diff --git a/src/gui/src/UI/UIDesktop.js b/src/gui/src/UI/UIDesktop.js index f74b7631..4239d53b 100644 --- a/src/gui/src/UI/UIDesktop.js +++ b/src/gui/src/UI/UIDesktop.js @@ -70,21 +70,10 @@ async function UIDesktop(options) { // Load the toolbar auto-hide preference let toolbar_auto_hide_enabled_val = await puter.kv.get('toolbar_auto_hide_enabled'); - console.log('toolbar_auto_hide_enabled_val', toolbar_auto_hide_enabled_val); if(toolbar_auto_hide_enabled_val === 'false' || toolbar_auto_hide_enabled_val === false){ window.toolbar_auto_hide_enabled = false; } - // If auto-hide is disabled, ensure toolbar is visible on load - if (!window.toolbar_auto_hide_enabled) { - // Make sure toolbar is visible when auto-hide is disabled - setTimeout(() => { - if ($('.toolbar').hasClass('toolbar-hidden')) { - window.show_toolbar(); - } - }, 100); // Small delay to ensure DOM is ready - } - // Modify the hide/show functions to use CSS rules that will apply to all icons, including future ones window.hideDesktopIcons = function () { // Add a CSS class to the desktop container that will hide all child icons @@ -1155,7 +1144,6 @@ async function UIDesktop(options) { // logo ht += ``; - // clock spacer ht += `
`; @@ -1188,7 +1176,6 @@ async function UIDesktop(options) { // search button ht += `
`; - //clock ht += `
12:00 AM Sun, Jan 01
`; @@ -1201,6 +1188,15 @@ async function UIDesktop(options) { // prepend toolbar to desktop $(ht).insertBefore(el_desktop); + // If auto-hide is disabled, ensure toolbar is visible on load + if (!window.toolbar_auto_hide_enabled) { + // Make sure toolbar is visible when auto-hide is disabled + setTimeout(() => { + if ($('.toolbar').hasClass('toolbar-hidden')) { + window.show_toolbar(); + } + }, 100); // Small delay to ensure DOM is ready + } // send event window.dispatchEvent(new CustomEvent('toolbar:ready'));