This commit is contained in:
cupcakearmy 2021-04-06 16:41:13 +02:00
parent a8c119d3ff
commit c7e7b7cbd6
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9
7 changed files with 62 additions and 919 deletions

View File

@ -41,7 +41,6 @@
"dayjs": "^1.10.4",
"electron-log": "^4.3.2",
"electron-store": "^7.0.2",
"hiq": "^4.1.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"spectre.css": "^0.5.9",

View File

@ -63,7 +63,7 @@ export default class Settings {
if (this.win) return
this.win = new BrowserWindow({
width: 400,
height: 485,
height: 575,
center: true,
resizable: false,
webPreferences: {
@ -75,7 +75,7 @@ export default class Settings {
const entry = join(__dirname, '../front/settings/index.html')
Settings.win.loadFile(entry)
if (DEV) {
if (DEV && false) {
Settings.win.setSize(800, 485)
Settings.win.setResizable(true)
Settings.win.webContents.openDevTools()

View File

@ -1,21 +1,6 @@
import React, { useCallback } from 'react'
import { shell } from 'electron'
const Link: React.FC<{ text: string; link: string }> = ({ text, link }) => {
const fn = useCallback(
(e: any) => {
e.preventDefault()
shell.openExternal(link)
},
[link]
)
return (
<a onClick={fn} href={link}>
{' '}
{text}{' '}
</a>
)
}
import Link from './ExternalLink'
const About: React.FC = () => {
return (

View File

@ -0,0 +1,20 @@
import React, { useCallback } from 'react'
import { shell } from 'electron'
const ExternalLink: React.FC<{ text: string; link: string }> = ({ text, link }) => {
const fn = useCallback(
(e: any) => {
e.preventDefault()
shell.openExternal(link)
},
[link]
)
return (
<a onClick={fn} href={link}>
{' '}
{text}{' '}
</a>
)
}
export default ExternalLink

View File

@ -1,10 +1,19 @@
import React from 'react'
import { version } from '../../../package.json'
import Link from './ExternalLink'
const Footer: React.FC = () => {
return (
<div className="tc mt4 f6 o-40">
<span className="code">version: {version}</span>
<div className="tc mt4 f6">
<div className="flex justify-center items-center">
<Link link="https://github.com/cupcakearmy" text="Github" />
<div className="ph1"> - </div>
<Link link="https://nicco.io/support" text="Support" />
</div>
<div className="code o-20 mt1">
<small>version: {version}</small>
</div>
</div>
)
}

View File

@ -8,7 +8,7 @@ import Field from './Field'
const Settings = () => {
return (
<div>
<h3 className="ma0 mb2">Settings</h3>
<h3 className="ma0 mv3">Settings</h3>
<form>
<fieldset className="ma0 pa0">
<Field setting="every" />

924
yarn.lock

File diff suppressed because it is too large Load Diff