diff --git a/src/backend/src/routers/_default.js b/src/backend/src/routers/_default.js index c5b4d277..fe45f4cd 100644 --- a/src/backend/src/routers/_default.js +++ b/src/backend/src/routers/_default.js @@ -307,6 +307,10 @@ router.all('*', async function(req, res, next) { if(path.startsWith('/action/') || path.startsWith('/@')){ path = '/'; } + // /settings + else if(path.startsWith('/settings')){ + path = '/'; + } // /app/ else if(path.startsWith('/app/')){ app_name = path.replace('/app/', ''); diff --git a/src/gui/src/UI/Settings/UIWindowSettings.js b/src/gui/src/UI/Settings/UIWindowSettings.js index fe80bf57..5f6efca1 100644 --- a/src/gui/src/UI/Settings/UIWindowSettings.js +++ b/src/gui/src/UI/Settings/UIWindowSettings.js @@ -34,7 +34,7 @@ async function UIWindowSettings(options){ h += `
`; h += `
`; // sidebar toggle - h += ``; + h += ``; // sidebar h += `
`; // sidebar items @@ -93,7 +93,8 @@ async function UIWindowSettings(options){ width: 'initial', height: '100%', overflow: 'auto' - } + }, + ...options?.window_options??{} }); const $el_window = $(el_window); tabs.forEach((tab, i) => { diff --git a/src/gui/src/UI/UIDesktop.js b/src/gui/src/UI/UIDesktop.js index 7729701a..590b69d7 100644 --- a/src/gui/src/UI/UIDesktop.js +++ b/src/gui/src/UI/UIDesktop.js @@ -1064,7 +1064,17 @@ async function UIDesktop(options){ window.app_query_params[key] = value; } } - + //-------------------------------------------------------------------------------------- + // /settings will open settings in fullpage mode + //-------------------------------------------------------------------------------------- + else if(window.url_paths[0]?.toLocaleLowerCase() === 'settings'){ + // open settings + UIWindowSettings({ + window_options:{ + is_fullpage: true, + } + }); + } // --------------------------------------------- // Run apps from insta-login URL // --------------------------------------------- diff --git a/src/gui/src/css/style.css b/src/gui/src/css/style.css index 129a7ac4..846633e2 100644 --- a/src/gui/src/css/style.css +++ b/src/gui/src/css/style.css @@ -3599,6 +3599,7 @@ fieldset[name=number-code] { flex-direction: row; -webkit-font-smoothing: antialiased; flex-grow: 1; + position: relative; } .settings-sidebar { @@ -3639,6 +3640,8 @@ fieldset[name=number-code] { .settings-content { display: none; + max-width: 800px; + margin: auto; } .settings-content[data-settings="about"] { @@ -4134,13 +4137,13 @@ fieldset[name=number-code] { } .sidebar-toggle{ - position: fixed; + position: absolute; z-index: 9999999999; - top: 32px; left: 2px; border: 0; padding-top: 5px; padding-bottom: 5px; + top: 3px; } .sidebar-toggle .sidebar-toggle-button { height: 20px; diff --git a/src/gui/src/index.js b/src/gui/src/index.js index 0ea9b609..6d88c7dc 100644 --- a/src/gui/src/index.js +++ b/src/gui/src/index.js @@ -80,7 +80,6 @@ window.gui = async function(options){ // 🚀 Launch the GUI 🚀 window.initgui(options); - } /** diff --git a/src/gui/src/services/SettingsService.js b/src/gui/src/services/SettingsService.js index 0a743949..b016bc85 100644 --- a/src/gui/src/services/SettingsService.js +++ b/src/gui/src/services/SettingsService.js @@ -30,13 +30,13 @@ export class SettingsService extends Service { #tabs = []; async _init () { ;[ - AboutTab, UsageTab, AccountTab, SecurityTab, PersonalizationTab, LanguageTag, ClockTab, + AboutTab, ].forEach(tab => { this.register_tab(tab); });