diff --git a/packages/app/constants/defaultRemotesOrigins.json b/packages/app/constants/defaultRemotesOrigins.json new file mode 100644 index 00000000..301d987c --- /dev/null +++ b/packages/app/constants/defaultRemotesOrigins.json @@ -0,0 +1,4 @@ +{ + "http_api": "https://devapi_comty01.ragestudio.net", + "ws_api": "wss://devws_comty01.ragestudio.net" +} \ No newline at end of file diff --git a/packages/app/constants/defaultSettings.json b/packages/app/constants/defaultSettings.json index a71bbf62..ee155a82 100644 --- a/packages/app/constants/defaultSettings.json +++ b/packages/app/constants/defaultSettings.json @@ -1,3 +1,15 @@ { - "collapseOnLooseFocus": true + "forceMobileMode": false, + "notifications_sound": true, + "notifications_vibrate": true, + "notifications_sound_volume": 50, + "selection_longPress_timeout": 600, + "haptic_feedback": false, + "collapseOnLooseFocus": true, + "language": "es", + "sidebarKeys": [ + "main", + "explore", + "users" + ] } \ No newline at end of file diff --git a/packages/app/constants/defaultSidebar.json b/packages/app/constants/defaultSidebar.json deleted file mode 100644 index 6ae75ce2..00000000 --- a/packages/app/constants/defaultSidebar.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - "main", - "fabric", - "workloads", - "users", - "geo", - "vault", - "statistics", - "reports" -] \ No newline at end of file diff --git a/packages/app/constants/defaultSoundPack.json b/packages/app/constants/defaultSoundPack.json index abe76874..467a491d 100644 --- a/packages/app/constants/defaultSoundPack.json +++ b/packages/app/constants/defaultSoundPack.json @@ -1,3 +1,5 @@ { - "crash": "/sounds/crash.wav" + "crash": "/sounds/crash.wav", + "error": "/sounds/error.wav", + "notification": "/sounds/notification.wav" } \ No newline at end of file diff --git a/packages/app/constants/pathDecorators.json b/packages/app/constants/pathDecorators.json index 3162662e..665b6772 100644 --- a/packages/app/constants/pathDecorators.json +++ b/packages/app/constants/pathDecorators.json @@ -10,13 +10,5 @@ "users": { "icon": "Users", "title": "Users" - }, - "regions": { - "icon": "Globe", - "title": "Locations" - }, - "vault": { - "icon": "Archive", - "title": "Vault" } } \ No newline at end of file diff --git a/packages/app/constants/routes.json b/packages/app/constants/routes.json index 952d2a7a..beba3a32 100644 --- a/packages/app/constants/routes.json +++ b/packages/app/constants/routes.json @@ -6,23 +6,9 @@ "locked": true }, { - "id": "users", - "title": "Users", - "icon": "Users" - }, - { - "id": "server_manager", - "title": "Server", - "icon": "Database" - }, - { - "id": "launchpad", - "title": "Launchpad", - "icon": "Command" - }, - { - "id": "statistics", - "title": "Statistics", - "icon": "BarChart" + "id": "explore", + "title": "Explore", + "icon": "Compass", + "locked": true } ] \ No newline at end of file diff --git a/packages/app/constants/settings.jsx b/packages/app/constants/settings.jsx new file mode 100644 index 00000000..9be748a9 --- /dev/null +++ b/packages/app/constants/settings.jsx @@ -0,0 +1,145 @@ +import React from "react" +import config from "config" +import { Select } from "antd" + +export default [ + { + "id": "language", + "group": "general", + "type": "Select", + "icon": "MdTranslate", + "title": "Language", + "description": "Choose a language for the application", + "props": { + children: config.i18n.languages.map((language) => { + return {language.name} + }) + }, + "emitEvent": "changeLanguage" + }, + { + "id": "forceMobileMode", + "group": "general", + "type": "Switch", + "icon": "MdSmartphone", + "title": "Force Mobile Mode", + "description": "Force the application to run in mobile mode.", + "emitEvent": "forceMobileMode" + }, + { + "id": "haptic_feedback", + "group": "general", + "type": "Switch", + "icon": "MdVibration", + "title": "Haptic Feedback", + "description": "Enable haptic feedback on touch events.", + }, + { + "id": "selection_longPress_timeout", + "group": "general", + "type": "Slider", + "icon": "MdTimer", + "title": "Selection press delay", + "description": "Set the delay before the selection trigger is activated.", + "props": { + min: 300, + max: 2000, + step: 100, + marks: { + 300: "0.3s", + 600: "0.6s", + 1000: "1s", + 1500: "1.5s", + 2000: "2s", + } + } + }, + { + "id": "notifications_sound", + "group": "notifications", + "type": "Switch", + "icon": "MdVolumeUp", + "title": "Notifications Sound", + "description": "Play a sound when a notification is received.", + }, + { + "id": "notifications_vibrate", + "group": "notifications", + "type": "Switch", + "icon": "MdVibration", + "title": "Vibration", + "description": "Vibrate the device when a notification is received.", + "emitEvent": "changeNotificationsVibrate" + }, + { + "id": "notifications_sound_volume", + "group": "notifications", + "type": "Slider", + "icon": "MdVolumeUp", + "title": "Sound Volume", + "description": "Set the volume of the sound when a notification is received.", + "props": { + tipFormatter: (value) => { + return `${value}%` + } + }, + "emitEvent": "changeNotificationsSoundVolume" + }, + { + "id": "edit_sidebar", + "group": "sidebar", + "type": "Button", + "icon": "Edit", + "title": "Edit Sidebar", + "emitEvent": "edit_sidebar", + "noStorage": true + }, + { + "id": "collapseOnLooseFocus", + "group": "sidebar", + "type": "Switch", + "title": "Auto Collapse", + "description": "Collapse the sidebar when loose focus", + }, + { + "id": "reduceAnimations", + "group": "aspect", + "type": "Switch", + "icon": "MdOutlineAnimation", + "title": "Reduce animation", + "experimental": true + }, + { + "id": "darkMode", + "group": "aspect", + "type": "Switch", + "icon": "Moon", + "title": "Dark mode", + "emitEvent": "darkMode", + "experimental": true + }, + { + "id": "primaryColor", + "group": "aspect", + "type": "SliderColorPicker", + "title": "Primary color", + "description": "Change primary color of the application.", + "emitEvent": "modifyTheme", + "emissionValueUpdate": (value) => { + return { + primaryColor: value + } + } + }, + { + "id": "resetTheme", + "group": "aspect", + "type": "Button", + "title": "Reset theme", + "props": { + "children": "Default Theme" + }, + "emitEvent": "resetTheme", + "noStorage": true + } +] \ No newline at end of file diff --git a/packages/app/constants/settingsGroupsDecorator.json b/packages/app/constants/settingsGroupsDecorator.json index 41717d1a..33d706d9 100644 --- a/packages/app/constants/settingsGroupsDecorator.json +++ b/packages/app/constants/settingsGroupsDecorator.json @@ -3,6 +3,10 @@ "title": "General", "icon": "Settings" }, + "notifications": { + "title": "Notifications", + "icon": "Bell" + }, "sidebar": { "title": "Sidebar", "icon": "Layout" diff --git a/packages/app/constants/settingsList.json b/packages/app/constants/settingsList.json deleted file mode 100644 index 44893c78..00000000 --- a/packages/app/constants/settingsList.json +++ /dev/null @@ -1,81 +0,0 @@ -[ - { - "id": "persistent_session", - "group": "general", - "type": "Switch", - "icon": "Key", - "title": "Save Session", - "title_i18n": "settings_general_persitentSession", - "description": "The application will save the session and no expire it.", - "description_i18n": "settings_general_persitentSession_description" - }, - { - "id": "language", - "group": "general", - "type": "Select", - "icon": "MdTranslate", - "title": "Language", - "title_i18n": "settings_general_language" - }, - { - "id": "edit_sidebar", - "group": "sidebar", - "type": "Button", - "icon": "Edit", - "title": "Edit Sidebar", - "title_i18n": "settings_sidebar_edit", - "emitEvent": "edit_sidebar", - "noStorage": true - }, - { - "id": "collapseOnLooseFocus", - "group": "sidebar", - "type": "Switch", - "title": "Auto Collapse", - "description": "Collapse the sidebar when loose focus", - "title_i18n": "settings_sidebar_autoCollapse", - "description_i18n": "settings_sidebar_autoCollapse_description" - }, - { - "id": "reduceAnimations", - "group": "aspect", - "type": "Switch", - "icon": "MdOutlineAnimation", - "title": "Reduce animation", - "title_i18n": "settings_aspect_reduceAnimation", - "experimental": true - }, - { - "id": "darkMode", - "group": "aspect", - "type": "Switch", - "icon": "Moon", - "title": "Dark Mode", - "title_i18n": "settings_aspect_darkMode", - "emitEvent": "darkMode", - "experimental": true - }, - { - "id": "primaryColor", - "group": "aspect", - "type": "SliderColorPicker", - "title": "Primary color", - "description": "Change primary color of the application.", - "title_i18n": "settings_aspect_primaryColor", - "description_i18n": "settings_aspect_primaryColor_description", - "emitEvent": "modifyTheme", - "updateValueKey": "primaryColor" - }, - { - "id": "resetTheme", - "group": "aspect", - "type": "Button", - "title": "Reset theme", - "title_i18n": "settings_aspect_resetTheme", - "props": { - "children": "Default Theme" - }, - "emitEvent": "resetTheme", - "noStorage": true - } -] \ No newline at end of file