add warning for open registration (#14963)
* wip
* wip
* Update ja-JP.yml
* Update index.d.ts
* ✌️
			
			
This commit is contained in:
		
							
								
								
									
										16
									
								
								locales/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								locales/index.d.ts
									
									
									
									
										vendored
									
									
								
							| @@ -1546,10 +1546,6 @@ export interface Locale extends ILocale { | |||||||
|      * 登録 |      * 登録 | ||||||
|      */ |      */ | ||||||
|     "registration": string; |     "registration": string; | ||||||
|     /** |  | ||||||
|      * 誰でも新規登録できるようにする |  | ||||||
|      */ |  | ||||||
|     "enableRegistration": string; |  | ||||||
|     /** |     /** | ||||||
|      * 招待 |      * 招待 | ||||||
|      */ |      */ | ||||||
| @@ -5218,6 +5214,10 @@ export interface Locale extends ILocale { | |||||||
|      * 利用可能なロール |      * 利用可能なロール | ||||||
|      */ |      */ | ||||||
|     "availableRoles": string; |     "availableRoles": string; | ||||||
|  |     /** | ||||||
|  |      * 注意事項を理解した上でオンにします。 | ||||||
|  |      */ | ||||||
|  |     "acknowledgeNotesAndEnable": string; | ||||||
|     "_accountSettings": { |     "_accountSettings": { | ||||||
|         /** |         /** | ||||||
|          * コンテンツの表示にログインを必須にする |          * コンテンツの表示にログインを必須にする | ||||||
| @@ -5794,6 +5794,14 @@ export interface Locale extends ILocale { | |||||||
|          * サーバー運営者へのお問い合わせフォームのURLや、運営者の連絡先等が記載されたWebページのURLを指定します。 |          * サーバー運営者へのお問い合わせフォームのURLや、運営者の連絡先等が記載されたWebページのURLを指定します。 | ||||||
|          */ |          */ | ||||||
|         "inquiryUrlDescription": string; |         "inquiryUrlDescription": string; | ||||||
|  |         /** | ||||||
|  |          * アカウントの作成をオープンにする | ||||||
|  |          */ | ||||||
|  |         "openRegistration": string; | ||||||
|  |         /** | ||||||
|  |          * 登録を開放することはリスクが伴います。サーバーを常に監視し、トラブルが発生した際にすぐに対応できる体制がある場合のみオンにすることを推奨します。 | ||||||
|  |          */ | ||||||
|  |         "openRegistrationWarning": string; | ||||||
|         /** |         /** | ||||||
|          * 一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。 |          * 一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。 | ||||||
|          */ |          */ | ||||||
|   | |||||||
| @@ -382,7 +382,6 @@ enableLocalTimeline: "ローカルタイムラインを有効にする" | |||||||
| enableGlobalTimeline: "グローバルタイムラインを有効にする" | enableGlobalTimeline: "グローバルタイムラインを有効にする" | ||||||
| disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。" | disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。" | ||||||
| registration: "登録" | registration: "登録" | ||||||
| enableRegistration: "誰でも新規登録できるようにする" |  | ||||||
| invite: "招待" | invite: "招待" | ||||||
| driveCapacityPerLocalAccount: "ローカルユーザーひとりあたりのドライブ容量" | driveCapacityPerLocalAccount: "ローカルユーザーひとりあたりのドライブ容量" | ||||||
| driveCapacityPerRemoteAccount: "リモートユーザーひとりあたりのドライブ容量" | driveCapacityPerRemoteAccount: "リモートユーザーひとりあたりのドライブ容量" | ||||||
| @@ -1300,6 +1299,7 @@ thisContentsAreMarkedAsSigninRequiredByAuthor: "投稿者により、表示に | |||||||
| lockdown: "ロックダウン" | lockdown: "ロックダウン" | ||||||
| pleaseSelectAccount: "アカウントを選択してください" | pleaseSelectAccount: "アカウントを選択してください" | ||||||
| availableRoles: "利用可能なロール" | availableRoles: "利用可能なロール" | ||||||
|  | acknowledgeNotesAndEnable: "注意事項を理解した上でオンにします。" | ||||||
|  |  | ||||||
| _accountSettings: | _accountSettings: | ||||||
|   requireSigninToViewContents: "コンテンツの表示にログインを必須にする" |   requireSigninToViewContents: "コンテンツの表示にログインを必須にする" | ||||||
| @@ -1466,6 +1466,8 @@ _serverSettings: | |||||||
|   reactionsBufferingDescription: "有効にすると、リアクション作成時のパフォーマンスが大幅に向上し、データベースへの負荷を軽減することが可能です。ただし、Redisのメモリ使用量は増加します。" |   reactionsBufferingDescription: "有効にすると、リアクション作成時のパフォーマンスが大幅に向上し、データベースへの負荷を軽減することが可能です。ただし、Redisのメモリ使用量は増加します。" | ||||||
|   inquiryUrl: "問い合わせ先URL" |   inquiryUrl: "問い合わせ先URL" | ||||||
|   inquiryUrlDescription: "サーバー運営者へのお問い合わせフォームのURLや、運営者の連絡先等が記載されたWebページのURLを指定します。" |   inquiryUrlDescription: "サーバー運営者へのお問い合わせフォームのURLや、運営者の連絡先等が記載されたWebページのURLを指定します。" | ||||||
|  |   openRegistration: "アカウントの作成をオープンにする" | ||||||
|  |   openRegistrationWarning: "登録を開放することはリスクが伴います。サーバーを常に監視し、トラブルが発生した際にすぐに対応できる体制がある場合のみオンにすることを推奨します。" | ||||||
|   thisSettingWillAutomaticallyOffWhenModeratorsInactive: "一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。" |   thisSettingWillAutomaticallyOffWhenModeratorsInactive: "一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。" | ||||||
|  |  | ||||||
| _accountMigration: | _accountMigration: | ||||||
|   | |||||||
| @@ -10,9 +10,12 @@ SPDX-License-Identifier: AGPL-3.0-only | |||||||
| 		<MkSpacer :contentMax="700" :marginMin="16" :marginMax="32"> | 		<MkSpacer :contentMax="700" :marginMin="16" :marginMax="32"> | ||||||
| 			<FormSuspense :p="init"> | 			<FormSuspense :p="init"> | ||||||
| 				<div class="_gaps_m"> | 				<div class="_gaps_m"> | ||||||
| 					<MkSwitch v-model="enableRegistration" @change="onChange_enableRegistration"> | 					<MkSwitch :modelValue="enableRegistration" @update:modelValue="onChange_enableRegistration"> | ||||||
| 						<template #label>{{ i18n.ts.enableRegistration }}</template> | 						<template #label>{{ i18n.ts._serverSettings.openRegistration }}</template> | ||||||
| 						<template #caption>{{ i18n.ts._serverSettings.thisSettingWillAutomaticallyOffWhenModeratorsInactive }}</template> | 						<template #caption> | ||||||
|  | 							<div>{{ i18n.ts._serverSettings.thisSettingWillAutomaticallyOffWhenModeratorsInactive }}</div> | ||||||
|  | 							<div><i class="ti ti-alert-triangle" style="color: var(--MI_THEME-warn);"></i> {{ i18n.ts._serverSettings.openRegistrationWarning }}</div> | ||||||
|  | 						</template> | ||||||
| 					</MkSwitch> | 					</MkSwitch> | ||||||
|  |  | ||||||
| 					<MkSwitch v-model="emailRequiredForSignup" @change="onChange_emailRequiredForSignup"> | 					<MkSwitch v-model="emailRequiredForSignup" @change="onChange_emailRequiredForSignup"> | ||||||
| @@ -164,7 +167,17 @@ async function init() { | |||||||
| 	mediaSilencedHosts.value = meta.mediaSilencedHosts.join('\n'); | 	mediaSilencedHosts.value = meta.mediaSilencedHosts.join('\n'); | ||||||
| } | } | ||||||
|  |  | ||||||
| function onChange_enableRegistration(value: boolean) { | async function onChange_enableRegistration(value: boolean) { | ||||||
|  | 	if (value) { | ||||||
|  | 		const { canceled } = await os.confirm({ | ||||||
|  | 			type: 'warning', | ||||||
|  | 			text: i18n.ts.acknowledgeNotesAndEnable, | ||||||
|  | 		}); | ||||||
|  | 		if (canceled) return; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	enableRegistration.value = value; | ||||||
|  |  | ||||||
| 	os.apiWithDialog('admin/update-meta', { | 	os.apiWithDialog('admin/update-meta', { | ||||||
| 		disableRegistration: !value, | 		disableRegistration: !value, | ||||||
| 	}).then(() => { | 	}).then(() => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo