π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:zap: Refactor, no longer need parameter passed to Auth functions
Alicia Sykesb71e1548ee70
diff --git a/src/components/Configuration/JsonEditor.vue b/src/components/Configuration/JsonEditor.vueindex fc618cf5..28782dc4 100644--- a/src/components/Configuration/JsonEditor.vue+++ b/src/components/Configuration/JsonEditor.vue@@ -102,7 +102,7 @@ export default {methods: {shouldAllowWriteToDisk() {const { appConfig } = this.config;- return appConfig.allowConfigEdit !== false && isUserAdmin(appConfig.auth);+ return appConfig.allowConfigEdit !== false && isUserAdmin();},save() {if (this.saveMode === 'local' || !this.allowWriteToDisk) {diff --git a/src/components/Settings/SettingsContainer.vue b/src/components/Settings/SettingsContainer.vueindex e3e2e4d6..0024ad6c 100644--- a/src/components/Settings/SettingsContainer.vue+++ b/src/components/Settings/SettingsContainer.vue@@ -114,7 +114,7 @@ export default {* then they will never be able to view the homepage, so no button needed*/userState() {- return getUserState(this.appConfig || {});+ return getUserState();},},data() {diff --git a/src/router.js b/src/router.jsindex aaa52e66..2800f8a5 100644--- a/src/router.js+++ b/src/router.js@@ -31,7 +31,7 @@ const isGuestEnabled = () => {/* Returns true if user is already authenticated, or if auth is not enabled */const isAuthenticated = () => {const users = config.appConfig.auth;- return (!users || users.length === 0 || isLoggedIn(users) || isGuestEnabled());+ return (!users || users.length === 0 || isLoggedIn() || isGuestEnabled());};/* Get the users chosen starting view from app config, or return default */diff --git a/src/views/Login.vue b/src/views/Login.vueindex 3e287a6c..a86908f3 100644--- a/src/views/Login.vue+++ b/src/views/Login.vue@@ -126,7 +126,7 @@ export default {},isUserAlreadyLoggedIn() {const users = this.appConfig.auth;- const loggedIn = (!users || users.length === 0 || isLoggedIn(users));+ const loggedIn = (!users || users.length === 0 || isLoggedIn());return (loggedIn && this.existingUsername);},isGuestAccessEnabled() {