From 6b9484a0fe6ec0acf14b9c83832f28d8e7352e9b Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 30 Jan 2022 04:04:28 +0000 Subject: [PATCH 1/9] :bug: Removes max height from colorful theme (#461) --- src/styles/color-themes.scss | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/styles/color-themes.scss b/src/styles/color-themes.scss index 23ab29ade4..1f6be8ed7e 100644 --- a/src/styles/color-themes.scss +++ b/src/styles/color-themes.scss @@ -353,9 +353,6 @@ html[data-theme='colorful'] { div.context-menu { border-color: var(--primary); } - .collapsable.is-open { - height: -webkit-fill-available; - } } html[data-theme='minimal-light'], html[data-theme='minimal-dark'], html[data-theme='vaporware'] { From 67326ed395b267fb7af5d98a45840ce04eb21a28 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 30 Jan 2022 04:05:10 +0000 Subject: [PATCH 2/9] :card_file_box: Adds `cutToHeight` to schema (#461) --- src/utils/ConfigSchema.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json index abfe51cf58..7b1ca073ca 100644 --- a/src/utils/ConfigSchema.json +++ b/src/utils/ConfigSchema.json @@ -530,6 +530,12 @@ "default": false, "description": "If true, section needs to be clicked to open" }, + "cutToHeight": { + "title": "Cut to Height", + "type": "boolean", + "default": false, + "description": "By default, sections will fill available space. Set this option to true to match section height with content height" + }, "color": { "title": "Color", "type": "string", From 3ea8fc960e3fd7ae06061cab1be2c2dcc3a24ab8 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 31 Jan 2022 17:09:48 +0000 Subject: [PATCH 3/9] :bookmark: Bumps to 2.0.1 and updates changelog --- .github/CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 0deae4abe6..4b05d13aa5 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 🐛 2.0.1 - Fixes Section Height [PR #462](https://github.com/Lissy93/dashy/pull/462) +- Adds `cutToHeight` to config schema (Re: #461) +- Removes the full-height CSS from colorful theme + ## ⚡️ 2.0.0 - Small Fixes and Docker Multi-Arch Build [PR #451](https://github.com/Lissy93/dashy/pull/451) - Fixes full-height sections for mobile and Safari (Re: #432, #442) - Fixes empty section visible in search (Re: #447) diff --git a/package.json b/package.json index 581dcfcab6..ed2d986bd1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Dashy", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT", "main": "server", "author": "Alicia Sykes (https://aliciasykes.com)", From d07a5f7e6f3a323f6b538a868afa4a5480d3c8f9 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 1 Feb 2022 16:00:23 +0000 Subject: [PATCH 4/9] :zap: Remove empty KeyCloak block from edit appConfig --- src/components/InteractiveEditor/EditAppConfig.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/InteractiveEditor/EditAppConfig.vue b/src/components/InteractiveEditor/EditAppConfig.vue index 56779b4ca8..40fe430c33 100644 --- a/src/components/InteractiveEditor/EditAppConfig.vue +++ b/src/components/InteractiveEditor/EditAppConfig.vue @@ -86,8 +86,15 @@ export default { /* Remove any attribute which has an undefined value before saving */ removeUndefinedValues(rawAppConfig) { const raw = rawAppConfig; - const isEmpty = (value) => (value === undefined); - Object.keys(raw).forEach(key => isEmpty(raw[key]) && delete raw[key]); + const isEmptyObject = (obj) => (typeof obj === 'object' && Object.keys(obj).length === 0); + const isEmpty = (value) => (value === undefined || isEmptyObject(value)); + // Delete empty values + Object.keys(raw).forEach(key => { + if (isEmpty(raw[key])) delete raw[key]; + }); + // If KC config empty, delete it + const kcConfig = raw.auth.keycloak; + if (!kcConfig.clientId && !kcConfig.realm && !kcConfig.serverUrl) delete raw.auth.keycloak; return raw; }, }, From ad1fae5b664a7eea76e3abb0f46ca6de95545d15 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 1 Feb 2022 16:43:09 +0000 Subject: [PATCH 5/9] :bug: Fixes clearFilterInput Safari bug (#463) (Sentry: 2911601158) --- src/components/Settings/SettingsContainer.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Settings/SettingsContainer.vue b/src/components/Settings/SettingsContainer.vue index 19e93e34f9..fbb86a362f 100644 --- a/src/components/Settings/SettingsContainer.vue +++ b/src/components/Settings/SettingsContainer.vue @@ -100,11 +100,13 @@ export default { this.settingsVisible = this.getSettingsVisibility(); }, methods: { + /* Emit event to begin/ continue searching */ userIsTypingSomething(something) { this.$emit('user-is-searchin', something); }, + /* Call function to clear search field, remove focus and reset results */ clearFilterInput() { - this.$refs.SearchBar.clearFilterInput(); + if (this.$refs.SearchBar) this.$refs.SearchBar.clearFilterInput(); }, getInitialTheme() { return this.appConfig.theme || ''; @@ -115,10 +117,12 @@ export default { if (typeof userThemes === 'string') return [userThemes]; return userThemes; }, + /* Show / hide settings */ toggleSettingsVisibility() { this.settingsVisible = !this.settingsVisible; localStorage.setItem(localStorageKeys.HIDE_SETTINGS, this.settingsVisible); }, + /* Get initial settings visibility, either from appConfig, local storage or browser type */ getSettingsVisibility() { const screenWidth = document.body.clientWidth; if (screenWidth && screenWidth < 600) return false; From e472d9110247675d1da9007fa35b062665a2e479 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 1 Feb 2022 18:54:19 +0000 Subject: [PATCH 6/9] :zap: Improved validation warnings in JSON editor --- src/components/Configuration/JsonEditor.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Configuration/JsonEditor.vue b/src/components/Configuration/JsonEditor.vue index 1ec4cfd69a..cb530066b9 100644 --- a/src/components/Configuration/JsonEditor.vue +++ b/src/components/Configuration/JsonEditor.vue @@ -193,12 +193,13 @@ export default { validationErrors(errors) { const errorMessages = []; errors.forEach((error) => { + console.log(error); switch (error.type) { case 'validation': errorMessages.push({ type: 'validation', msg: `${this.$t('config-editor.warning-msg-validation')}: ` - + `${error.error.keyword} ${error.error.message}`, + + `${(error.error || error).dataPath} ${(error.error || error).message}`, }); break; case 'error': From 11291ae0e61cb54caa05a18a5f23b6970a40703d Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 1 Feb 2022 18:59:55 +0000 Subject: [PATCH 7/9] :zap: Improved validation warnings in JSON editor --- src/components/Configuration/JsonEditor.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Configuration/JsonEditor.vue b/src/components/Configuration/JsonEditor.vue index cb530066b9..fd69bbd53b 100644 --- a/src/components/Configuration/JsonEditor.vue +++ b/src/components/Configuration/JsonEditor.vue @@ -193,7 +193,6 @@ export default { validationErrors(errors) { const errorMessages = []; errors.forEach((error) => { - console.log(error); switch (error.type) { case 'validation': errorMessages.push({ From a5944c1d0682800274919e682210f28bc711d262 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 1 Feb 2022 19:15:18 +0000 Subject: [PATCH 8/9] :zap: Adds type checking for section search --- src/components/Workspace/SideBar.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Workspace/SideBar.vue b/src/components/Workspace/SideBar.vue index 40ac0d021a..2442403c54 100644 --- a/src/components/Workspace/SideBar.vue +++ b/src/components/Workspace/SideBar.vue @@ -64,10 +64,10 @@ export default { /* If an initial URL is specified, then open relevant section */ openDefaultSection() { if (!this.initUrl) return; - const process = (url) => url.replace(/[^\w\s]/gi, '').toLowerCase(); + const process = (url) => (url ? url.replace(/[^\w\s]/gi, '').toLowerCase() : undefined); const compare = (item) => (process(item.url) === process(this.initUrl)); - this.sections.forEach((section, sectionIndex) => { - if (section.items.findIndex(compare) !== -1) this.openSection(sectionIndex); + this.sections.forEach((section, secIndex) => { + if (section.items && section.items.findIndex(compare) !== -1) this.openSection(secIndex); }); }, }, From 947d616f94e0eaa894b85814b73d7eaf443af483 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 1 Feb 2022 19:30:30 +0000 Subject: [PATCH 9/9] :bookmark: Updates changelog for V 2.0.1 --- .github/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 4b05d13aa5..5cd6da5d1c 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -3,6 +3,9 @@ ## 🐛 2.0.1 - Fixes Section Height [PR #462](https://github.com/Lissy93/dashy/pull/462) - Adds `cutToHeight` to config schema (Re: #461) - Removes the full-height CSS from colorful theme +- Improved config validation warnings in JSON editor +- Removes empty Keycloak block from appConfig editor +- Adds typechecking to search and clear search for Safari ## ⚡️ 2.0.0 - Small Fixes and Docker Multi-Arch Build [PR #451](https://github.com/Lissy93/dashy/pull/451) - Fixes full-height sections for mobile and Safari (Re: #432, #442)