admin-fe/src/views/settings/index.vue

157 lines
4 KiB
Vue
Raw Normal View History

<template>
<div class="settings-container">
<h1>{{ $t('settings.settings') }}</h1>
<el-tabs v-model="activeTab" :tab-position="tabPosition">
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.activityPub')" :disabled="configDisabled" lazy>
<activity-pub/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.auth')" :disabled="configDisabled" lazy>
2019-11-21 14:09:06 +00:00
<authentication/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.autoLinker')" :disabled="configDisabled" lazy>
2019-12-10 09:24:00 +00:00
<auto-linker/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.esshd')" :disabled="configDisabled" lazy>
<esshd/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.captcha')" :disabled="configDisabled" lazy>
<captcha/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.frontend')" :disabled="configDisabled" lazy>
<frontend/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.gopher')" :disabled="configDisabled" lazy>
<gopher/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.http')" :disabled="configDisabled" lazy>
<http/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.instance')" :disabled="configDisabled" name="instance">
<instance/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.jobQueue')" :disabled="configDisabled" lazy>
<job-queue/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.logger')" :disabled="configDisabled" lazy>
<logger/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.mailer')" :disabled="configDisabled" lazy>
<mailer/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.mediaProxy')" :disabled="configDisabled" lazy>
<media-proxy/>
2020-01-05 06:17:25 +00:00
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.metadata')" :disabled="configDisabled" lazy>
<metadata/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.mrf')" :disabled="configDisabled" lazy>
<mrf/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.rateLimiters')" :disabled="configDisabled" lazy>
<rate-limiters/>
</el-tab-pane>
<el-tab-pane :label="$t('settings.relays')" lazy name="relays">
2019-10-17 20:59:25 +00:00
<relays/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.webPush')" :disabled="configDisabled" lazy>
<web-push/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.upload')" :disabled="configDisabled" lazy>
<upload/>
</el-tab-pane>
2020-02-01 13:08:10 +00:00
<el-tab-pane :label="$t('settings.other')" :disabled="configDisabled" lazy>
<other/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import {
ActivityPub,
Authentication,
AutoLinker,
Captcha,
Esshd,
Frontend,
Gopher,
Http,
Instance,
JobQueue,
Logger,
Mailer,
MediaProxy,
Metadata,
Mrf,
Other,
RateLimiters,
Relays,
Upload,
WebPush
} from './components'
export default {
components: {
ActivityPub,
Authentication,
AutoLinker,
Captcha,
Esshd,
Frontend,
Gopher,
Http,
Instance,
JobQueue,
Logger,
Mailer,
MediaProxy,
Metadata,
Mrf,
Other,
RateLimiters,
Relays,
Upload,
WebPush
},
computed: {
activeTab: {
get() {
return this.$store.state.settings.activeTab
},
set(tab) {
this.$store.dispatch('SetActiveTab', tab)
}
},
2020-02-01 13:08:10 +00:00
configDisabled() {
return this.$store.state.settings.configDisabled
},
isMobile() {
return this.$store.state.app.device === 'mobile'
},
tabPosition() {
return this.isMobile ? 'top' : 'left'
}
},
mounted: function() {
this.$store.dispatch('FetchSettings')
}
}
</script>
<style rel='stylesheet/scss' lang='scss' scoped>
.settings-container {
.el-tabs {
margin-top: 20px
}
h1 {
margin: 22px 0 0 15px;
}
}
2020-01-30 14:36:35 +00:00
@media only screen and (min-width: 1824px) {
.settings-container {
max-width: 1824px;
2020-01-30 14:36:35 +00:00
margin: auto;
}
}
</style>