diff --git a/src/api/settings.js b/src/api/settings.js index 87bbd9cf5b5566516fff2995f87ea0dcb79c811d..c37c0931f1630fb864b3b239c3da8ccd82bf7182 100644 --- a/src/api/settings.js +++ b/src/api/settings.js @@ -12,15 +12,6 @@ export async function deleteInstanceDocument(name, authHost, token) { } export async function fetchDescription(authHost, token) { - return await request({ - baseURL: baseName(authHost), - url: `/api/v1/pleroma/admin/config/descriptions`, - method: 'get', - headers: authHeaders(token) - }) -} - -export async function fetchDescription2(authHost, token) { return await request({ baseURL: baseName(authHost), url: `/api/v2/pleroma/admin/config/descriptions`, diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js index df7b0e88a839a716c54e84b8b98d8fd6cc7bf144..8f3c423cc8696c857d4550a493bf5cb7b49fbfb5 100644 --- a/src/store/modules/settings.js +++ b/src/store/modules/settings.js @@ -7,7 +7,6 @@ import { updateInstanceDocument, updateSettings } from '@/api/settings' import { formSearchObject, parseNonTuples, parseTuples, valueHasTuples, wrapUpdatedSettings } from './normalizers' -import { tabs } from '../../utils/tabs' import _ from 'lodash' const settings = { @@ -106,10 +105,10 @@ const settings = { commit('SET_SETTINGS', settings.data.configs) const { data } = await fetchDescription(getters.authHost, getters.token) - commit('SET_DESCRIPTION', data) - const searchObject = formSearchObject(data) + commit('SET_DESCRIPTION', data.descriptions) + const searchObject = formSearchObject(data.descriptions) commit('SET_SEARCH', searchObject) - commit('SET_TABS', tabs) + commit('SET_TABS', data.tabs) } catch (_e) { commit('TOGGLE_TABS', true) commit('SET_LOADING', false) diff --git a/src/utils/tabs.js b/src/utils/tabs.js deleted file mode 100644 index 35b24b761902e88c1fc69bb3b507f88f36ab6cbf..0000000000000000000000000000000000000000 --- a/src/utils/tabs.js +++ /dev/null @@ -1,22 +0,0 @@ -export const tabs = [ - { label: 'ActivityPub', path: 'activity-pub', tab: ':activity_pub' }, - { label: 'Authentication', path: 'authentication', tab: ':authentication' }, - { label: 'Captcha', path: 'captcha', tab: ':captcha' }, - { label: 'BBS / SSH access', path: 'esshd', tab: ':esshd' }, - { label: 'Emoji', path: 'emoji', tab: ':emoji' }, - { label: 'Frontend', path: 'frontend', tab: ':frontend' }, - { label: 'Gopher', path: 'gopher', tab: ':gopher' }, - { label: 'HTTP', path: 'http', tab: ':http' }, - { label: 'Instance', path: 'instance', tab: ':instance' }, - { label: 'Job queue', path: 'job-queue', tab: ':job_queue' }, - { label: 'Link Formatter', path: 'link-formatter', tab: ':link_formatter' }, - { label: 'Logger', path: 'logger', tab: ':logger' }, - { label: 'Mailer', path: 'mailer', tab: ':mailer' }, - { label: 'Media Proxy', path: 'media-proxy', tab: ':media_proxy' }, - { label: 'Metadata', path: 'metadata', tab: ':metadata' }, - { label: 'MRF', path: 'mrf', tab: ':mrf' }, - { label: 'Rate limiters', path: 'rate-limiters', tab: ':rate_limiters' }, - { label: 'Web push encryption', path: 'web-push', tab: ':web_push' }, - { label: 'Upload', path: 'upload', tab: ':upload' }, - { label: 'Other', path: 'other', tab: ':other' } -]