Going to /settings will open the Settings in full page mode

This commit is contained in:
jelveh 2024-10-22 16:46:06 -07:00
parent c6bc42f551
commit 6f702c3927
6 changed files with 24 additions and 7 deletions

View File

@ -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/', '');

View File

@ -34,7 +34,7 @@ async function UIWindowSettings(options){
h += `<div class="settings-container">`;
h += `<div class="settings">`;
// sidebar toggle
h += `<button class="sidebar-toggle hidden-lg hidden-xl"><div class="sidebar-toggle-button"><span></span><span></span><span></span></div></button>`;
h += `<button class="sidebar-toggle hidden-lg hidden-xl hidden-md"><div class="sidebar-toggle-button"><span></span><span></span><span></span></div></button>`;
// sidebar
h += `<div class="settings-sidebar disable-user-select disable-context-menu">`;
// 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) => {

View File

@ -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
// ---------------------------------------------

View File

@ -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;

View File

@ -80,7 +80,6 @@ window.gui = async function(options){
// 🚀 Launch the GUI 🚀
window.initgui(options);
}
/**

View File

@ -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);
});