From 665c263c03936c063a3528047aa33001ce42801e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Bratovi=C4=87?= Date: Tue, 2 Nov 2021 11:51:45 +0100 Subject: [PATCH 01/27] Add db migrations for new basic auth fields --- db/patch-monitor-basicauth.sql | 10 ++++++++++ server/database.js | 1 + 2 files changed, 11 insertions(+) create mode 100644 db/patch-monitor-basicauth.sql diff --git a/db/patch-monitor-basicauth.sql b/db/patch-monitor-basicauth.sql new file mode 100644 index 000000000..3a33350d7 --- /dev/null +++ b/db/patch-monitor-basicauth.sql @@ -0,0 +1,10 @@ +-- You should not modify if this have pushed to Github, unless it does serious wrong with the db. +BEGIN TRANSACTION; + +ALTER TABLE monitor + ADD basicauth_user TEXT default null; + +ALTER TABLE monitor + ADD basicauth_pass TEXT default null; + +COMMIT; diff --git a/server/database.js b/server/database.js index 41d91e858..cc7247f1c 100644 --- a/server/database.js +++ b/server/database.js @@ -52,6 +52,7 @@ class Database { "patch-http-monitor-method-body-and-headers.sql": true, "patch-2fa-invalidate-used-token.sql": true, "patch-notification_sent_history.sql": true, + "patch-monitor-basicauth.sql": true, } /** From 23736549f90eb86afcca919e99e06abfe66c3105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Bratovi=C4=87?= Date: Tue, 2 Nov 2021 12:30:44 +0100 Subject: [PATCH 02/27] Implement HTTP basic auth feature --- server/model/monitor.js | 20 ++++++++++++++++++++ server/server.js | 4 ++++ src/pages/EditMonitor.vue | 10 ++++++++++ 3 files changed, 34 insertions(+) diff --git a/server/model/monitor.js b/server/model/monitor.js index fc3292317..c80e941e9 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -58,6 +58,8 @@ class Monitor extends BeanModel { method: this.method, body: this.body, headers: this.headers, + basicauth_user: this.basicauth_user, + basicauth_pass: this.basicauth_pass, hostname: this.hostname, port: this.port, maxretries: this.maxretries, @@ -80,6 +82,15 @@ class Monitor extends BeanModel { }; } + /** + * Encode user and password to Base64 encoding + * for HTTP "basic" auth, as per RFC-7617 + * @returns {string} + */ + encodeB64(user, pass) { + return btoa(user + ":" + pass); + } + /** * Parse to boolean * @returns {boolean} @@ -141,6 +152,14 @@ class Monitor extends BeanModel { // Do not do any queries/high loading things before the "bean.ping" let startTime = dayjs().valueOf(); + // HTTP basic auth + let basicauthHeader = {}; + if (this.basicauth_user) { + basicauthHeader = { + "Authorization": "Basic " + this.encodeB64(this.basicauth_user, this.basicauth_pass) + } + } + const options = { url: this.url, method: (this.method || "get").toLowerCase(), @@ -150,6 +169,7 @@ class Monitor extends BeanModel { "Accept": "*/*", "User-Agent": "Uptime-Kuma/" + version, ...(this.headers ? JSON.parse(this.headers) : {}), + ...(basicauthHeader) }, httpsAgent: new https.Agent({ maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940) diff --git a/server/server.js b/server/server.js index d1fd7ff29..76d456c54 100644 --- a/server/server.js +++ b/server/server.js @@ -575,6 +575,8 @@ exports.entryPage = "dashboard"; bean.method = monitor.method; bean.body = monitor.body; bean.headers = monitor.headers; + bean.basicauth_user = monitor.basicauth_user; + bean.basicauth_pass = monitor.basicauth_pass; bean.interval = monitor.interval; bean.retryInterval = monitor.retryInterval; bean.hostname = monitor.hostname; @@ -1139,6 +1141,8 @@ exports.entryPage = "dashboard"; method: monitorListData[i].method || "GET", body: monitorListData[i].body, headers: monitorListData[i].headers, + basicauth_user: monitorListData[i].basicauth_user, + basicauth_pass: monitorListData[i].basicauth_pass, interval: monitorListData[i].interval, retryInterval: retryInterval, hostname: monitorListData[i].hostname, diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 65c3dad6e..18954968a 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -265,6 +265,15 @@ + + +

{{ $t("HTTP Basic Auth") }}

