update settings list

This commit is contained in:
SrGooglo 2024-01-27 15:40:01 +01:00
parent 782cbc1093
commit c01a77ab0f
4 changed files with 77 additions and 40 deletions

View File

@ -1,4 +0,0 @@
node_modules
dist
out
.gitignore

View File

@ -1,9 +0,0 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'@electron-toolkit',
'@electron-toolkit/eslint-config-prettier'
]
}

View File

@ -1,4 +1,4 @@
singleQuote: true
singleQuote: false
semi: false
printWidth: 100
trailingComma: none

View File

@ -1,9 +1,14 @@
import { Button } from "antd"
export default [
{
id: "services",
name: "Services",
icon: "MdAccountTree",
children: [
{
id: "drive_auth",
name: "Google Drive Authorize",
name: "Google Drive",
description: "Authorize your Google Drive account to be used for bundles installation.",
icon: "SiGoogledrive",
type: "button",
@ -13,7 +18,8 @@ export default [
return await api.settings.get("drive_auth")
},
render: (props) => {
return <Button
return (
<Button
type={props.value ? "primary" : "default"}
onClick={() => {
if (!props.value) {
@ -25,12 +31,18 @@ export default [
return ipc.exec("drive:unauthorize")
}}
>
{
props.value ? "Unauthorize" : "Authorize"
}
{props.value ? "Unauthorize" : "Authorize"}
</Button>
)
}
}
]
},
{
id: "updates",
name: "Updates",
icon: "MdUpdate",
children: [
{
id: "check_update",
name: "Check for updates",
@ -55,4 +67,42 @@ export default [
storaged: true,
defaultValue: false
}
]
},
{
id: "other",
name: "Other",
icon: "MdSettings",
children: [
{
id: "open_settings_path",
name: "Open settings path",
description: "Open the folder where all packages are stored.",
icon: "MdFolder",
type: "button",
type: "button",
props: {
children: "Open",
onClick: () => {
ipc.send("open-runtime-path")
}
},
storaged: false
},
{
id: "open_dev_logs",
name: "Open internal logs",
description: "Open the internal logs of the app.",
icon: "MdTerminal",
type: "button",
props: {
children: "Open",
onClick: () => {
ipc.send("open-dev-logs")
}
},
storaged: false
}
]
}
]