aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/settings_modal/settings_modal_admin_content.js18
-rw-r--r--src/components/settings_modal/settings_modal_admin_content.vue39
2 files changed, 55 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: {
diff --git a/src/components/settings_modal/settings_modal_admin_content.vue b/src/components/settings_modal/settings_modal_admin_content.vue
index 52c6ddf5..ae670a90 100644
--- a/src/components/settings_modal/settings_modal_admin_content.vue
+++ b/src/components/settings_modal/settings_modal_admin_content.vue
@@ -4,9 +4,40 @@
class="settings_tab-switcher"
:side-tab-bar="true"
:scrollable-tabs="true"
+ :render-only-focused="true"
:body-scroll-lock="bodyLock"
>
<div
+ v-if="noDb"
+ :label="$t('admin_dash.tabs.nodb')"
+ icon="exclamation-triangle"
+ data-tab-name="nodb-notice"
+ >
+ <div :label="$t('admin_dash.tabs.nodb')">
+ <div class="setting-item">
+ <h2>{{ $t('admin_dash.nodb.heading') }}</h2>
+ <i18n-t keypath="admin_dash.nodb.text">
+ <template #documentation>
+ <a
+ href="https://docs-develop.pleroma.social/backend/configuration/howto_database_config/"
+ target="_blank"
+ >
+ {{ $t("admin_dash.nodb.documentation") }}
+ </a>
+ </template>
+ <template #property>
+ <code>config :pleroma, configurable_from_database</code>
+ </template>
+ <template #value>
+ <code>true</code>
+ </template>
+ </i18n-t>
+ <p>{{ $t('admin_dash.nodb.text2') }}</p>
+ </div>
+ </div>
+ </div>
+ <div
+ v-if="adminDbLoaded"
:label="$t('admin_dash.tabs.instance')"
icon="wrench"
data-tab-name="general"
@@ -14,12 +45,20 @@
<InstanceTab />
</div>
<div
+ v-if="adminDbLoaded"
:label="$t('admin_dash.tabs.limits')"
icon="hand"
data-tab-name="limits"
>
<LimitsTab />
</div>
+ <div
+ :label="$t('admin_dash.tabs.frontends')"
+ icon="laptop-code"
+ data-tab-name="frontends"
+ >
+ <FrontendsTab />
+ </div>
</tab-switcher>
</template>