プライバシーポリシー・運営者情報のリンクを追加 (#11925)
* 運営者情報・プライバシーポリシーリンクを追加 * Update Changelog * Run api extractor * プライバシーポリシー・利用規約の同意をまとめる * Update Changelog * fix lint * fix * api extractor * improve design * nodeinfoにプライバシーポリシー・運営者情報を追加
This commit is contained in:
		| @@ -46,14 +46,18 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| 							<template #value>{{ instance.maintainerEmail }}</template> | ||||
| 						</MkKeyValue> | ||||
| 					</FormSplit> | ||||
| 					<MkFolder v-if="instance.serverRules.length > 0"> | ||||
| 						<template #label>{{ i18n.ts.serverRules }}</template> | ||||
| 					<FormLink v-if="instance.impressumUrl" :to="instance.impressumUrl" external>{{ i18n.ts.impressum }}</FormLink> | ||||
| 					<div class="_formLinks"> | ||||
| 						<MkFolder v-if="instance.serverRules.length > 0"> | ||||
| 							<template #label>{{ i18n.ts.serverRules }}</template> | ||||
|  | ||||
| 						<ol class="_gaps_s" :class="$style.rules"> | ||||
| 							<li v-for="item in instance.serverRules" :class="$style.rule"><div :class="$style.ruleText" v-html="item"></div></li> | ||||
| 						</ol> | ||||
| 					</MkFolder> | ||||
| 					<FormLink v-if="instance.tosUrl" :to="instance.tosUrl" external>{{ i18n.ts.termsOfService }}</FormLink> | ||||
| 							<ol class="_gaps_s" :class="$style.rules"> | ||||
| 								<li v-for="item, index in instance.serverRules" :key="index" :class="$style.rule"><div :class="$style.ruleText" v-html="item"></div></li> | ||||
| 							</ol> | ||||
| 						</MkFolder> | ||||
| 						<FormLink v-if="instance.tosUrl" :to="instance.tosUrl" external>{{ i18n.ts.termsOfService }}</FormLink> | ||||
| 						<FormLink v-if="instance.privacyPolicyUrl" :to="instance.privacyPolicyUrl" external>{{ i18n.ts.privacyPolicy }}</FormLink> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			</FormSection> | ||||
|  | ||||
|   | ||||
| @@ -25,6 +25,11 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| 						<template #label>{{ i18n.ts.tosUrl }}</template> | ||||
| 					</MkInput> | ||||
|  | ||||
| 					<MkInput v-model="privacyPolicyUrl"> | ||||
| 						<template #prefix><i class="ti ti-link"></i></template> | ||||
| 						<template #label>{{ i18n.ts.privacyPolicyUrl }}</template> | ||||
| 					</MkInput> | ||||
|  | ||||
| 					<MkTextarea v-model="preservedUsernames"> | ||||
| 						<template #label>{{ i18n.ts.preservedUsernames }}</template> | ||||
| 						<template #caption>{{ i18n.ts.preservedUsernamesDescription }}</template> | ||||
| @@ -69,6 +74,7 @@ let emailRequiredForSignup: boolean = $ref(false); | ||||
| let sensitiveWords: string = $ref(''); | ||||
| let preservedUsernames: string = $ref(''); | ||||
| let tosUrl: string | null = $ref(null); | ||||
| let privacyPolicyUrl: string | null = $ref(null); | ||||
|  | ||||
| async function init() { | ||||
| 	const meta = await os.api('admin/meta'); | ||||
| @@ -77,6 +83,7 @@ async function init() { | ||||
| 	sensitiveWords = meta.sensitiveWords.join('\n'); | ||||
| 	preservedUsernames = meta.preservedUsernames.join('\n'); | ||||
| 	tosUrl = meta.tosUrl; | ||||
| 	privacyPolicyUrl = meta.privacyPolicyUrl; | ||||
| } | ||||
|  | ||||
| function save() { | ||||
| @@ -84,6 +91,7 @@ function save() { | ||||
| 		disableRegistration: !enableRegistration, | ||||
| 		emailRequiredForSignup, | ||||
| 		tosUrl, | ||||
| 		privacyPolicyUrl, | ||||
| 		sensitiveWords: sensitiveWords.split('\n'), | ||||
| 		preservedUsernames: preservedUsernames.split('\n'), | ||||
| 	}).then(() => { | ||||
|   | ||||
| @@ -34,6 +34,12 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| 						</MkInput> | ||||
| 					</FormSplit> | ||||
|  | ||||
| 					<MkInput v-model="impressumUrl"> | ||||
| 						<template #label>{{ i18n.ts.impressumUrl }}</template> | ||||
| 						<template #prefix><i class="ti ti-link"></i></template> | ||||
| 						<template #caption>{{ i18n.ts.impressumDescription }}</template> | ||||
| 					</MkInput> | ||||
|  | ||||
| 					<MkTextarea v-model="pinnedUsers"> | ||||
| 						<template #label>{{ i18n.ts.pinnedUsers }}</template> | ||||
| 						<template #caption>{{ i18n.ts.pinnedUsersDescription }}</template> | ||||
| @@ -135,6 +141,7 @@ let shortName: string | null = $ref(null); | ||||
| let description: string | null = $ref(null); | ||||
| let maintainerName: string | null = $ref(null); | ||||
| let maintainerEmail: string | null = $ref(null); | ||||
| let impressumUrl: string | null = $ref(null); | ||||
| let pinnedUsers: string = $ref(''); | ||||
| let cacheRemoteFiles: boolean = $ref(false); | ||||
| let cacheRemoteSensitiveFiles: boolean = $ref(false); | ||||
| @@ -153,6 +160,7 @@ async function init(): Promise<void> { | ||||
| 	description = meta.description; | ||||
| 	maintainerName = meta.maintainerName; | ||||
| 	maintainerEmail = meta.maintainerEmail; | ||||
| 	impressumUrl = meta.impressumUrl; | ||||
| 	pinnedUsers = meta.pinnedUsers.join('\n'); | ||||
| 	cacheRemoteFiles = meta.cacheRemoteFiles; | ||||
| 	cacheRemoteSensitiveFiles = meta.cacheRemoteSensitiveFiles; | ||||
| @@ -172,6 +180,7 @@ function save(): void { | ||||
| 		description, | ||||
| 		maintainerName, | ||||
| 		maintainerEmail, | ||||
| 		impressumUrl, | ||||
| 		pinnedUsers: pinnedUsers.split('\n'), | ||||
| 		cacheRemoteFiles, | ||||
| 		cacheRemoteSensitiveFiles, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 かっこかり
					かっこかり