diff options
| author | Henry Jameson <me@hjkos.com> | 2023-03-27 22:57:50 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2023-03-27 22:57:50 +0300 |
| commit | 4c3af5c362574aad4d851990265ebc7252c6f990 (patch) | |
| tree | 7d934c815717cfe6e2fd3c825b9e2f5350389f9e /src/components/settings_modal/settings_modal_admin_content.js | |
| parent | df9fe6d261ca554b8f886e45ccf70b44b47e53f5 (diff) | |
handle db config disabled case
Diffstat (limited to 'src/components/settings_modal/settings_modal_admin_content.js')
| -rw-r--r-- | src/components/settings_modal/settings_modal_admin_content.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/components/settings_modal/settings_modal_admin_content.js b/src/components/settings_modal/settings_modal_admin_content.js index 07d4cf2e..1c239e59 100644 --- a/src/components/settings_modal/settings_modal_admin_content.js +++ b/src/components/settings_modal/settings_modal_admin_content.js @@ -9,7 +9,7 @@ import { library } from '@fortawesome/fontawesome-svg-core' import { faWrench, faHand, - faFilter, + faLaptopCode, faPaintBrush, faBell, faDownload, @@ -20,7 +20,7 @@ import { library.add( faWrench, faHand, - faFilter, + faLaptopCode, faPaintBrush, faBell, faDownload, @@ -38,6 +38,9 @@ const SettingsModalAdminContent = { LimitsTab }, computed: { + user () { + return this.$store.state.users.currentUser + }, isLoggedIn () { return !!this.$store.state.users.currentUser }, @@ -46,6 +49,17 @@ const SettingsModalAdminContent = { }, bodyLock () { return this.$store.state.interface.settingsModalState === 'visible' + }, + adminDbLoaded () { + return this.$store.state.adminSettings.loaded + }, + noDb () { + return this.$store.state.adminSettings.dbConfigEnabled === false + } + }, + created () { + if (this.user.rights.admin) { + this.$store.dispatch('loadAdminStuff') } }, methods: { |
