diff --git a/src/UI/Settings/UIWindowSettings.js b/src/UI/Settings/UIWindowSettings.js index ee74d75f..7fc6579e 100644 --- a/src/UI/Settings/UIWindowSettings.js +++ b/src/UI/Settings/UIWindowSettings.js @@ -131,11 +131,11 @@ async function UIWindowSettings(options){ h += `
`; h += `

Clock

`; h += `
` - h += `${i18n('click_visable')}:` - h += `` + h += `` + h += `` + h += `` h += `` h += `
` h += `
`; @@ -357,14 +357,14 @@ async function UIWindowSettings(options){ }) }); - $(el_window).on('change', 'select.change-clock-visable', function(e){ + $(el_window).on('change', 'select.change-clock-visible', function(e){ const $this = $(this); const value = $this.val(); - window.change_clock_visable(value); + window.change_clock_visible(value); }) - window.change_clock_visable(); + window.change_clock_visible(); resolve(el_window); }); diff --git a/src/UI/UIDesktop.js b/src/UI/UIDesktop.js index 1b3724b3..a351cc0e 100644 --- a/src/UI/UIDesktop.js +++ b/src/UI/UIDesktop.js @@ -505,7 +505,7 @@ async function UIDesktop(options){ const user_preferences = { show_hidden_files: JSON.parse(await puter.kv.get('user_preferences.show_hidden_files')), language: await puter.kv.get('user_preferences.language'), - clock_visable: await puter.kv.get('user_preferences.clock_visable'), + clock_visible: await puter.kv.get('user_preferences.clock_visible'), }; // update default apps @@ -1383,11 +1383,11 @@ document.addEventListener('fullscreenchange', (event) => { if (document.fullscreenElement) { $('.fullscreen-btn').css('background-image', `url(${window.icons['shrink.svg']})`); $('.fullscreen-btn').attr('title', 'Exit Full Screen'); - window.user_preferences.clock_visable === 'auto' && $('#clock').show(); + window.user_preferences.clock_visible === 'auto' && $('#clock').show(); } else { $('.fullscreen-btn').css('background-image', `url(${window.icons['fullscreen.svg']})`); $('.fullscreen-btn').attr('title', 'Enter Full Screen'); - window.user_preferences.clock_visable === 'auto' && $('#clock').hide(); + window.user_preferences.clock_visible === 'auto' && $('#clock').hide(); } }) diff --git a/src/UI/UITaskbar.js b/src/UI/UITaskbar.js index 5d00082c..43b7a603 100644 --- a/src/UI/UITaskbar.js +++ b/src/UI/UITaskbar.js @@ -46,7 +46,7 @@ async function UITaskbar(options){ $('.desktop').append(h); // init clock visibility - window.change_clock_visable(); + window.change_clock_visible(); //--------------------------------------------- // add `Start` to taskbar diff --git a/src/globals.js b/src/globals.js index 607282e6..5d91c0af 100644 --- a/src/globals.js +++ b/src/globals.js @@ -97,7 +97,7 @@ if (window.user_preferences === null) { window.user_preferences = { show_hidden_files: false, language: navigator.language.split("-")[0] || navigator.userLanguage || 'en', - clock_visable: 'auto', + clock_visible: 'auto', } } diff --git a/src/helpers.js b/src/helpers.js index 25b7f550..dd887414 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -3680,21 +3680,21 @@ window.delete_desktop_item_positions = ()=>{ puter.kv.del('desktop_item_positions'); } -window.change_clock_visable = (clock_visable) => { - let newValue = clock_visable || window.user_preferences.clock_visable; +window.change_clock_visible = (clock_visible) => { + let newValue = clock_visible || window.user_preferences.clock_visible; newValue === 'show' && $('#clock').show(); newValue === 'hide' && $('#clock').hide(); - if(clock_visable) { - // save clock_visable to user preferences + if(clock_visible) { + // save clock_visible to user preferences window.mutate_user_preferences({ - clock_visable: newValue + clock_visible: newValue }); return; } - $('select.change-clock-visable').val(window.user_preferences.clock_visable); + $('select.change-clock-visible').val(window.user_preferences.clock_visible); } \ No newline at end of file diff --git a/src/i18n/translations/en.js b/src/i18n/translations/en.js index a72e570d..0070912c 100644 --- a/src/i18n/translations/en.js +++ b/src/i18n/translations/en.js @@ -61,10 +61,10 @@ const en = { current_password: "Current Password", cut: 'Cut', clock: "Clock", - click_visable: 'Visible', - click_visable_hide: 'Hide - Always hidden', - click_visable_show: 'Show - Always visible', - click_visable_auto: 'Auto - Default, visible only in full-screen mode.', + click_visible: 'Visible', + click_visible_hide: 'Hide - Always hidden', + click_visible_show: 'Show - Always visible', + click_visible_auto: 'Auto - Default, visible only in full-screen mode.', date_modified: 'Date modified', delete: 'Delete', delete_account: "Delete Account", diff --git a/src/i18n/translations/zh.js b/src/i18n/translations/zh.js index 9440c60b..bd2827d8 100644 --- a/src/i18n/translations/zh.js +++ b/src/i18n/translations/zh.js @@ -51,10 +51,10 @@ const zh = { current_password: "当前密码", cut: '剪切', clock: "时间", - click_visable: '显示方式', - click_visable_hide: '隐藏 - 始终隐藏', - click_visable_show: '显示 - 始终显示', - click_visable_auto: '自动 - 默认值,全屏显示', + click_visible: '显示方式', + click_visible_hide: '隐藏 - 始终隐藏', + click_visible_show: '显示 - 始终显示', + click_visible_auto: '自动 - 默认值,全屏显示', date_modified: '修改日期', delete: '删除', delete_permanently: "永久删除",