mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-23 14:20:22 +08:00
Going to /settings
will open the Settings in full page mode
This commit is contained in:
parent
c6bc42f551
commit
6f702c3927
@ -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/', '');
|
||||
|
@ -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) => {
|
||||
|
@ -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
|
||||
// ---------------------------------------------
|
||||
|
@ -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;
|
||||
|
@ -80,7 +80,6 @@ window.gui = async function(options){
|
||||
|
||||
// 🚀 Launch the GUI 🚀
|
||||
window.initgui(options);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user