Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

♻️ Refactors to remove unnecisary intermediaty varianple for filter tiles in sidebar

Alicia Sykes43068f6e2a4c
diff --git a/src/components/Workspace/SideBar.vue b/src/components/Workspace/SideBar.vue
index e312f326..92af760a 100644
--- a/src/components/Workspace/SideBar.vue
+++ b/src/components/Workspace/SideBar.vue
@@ -53,10 +53,7 @@ export default {
/* Return a list of sections that should be visible in workspace */
filteredSections() {
if (!this.sections) return [];
- return this.sections.filter((section) => {
- const hideFromWorkspace = section.displayData?.hideFromWorkspace || false;
- return !hideFromWorkspace;
- });
+ return this.sections.filter((section) => !section.displayData?.hideFromWorkspace);
},
},
watch: {
@@ -104,12 +101,8 @@ export default {
if (!allTiles) {
return [];
}
- return allTiles.filter((tile) => {
- // Check user visibility and also check if item should be hidden from workspace
- const isVisible = checkItemVisibility(tile);
- const hideFromWorkspace = tile.displayData?.hideFromWorkspace || false;
- return isVisible && !hideFromWorkspace;
- });
+ return allTiles.filter((tile) => checkItemVisibility(tile)
+ && !tile.displayData?.hideFromWorkspace);
},
},
mounted() {
diff --git a/src/mixins/HomeMixin.js b/src/mixins/HomeMixin.js
index e467e7e4..4be0a96c 100644
--- a/src/mixins/HomeMixin.js
+++ b/src/mixins/HomeMixin.js
@@ -65,15 +65,6 @@ const HomeMixin = {
const subPageName = isSubPage ? pagePath.split('/').pop() : null;
return subPageName;
},
- /* TEMPORARY: If on sub-page, check if custom theme is set and return it */
- getSubPageTheme() {
- if (!this.pageId || this.pageId === 'home') {
- return null;
- } else {
- const themeStoreKey = `${localStorageKeys.THEME}-${this.pageId}`;
- return localStorage[themeStoreKey] || null;
- }
- },
setTheme() {
this.initializeTheme();
},