modal update, initial localization

This commit is contained in:
Henry Jameson 2023-03-21 10:26:25 +02:00
parent 0b5e536b4c
commit 9a97e0d196
6 changed files with 64 additions and 22 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div :label="$t('admin_dash.instance')"> <div :label="$t('admin_dash.tabs.instance')">
<div class="setting-item"> <div class="setting-item">
<h2>{{ $t('admin_dash.instance') }}</h2> <h2>{{ $t('admin_dash.instance.instance') }}</h2>
<ul class="setting-list"> <ul class="setting-list">
<li> <li>
<StringSetting <StringSetting
@ -69,7 +69,7 @@
</ul> </ul>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<h2>{{ $t('admin_dash.registrations') }}</h2> <h2>{{ $t('admin_dash.instance.registrations') }}</h2>
<ul class="setting-list"> <ul class="setting-list">
<li> <li>
<BooleanSetting <BooleanSetting
@ -112,7 +112,7 @@
</BooleanSetting> </BooleanSetting>
</li> </li>
<li> <li>
<h3>{{ $t('admin_dash.captcha.header') }}</h3> <h3>{{ $t('admin_dash.instance.captcha_header') }}</h3>
</li> </li>
<li> <li>
<BooleanSetting <BooleanSetting
@ -150,7 +150,7 @@
v-if="adminConfig[':pleroma']['Pleroma.Captcha'][':enabled'] && adminConfig[':pleroma']['Pleroma.Captcha'][':method'] === 'Pleroma.Captcha.Kocaptcha'" v-if="adminConfig[':pleroma']['Pleroma.Captcha'][':enabled'] && adminConfig[':pleroma']['Pleroma.Captcha'][':method'] === 'Pleroma.Captcha.Kocaptcha'"
class="setting-list suboptions" class="setting-list suboptions"
> >
<h4>{{ $t('admin_dash.kocaptcha') }}</h4> <h4>{{ $t('admin_dash.instance.kocaptcha') }}</h4>
<li> <li>
<StringSetting <StringSetting
source="admin" source="admin"

View File

@ -1,7 +1,7 @@
<template> <template>
<div :label="$t('admin_dash.instance')"> <div :label="$t('admin_dash.tabs.limits')">
<div class="setting-item"> <div class="setting-item">
<h2>{{ $t('admin_dash.arbitrary_limits') }}</h2> <h2>{{ $t('admin_dash.limits.arbitrary_limits') }}</h2>
<ul class="setting-list"> <ul class="setting-list">
<li> <li>
<h3>{{ $t('admin_dash.limits.posts') }}</h3> <h3>{{ $t('admin_dash.limits.posts') }}</h3>
@ -19,6 +19,7 @@
<IntegerSetting <IntegerSetting
source="admin" source="admin"
path=":pleroma.:instance.:remote_limit" path=":pleroma.:instance.:remote_limit"
expert="1"
draft-mode draft-mode
> >
POST LIMIT (remote) POST LIMIT (remote)
@ -57,6 +58,15 @@
<li> <li>
<h3>{{ $t('admin_dash.limits.users') }}</h3> <h3>{{ $t('admin_dash.limits.users') }}</h3>
</li> </li>
<li>
<IntegerSetting
source="admin"
path=":pleroma.:instance.:max_pinned_statuses"
draft-mode
>
MAX PINNED POSTS
</IntegerSetting>
</li>
<li> <li>
<IntegerSetting <IntegerSetting
source="admin" source="admin"
@ -92,6 +102,7 @@
source="admin" source="admin"
path=":pleroma.:instance.:max_remote_account_fields" path=":pleroma.:instance.:max_remote_account_fields"
draft-mode draft-mode
expert="1"
> >
MAX ACCOUNT FIELDS (remote) MAX ACCOUNT FIELDS (remote)
</IntegerSetting> </IntegerSetting>
@ -135,15 +146,6 @@
MAX BANNER SIZE KiB MAX BANNER SIZE KiB
</IntegerSetting> </IntegerSetting>
</li> </li>
<li>
<IntegerSetting
source="admin"
path=":pleroma.:instance.:max_pinned_statuses"
draft-mode
>
MAX PINNED POSTS
</IntegerSetting>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -8,7 +8,7 @@
<div class="settings-modal-panel panel"> <div class="settings-modal-panel panel">
<div class="panel-heading"> <div class="panel-heading">
<span class="title"> <span class="title">
{{ $t('settings.settings') }} {{ modalMode === 'user' ? $t('settings.settings') : $t('admin_dash.window_title') }}
</span> </span>
<transition name="fade"> <transition name="fade">
<div <div
@ -47,6 +47,7 @@
</div> </div>
<div class="panel-footer settings-footer"> <div class="panel-footer settings-footer">
<Popover <Popover
v-if="modalMode === 'user'"
class="export" class="export"
trigger="click" trigger="click"
placement="top" placement="top"
@ -108,6 +109,18 @@
> >
{{ $t("settings.expert_mode") }} {{ $t("settings.expert_mode") }}
</Checkbox> </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 <span
id="unscrolled-content" id="unscrolled-content"
class="extra-content" class="extra-content"

View File

@ -8,7 +8,7 @@ import LimitsTab from './admin_tabs/limits_tab.vue'
import { library } from '@fortawesome/fontawesome-svg-core' import { library } from '@fortawesome/fontawesome-svg-core'
import { import {
faWrench, faWrench,
faUser, faHand,
faFilter, faFilter,
faPaintBrush, faPaintBrush,
faBell, faBell,
@ -19,7 +19,7 @@ import {
library.add( library.add(
faWrench, faWrench,
faUser, faHand,
faFilter, faFilter,
faPaintBrush, faPaintBrush,
faBell, faBell,

View File

@ -7,15 +7,15 @@
:body-scroll-lock="bodyLock" :body-scroll-lock="bodyLock"
> >
<div <div
:label="$t('admin_dash.instance')" :label="$t('admin_dash.tabs.instance')"
icon="wrench" icon="wrench"
data-tab-name="general" data-tab-name="general"
> >
<InstanceTab /> <InstanceTab />
</div> </div>
<div <div
:label="$t('admin_dash.limits')" :label="$t('admin_dash.tabs.limits')"
icon="wrench" icon="hand"
data-tab-name="limits" data-tab-name="limits"
> >
<LimitsTab /> <LimitsTab />

View File

@ -832,6 +832,33 @@
"frontend_version": "Frontend version" "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": { "time": {
"unit": { "unit": {
"days": "{0} day | {0} days", "days": "{0} day | {0} days",