registrations tab
This commit is contained in:
parent
489fb17070
commit
eae09226b5
6 changed files with 236 additions and 83 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div :label="$t('admin_dash.tabs.instance')">
|
||||
<div class="setting-item">
|
||||
<h2>{{ $t('admin_dash.instance.instance') }}</h2>
|
||||
<h3>{{ $t('admin_dash.instance.instance') }}</h3>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<StringSetting path=":pleroma.:instance.:name" />
|
||||
|
|
@ -34,75 +34,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<h2>{{ $t('admin_dash.instance.registrations') }}</h2>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<BooleanSetting path=":pleroma.:instance.:registrations_open" />
|
||||
<ul class="setting-list suboptions">
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path=":pleroma.:instance.:invites_enabled"
|
||||
parent-path=":pleroma.:instance.:registrations_open"
|
||||
parent-invert
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path=":pleroma.:instance.:birthday_required" />
|
||||
<ul class="setting-list suboptions">
|
||||
<li>
|
||||
<IntegerSetting
|
||||
path=":pleroma.:instance.:birthday_min_age"
|
||||
parent-path=":pleroma.:instance.:birthday_required"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path=":pleroma.:instance.:account_activation_required" />
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path=":pleroma.:instance.:account_approval_required" />
|
||||
</li>
|
||||
<li>
|
||||
<h3>{{ $t('admin_dash.instance.captcha_header') }}</h3>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<BooleanSetting :path="[':pleroma', 'Pleroma.Captcha', ':enabled']" />
|
||||
<ul class="setting-list suboptions">
|
||||
<li>
|
||||
<ChoiceSetting
|
||||
:path="[':pleroma', 'Pleroma.Captcha', ':method']"
|
||||
:parent-path="[':pleroma', 'Pleroma.Captcha', ':enabled']"
|
||||
:option-label-map="{
|
||||
'Pleroma.Captcha.Native': $t('admin_dash.captcha.native'),
|
||||
'Pleroma.Captcha.Kocaptcha': $t('admin_dash.captcha.kocaptcha')
|
||||
}"
|
||||
/>
|
||||
<IntegerSetting
|
||||
:path="[':pleroma', 'Pleroma.Captcha', ':seconds_valid']"
|
||||
:parent-path="[':pleroma', 'Pleroma.Captcha', ':enabled']"
|
||||
/>
|
||||
</li>
|
||||
<li
|
||||
v-if="adminDraft[':pleroma']['Pleroma.Captcha'][':enabled'] && adminDraft[':pleroma']['Pleroma.Captcha'][':method'] === 'Pleroma.Captcha.Kocaptcha'"
|
||||
>
|
||||
<h4>{{ $t('admin_dash.instance.kocaptcha') }}</h4>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<StringSetting :path="[':pleroma', 'Pleroma.Captcha.Kocaptcha', ':endpoint']" />
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<h2>{{ $t('admin_dash.instance.access') }}</h2>
|
||||
<h3>{{ $t('admin_dash.instance.access') }}</h3>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<BooleanSetting
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
import BooleanSetting from '../helpers/boolean_setting.vue'
|
||||
import ChoiceSetting from '../helpers/choice_setting.vue'
|
||||
import IntegerSetting from '../helpers/integer_setting.vue'
|
||||
import StringSetting from '../helpers/string_setting.vue'
|
||||
import GroupSetting from '../helpers/group_setting.vue'
|
||||
import AttachmentSetting from '../helpers/attachment_setting.vue'
|
||||
|
||||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faGlobe
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
library.add(
|
||||
faGlobe
|
||||
)
|
||||
|
||||
const RegistrationsTab = {
|
||||
provide () {
|
||||
return {
|
||||
defaultDraftMode: true,
|
||||
defaultSource: 'admin'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
BooleanSetting,
|
||||
ChoiceSetting,
|
||||
IntegerSetting,
|
||||
StringSetting,
|
||||
AttachmentSetting,
|
||||
GroupSetting
|
||||
},
|
||||
computed: {
|
||||
...SharedComputedObject()
|
||||
}
|
||||
}
|
||||
|
||||
export default RegistrationsTab
|
||||
158
src/components/settings_modal/admin_tabs/registrations_tab.vue
Normal file
158
src/components/settings_modal/admin_tabs/registrations_tab.vue
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
<template>
|
||||
<div :label="$t('admin_dash.tabs.instance')">
|
||||
<div class="setting-item">
|
||||
<h3>{{ $t('admin_dash.instance.registrations') }}</h3>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<BooleanSetting path=":pleroma.:instance.:registrations_open" />
|
||||
<ul class="setting-list suboptions">
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path=":pleroma.:instance.:invites_enabled"
|
||||
parent-path=":pleroma.:instance.:registrations_open"
|
||||
parent-invert
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path=":pleroma.:instance.:birthday_required" />
|
||||
<ul class="setting-list suboptions">
|
||||
<li>
|
||||
<IntegerSetting
|
||||
path=":pleroma.:instance.:birthday_min_age"
|
||||
parent-path=":pleroma.:instance.:birthday_required"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path=":pleroma.:instance.:account_activation_required" />
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path=":pleroma.:instance.:account_approval_required" />
|
||||
</li>
|
||||
<li>
|
||||
<h4>{{ $t('admin_dash.instance.captcha_header') }}</h4>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<BooleanSetting :path="[':pleroma', 'Pleroma.Captcha', ':enabled']" />
|
||||
<ul class="setting-list suboptions">
|
||||
<li>
|
||||
<ChoiceSetting
|
||||
:path="[':pleroma', 'Pleroma.Captcha', ':method']"
|
||||
:parent-path="[':pleroma', 'Pleroma.Captcha', ':enabled']"
|
||||
:option-label-map="{
|
||||
'Pleroma.Captcha.Native': $t('admin_dash.captcha.native'),
|
||||
'Pleroma.Captcha.Kocaptcha': $t('admin_dash.captcha.kocaptcha')
|
||||
}"
|
||||
/>
|
||||
<IntegerSetting
|
||||
:path="[':pleroma', 'Pleroma.Captcha', ':seconds_valid']"
|
||||
:parent-path="[':pleroma', 'Pleroma.Captcha', ':enabled']"
|
||||
/>
|
||||
</li>
|
||||
<li
|
||||
v-if="adminDraft[':pleroma']['Pleroma.Captcha'][':enabled'] && adminDraft[':pleroma']['Pleroma.Captcha'][':method'] === 'Pleroma.Captcha.Kocaptcha'"
|
||||
>
|
||||
<h5>{{ $t('admin_dash.instance.kocaptcha') }}</h5>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<StringSetting :path="[':pleroma', 'Pleroma.Captcha.Kocaptcha', ':endpoint']" />
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<h3>{{ $t('admin_dash.registrations.welcome.title') }}</h3>
|
||||
<ul class="setting-list">
|
||||
<p>{{ $t('admin_dash.registrations.welcome.description') }}</p>
|
||||
<li>
|
||||
<h4>{{ $t('admin_dash.registrations.welcome.direct_message') }}</h4>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path=":pleroma.:welcome.:direct_message.:enabled"
|
||||
/>
|
||||
<ul class="setting-list suboptions">
|
||||
<li>
|
||||
<StringSetting
|
||||
path=":pleroma.:welcome.:direct_message.:sender_nickname"
|
||||
parent-path=":pleroma.:welcome.:direct_message.:enabled"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<StringSetting
|
||||
path=":pleroma.:welcome.:direct_message.:message"
|
||||
parent-path=":pleroma.:welcome.:direct_message.:enabled"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h4>{{ $t('admin_dash.registrations.welcome.chat_message') }}</h4>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path=":pleroma.:welcome.:chat_message.:enabled"
|
||||
/>
|
||||
<ul class="setting-list suboptions">
|
||||
<li>
|
||||
<StringSetting
|
||||
path=":pleroma.:welcome.:chat_message.:sender_nickname"
|
||||
parent-path=":pleroma.:welcome.:chat_message.:enabled"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<StringSetting
|
||||
path=":pleroma.:welcome.:chat_message.:message"
|
||||
parent-path=":pleroma.:welcome.:chat_message.:enabled"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h4>{{ $t('admin_dash.registrations.welcome.email') }}</h4>
|
||||
<ul class="setting-list">
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path=":pleroma.:welcome.:email.:enabled"
|
||||
/>
|
||||
<ul class="setting-list suboptions">
|
||||
<li>
|
||||
<StringSetting
|
||||
path=":pleroma.:welcome.:email.:sender"
|
||||
parent-path=":pleroma.:welcome.:email.:enabled"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<StringSetting
|
||||
path=":pleroma.:welcome.:email.:subject"
|
||||
parent-path=":pleroma.:welcome.:email.:enabled"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<StringSetting
|
||||
path=":pleroma.:welcome.:email.:html"
|
||||
parent-path=":pleroma.:welcome.:email.:enabled"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="./registrations_tab.js"></script>
|
||||
|
|
@ -6,6 +6,7 @@ import FrontendsTab from './admin_tabs/frontends_tab.vue'
|
|||
import EmojiTab from './admin_tabs/emoji_tab.vue'
|
||||
import MailerTab from './admin_tabs/mailer_tab.vue'
|
||||
import MonitoringTab from './admin_tabs/monitoring_tab.vue'
|
||||
import RegistrationsTab from './admin_tabs/registrations_tab.vue'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
|
@ -14,7 +15,8 @@ import {
|
|||
faHand,
|
||||
faLaptopCode,
|
||||
faEnvelope,
|
||||
faChartLine
|
||||
faChartLine,
|
||||
faDoorOpen
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
library.add(
|
||||
|
|
@ -22,7 +24,8 @@ library.add(
|
|||
faHand,
|
||||
faLaptopCode,
|
||||
faEnvelope,
|
||||
faChartLine
|
||||
faChartLine,
|
||||
faDoorOpen
|
||||
)
|
||||
|
||||
const SettingsModalAdminContent = {
|
||||
|
|
@ -34,7 +37,8 @@ const SettingsModalAdminContent = {
|
|||
FrontendsTab,
|
||||
MailerTab,
|
||||
EmojiTab,
|
||||
MonitoringTab
|
||||
MonitoringTab,
|
||||
RegistrationsTab
|
||||
},
|
||||
computed: {
|
||||
user () {
|
||||
|
|
|
|||
|
|
@ -48,14 +48,23 @@
|
|||
>
|
||||
<InstanceTab />
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="adminDbLoaded"
|
||||
:label="$t('admin_dash.tabs.limits')"
|
||||
icon="hand"
|
||||
data-tab-name="limits"
|
||||
:label="$t('admin_dash.tabs.registrations')"
|
||||
icon="door-open"
|
||||
data-tab-name="registrations"
|
||||
>
|
||||
<LimitsTab />
|
||||
<RegistrationsTab />
|
||||
</div>
|
||||
|
||||
<div
|
||||
:label="$t('admin_dash.tabs.emoji')"
|
||||
icon="face-smile-beam"
|
||||
data-tab-name="emoji"
|
||||
>
|
||||
<EmojiTab />
|
||||
</div>
|
||||
|
||||
<div
|
||||
:label="$t('admin_dash.tabs.frontends')"
|
||||
icon="laptop-code"
|
||||
|
|
@ -65,11 +74,12 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
:label="$t('admin_dash.tabs.emoji')"
|
||||
icon="face-smile-beam"
|
||||
data-tab-name="emoji"
|
||||
v-if="adminDbLoaded"
|
||||
:label="$t('admin_dash.tabs.limits')"
|
||||
icon="hand"
|
||||
data-tab-name="limits"
|
||||
>
|
||||
<EmojiTab />
|
||||
<LimitsTab />
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -1153,7 +1153,9 @@
|
|||
"limits": "Limits",
|
||||
"frontends": "Front-ends",
|
||||
"mailer": "EMails",
|
||||
"emoji": "Emoji"
|
||||
"emoji": "Emoji",
|
||||
"monitoring": "Monitoring",
|
||||
"registrations": "Registrations"
|
||||
},
|
||||
"nodb": {
|
||||
"heading": "Database config is disabled",
|
||||
|
|
@ -1179,6 +1181,15 @@
|
|||
"activities": "Statuses/activities access"
|
||||
}
|
||||
},
|
||||
"registrations": {
|
||||
"welcome": {
|
||||
"title": "Welcome message",
|
||||
"description": "Send new users a message when they sign up",
|
||||
"direct_message": "Via direct message",
|
||||
"chat_message": "Via chat",
|
||||
"email_message": "Via email"
|
||||
}
|
||||
},
|
||||
"mailer": {
|
||||
"adapter": "Mailing Adapter",
|
||||
"auth": "Authentication"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue