From 0271950b783c4cf1a243d4df6808bce618f12760 Mon Sep 17 00:00:00 2001 From: meetqy Date: Thu, 28 Mar 2024 10:44:52 +0800 Subject: [PATCH] clock page --- src/UI/Settings/UIWindowSettings.js | 44 ++++++++++++++++++++++++++++- src/i18n/translations/en.js | 1 + src/icons/clock.svg | 1 + 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/icons/clock.svg diff --git a/src/UI/Settings/UIWindowSettings.js b/src/UI/Settings/UIWindowSettings.js index 616d2e5f..7da37353 100644 --- a/src/UI/Settings/UIWindowSettings.js +++ b/src/UI/Settings/UIWindowSettings.js @@ -40,6 +40,7 @@ async function UIWindowSettings(options){ h += `
${i18n('usage')}
`; h += `
${i18n('account')}
`; h += `
${i18n('language')}
`; + h += `
${i18n('clock')}
`; h += ``; // content @@ -124,9 +125,21 @@ async function UIWindowSettings(options){ h += `
${lang.name}
`; } h += ``; - h += ``; + // Clock + h += `
`; + h += `

Clock

`; + h += `
` + h += `Visable:` + h += `` + h += `
` + h += `
`; + h += ``; h += ``; h += ``; @@ -344,6 +357,35 @@ async function UIWindowSettings(options){ }) }); + $(el_window).on('change', 'select.change-clock-visable', function(e){ + const $this = $(this); + const value = $this.val(); + console.log(value); + // $.ajax({ + // url: api_origin + "/clock", + // type: 'POST', + // async: true, + // headers: { + // "Authorization": "Bearer "+auth_token + // }, + // contentType: "application/json", + // data: value, + // // data: JSON.stringify({ + // // old_pass: current_password, + // // new_pass: new_password, + // // }), + // success: function (data){ + // // $(el_window).find('.form-success-msg').html(i18n('password_changed')); + // // $(el_window).find('.form-success-msg').fadeIn(); + // // $(el_window).find('input').val(''); + // }, + // error: function (err){ + // // $(el_window).find('.form-error-msg').html(err.responseText); + // // $(el_window).find('.form-error-msg').fadeIn(); + // } + // }); + }) + resolve(el_window); }); } diff --git a/src/i18n/translations/en.js b/src/i18n/translations/en.js index 832ccd72..4980a140 100644 --- a/src/i18n/translations/en.js +++ b/src/i18n/translations/en.js @@ -60,6 +60,7 @@ const en = { credits: "Credits", current_password: "Current Password", cut: 'Cut', + clock: "Clock", date_modified: 'Date modified', delete: 'Delete', delete_account: "Delete Account", diff --git a/src/icons/clock.svg b/src/icons/clock.svg new file mode 100644 index 00000000..52c39737 --- /dev/null +++ b/src/icons/clock.svg @@ -0,0 +1 @@ + \ No newline at end of file