From 931ca6a3ef05483d28cf137212afc14e1eac44a9 Mon Sep 17 00:00:00 2001 From: Patrick Hafner Date: Tue, 21 Dec 2021 03:27:05 +0100 Subject: [PATCH 1/7] Add: customize status page (css and poweredby) --- src/pages/StatusPage.vue | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 0dc49518e..213a9fbd6 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -88,6 +88,11 @@ {{ $t("Show Tags") }} + + @@ -144,6 +149,15 @@ + + +
@@ -208,9 +222,14 @@
+ + + {{ config.customCSS }} + @@ -659,7 +685,7 @@ footer { } } -.incident { +.incident, .customize { .content { &[contenteditable=true] { min-height: 60px; From 2c2a824f97f012146548a2fb7cf479b2288b78cd Mon Sep 17 00:00:00 2001 From: Patrick Hafner Date: Tue, 21 Dec 2021 03:31:09 +0100 Subject: [PATCH 2/7] Add: en & de-DE language --- src/languages/de-DE.js | 5 ++++- src/languages/en.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js index 6c2dd1f19..1b500267d 100644 --- a/src/languages/de-DE.js +++ b/src/languages/de-DE.js @@ -348,5 +348,8 @@ export default { serwersmsAPIPassword: "API Passwort", serwersmsPhoneNumber: "Telefonnummer", serwersmsSenderName: "Name des SMS-Absenders (über Kundenportal registriert)", - "stackfield": "Stackfield", + stackfield: "Stackfield", + Customize: "Anpassen", + "Custom Footer": "Eigener Footer (Leerlassen für Standard)", + "Custom CSS": "Eigenes CSS", }; diff --git a/src/languages/en.js b/src/languages/en.js index fee80a760..97a88f50c 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -351,5 +351,8 @@ export default { serwersmsAPIPassword: "API Password", serwersmsPhoneNumber: "Phone number", serwersmsSenderName: "SMS Sender Name (registered via customer portal)", - "stackfield": "Stackfield", + stackfield: "Stackfield", + Customize: "Customize", + "Custom Footer": "Custom Footer (empty string for default)", + "Custom CSS": "Custom CSS", }; From 3a12e209da1207fb16b4012ec8ff01a7f08f5c0b Mon Sep 17 00:00:00 2001 From: Patrick Hafner Date: Tue, 21 Dec 2021 03:55:25 +0100 Subject: [PATCH 3/7] Edit: editMode check before toggle --- src/pages/StatusPage.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 213a9fbd6..2d264054f 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -602,8 +602,10 @@ export default { /** customize status page */ customizeStatusPage() { - // toggle modal - this.enableEditCustomizeMode = !this.enableEditCustomizeMode; + if (this.editMode) { + // toggle modal + this.enableEditCustomizeMode = !this.enableEditCustomizeMode; + } }, } From 9ee591417da3fb5e7ad402be97677b2f79385605 Mon Sep 17 00:00:00 2001 From: Patrick Hafner Date: Sat, 25 Dec 2021 04:09:41 +0100 Subject: [PATCH 4/7] Footer HTML support, updated german translation --- src/languages/de-DE.js | 2 +- src/pages/StatusPage.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js index 1b500267d..585d00639 100644 --- a/src/languages/de-DE.js +++ b/src/languages/de-DE.js @@ -335,7 +335,7 @@ export default { "Hide Tags": "Tags ausblenden", Description: "Beschreibung", "No monitors available.": "Keine Monitore verfügbar.", - "Add one": "Füge eins hinzu", + "Add one": "Hinzufügen", "No Monitors": "Keine Monitore", "Untitled Group": "Gruppe ohne Titel", Services: "Dienste", diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 2d264054f..d1835e21c 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -222,7 +222,7 @@ From 81de2eedfb596031ba4a74feb9db629f7b8c4e04 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Tue, 12 Apr 2022 20:23:11 +0800 Subject: [PATCH 5/7] Fix template can contain one tag only, disable vue/require-component-is eslint rule --- .eslintrc.js | 1 + src/pages/StatusPage.vue | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b0934d6d8..67a80d245 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -39,6 +39,7 @@ module.exports = { "vue/max-attributes-per-line": "off", "vue/singleline-html-element-content-newline": "off", "vue/html-self-closing": "off", + "vue/require-component-is": "off", // not allow is="style" https://github.com/vuejs/eslint-plugin-vue/issues/462#issuecomment-430234675 "vue/attribute-hyphenation": "off", // This change noNL to "no-n-l" unexpectedly "no-multi-spaces": ["error", { ignoreEOLComments: true, diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index b1b2e9802..381162546 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -261,11 +261,11 @@ {{ $t("deleteStatusPageMsg") }} - - - {{ config.customCSS }} - + + {{ config.customCSS }} + + @@ -863,7 +885,7 @@ footer { } } -.incident, .customize { +.incident { .content { &[contenteditable="true"] { min-height: 60px; @@ -922,4 +944,19 @@ footer { } } +/* required class */ +.css-editor { + /* we dont use `language-` classes anymore so thats why we need to add background and text color manually */ + + border-radius: 1rem; + padding: 10px 5px; + border: 1px solid #ced4da; + + .dark & { + background: $dark-bg; + border: 1px solid $dark-border-color; + } + +} + From 572f2b983827b7f49cb5a3e5db68dbee5d6d0877 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sun, 17 Apr 2022 14:57:31 +0800 Subject: [PATCH 7/7] eslint --- src/pages/StatusPage.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index da0bafb5e..4b94289cd 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -956,7 +956,6 @@ footer { background: $dark-bg; border: 1px solid $dark-border-color; } - }