logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 9a97e0d196c879e41dcb8bda8bd8128a039bacdc
parent 0b5e536b4c96a81ec78f323be9bece6deae61773
Author: Henry Jameson <me@hjkos.com>
Date:   Tue, 21 Mar 2023 10:26:25 +0200

modal update, initial localization

Diffstat:

Msrc/components/settings_modal/admin_tabs/instance_tab.vue10+++++-----
Msrc/components/settings_modal/admin_tabs/limits_tab.vue24+++++++++++++-----------
Msrc/components/settings_modal/settings_modal.vue15++++++++++++++-
Msrc/components/settings_modal/settings_modal_admin_content.js4++--
Msrc/components/settings_modal/settings_modal_admin_content.vue6+++---
Msrc/i18n/en.json27+++++++++++++++++++++++++++
6 files changed, 64 insertions(+), 22 deletions(-)

diff --git a/src/components/settings_modal/admin_tabs/instance_tab.vue b/src/components/settings_modal/admin_tabs/instance_tab.vue @@ -1,7 +1,7 @@ <template> - <div :label="$t('admin_dash.instance')"> + <div :label="$t('admin_dash.tabs.instance')"> <div class="setting-item"> - <h2>{{ $t('admin_dash.instance') }}</h2> + <h2>{{ $t('admin_dash.instance.instance') }}</h2> <ul class="setting-list"> <li> <StringSetting @@ -69,7 +69,7 @@ </ul> </div> <div class="setting-item"> - <h2>{{ $t('admin_dash.registrations') }}</h2> + <h2>{{ $t('admin_dash.instance.registrations') }}</h2> <ul class="setting-list"> <li> <BooleanSetting @@ -112,7 +112,7 @@ </BooleanSetting> </li> <li> - <h3>{{ $t('admin_dash.captcha.header') }}</h3> + <h3>{{ $t('admin_dash.instance.captcha_header') }}</h3> </li> <li> <BooleanSetting @@ -150,7 +150,7 @@ v-if="adminConfig[':pleroma']['Pleroma.Captcha'][':enabled'] && adminConfig[':pleroma']['Pleroma.Captcha'][':method'] === 'Pleroma.Captcha.Kocaptcha'" class="setting-list suboptions" > - <h4>{{ $t('admin_dash.kocaptcha') }}</h4> + <h4>{{ $t('admin_dash.instance.kocaptcha') }}</h4> <li> <StringSetting source="admin" diff --git a/src/components/settings_modal/admin_tabs/limits_tab.vue b/src/components/settings_modal/admin_tabs/limits_tab.vue @@ -1,7 +1,7 @@ <template> - <div :label="$t('admin_dash.instance')"> + <div :label="$t('admin_dash.tabs.limits')"> <div class="setting-item"> - <h2>{{ $t('admin_dash.arbitrary_limits') }}</h2> + <h2>{{ $t('admin_dash.limits.arbitrary_limits') }}</h2> <ul class="setting-list"> <li> <h3>{{ $t('admin_dash.limits.posts') }}</h3> @@ -19,6 +19,7 @@ <IntegerSetting source="admin" path=":pleroma.:instance.:remote_limit" + expert="1" draft-mode > POST LIMIT (remote) @@ -60,6 +61,15 @@ <li> <IntegerSetting source="admin" + path=":pleroma.:instance.:max_pinned_statuses" + draft-mode + > + MAX PINNED POSTS + </IntegerSetting> + </li> + <li> + <IntegerSetting + source="admin" path=":pleroma.:instance.:user_bio_length" draft-mode > @@ -92,6 +102,7 @@ source="admin" path=":pleroma.:instance.:max_remote_account_fields" draft-mode + expert="1" > MAX ACCOUNT FIELDS (remote) </IntegerSetting> @@ -135,15 +146,6 @@ MAX BANNER SIZE KiB </IntegerSetting> </li> - <li> - <IntegerSetting - source="admin" - path=":pleroma.:instance.:max_pinned_statuses" - draft-mode - > - MAX PINNED POSTS - </IntegerSetting> - </li> </ul> </div> </div> diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue @@ -8,7 +8,7 @@ <div class="settings-modal-panel panel"> <div class="panel-heading"> <span class="title"> - {{ $t('settings.settings') }} + {{ modalMode === 'user' ? $t('settings.settings') : $t('admin_dash.window_title') }} </span> <transition name="fade"> <div @@ -47,6 +47,7 @@ </div> <div class="panel-footer settings-footer"> <Popover + v-if="modalMode === 'user'" class="export" trigger="click" placement="top" @@ -108,6 +109,18 @@ > {{ $t("settings.expert_mode") }} </Checkbox> + <span v-if="modalMode === 'admin'"> + <i18n-t keypath="admin_dash.wip_notice"> + <template #adminFeLink> + <a + href="/pleroma/admin/#/login-pleroma" + target="_blank" + > + {{ $t("admin_dash.old_ui_link") }} + </a> + </template> + </i18n-t> + </span> <span id="unscrolled-content" class="extra-content" diff --git a/src/components/settings_modal/settings_modal_admin_content.js b/src/components/settings_modal/settings_modal_admin_content.js @@ -8,7 +8,7 @@ import LimitsTab from './admin_tabs/limits_tab.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { faWrench, - faUser, + faHand, faFilter, faPaintBrush, faBell, @@ -19,7 +19,7 @@ import { library.add( faWrench, - faUser, + faHand, faFilter, faPaintBrush, faBell, diff --git a/src/components/settings_modal/settings_modal_admin_content.vue b/src/components/settings_modal/settings_modal_admin_content.vue @@ -7,15 +7,15 @@ :body-scroll-lock="bodyLock" > <div - :label="$t('admin_dash.instance')" + :label="$t('admin_dash.tabs.instance')" icon="wrench" data-tab-name="general" > <InstanceTab /> </div> <div - :label="$t('admin_dash.limits')" - icon="wrench" + :label="$t('admin_dash.tabs.limits')" + icon="hand" data-tab-name="limits" > <LimitsTab /> diff --git a/src/i18n/en.json b/src/i18n/en.json @@ -832,6 +832,33 @@ "frontend_version": "Frontend version" } }, + "admin_dash": { + "window_title": "Administration", + "wip_notice": "This admin dashboard is experimental and WIP, {adminFeLink}.", + "old_ui_link": "old admin UI available here", + "tabs": { + "instance": "Instance", + "limits": "Limits" + }, + "captcha": { + "native": "Native", + "kocaptcha": "KoCaptcha" + }, + "instance": { + "instance": "Instance information", + "registrations": "User sign-ups", + "captcha_header": "CAPTCHA", + "kocaptcha": "KoCaptcha settings" + }, + "limits": { + "arbitrary_limits": "Arbitrary limits", + "posts": "Post limits", + "uploads": "Attachments limits", + "users": "User profile limits", + "profile_fields": "Profile fields limits", + "user_uploads": "Profile media limits" + } + }, "time": { "unit": { "days": "{0} day | {0} days",