From ab5a7158b544d467d38a774514819279af8ab59f Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Tue, 25 Feb 2020 19:59:47 +0300 Subject: [PATCH] Replace regular tabs with tabs rendered dynamically --- src/views/settings/components/tabs.js | 68 ++++++++++++++++++++++ src/views/settings/index.vue | 83 +++++---------------------- 2 files changed, 81 insertions(+), 70 deletions(-) create mode 100644 src/views/settings/components/tabs.js diff --git a/src/views/settings/components/tabs.js b/src/views/settings/components/tabs.js new file mode 100644 index 00000000..c08688f7 --- /dev/null +++ b/src/views/settings/components/tabs.js @@ -0,0 +1,68 @@ +import _ from 'lodash' + +export const tabs = { + 'activity-pub': { + label: 'settings.activityPub', + activitypub: () => this.settings.description.find(setting => setting.key === ':activitypub'), + activitypubData: () => _.get(this.settings.settings, [':pleroma', ':activitypub']) || {}, + user: () => this.settings.description.find(setting => setting.key === ':user'), + userData: () => _.get(this.settings.settings, [':pleroma', ':user']) || {} + }, + 'authentication': { + label: 'settings.auth' + }, + 'auto-linker': { + label: 'settings.autoLinker' + }, + 'esshd': { + label: 'settings.esshd' + }, + 'captcha': { + label: 'settings.captcha' + }, + 'frontend': { + label: 'settings.frontend' + }, + 'gopher': { + label: 'settings.gopher' + }, + 'http': { + label: 'settings.http' + }, + 'instance': { + label: 'settings.instance' + }, + 'job-queue': { + label: 'settings.jobQueue' + }, + 'logger': { + label: 'settings.logger' + }, + 'mailer': { + label: 'settings.mailer' + }, + 'media-proxy': { + label: 'settings.mediaProxy' + }, + 'metadata': { + label: 'settings.metadata' + }, + 'mrf': { + label: 'settings.mrf' + }, + 'rate-limiters': { + label: 'settings.rateLimiters' + }, + 'relays': { + label: 'settings.relays' + }, + 'web-push': { + label: 'settings.webPush' + }, + 'upload': { + label: 'settings.upload' + }, + 'other': { + label: 'settings.other' + } +} diff --git a/src/views/settings/index.vue b/src/views/settings/index.vue index dd8349d2..e46d094c 100644 --- a/src/views/settings/index.vue +++ b/src/views/settings/index.vue @@ -34,65 +34,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -127,17 +76,7 @@ -
- -
+
@@ -164,6 +103,7 @@