From b579890c0cdc639eedc1efbb3fc0823caf5681ec Mon Sep 17 00:00:00 2001 From: srgooglo Date: Fri, 13 May 2022 20:12:18 +0200 Subject: [PATCH] update settings --- packages/app/constants/settings/account.jsx | 8 +++ packages/app/constants/settings/app.jsx | 49 ----------------- packages/app/constants/settings/apparence.jsx | 53 +++++++++++++++++++ packages/app/constants/settings/index.js | 21 ++++++++ 4 files changed, 82 insertions(+), 49 deletions(-) create mode 100644 packages/app/constants/settings/apparence.jsx create mode 100644 packages/app/constants/settings/index.js diff --git a/packages/app/constants/settings/account.jsx b/packages/app/constants/settings/account.jsx index 31b89140..9e57bb71 100644 --- a/packages/app/constants/settings/account.jsx +++ b/packages/app/constants/settings/account.jsx @@ -137,5 +137,13 @@ export default [ } }, "debounced": true, + }, + { + "id": "logout", + "footer": true, + "type": "Button", + "icon": "LogOut", + "title": "Logout", + "emitEvent": "logout", } ] \ No newline at end of file diff --git a/packages/app/constants/settings/app.jsx b/packages/app/constants/settings/app.jsx index 8945a54f..d3af1c8f 100644 --- a/packages/app/constants/settings/app.jsx +++ b/packages/app/constants/settings/app.jsx @@ -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, - } ] \ No newline at end of file diff --git a/packages/app/constants/settings/apparence.jsx b/packages/app/constants/settings/apparence.jsx new file mode 100644 index 00000000..310ba6f3 --- /dev/null +++ b/packages/app/constants/settings/apparence.jsx @@ -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, + } +] \ No newline at end of file diff --git a/packages/app/constants/settings/index.js b/packages/app/constants/settings/index.js new file mode 100644 index 00000000..2a444a5e --- /dev/null +++ b/packages/app/constants/settings/index.js @@ -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 + }, +} \ No newline at end of file