meetqy 1 éve
szülő
commit
5d45bfbfe1

+ 6 - 5
src/UI/Settings/UIWindowSettings.js

@@ -131,11 +131,11 @@ async function UIWindowSettings(options){
                 h += `<div class="settings-content" data-settings="clock">`;
                      h += `<h1>Clock</h1>`;
                      h += `<div style="display: flex;align-items: center">`
-                        h += `<span>Visable:</span>`
-                        h += `<Select class="change-clock-visable" style="margin-left: 10px">`
-                            h += `<option value="auto">Auto - Default, visible only in full-screen mode.</option>`
-                            h += `<option value="hide">Hide - Always visible</option>`
-                            h += `<option value="show">Show - Always hidden</option>`
+                        h += `<span>${i18n('click_visable')}:</span>`
+                        h += `<Select class="change-clock-visable" style="margin-left: 10px;flex: 1">`
+                            h += `<option value="auto" selected="${window.user_preferences.clock_visable === 'auto'}">${i18n('click_visable_auto')}</option>`
+                            h += `<option value="hide" selected="${window.user_preferences.clock_visable === 'hide'}">${i18n('click_visable_hide')}</option>`
+                            h += `<option value="show" selected="${window.user_preferences.clock_visable === 'show'}">${i18n('click_visable_show')}</option>`
                         h += `</Select>`
                      h += `</div>`
                 h += `</div>`;      
@@ -364,6 +364,7 @@ async function UIWindowSettings(options){
             value === 'show' && $('#clock').show();
             value === 'hide' && $('#clock').hide();
 
+            // save clock_visable to user preferences
             window.mutate_user_preferences({
                 clock_visable: value
             });

+ 4 - 0
src/i18n/translations/en.js

@@ -61,6 +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.',
         date_modified: 'Date modified',
         delete: 'Delete',
         delete_account: "Delete Account",

+ 5 - 0
src/i18n/translations/zh.js

@@ -50,6 +50,11 @@ const zh = {
         create_shortcut: "创建快捷方式",
         current_password: "当前密码",
         cut: '剪切',
+        clock: "时间",
+        click_visable: '显示方式',
+        click_visable_hide: '隐藏 - 始终隐藏',
+        click_visable_show: '显示 - 始终显示',
+        click_visable_auto: '自动 - 默认值,全屏显示',
         date_modified: '修改日期',
         delete: '删除',
         delete_permanently: "永久删除",