File tree 3 files changed +32
-9
lines changed
packages/frontend/src/pages/admin
3 files changed +32
-9
lines changed Original file line number Diff line number Diff line change @@ -1546,10 +1546,6 @@ export interface Locale extends ILocale {
1546
1546
* 登録
1547
1547
*/
1548
1548
"registration" : string ;
1549
- /**
1550
- * 誰でも新規登録できるようにする
1551
- */
1552
- "enableRegistration" : string ;
1553
1549
/**
1554
1550
* 招待
1555
1551
*/
@@ -5218,6 +5214,10 @@ export interface Locale extends ILocale {
5218
5214
* 利用可能なロール
5219
5215
*/
5220
5216
"availableRoles" : string ;
5217
+ /**
5218
+ * 注意事項を理解した上でオンにします。
5219
+ */
5220
+ "acknowledgeNotesAndEnable" : string ;
5221
5221
"_accountSettings" : {
5222
5222
/**
5223
5223
* コンテンツの表示にログインを必須にする
@@ -5794,6 +5794,14 @@ export interface Locale extends ILocale {
5794
5794
* サーバー運営者へのお問い合わせフォームのURLや、運営者の連絡先等が記載されたWebページのURLを指定します。
5795
5795
*/
5796
5796
"inquiryUrlDescription" : string ;
5797
+ /**
5798
+ * アカウントの作成をオープンにする
5799
+ */
5800
+ "openRegistration" : string ;
5801
+ /**
5802
+ * 登録を開放することはリスクが伴います。サーバーを常に監視し、トラブルが発生した際にすぐに対応できる体制がある場合のみオンにすることを推奨します。
5803
+ */
5804
+ "openRegistrationWarning" : string ;
5797
5805
/**
5798
5806
* 一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。
5799
5807
*/
Original file line number Diff line number Diff line change @@ -382,7 +382,6 @@ enableLocalTimeline: "ローカルタイムラインを有効にする"
382
382
enableGlobalTimeline : " グローバルタイムラインを有効にする"
383
383
disablingTimelinesInfo : " これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。"
384
384
registration : " 登録"
385
- enableRegistration : " 誰でも新規登録できるようにする"
386
385
invite : " 招待"
387
386
driveCapacityPerLocalAccount : " ローカルユーザーひとりあたりのドライブ容量"
388
387
driveCapacityPerRemoteAccount : " リモートユーザーひとりあたりのドライブ容量"
@@ -1300,6 +1299,7 @@ thisContentsAreMarkedAsSigninRequiredByAuthor: "投稿者により、表示に
1300
1299
lockdown : " ロックダウン"
1301
1300
pleaseSelectAccount : " アカウントを選択してください"
1302
1301
availableRoles : " 利用可能なロール"
1302
+ acknowledgeNotesAndEnable : " 注意事項を理解した上でオンにします。"
1303
1303
1304
1304
_accountSettings :
1305
1305
requireSigninToViewContents : " コンテンツの表示にログインを必須にする"
@@ -1466,6 +1466,8 @@ _serverSettings:
1466
1466
reactionsBufferingDescription : " 有効にすると、リアクション作成時のパフォーマンスが大幅に向上し、データベースへの負荷を軽減することが可能です。ただし、Redisのメモリ使用量は増加します。"
1467
1467
inquiryUrl : " 問い合わせ先URL"
1468
1468
inquiryUrlDescription : " サーバー運営者へのお問い合わせフォームのURLや、運営者の連絡先等が記載されたWebページのURLを指定します。"
1469
+ openRegistration : " アカウントの作成をオープンにする"
1470
+ openRegistrationWarning : " 登録を開放することはリスクが伴います。サーバーを常に監視し、トラブルが発生した際にすぐに対応できる体制がある場合のみオンにすることを推奨します。"
1469
1471
thisSettingWillAutomaticallyOffWhenModeratorsInactive : " 一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。"
1470
1472
1471
1473
_accountMigration :
Original file line number Diff line number Diff line change @@ -10,9 +10,12 @@ SPDX-License-Identifier: AGPL-3.0-only
10
10
<MkSpacer :contentMax="700" :marginMin="16" :marginMax="32">
11
11
<FormSuspense :p="init">
12
12
<div class="_gaps_m">
13
- <MkSwitch v-model="enableRegistration" @change="onChange_enableRegistration">
14
- <template #label>{{ i18n.ts.enableRegistration }}</template>
15
- <template #caption>{{ i18n.ts._serverSettings.thisSettingWillAutomaticallyOffWhenModeratorsInactive }}</template>
13
+ <MkSwitch :modelValue="enableRegistration" @update:modelValue="onChange_enableRegistration">
14
+ <template #label>{{ i18n.ts._serverSettings.openRegistration }}</template>
15
+ <template #caption>
16
+ <div>{{ i18n.ts._serverSettings.thisSettingWillAutomaticallyOffWhenModeratorsInactive }}</div>
17
+ <div><i class="ti ti-alert-triangle" style="color: var(--MI_THEME-warn);"></i> {{ i18n.ts._serverSettings.openRegistrationWarning }}</div>
18
+ </template>
16
19
</MkSwitch>
17
20
18
21
<MkSwitch v-model="emailRequiredForSignup" @change="onChange_emailRequiredForSignup">
@@ -164,7 +167,17 @@ async function init() {
164
167
mediaSilencedHosts.value = meta.mediaSilencedHosts.join('\n');
165
168
}
166
169
167
- function onChange_enableRegistration(value: boolean) {
170
+ async function onChange_enableRegistration(value: boolean) {
171
+ if (value) {
172
+ const { canceled } = await os.confirm({
173
+ type: 'warning',
174
+ text: i18n.ts.acknowledgeNotesAndEnable,
175
+ });
176
+ if (canceled) return;
177
+ }
178
+
179
+ enableRegistration.value = value;
180
+
168
181
os.apiWithDialog('admin/update-meta', {
169
182
disableRegistration: !value,
170
183
}).then(() => {
You can’t perform that action at this time.
0 commit comments