update settings

This commit is contained in:
srgooglo 2022-05-13 20:12:18 +02:00
parent 10a316c64d
commit b579890c0c
4 changed files with 82 additions and 49 deletions

View File

@ -137,5 +137,13 @@ export default [
}
},
"debounced": true,
},
{
"id": "logout",
"footer": true,
"type": "Button",
"icon": "LogOut",
"title": "Logout",
"emitEvent": "logout",
}
]

View File

@ -136,53 +136,4 @@ export default [
}
}
},
{
"id": "reduceAnimations",
"storaged": true,
"group": "aspect",
"type": "Switch",
"icon": "MdOutlineAnimation",
"title": "Reduce animation",
"experimental": true
},
{
"experimental": true,
"id": "darkMode",
"storaged": true,
"group": "aspect",
"type": "Switch",
"icon": "Moon",
"title": "Dark mode",
"emitEvent": "theme.applyVariant",
"emissionValueUpdate": (value) => {
return value ? "dark" : "light"
},
},
{
"id": "primaryColor",
"storaged": true,
"group": "aspect",
"type": "SliderColorPicker",
"title": "Primary color",
"description": "Change primary color of the application.",
"emitEvent": "modifyTheme",
"reloadValueOnUpdateEvent": "resetTheme",
"emissionValueUpdate": (value) => {
return {
primaryColor: value
}
}
},
{
"id": "resetTheme",
"storaged": true,
"group": "aspect",
"type": "Button",
"title": "Reset theme",
"props": {
"children": "Default Theme"
},
"emitEvent": "resetTheme",
"noUpdate": true,
}
]

View File

@ -0,0 +1,53 @@
import React from "react"
export default [
{
"id": "reduceAnimations",
"storaged": true,
"group": "aspect",
"type": "Switch",
"icon": "MdOutlineAnimation",
"title": "Reduce animation",
"experimental": true
},
{
"experimental": true,
"id": "darkMode",
"storaged": true,
"group": "aspect",
"type": "Switch",
"icon": "Moon",
"title": "Dark mode",
"emitEvent": "theme.applyVariant",
"emissionValueUpdate": (value) => {
return value ? "dark" : "light"
},
},
{
"id": "primaryColor",
"storaged": true,
"group": "aspect",
"type": "SliderColorPicker",
"title": "Primary color",
"description": "Change primary color of the application.",
"emitEvent": "modifyTheme",
"reloadValueOnUpdateEvent": "resetTheme",
"emissionValueUpdate": (value) => {
return {
primaryColor: value
}
}
},
{
"id": "resetTheme",
"storaged": true,
"group": "aspect",
"type": "Button",
"title": "Reset theme",
"props": {
"children": "Default Theme"
},
"emitEvent": "resetTheme",
"noUpdate": true,
}
]

View File

@ -0,0 +1,21 @@
import AppSettings from "./app"
import AccountSettings from "./account"
import ApparenceSettings from "./apparence"
export default {
app: {
icon: "Command",
label: "App",
settings: AppSettings
},
account: {
icon: "User",
label: "Account",
settings: AccountSettings
},
apparence: {
icon: "Eye",
label: "Apparence",
settings: ApparenceSettings
},
}