π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
π Moves re-used home method into shared home mixin
Alicia Sykes0566ce96fcf0
diff --git a/src/mixins/HomeMixin.js b/src/mixins/HomeMixin.jsindex 6292f286..37c6bfc9 100644--- a/src/mixins/HomeMixin.js+++ b/src/mixins/HomeMixin.js@@ -28,6 +28,10 @@ const HomeMixin = {pageId() {return this.$store.state.currentConfigInfo?.confId || 'home';},+ /* True when the server returned a stripped bootstrap config (e.g. expired token) */+ isBootstrap() {+ return this.$store.state.rootConfig?._bootstrap?.authenticated === false;+ },},data: () => ({searchValue: '',@@ -41,6 +45,10 @@ const HomeMixin = {this.loadUpConfig();},methods: {+ /* Reload to restart the auth flow, when OIDC/Keycloak get bootstrap marker */+ reAuth() {+ window.location.reload();+ },/* When page loaded / sub-page changed, initiate config fetch.* For ROOT / LEGACY_SECTION intent the store loads the root config* for KNOWN the store loads the matching sub-configdiff --git a/src/views/Home.vue b/src/views/Home.vueindex 361020d9..704297f3 100644--- a/src/views/Home.vue+++ b/src/views/Home.vue@@ -132,16 +132,8 @@ export default {if (this.colCount) classes += ` col-count-${this.colCount}`;return classes;},- /* True if the server served a stripped bootstrap config (e.g. expired token) */- isBootstrap() {- return this.$store.state.rootConfig?._bootstrap?.authenticated === false;- },},methods: {- /* Reload to restart the auth flow (OIDC will see the bootstrap marker and redirect) */- reAuth() {- window.location.reload();- },/* Clears input field, once a searched item is opened */finishedSearching() {if (this.$refs.filterComp) this.$refs.filterComp.clearFilterInput();diff --git a/src/views/Minimal.vue b/src/views/Minimal.vueindex 969b1ff9..c77379ab 100644--- a/src/views/Minimal.vue+++ b/src/views/Minimal.vue@@ -111,17 +111,7 @@ export default {},sections() { this.syncSelectedFromRoute(); },},- computed: {- /* True if the server served a stripped bootstrap config (e.g. expired token) */- isBootstrap() {- return this.$store.state.rootConfig?._bootstrap?.authenticated === false;- },- },methods: {- /* Reload to restart the auth flow (OIDC will see the bootstrap marker and redirect) */- reAuth() {- window.location.reload();- },sectionSelected(index) {this.selectedSection = index;},