+
+ + + + +
@@ -487,6 +496,7 @@ export default { this.monitor.headers = JSON.stringify(JSON.parse(this.monitor.headers), null, 4); } + if (this.isAdd) { this.$root.add(this.monitor, async (res) => { From 0dcb7aed21fe9d63ffbdc6c866e0d4cd4485b6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Bratovi=C4=87?= Date: Tue, 2 Nov 2021 13:11:33 +0100 Subject: [PATCH 03/27] Delinting --- server/model/monitor.js | 6 +++--- src/pages/EditMonitor.vue | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index c80e941e9..95ef39336 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -87,9 +87,9 @@ class Monitor extends BeanModel { * for HTTP "basic" auth, as per RFC-7617 * @returns {string} */ - encodeB64(user, pass) { + encodeB64(user, pass) { return btoa(user + ":" + pass); - } + } /** * Parse to boolean @@ -157,7 +157,7 @@ class Monitor extends BeanModel { if (this.basicauth_user) { basicauthHeader = { "Authorization": "Basic " + this.encodeB64(this.basicauth_user, this.basicauth_pass) - } + }; } const options = { diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 18954968a..f5099aa3a 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -266,7 +266,7 @@ - +

{{ $t("HTTP Basic Auth") }}

@@ -496,7 +496,6 @@ export default { this.monitor.headers = JSON.stringify(JSON.parse(this.monitor.headers), null, 4); } - if (this.isAdd) { this.$root.add(this.monitor, async (res) => { From 179ca232bc85d6a7a0bbedc05d10be5f6e6a003e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Bratovi=C4=87?= Date: Thu, 4 Nov 2021 10:12:06 +0100 Subject: [PATCH 04/27] Minor refactor - change variable names and add commas to object definitions --- ...-basicauth.sql => patch-monitor-basic-auth.sql} | 4 ++-- server/database.js | 2 +- server/model/monitor.js | 14 +++++++------- server/server.js | 8 ++++---- src/pages/EditMonitor.vue | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) rename db/{patch-monitor-basicauth.sql => patch-monitor-basic-auth.sql} (66%) diff --git a/db/patch-monitor-basicauth.sql b/db/patch-monitor-basic-auth.sql similarity index 66% rename from db/patch-monitor-basicauth.sql rename to db/patch-monitor-basic-auth.sql index 3a33350d7..de4bdefd9 100644 --- a/db/patch-monitor-basicauth.sql +++ b/db/patch-monitor-basic-auth.sql @@ -2,9 +2,9 @@ BEGIN TRANSACTION; ALTER TABLE monitor - ADD basicauth_user TEXT default null; + ADD basic_auth_user TEXT default null; ALTER TABLE monitor - ADD basicauth_pass TEXT default null; + ADD basic_auth_pass TEXT default null; COMMIT; diff --git a/server/database.js b/server/database.js index cc7247f1c..dfc739e0a 100644 --- a/server/database.js +++ b/server/database.js @@ -52,7 +52,7 @@ class Database { "patch-http-monitor-method-body-and-headers.sql": true, "patch-2fa-invalidate-used-token.sql": true, "patch-notification_sent_history.sql": true, - "patch-monitor-basicauth.sql": true, + "patch-monitor-basic-auth.sql": true, } /** diff --git a/server/model/monitor.js b/server/model/monitor.js index 95ef39336..f3c823c3b 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -58,8 +58,8 @@ class Monitor extends BeanModel { method: this.method, body: this.body, headers: this.headers, - basicauth_user: this.basicauth_user, - basicauth_pass: this.basicauth_pass, + basic_auth_user: this.basic_auth_user, + basic_auth_pass: this.basic_auth_pass, hostname: this.hostname, port: this.port, maxretries: this.maxretries, @@ -153,10 +153,10 @@ class Monitor extends BeanModel { let startTime = dayjs().valueOf(); // HTTP basic auth - let basicauthHeader = {}; - if (this.basicauth_user) { - basicauthHeader = { - "Authorization": "Basic " + this.encodeB64(this.basicauth_user, this.basicauth_pass) + let basicAuthHeader = {}; + if (this.basic_auth_user) { + basicAuthHeader = { + "Authorization": "Basic " + this.encodeB64(this.basic_auth_user, this.basic_auth_pass), }; } @@ -169,7 +169,7 @@ class Monitor extends BeanModel { "Accept": "*/*", "User-Agent": "Uptime-Kuma/" + version, ...(this.headers ? JSON.parse(this.headers) : {}), - ...(basicauthHeader) + ...(basicAuthHeader), }, httpsAgent: new https.Agent({ maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940) diff --git a/server/server.js b/server/server.js index 76d456c54..b1678198a 100644 --- a/server/server.js +++ b/server/server.js @@ -575,8 +575,8 @@ exports.entryPage = "dashboard"; bean.method = monitor.method; bean.body = monitor.body; bean.headers = monitor.headers; - bean.basicauth_user = monitor.basicauth_user; - bean.basicauth_pass = monitor.basicauth_pass; + bean.basic_auth_user = monitor.basic_auth_user; + bean.basic_auth_pass = monitor.basic_auth_pass; bean.interval = monitor.interval; bean.retryInterval = monitor.retryInterval; bean.hostname = monitor.hostname; @@ -1141,8 +1141,8 @@ exports.entryPage = "dashboard"; method: monitorListData[i].method || "GET", body: monitorListData[i].body, headers: monitorListData[i].headers, - basicauth_user: monitorListData[i].basicauth_user, - basicauth_pass: monitorListData[i].basicauth_pass, + basic_auth_user: monitorListData[i].basic_auth_user, + basic_auth_pass: monitorListData[i].basic_auth_pass, interval: monitorListData[i].interval, retryInterval: retryInterval, hostname: monitorListData[i].hostname, diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index f5099aa3a..8b3157eab 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -270,9 +270,9 @@

{{ $t("HTTP Basic Auth") }}

- + - +
From 0481a241f3905dc23421a41de6b0ca80836f233c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Bratovi=C4=87?= Date: Thu, 4 Nov 2021 10:22:42 +0100 Subject: [PATCH 05/27] Add translated placeholders for editing basic auth --- src/pages/EditMonitor.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 8b3157eab..108defb74 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -270,9 +270,9 @@

{{ $t("HTTP Basic Auth") }}

- + - +
From daef238a70b8b5bcd3eb7c87f0f657d653894464 Mon Sep 17 00:00:00 2001 From: Ioma Taani Date: Thu, 11 Nov 2021 18:28:22 +0100 Subject: [PATCH 06/27] Updated Italian Language (#911) Co-authored-by: Paride Barison --- src/languages/it-IT.js | 136 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 123 insertions(+), 13 deletions(-) diff --git a/src/languages/it-IT.js b/src/languages/it-IT.js index 5ddc414f7..5257a217f 100644 --- a/src/languages/it-IT.js +++ b/src/languages/it-IT.js @@ -33,6 +33,7 @@ export default { Appearance: "Aspetto", Theme: "Tema", General: "Generali", + "Primary Base URL": "URL base primario", Version: "Versione", "Check Update On GitHub": "Controlla aggiornamenti su GitHub", List: "Lista", @@ -64,7 +65,7 @@ export default { Ping: "Ping", "Monitor Type": "Tipo di Monitoraggio", Keyword: "Parola chiave", - "Friendly Name": "Nome Amichevole", + "Friendly Name": "Nomignolo", URL: "URL", Hostname: "Nome Host", Port: "Porta", @@ -75,6 +76,9 @@ export default { "Upside Down Mode": "Modalità capovolta", "Max. Redirects": "Reindirizzamenti massimi", "Accepted Status Codes": "Codici di stato accettati", + "Push URL": "Push URL", + needPushEvery: "Notificare questo URL ogni {0} secondi.", + pushOptionalParams: "Parametri aggiuntivi: {0}", Save: "Salva", Notifications: "Notifiche", "Not available, please setup.": "Non disponibili, da impostare.", @@ -166,8 +170,8 @@ export default { Purple: "Viola", Pink: "Rosa", "Search...": "Cerca...", - "Avg. Ping": "Ping medio", - "Avg. Response": "Risposta media", + "Avg. Ping": "Tempo di risposta al ping medio", + "Avg. Response": "Tempo di risposta medio", "Entry Page": "Entry Page", statusPageNothing: "Non c'è nulla qui, aggiungere un gruppo oppure un monitoraggio.", "No Services": "Nessun Servizio", @@ -178,23 +182,129 @@ export default { "Add a monitor": "Aggiungi un monitoraggio", "Edit Status Page": "Modifica pagina di stato", "Go to Dashboard": "Vai al Cruscotto", - "Status Page": "Status Page", - telegram: "Telegram", - webhook: "Webhook", - smtp: "Email (SMTP)", - discord: "Discord", - teams: "Microsoft Teams", - signal: "Signal", - gotify: "Gotify", - slack: "Slack", + "Status Page": "Pagina di stato", + defaultNotificationName: "Allarme {notification} ({number})", + here: "qui", + "Required": "Richiesto", + "telegram": "Telegram", + "Bot Token": "Token del Bot", + "You can get a token from": "Puoi ricevere un token da", + "Chat ID": "ID Chat", + supportTelegramChatID: "Supporta Chat dirette / di Gruppo / ID Canale", + wayToGetTelegramChatID: "Puoi ricereve l'ID chat mandando un messaggio al bot andando in questo url per visualizzare il chat_id:", + "YOUR BOT TOKEN HERE": "QUI IL TOKEN DEL BOT", + chatIDNotFound: "Non trovo l'ID chat. Prima bisogna mandare un messaggio al bot", + "webhook": "Webhook", + "Post URL": "Post URL", + "Content Type": "Content Type", + webhookJsonDesc: "{0} va bene per qualsiasi server http moderno ad esempio express.js", + webhookFormDataDesc: "{multipart} va bene per PHP, c'è solo bisogno di analizzare il json con {decodeFunction}", + "smtp": "E-mail (SMTP)", + secureOptionNone: "Nessuno / STARTTLS (25, 587)", + secureOptionTLS: "TLS (465)", + "Ignore TLS Error": "Ignora gli errori TLS", + "From Email": "Mittente", + emailCustomSubject: "Oggetto personalizzato", + "To Email": "Destinatario", + smtpCC: "CC", + smtpBCC: "CCn", + "discord": "Discord", + "Discord Webhook URL": "URL Webhook di Discord", + wayToGetDiscordURL: "È possibile recuperarlo da Impostazioni server -> Integrazioni -> Creare Webhook", + "Bot Display Name": "Nome del Bot", + "Prefix Custom Message": "Prefisso per il messaggio personalizzato", + "Hello @everyone is...": "Ciao a {'@'}everyone ...", + "teams": "Microsoft Teams", + "Webhook URL": "URL Webhook", + wayToGetTeamsURL: "È possibile imparare a creare un URL Webhook {0}.", + "signal": "Signal", + "Number": "Numero", + "Recipients": "Destinatari", + needSignalAPI: "È necessario avere un client Signal con le API REST.", + wayToCheckSignalURL: "Controllare questo url per capire come impostarne uno:", + signalImportant: "IMPORTANTE: Non è possibile mischiare gruppi e numeri all'interno dei destinatari!", + "gotify": "Gotify", + "Application Token": "Token Applicazione", + "Server URL": "URL Server", + "Priority": "Priorità", + "slack": "Slack", + "Icon Emoji": "Icona Emoji", + "Channel Name": "Nome Canale", + "Uptime Kuma URL": "Indirizzo Uptime Kuma", + aboutWebhooks: "Maggiori informazioni riguardo ai webhooks su: {0}", + aboutChannelName: "Inserire il nome del canale nel campo \"Nome Canale\" {0} se si vuole bypassare il canale webhook. Ad esempio: #altro-canale", + aboutKumaURL: "Se si lascia bianco il campo Indirizzo Uptime Kuma, la pagina GitHub sarà il valore predefinito.", + emojiCheatSheet: "Lista Emoji: {0}", "rocket.chat": "Rocket.chat", pushover: "Pushover", pushy: "Pushy", octopush: "Octopush", promosms: "PromoSMS", + clicksendsms: "ClickSend SMS", lunasea: "LunaSea", - apprise: "Apprise (Support 50+ Notification services)", + apprise: "Apprise (Supporta più di 50 servizi di notifica)", pushbullet: "Pushbullet", line: "Line Messenger", mattermost: "Mattermost", + "User Key": "Chiave Utente", + "Device": "Dispositivo", + "Message Title": "Titolo Messaggio", + "Notification Sound": "Suono di Notifica", + "More info on:": "Maggiori informazioni su: {0}", + pushoverDesc1: "Priorità di Emergenza (2) ha 30 secondi di timeout tra un tentativo e l'altro e scadrà dopo un'ora.", + pushoverDesc2: "Se si vuole inviare la notifica a dispositivi differenti, riempire il campo Dispositivi.", + "SMS Type": "Tipo di SMS", + octopushTypePremium: "Premium (Veloce - raccomandato per allertare)", + octopushTypeLowCost: "A Basso Costo (Lento - talvolta bloccato dall'operatore)", + checkPrice: "Controlla {0} prezzi:", + apiCredentials: "Credenziali API", + octopushLegacyHint: "Si vuole utilizzare la vecchia versione (2011-2020) oppure la nuova versione di Octopush?", + "Check octopush prices": "Controlla i prezzi di Octopush {0}.", + octopushPhoneNumber: "Numero di telefono (formato internazionale (p.e.): +33612345678) ", + octopushSMSSender: "Nome del mittente: 3-11 caratteri alfanumerici e spazi (a-zA-Z0-9)", + "LunaSea Device ID": "ID dispositivo LunaSea", + "Apprise URL": "URL Apprise", + "Example:": "Esempio: {0}", + "Read more:": "Maggiori informazioni: {0}", + "Status:": "Stato: {0}", + "Read more": "Maggiori informazioni", + appriseInstalled: "Apprise è installato.", + appriseNotInstalled: "Apprise non è installato. {0}", + "Access Token": "Token di accesso", + "Channel access token": "Token di accesso al canale", + "Line Developers Console": "Console sviluppatori Line", + lineDevConsoleTo: "Console sviluppatori Line - {0}", + "Basic Settings": "Impostazioni Base", + "User ID": "ID Utente", + "Messaging API": "API di Messaggistica", + wayToGetLineChannelToken: "Prima accedi a {0}, crea un provider e un canale (API di Messaggistica), dopodiché puoi avere il token di accesso e l'id utente dal menù sopra.", + "Icon URL": "URL Icona", + aboutIconURL: "È possibile impostare un collegameno a una immagine in \"URL Icona\" per modificare l'immagine di profilo. Non verrà utilizzata se è impostata l'Icona Emoji.", + aboutMattermostChannelName: "È possibile modificare il canale predefinito che dove il webhook manda messaggi immettendo il nome del canale nel campo \"Nome Canale\". Questo va abilitato nelle impostazioni webhook di Mattermost webhook. P.E.: #altro-canale", + "matrix": "Matrix", + promosmsTypeEco: "SMS ECO - economico, ma lento e spesso sovraccarico. Limitato solamente a destinatari Polacchi.", + promosmsTypeFlash: "SMS FLASH - Il messaggio sarà automaticamente mostrato sul dispositivo dei destinatari. Limitato solo a destinatari Polacchi.", + promosmsTypeFull: "SMS FULL - Premium, È possibile utilizzare il proprio come come mittente (è necessario prima registrare il nome). Affidabile per gli allarmi.", + promosmsTypeSpeed: "SMS SPEED - Maggior priorità. Rapido, affidabile, ma costoso (costa il doppio di SMS FULL).", + promosmsPhoneNumber: "Numero di Telefono (per destinatari Polacchi si può omettere il codice area)", + promosmsSMSSender: "Mittente SMS : Nome preregistrato oppure uno dei seguenti: InfoSMS, SMS Info, MaxSMS, INFO, SMS", + "Feishu WebHookUrl": "URL WebHook di Feishu", + matrixHomeserverURL: "URL Server (con http(s):// e opzionalmente la porta)", + "Internal Room Id": "ID Stanza Interna", + matrixDesc1: "È possibile recuperare l'ID della stanza all'interno delle impostazioni avanzate della stanza nel client Matrix. Dovrebbe essere simile a !QMdRCpUIfLwsfjxye6:server.di.casa.", + matrixDesc2: "È altamente raccomandata la creazione di un nuovo utente e di non utilizare il proprio token di accesso Matrix poiché darà pieno controllo al proprio account e a tutte le stanze in cui si ha accesso. Piuttosto, si crei un nuovo utente per invitarlo nella stanza dove si vuole ricevere le notifiche. Si può accedere al token eseguendo {0}", + Method: "Metodo", + Body: "Corpo", + Headers: "Headers", + PushUrl: "URL di Push", + HeadersInvalidFormat: "L'header di richiesta non è un JSON valido: ", + BodyInvalidFormat: "Il corpo di richiesta non è un JSON valido: ", + "Monitor History": "Storico monitoraggio", + clearDataOlderThan: "Mantieni lo storico per {0} giorni.", + PasswordsDoNotMatch: "Le password non corrispondono.", + records: "records", + "One record": "One record", + steamApiKeyDescription: "Per monitorare un server di gioco Steam si necessita della chiave Steam Web-API. È possibile registrare la propria chiave API qui: ", + "Current User": "Utente corrente", + recent: "Recenti", }; From 73c18b6ff07f8ce3ed1c590ec3539bf079cdf906 Mon Sep 17 00:00:00 2001 From: Ioma Taani Date: Sat, 13 Nov 2021 16:53:07 +0100 Subject: [PATCH 07/27] correzione --- src/languages/it-IT.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/it-IT.js b/src/languages/it-IT.js index 5257a217f..0afd46ca9 100644 --- a/src/languages/it-IT.js +++ b/src/languages/it-IT.js @@ -136,7 +136,7 @@ export default { Heartbeats: "Controlli", "Auto Get": "Auto Get", backupDescription: "È possibile fare il backup di tutti i monitoraggi e di tutte le notifiche in un file JSON.", - backupDescription2: "P.S.: lo storico e i dati relativi agli eventi non saranno inclusi.", + backupDescription2: "P.S.: lo storico e i dati relativi agli eventi non saranno inclusi", backupDescription3: "Dati sensibili come i token di autenticazione saranno inclusi nel backup, tenere quindi in un luogo sicuro.", alertNoFile: "Selezionare il file da importare.", alertWrongFileType: "Selezionare un file JSON.", From 5cdb5edeb35b690611da93c1534739dc6eef4da0 Mon Sep 17 00:00:00 2001 From: Ioma Taani Date: Sat, 13 Nov 2021 17:00:23 +0100 Subject: [PATCH 08/27] corretto --- src/languages/it-IT.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/it-IT.js b/src/languages/it-IT.js index 0afd46ca9..105755d62 100644 --- a/src/languages/it-IT.js +++ b/src/languages/it-IT.js @@ -172,7 +172,7 @@ export default { "Search...": "Cerca...", "Avg. Ping": "Tempo di risposta al ping medio", "Avg. Response": "Tempo di risposta medio", - "Entry Page": "Entry Page", + "Entry Page": "Pagina Principale", statusPageNothing: "Non c'è nulla qui, aggiungere un gruppo oppure un monitoraggio.", "No Services": "Nessun Servizio", "All Systems Operational": "Tutti i sistemi sono operativi", From d5d957b748feb43932c6775ac9c4e80ebeeeb858 Mon Sep 17 00:00:00 2001 From: Phuong Nguyen Minh <73861816+mrphuongbn@users.noreply.github.com> Date: Mon, 15 Nov 2021 12:27:31 +0700 Subject: [PATCH 09/27] update vi.js (#853) * update vi.js * Update vi.js * Update vi.js --- src/languages/vi.js | 55 +++++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/src/languages/vi.js b/src/languages/vi.js index 0bfa3f208..bc2e86de0 100644 --- a/src/languages/vi.js +++ b/src/languages/vi.js @@ -33,21 +33,22 @@ export default { Appearance: "Giao diện", Theme: "Theme", General: "Chung", + "Primary Base URL": "URL chính", Version: "Phiên bản", "Check Update On GitHub": "Kiểm tra bản cập nhật mới trên GitHub", List: "List", Add: "Thêm", "Add New Monitor": "Thêm mới Monitor", "Quick Stats": "Thống kê nhanh", - Up: "Lên", - Down: "Xuống", + Up: "Up", + Down: "Down", Pending: "Chờ xử lý", Unknown: "Không xác định", Pause: "Tạm dừng", Name: "Tên", Status: "Trạng thái", DateTime: "Ngày tháng", - Message: "Tin nhắn", + Message: "Trạng thái request", "No important events": "Không có sự kiện quan trọng nào", Resume: "Khôi phục", Edit: "Sửa", @@ -64,17 +65,20 @@ export default { Ping: "Ping", "Monitor Type": "Kiểu monitor", Keyword: "Từ khoá", - "Friendly Name": "Tên dễ hiểu", + "Friendly Name": "Tên monitor", URL: "URL", Hostname: "Hostname", Port: "Port", - "Heartbeat Interval": "Tần suất heartbeat", + "Heartbeat Interval": "Tần suất kiểm tra", Retries: "Thử lại", - "Heartbeat Retry Interval": "Tần suất thử lại của Heartbeat", + "Heartbeat Retry Interval": "Tần suất kiểm tra lại", Advanced: "Nâng cao", - "Upside Down Mode": "Trạng thái đảo ngược", - "Max. Redirects": "Chuyển hướng tối đa", + "Upside Down Mode": "Chế độ đảo ngược", + "Max. Redirects": "Số chuyển hướng tối đa", "Accepted Status Codes": "Codes trạng thái chấp nhận", + "Push URL": "Push URL", + needPushEvery: "Bạn nên gọi URL mỗi {0} giây.", + pushOptionalParams: "Tuỳ chỉnh parameters: {0}", Save: "Lưu", Notifications: "Thông báo", "Not available, please setup.": "Chưa sẵn sàng, hãy cài đặt.", @@ -131,7 +135,7 @@ export default { Events: "Sự kiện", Heartbeats: "Heartbeats", "Auto Get": "Tự động lấy", - backupDescription: "Bạn có thể sao lưu tất cả các màn hình và tất cả các thông báo vào một file JSON.", + backupDescription: "Bạn có thể sao lưu tất cả các monitor và tất cả các thông báo vào một file JSON.", backupDescription2: "PS: Không bao gồm dữ liệu lịch sử các sự kiện.", backupDescription3: "Hãy lưu giữ file này cẩn thận vì trong file đó chứa cả các mã token thông báo.", alertNoFile: "Hãy chọn file để khôi phục.", @@ -171,7 +175,7 @@ export default { "Entry Page": "Entry Page", statusPageNothing: "Không có gì, hãy thêm nhóm monitor hoặc monitor.", "No Services": "Không có dịch vụ", - "All Systems Operational": "Tất cả các hệ thống hoạt động", + "All Systems Operational": "Tất cả các hệ thống hoạt động bình thường", "Partially Degraded Service": "Dịch vụ xuống cấp một phần", "Degraded Service": "Degraded Service", "Add Group": "Thêm nhóm", @@ -184,7 +188,7 @@ export default { Required: "Bắt buộc", telegram: "Telegram", "Bot Token": "Bot Token", - "You can get a token from": "Bạn có thể lấy mã token từ", + wayToGetTelegramToken: "Bạn có thể lấy mã token từ", "Chat ID": "Chat ID", supportTelegramChatID: "Hỗ trợ chat trực tiếp / Nhóm / Kênh Chat ID", wayToGetTelegramChatID: "Bạn có thể lấy chat id của mình bằng cách gửi tin nhắn tới bot và truy cập url này để xem chat_id:", @@ -200,6 +204,7 @@ export default { secureOptionTLS: "TLS (465)", "Ignore TLS Error": "Bỏ qua lỗi TLS", "From Email": "Từ Email", + emailCustomSubject: "Tuỳ chỉnh tiêu đề", "To Email": "Tới Email", smtpCC: "CC", smtpBCC: "BCC", @@ -212,7 +217,7 @@ export default { teams: "Microsoft Teams", "Webhook URL": "Webhook URL", wayToGetTeamsURL: "Bạn có thể học cách tạo webhook url {0}.", - signal: "Signal", + signal: "Tín hiệu", Number: "Số", Recipients: "Người nhận", needSignalAPI: "Bạn cần một tín hiệu client với REST API.", @@ -235,8 +240,9 @@ export default { pushy: "Pushy", octopush: "Octopush", promosms: "PromoSMS", + clicksendsms: "ClickSend SMS", lunasea: "LunaSea", - apprise: "Thông báo (Hỗ trợ 50+ dịch vụ thông báo)", + apprise: "Apprise (Hỗ trợ 50+ dịch vụ thông báo)", pushbullet: "Pushbullet", line: "Line Messenger", mattermost: "Mattermost", @@ -250,8 +256,11 @@ export default { "SMS Type": "SMS Type", octopushTypePremium: "Premium (Nhanh - Khuyến nghị nên dùng cho cảnh báo)", octopushTypeLowCost: "Giá rẻ (Chậm, thỉnh thoảng bị chặn)", + checkPrice: "Kiểm tra giá {0}:", + apiCredentials: "API credentials", + octopushLegacyHint: "Bạn muốn sử dụng phiên bản cũ của Octopush (2011-2020) hay phiên bản mới?", "Check octopush prices": "Kiểm tra giá octopush {0}.", - octopushPhoneNumber: "Số điện thoại (Định dạng intl, vd : +33612345678) ", + octopushPhoneNumber: "Số điện thoại (Định dạng intl, vd : +84123456789) ", octopushSMSSender: "SMS người gửi : 3-11 ký tự chữ, số và dấu cách (a-zA-Z0-9)", "LunaSea Device ID": "LunaSea ID thiết bị", "Apprise URL": "Apprise URL", @@ -280,4 +289,22 @@ export default { promosmsPhoneNumber: "Số điện thoại (Bỏ qua mã vùng với người Ba Lan)", promosmsSMSSender: "SMS Tên người gửi: Tên đã đăng ký trước hoặc tên mặc định: InfoSMS, SMS Info, MaxSMS, INFO, SMS", "Feishu WebHookUrl": "Feishu WebHookUrl", + matrixHomeserverURL: "Homeserver URL (với http(s):// và port tuỳ chỉnh)", + "Internal Room Id": "Room ID Nội bộ", + matrixDesc1: "Bạn có thể tìm thấy room ID nội bộ bằng cách tìm trong mục advanced của phần room settings trong Matrix client của bạn. Nó có dạng giống như !QMdRCpUIfLwsfjxye6:home.server.", + matrixDesc2: "Bạn nên tạo người dùng mới và đừng sử dụng mã token truy cập của Matrix user vì nó sẽ cho phép truy cập toàn quyền vào tài khoản của bạn và tất cả các phòng bạn đã tham gia. Thay vào đó, hãy tạo một người dùng mới và chỉ mời người đó vào phòng mà bạn muốn nhận thông báo. Bạn có thể lấy được mã token truy cập bằng cách chạy {0}", + Method: "Method", + Body: "Body", + Headers: "Headers", + PushUrl: "Push URL", + HeadersInvalidFormat: "Header request không hợp lệ JSON: ", + BodyInvalidFormat: "Tequest body không hợp lệ JSON: ", + "Monitor History": "Lịch sử Monitor", + clearDataOlderThan: "Giữ dữ liệu lịch sử monitor {0} ngày.", + PasswordsDoNotMatch: "Passwords không khớp.", + records: "records", + "One record": "One record", + steamApiKeyDescription: "Để monitor các Steam Game Server bạn cần một Steam Web-API key. Bạn có thể đăng ký API key tại đây: ", + "Current User": "User hiện tại", + recent: "Gần đây", }; From 9747048890abed13caf123478b59d898e20aaab2 Mon Sep 17 00:00:00 2001 From: Ioma Taani Date: Tue, 16 Nov 2021 09:04:10 +0100 Subject: [PATCH 10/27] correzioni e miglioramenti --- src/languages/it-IT.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/it-IT.js b/src/languages/it-IT.js index 5257a217f..5de29d441 100644 --- a/src/languages/it-IT.js +++ b/src/languages/it-IT.js @@ -175,7 +175,7 @@ export default { "Entry Page": "Entry Page", statusPageNothing: "Non c'è nulla qui, aggiungere un gruppo oppure un monitoraggio.", "No Services": "Nessun Servizio", - "All Systems Operational": "Tutti i sistemi sono operativi", + "All Systems Operational": "Tutti i sistemi sono funzionali", "Partially Degraded Service": "Servizio parzialmente degradato", "Degraded Service": "Servizio degradato", "Add Group": "Aggiungi Gruppo", @@ -304,7 +304,7 @@ export default { PasswordsDoNotMatch: "Le password non corrispondono.", records: "records", "One record": "One record", - steamApiKeyDescription: "Per monitorare un server di gioco Steam si necessita della chiave Steam Web-API. È possibile registrare la propria chiave API qui: ", + steamApiKeyDescription: "Per monitorare un server di gioco Steam si necessita della chiave Web-API di Steam. È possibile registrare la propria chiave API qui: ", "Current User": "Utente corrente", recent: "Recenti", }; From be3a791e6ea858f1e2de6739f2f6a96e6cdcd660 Mon Sep 17 00:00:00 2001 From: MultiGamer8853 Date: Tue, 16 Nov 2021 18:14:23 +0900 Subject: [PATCH 11/27] Update ja.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 日本語を最適化 --- src/languages/ja.js | 126 ++++++++++++++++++++++---------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/src/languages/ja.js b/src/languages/ja.js index f96028e42..9446c78c9 100644 --- a/src/languages/ja.js +++ b/src/languages/ja.js @@ -17,7 +17,7 @@ export default { pauseMonitorMsg: "一時停止しますか?", Settings: "設定", Dashboard: "ダッシュボード", - "New Update": "New Update", + "New Update": "新しいアップデート", Language: "言語", Appearance: "外観", Theme: "テーマ", @@ -53,7 +53,7 @@ export default { Ping: "Ping", "Monitor Type": "監視タイプ", Keyword: "キーワード", - "Friendly Name": "Friendly Name", + "Friendly Name": "分かりやすい名前", URL: "URL", Hostname: "ホスト名", Port: "ポート", @@ -104,60 +104,60 @@ export default { "Resolver Server": "問い合わせ先DNSサーバ", "Resource Record Type": "DNSレコード設定", "Last Result": "最終結果", - "Create your admin account": "Create your admin account", - "Repeat Password": "Repeat Password", - respTime: "Resp. Time (ms)", + "Create your admin account": "Adminアカウントの作成", + "Repeat Password": "パスワード確認", + respTime: "応答時間 (ms)", notAvailableShort: "N/A", - Create: "Create", - clearEventsMsg: "Are you sure want to delete all events for this monitor?", - clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?", - confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?", - "Clear Data": "Clear Data", - Events: "Events", - Heartbeats: "Heartbeats", - "Auto Get": "Auto Get", - enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", - "Default enabled": "Default enabled", - "Also apply to existing monitors": "Also apply to existing monitors", - Export: "Export", - Import: "Import", - backupDescription: "You can backup all monitors and all notifications into a JSON file.", - backupDescription2: "PS: History and event data is not included.", - backupDescription3: "Sensitive data such as notification tokens is included in the export file, please keep it carefully.", - alertNoFile: "Please select a file to import.", - alertWrongFileType: "Please select a JSON file.", - twoFAVerifyLabel: "Please type in your token to verify that 2FA is working", - tokenValidSettingsMsg: "Token is valid! You can now save the 2FA settings.", - confirmEnableTwoFAMsg: "Are you sure you want to enable 2FA?", - confirmDisableTwoFAMsg: "Are you sure you want to disable 2FA?", - "Apply on all existing monitors": "Apply on all existing monitors", - "Verify Token": "Verify Token", - "Setup 2FA": "Setup 2FA", - "Enable 2FA": "Enable 2FA", - "Disable 2FA": "Disable 2FA", - "2FA Settings": "2FA Settings", - "Two Factor Authentication": "Two Factor Authentication", + Create: "作成", + clearEventsMsg: "この監視のすべての記録を削除してもよろしいですか?", + clearHeartbeatsMsg: "この監視のすべての異常記録を削除してもよろしいですか?", + confirmClearStatisticsMsg: "すべての統計を削除してもよろしいですか?", + "Clear Data": "データを削除", + Events: "統計", + Heartbeats: "異常記録", + "Auto Get": "自動取得", + enableDefaultNotificationDescription: "監視を作成するごとに、この通知方法はデフォルトで有効になります。監視ごとに通知を無効にすることもできます。", + "Default enabled": "デフォルトで有効にする", + "Also apply to existing monitors": "既存のモニターにも適用する", + Export: "エクスポート", + Import: "インポート", + backupDescription: "すべての監視と通知方法をJSONファイルにできます。", + backupDescription2: "※ 履歴と統計のデータはバックアップされません。", + backupDescription3: "通知に使用するトークンなどの機密データも含まれています。注意して扱ってください。", + alertNoFile: "インポートするファイルを選択してください。", + alertWrongFileType: "JSONファイルを選択してください。", + twoFAVerifyLabel: "トークンを入力して、2段階認証を有効にします。", + tokenValidSettingsMsg: "トークンの確認が完了しました! 「保存」をしてください。", + confirmEnableTwoFAMsg: "2段階認証を「有効」にします。よろしいですか?", + confirmDisableTwoFAMsg: "2段階認証を「無効」にします。よろしいですか?", + "Apply on all existing monitors": "既存のすべてのモニターに適用する", + "Verify Token": "認証する", + "Setup 2FA": "2段階認証の設定", + "Enable 2FA": "2段階認証を有効にする", + "Disable 2FA": "2段階認証を無効にする", + "2FA Settings": "2段階認証の設定", + "Two Factor Authentication": "2段階認証", Active: "Active", Inactive: "Inactive", Token: "Token", "Show URI": "Show URI", - "Clear all statistics": "Clear all Statistics", + "Clear all statistics": "すべての記録を削除", retryCheckEverySecond: "Retry every {0} seconds.", - importHandleDescription: "Choose 'Skip existing' if you want to skip every monitor or notification with the same name. 'Overwrite' will delete every existing monitor and notification.", - confirmImportMsg: "Are you sure to import the backup? Please make sure you've selected the right import option.", - "Heartbeat Retry Interval": "Heartbeat Retry Interval", - "Import Backup": "Import Backup", - "Export Backup": "Export Backup", - "Skip existing": "Skip existing", - Overwrite: "Overwrite", - Options: "Options", - "Keep both": "Keep both", - Tags: "Tags", - "Add New below or Select...": "Add New below or Select...", - "Tag with this name already exist.": "Tag with this name already exist.", - "Tag with this value already exist.": "Tag with this value already exist.", - color: "color", - "value (optional)": "value (optional)", + importHandleDescription: "同じ名前のすべての監視または通知方法を上書きしない場合は、「既存のをスキップ」を選択します。 「上書きする」は、既存のすべてのモニターと通知を削除します。", + confirmImportMsg: "バックアップをインポートしてもよろしいですか?希望するオプションを選択してください。", + "Heartbeat Retry Interval": "異常検知後の再試行間隔", + "Import Backup": "バックアップのインポート", + "Export Backup": "バックアップのエクスポート", + "Skip existing": "既存のをスキップする", + Overwrite: "上書きする", + Options: "オプション", + "Keep both": "どちらも保持する", + Tags: "タグ", + "Add New below or Select...": "新規追加または選択...", + "Tag with this name already exist.": "この名前のタグはすでに存在しています。", + "Tag with this value already exist.": "この値のタグはすでに存在しています。", + color: "色", + "value (optional)": "値 (optional)", Gray: "Gray", Red: "Red", Orange: "Orange", @@ -166,20 +166,20 @@ export default { Indigo: "Indigo", Purple: "Purple", Pink: "Pink", - "Search...": "Search...", - "Avg. Ping": "Avg. Ping", - "Avg. Response": "Avg. Response", - "Entry Page": "Entry Page", - statusPageNothing: "Nothing here, please add a group or a monitor.", + "Search...": "検索...", + "Avg. Ping": "平均Ping時間", + "Avg. Response": "平均応答時間", + "Entry Page": "エントリーページ", + statusPageNothing: "ここには何もありません。グループまたは監視を追加してください。", "No Services": "No Services", - "All Systems Operational": "All Systems Operational", - "Partially Degraded Service": "Partially Degraded Service", - "Degraded Service": "Degraded Service", - "Add Group": "Add Group", - "Add a monitor": "Add a monitor", - "Edit Status Page": "Edit Status Page", - "Go to Dashboard": "Go to Dashboard", - "Status Page": "Status Page", + "All Systems Operational": "すべてのサービスが稼働中", + "Partially Degraded Service": "部分的にサービスが停止中", + "Degraded Service": "サービスが停止中", + "Add Group": "グループの追加", + "Add a monitor": "監視の追加", + "Edit Status Page": "ステータスページ編集", + "Go to Dashboard": "ダッシュボード", + "Status Page": "ステータスページ", telegram: "Telegram", webhook: "Webhook", smtp: "Email (SMTP)", From f9bb48de137eb83c458c9cdc2275a736b9d2ab83 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Wed, 20 Oct 2021 18:54:20 +0800 Subject: [PATCH 12/27] WIP: Convert Settings to components --- src/assets/vars.scss | 1 + src/components/MonitorList.vue | 2 +- src/components/settings/About.vue | 25 + src/components/settings/Appearance.vue | 149 +++++ src/components/settings/Backup.vue | 213 ++++++ src/components/settings/General.vue | 191 ++++++ src/components/settings/MonitorHistory.vue | 127 ++++ src/components/settings/Notifications.vue | 46 ++ src/components/settings/Security.vue | 323 +++++++++ src/languages/en.js | 1 + src/layouts/Layout.vue | 4 +- src/pages/Settings.vue | 741 +++------------------ 12 files changed, 1190 insertions(+), 633 deletions(-) create mode 100644 src/components/settings/About.vue create mode 100644 src/components/settings/Appearance.vue create mode 100644 src/components/settings/Backup.vue create mode 100644 src/components/settings/General.vue create mode 100644 src/components/settings/MonitorHistory.vue create mode 100644 src/components/settings/Notifications.vue create mode 100644 src/components/settings/Security.vue diff --git a/src/assets/vars.scss b/src/assets/vars.scss index 2f4369832..91ab917e5 100644 --- a/src/assets/vars.scss +++ b/src/assets/vars.scss @@ -12,6 +12,7 @@ $dark-font-color2: #020b05; $dark-bg: #0d1117; $dark-bg2: #070a10; $dark-border-color: #1d2634; +$dark-header-bg: #161b22; $easing-in: cubic-bezier(0.54, 0.78, 0.55, 0.97); $easing-out: cubic-bezier(0.25, 0.46, 0.45, 0.94); diff --git a/src/components/MonitorList.vue b/src/components/MonitorList.vue index bd771f8f0..ef51e89cd 100644 --- a/src/components/MonitorList.vue +++ b/src/components/MonitorList.vue @@ -137,7 +137,7 @@ export default { justify-content: space-between; .dark & { - background-color: #161b22; + background-color: $dark-header-bg; border-bottom: 0; } } diff --git a/src/components/settings/About.vue b/src/components/settings/About.vue new file mode 100644 index 000000000..baa72f39a --- /dev/null +++ b/src/components/settings/About.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/src/components/settings/Appearance.vue b/src/components/settings/Appearance.vue new file mode 100644 index 000000000..e0a3d6430 --- /dev/null +++ b/src/components/settings/Appearance.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/src/components/settings/Backup.vue b/src/components/settings/Backup.vue new file mode 100644 index 000000000..6ac28d468 --- /dev/null +++ b/src/components/settings/Backup.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/components/settings/General.vue b/src/components/settings/General.vue new file mode 100644 index 000000000..308f21aee --- /dev/null +++ b/src/components/settings/General.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/components/settings/MonitorHistory.vue b/src/components/settings/MonitorHistory.vue new file mode 100644 index 000000000..85853ea1a --- /dev/null +++ b/src/components/settings/MonitorHistory.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/src/components/settings/Notifications.vue b/src/components/settings/Notifications.vue new file mode 100644 index 000000000..b2cbcf48a --- /dev/null +++ b/src/components/settings/Notifications.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/src/components/settings/Security.vue b/src/components/settings/Security.vue new file mode 100644 index 000000000..1cbfb034e --- /dev/null +++ b/src/components/settings/Security.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/languages/en.js b/src/languages/en.js index 15c3cd0f3..a503b5235 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -307,4 +307,5 @@ export default { steamApiKeyDescription: "For monitoring a Steam Game Server you need a Steam Web-API key. You can register your API key here: ", "Current User": "Current User", recent: "Recent", + shrinkDatabaseDescription: "Trigger database VACCUM for SQLite. If your database is created after 1.10.0, AUTO_VACCUM is already enabled and this action is not needed.", }; diff --git a/src/layouts/Layout.vue b/src/layouts/Layout.vue index 7228a460d..2f4f689ab 100644 --- a/src/layouts/Layout.vue +++ b/src/layouts/Layout.vue @@ -188,8 +188,8 @@ main { .dark { header { - background-color: #161b22; - border-bottom-color: #161b22 !important; + background-color: $dark-header-bg; + border-bottom-color: $dark-header-bg !important; span { color: #f0f6fc; diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 9d501407d..9ff234150 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -7,521 +7,90 @@
-
-

{{ $t("Appearance") }}

- -
- - +
+ - -
- - -
-
- - - - - - - - -
-
-
- -
- -
-
- - - - - - - - -
-
-
- - -

{{ $t("General") }}

- -
- -
- - -
- - -
- - -
- - -
-
- - -
-
- - -
- - -
- - -
- -
- - -
-
- - -
- - -
- - -
- -
-
-
- - -
- - -
- {{ $t("steamApiKeyDescription") }}https://steamcommunity.com/dev -
-
- - -
-

{{ $t("Monitor History") }}

-
- - -
-
- - -
- -
-
- -
- -
-
- - -
-

{{ $t("Notifications") }}

-

- {{ $t("Not available, please setup.") }} -

-

- {{ $t("notificationDescription") }} -

- - - - +
+
+ {{ subMenus[currentSubMenu].title }} +
+
+
- - -

{{ $t("Info") }}

- - {{ $t("Version") }}: {{ $root.info.version }}
- {{ $t("Check Update On GitHub") }}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ $t("confirmClearStatisticsMsg") }} - - - {{ $t("confirmImportMsg") }} -
@@ -667,37 +126,8 @@ export default { .shadow-box { padding: 20px; -} - -.btn-check:active + .btn-outline-primary, -.btn-check:checked + .btn-outline-primary, -.btn-check:hover + .btn-outline-primary { - color: #fff; -} - -.dark { - .list-group-item { - background-color: $dark-bg2; - color: $dark-font-color; - } - - .btn-check:active + .btn-outline-primary, - .btn-check:checked + .btn-outline-primary, - .btn-check:hover + .btn-outline-primary { - color: #000; - } - - #importBackup { - &::file-selector-button { - color: $primary; - background-color: $dark-bg; - } - - &:hover:not(:disabled):not([readonly])::file-selector-button { - color: $dark-font-color2; - background-color: $primary; - } - } + min-height: calc(100vh - 155px); + max-height: calc(100vh - 30px); } footer { @@ -707,4 +137,55 @@ footer { padding-bottom: 30px; text-align: center; } + +.settings-menu { + flex: 0 0 auto; + width: 300px; + + .menu-item { + border-radius: 10px; + margin: 0.5em; + padding: 0.7em 1em; + cursor: pointer; + } + + .menu-item:hover { + background: $highlight-white; + + .dark & { + background: $dark-header-bg; + } + } + + .menu-item.active { + background: $highlight-white; + border-left: 4px solid $primary; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + + .dark & { + background: $dark-header-bg; + } + } +} + +.settings-content { + flex: 0 0 auto; + width: calc(100% - 300px); + + .settings-content-header { + width: calc(100% + 20px); + border-bottom: 1px solid #dee2e6; + border-radius: 0 10px 0 0; + margin-top: -20px; + margin-right: -20px; + padding: 12.5px 1em; + font-size: 26px; + + .dark & { + background: $dark-header-bg; + border-bottom: 0; + } + } +} From 369cad90c1c2e938a7651947dbffaed6bd2ebd4f Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Wed, 3 Nov 2021 17:03:40 +0800 Subject: [PATCH 13/27] WIP: Convert to use vue-router & improve layout WIP: Fix security page & improve layout WIP: Fix displaying current page UI: Improve spacing Chore: Improve styling --- src/components/settings/General.vue | 6 +-- src/components/settings/MonitorHistory.vue | 8 ++-- src/components/settings/Security.vue | 10 ++--- src/pages/Settings.vue | 51 ++++++++++------------ src/router.js | 46 +++++++++++++++++++ 5 files changed, 82 insertions(+), 39 deletions(-) diff --git a/src/components/settings/General.vue b/src/components/settings/General.vue index 308f21aee..a1b42d85f 100644 --- a/src/components/settings/General.vue +++ b/src/components/settings/General.vue @@ -163,13 +163,13 @@ export default { computed: { settings() { - return this.$parent.$parent.settings; + return this.$parent.$parent.$parent.settings; }, saveSettings() { - return this.$parent.$parent.saveSettings; + return this.$parent.$parent.$parent.saveSettings; }, settingsLoaded() { - return this.$parent.$parent.settingsLoaded; + return this.$parent.$parent.$parent.settingsLoaded; }, guessTimezone() { return dayjs.tz.guess(); diff --git a/src/components/settings/MonitorHistory.vue b/src/components/settings/MonitorHistory.vue index 85853ea1a..95efff0e2 100644 --- a/src/components/settings/MonitorHistory.vue +++ b/src/components/settings/MonitorHistory.vue @@ -23,7 +23,7 @@ -
{{ $t("shrinkDatabaseDescription") }}
+
{{ $t("shrinkDatabaseDescription") }}

{{ $t("Change Password") }}
@@ -60,7 +61,7 @@ -
+
{{ $t("Two Factor Authentication") }}
@@ -82,7 +83,6 @@
-
@@ -244,13 +244,13 @@ export default { computed: { settings() { - return this.$parent.$parent.settings; + return this.$parent.$parent.$parent.settings; }, saveSettings() { - return this.$parent.$parent.saveSettings; + return this.$parent.$parent.$parent.saveSettings; }, settingsLoaded() { - return this.$parent.$parent.settingsLoaded; + return this.$parent.$parent.$parent.settingsLoaded; } }, diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 9ff234150..0cff13678 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -8,21 +8,25 @@
- + +
- {{ subMenus[currentSubMenu].title }} + {{ subMenus[$route.name.split("-")[1]].title }}
- +
@@ -32,16 +36,6 @@