refactor
This commit is contained in:
		@@ -4,10 +4,10 @@
 | 
			
		||||
	<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
 | 
			
		||||
		<FormSuspense :p="init">
 | 
			
		||||
			<div class="_gaps_m">
 | 
			
		||||
				<FormSwitch v-model="enableEmail">
 | 
			
		||||
				<MkSwitch v-model="enableEmail">
 | 
			
		||||
					<template #label>{{ i18n.ts.enableEmail }} ({{ i18n.ts.recommended }})</template>
 | 
			
		||||
					<template #caption>{{ i18n.ts.emailConfigInfo }}</template>
 | 
			
		||||
				</FormSwitch>
 | 
			
		||||
				</MkSwitch>
 | 
			
		||||
 | 
			
		||||
				<template v-if="enableEmail">
 | 
			
		||||
					<FormInput v-model="email" type="email">
 | 
			
		||||
@@ -35,10 +35,10 @@
 | 
			
		||||
								</FormInput>
 | 
			
		||||
							</FormSplit>
 | 
			
		||||
							<FormInfo>{{ i18n.ts.emptyToDisableSmtpAuth }}</FormInfo>
 | 
			
		||||
							<FormSwitch v-model="smtpSecure">
 | 
			
		||||
							<MkSwitch v-model="smtpSecure">
 | 
			
		||||
								<template #label>{{ i18n.ts.smtpSecure }}</template>
 | 
			
		||||
								<template #caption>{{ i18n.ts.smtpSecureInfo }}</template>
 | 
			
		||||
							</FormSwitch>
 | 
			
		||||
							</MkSwitch>
 | 
			
		||||
						</div>
 | 
			
		||||
					</FormSection>
 | 
			
		||||
				</template>
 | 
			
		||||
@@ -51,7 +51,7 @@
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { } from 'vue';
 | 
			
		||||
import XHeader from './_header_.vue';
 | 
			
		||||
import FormSwitch from '@/components/form/switch.vue';
 | 
			
		||||
import MkSwitch from '@/components/MkSwitch.vue';
 | 
			
		||||
import FormInput from '@/components/form/input.vue';
 | 
			
		||||
import FormInfo from '@/components/MkInfo.vue';
 | 
			
		||||
import FormSuspense from '@/components/form/suspense.vue';
 | 
			
		||||
 
 | 
			
		||||
@@ -74,7 +74,7 @@ import MkButton from '@/components/MkButton.vue';
 | 
			
		||||
import MkInput from '@/components/form/input.vue';
 | 
			
		||||
import MkPagination from '@/components/MkPagination.vue';
 | 
			
		||||
import MkTab from '@/components/MkTab.vue';
 | 
			
		||||
import MkSwitch from '@/components/form/switch.vue';
 | 
			
		||||
import MkSwitch from '@/components/MkSwitch.vue';
 | 
			
		||||
import FormSplit from '@/components/form/split.vue';
 | 
			
		||||
import { selectFile, selectFiles } from '@/scripts/select-file';
 | 
			
		||||
import * as os from '@/os';
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
<template>
 | 
			
		||||
<FormSuspense :p="init">
 | 
			
		||||
	<div class="_gaps_m">
 | 
			
		||||
		<FormSwitch v-model="enableDiscordIntegration">
 | 
			
		||||
		<MkSwitch v-model="enableDiscordIntegration">
 | 
			
		||||
			<template #label>{{ i18n.ts.enable }}</template>
 | 
			
		||||
		</FormSwitch>
 | 
			
		||||
		</MkSwitch>
 | 
			
		||||
 | 
			
		||||
		<template v-if="enableDiscordIntegration">
 | 
			
		||||
			<FormInfo>Callback URL: {{ `${uri}/api/dc/cb` }}</FormInfo>
 | 
			
		||||
@@ -26,7 +26,7 @@
 | 
			
		||||
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { } from 'vue';
 | 
			
		||||
import FormSwitch from '@/components/form/switch.vue';
 | 
			
		||||
import MkSwitch from '@/components/MkSwitch.vue';
 | 
			
		||||
import FormInput from '@/components/form/input.vue';
 | 
			
		||||
import MkButton from '@/components/MkButton.vue';
 | 
			
		||||
import FormInfo from '@/components/MkInfo.vue';
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
<template>
 | 
			
		||||
<FormSuspense :p="init">
 | 
			
		||||
	<div class="_gaps_m">
 | 
			
		||||
		<FormSwitch v-model="enableGithubIntegration">
 | 
			
		||||
		<MkSwitch v-model="enableGithubIntegration">
 | 
			
		||||
			<template #label>{{ i18n.ts.enable }}</template>
 | 
			
		||||
		</FormSwitch>
 | 
			
		||||
		</MkSwitch>
 | 
			
		||||
 | 
			
		||||
		<template v-if="enableGithubIntegration">
 | 
			
		||||
			<FormInfo>Callback URL: {{ `${uri}/api/gh/cb` }}</FormInfo>
 | 
			
		||||
@@ -26,7 +26,7 @@
 | 
			
		||||
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { } from 'vue';
 | 
			
		||||
import FormSwitch from '@/components/form/switch.vue';
 | 
			
		||||
import MkSwitch from '@/components/MkSwitch.vue';
 | 
			
		||||
import FormInput from '@/components/form/input.vue';
 | 
			
		||||
import MkButton from '@/components/MkButton.vue';
 | 
			
		||||
import FormInfo from '@/components/MkInfo.vue';
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
<template>
 | 
			
		||||
<FormSuspense :p="init">
 | 
			
		||||
	<div class="_gaps_m">
 | 
			
		||||
		<FormSwitch v-model="enableTwitterIntegration">
 | 
			
		||||
		<MkSwitch v-model="enableTwitterIntegration">
 | 
			
		||||
			<template #label>{{ i18n.ts.enable }}</template>
 | 
			
		||||
		</FormSwitch>
 | 
			
		||||
		</MkSwitch>
 | 
			
		||||
 | 
			
		||||
		<template v-if="enableTwitterIntegration">
 | 
			
		||||
			<FormInfo>Callback URL: {{ `${uri}/api/tw/cb` }}</FormInfo>
 | 
			
		||||
@@ -26,7 +26,7 @@
 | 
			
		||||
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { defineComponent } from 'vue';
 | 
			
		||||
import FormSwitch from '@/components/form/switch.vue';
 | 
			
		||||
import MkSwitch from '@/components/MkSwitch.vue';
 | 
			
		||||
import FormInput from '@/components/form/input.vue';
 | 
			
		||||
import MkButton from '@/components/MkButton.vue';
 | 
			
		||||
import FormInfo from '@/components/MkInfo.vue';
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
	<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
 | 
			
		||||
		<FormSuspense :p="init">
 | 
			
		||||
			<div class="_gaps_m">
 | 
			
		||||
				<FormSwitch v-model="useObjectStorage">{{ i18n.ts.useObjectStorage }}</FormSwitch>
 | 
			
		||||
				<MkSwitch v-model="useObjectStorage">{{ i18n.ts.useObjectStorage }}</MkSwitch>
 | 
			
		||||
 | 
			
		||||
				<template v-if="useObjectStorage">
 | 
			
		||||
					<FormInput v-model="objectStorageBaseUrl">
 | 
			
		||||
@@ -44,23 +44,23 @@
 | 
			
		||||
						</FormInput>
 | 
			
		||||
					</FormSplit>
 | 
			
		||||
 | 
			
		||||
					<FormSwitch v-model="objectStorageUseSSL">
 | 
			
		||||
					<MkSwitch v-model="objectStorageUseSSL">
 | 
			
		||||
						<template #label>{{ i18n.ts.objectStorageUseSSL }}</template>
 | 
			
		||||
						<template #caption>{{ i18n.ts.objectStorageUseSSLDesc }}</template>
 | 
			
		||||
					</FormSwitch>
 | 
			
		||||
					</MkSwitch>
 | 
			
		||||
 | 
			
		||||
					<FormSwitch v-model="objectStorageUseProxy">
 | 
			
		||||
					<MkSwitch v-model="objectStorageUseProxy">
 | 
			
		||||
						<template #label>{{ i18n.ts.objectStorageUseProxy }}</template>
 | 
			
		||||
						<template #caption>{{ i18n.ts.objectStorageUseProxyDesc }}</template>
 | 
			
		||||
					</FormSwitch>
 | 
			
		||||
					</MkSwitch>
 | 
			
		||||
 | 
			
		||||
					<FormSwitch v-model="objectStorageSetPublicRead">
 | 
			
		||||
					<MkSwitch v-model="objectStorageSetPublicRead">
 | 
			
		||||
						<template #label>{{ i18n.ts.objectStorageSetPublicRead }}</template>
 | 
			
		||||
					</FormSwitch>
 | 
			
		||||
					</MkSwitch>
 | 
			
		||||
 | 
			
		||||
					<FormSwitch v-model="objectStorageS3ForcePathStyle">
 | 
			
		||||
					<MkSwitch v-model="objectStorageS3ForcePathStyle">
 | 
			
		||||
						<template #label>s3ForcePathStyle</template>
 | 
			
		||||
					</FormSwitch>
 | 
			
		||||
					</MkSwitch>
 | 
			
		||||
				</template>
 | 
			
		||||
			</div>
 | 
			
		||||
		</FormSuspense>
 | 
			
		||||
@@ -71,7 +71,7 @@
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { } from 'vue';
 | 
			
		||||
import XHeader from './_header_.vue';
 | 
			
		||||
import FormSwitch from '@/components/form/switch.vue';
 | 
			
		||||
import MkSwitch from '@/components/MkSwitch.vue';
 | 
			
		||||
import FormInput from '@/components/form/input.vue';
 | 
			
		||||
import FormSuspense from '@/components/form/suspense.vue';
 | 
			
		||||
import FormSplit from '@/components/form/split.vue';
 | 
			
		||||
 
 | 
			
		||||
@@ -38,20 +38,20 @@
 | 
			
		||||
							<template #caption>{{ i18n.ts._sensitiveMediaDetection.sensitivityDescription }}</template>
 | 
			
		||||
						</FormRange>
 | 
			
		||||
 | 
			
		||||
						<FormSwitch v-model="enableSensitiveMediaDetectionForVideos">
 | 
			
		||||
						<MkSwitch v-model="enableSensitiveMediaDetectionForVideos">
 | 
			
		||||
							<template #label>{{ i18n.ts._sensitiveMediaDetection.analyzeVideos }}<span class="_beta">{{ i18n.ts.beta }}</span></template>
 | 
			
		||||
							<template #caption>{{ i18n.ts._sensitiveMediaDetection.analyzeVideosDescription }}</template>
 | 
			
		||||
						</FormSwitch>
 | 
			
		||||
						</MkSwitch>
 | 
			
		||||
 | 
			
		||||
						<FormSwitch v-model="setSensitiveFlagAutomatically">
 | 
			
		||||
						<MkSwitch v-model="setSensitiveFlagAutomatically">
 | 
			
		||||
							<template #label>{{ i18n.ts._sensitiveMediaDetection.setSensitiveFlagAutomatically }} ({{ i18n.ts.notRecommended }})</template>
 | 
			
		||||
							<template #caption>{{ i18n.ts._sensitiveMediaDetection.setSensitiveFlagAutomaticallyDescription }}</template>
 | 
			
		||||
						</FormSwitch>
 | 
			
		||||
						</MkSwitch>
 | 
			
		||||
 | 
			
		||||
						<!-- 現状 false positive が多すぎて実用に耐えない
 | 
			
		||||
						<FormSwitch v-model="disallowUploadWhenPredictedAsPorn">
 | 
			
		||||
						<MkSwitch v-model="disallowUploadWhenPredictedAsPorn">
 | 
			
		||||
							<template #label>{{ i18n.ts._sensitiveMediaDetection.disallowUploadWhenPredictedAsPorn }}</template>
 | 
			
		||||
						</FormSwitch>
 | 
			
		||||
						</MkSwitch>
 | 
			
		||||
						-->
 | 
			
		||||
 | 
			
		||||
						<MkButton primary @click="save"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton>
 | 
			
		||||
@@ -65,9 +65,9 @@
 | 
			
		||||
 | 
			
		||||
					<div class="_gaps_m">
 | 
			
		||||
						<span>{{ i18n.ts.activeEmailValidationDescription }}</span>
 | 
			
		||||
						<FormSwitch v-model="enableActiveEmailValidation" @update:model-value="save">
 | 
			
		||||
						<MkSwitch v-model="enableActiveEmailValidation" @update:model-value="save">
 | 
			
		||||
							<template #label>Enable</template>
 | 
			
		||||
						</FormSwitch>
 | 
			
		||||
						</MkSwitch>
 | 
			
		||||
					</div>
 | 
			
		||||
				</FormFolder>
 | 
			
		||||
 | 
			
		||||
@@ -77,9 +77,9 @@
 | 
			
		||||
					<template v-else #suffix>Disabled</template>
 | 
			
		||||
 | 
			
		||||
					<div class="_gaps_m">
 | 
			
		||||
						<FormSwitch v-model="enableIpLogging" @update:model-value="save">
 | 
			
		||||
						<MkSwitch v-model="enableIpLogging" @update:model-value="save">
 | 
			
		||||
							<template #label>Enable</template>
 | 
			
		||||
						</FormSwitch>
 | 
			
		||||
						</MkSwitch>
 | 
			
		||||
					</div>
 | 
			
		||||
				</FormFolder>
 | 
			
		||||
 | 
			
		||||
@@ -107,7 +107,7 @@ import XBotProtection from './bot-protection.vue';
 | 
			
		||||
import XHeader from './_header_.vue';
 | 
			
		||||
import FormFolder from '@/components/form/folder.vue';
 | 
			
		||||
import FormRadios from '@/components/form/radios.vue';
 | 
			
		||||
import FormSwitch from '@/components/form/switch.vue';
 | 
			
		||||
import MkSwitch from '@/components/MkSwitch.vue';
 | 
			
		||||
import FormInfo from '@/components/MkInfo.vue';
 | 
			
		||||
import FormSuspense from '@/components/form/suspense.vue';
 | 
			
		||||
import FormRange from '@/components/form/range.vue';
 | 
			
		||||
 
 | 
			
		||||
@@ -36,20 +36,20 @@
 | 
			
		||||
 | 
			
		||||
					<FormSection>
 | 
			
		||||
						<div class="_gaps_s">
 | 
			
		||||
							<FormSwitch v-model="enableRegistration">
 | 
			
		||||
							<MkSwitch v-model="enableRegistration">
 | 
			
		||||
								<template #label>{{ i18n.ts.enableRegistration }}</template>
 | 
			
		||||
							</FormSwitch>
 | 
			
		||||
							</MkSwitch>
 | 
			
		||||
 | 
			
		||||
							<FormSwitch v-model="emailRequiredForSignup">
 | 
			
		||||
							<MkSwitch v-model="emailRequiredForSignup">
 | 
			
		||||
								<template #label>{{ i18n.ts.emailRequiredForSignup }}</template>
 | 
			
		||||
							</FormSwitch>
 | 
			
		||||
							</MkSwitch>
 | 
			
		||||
						</div>
 | 
			
		||||
					</FormSection>
 | 
			
		||||
 | 
			
		||||
					<FormSection>
 | 
			
		||||
						<div class="_gaps_s">
 | 
			
		||||
							<FormSwitch v-model="enableLocalTimeline">{{ i18n.ts.enableLocalTimeline }}</FormSwitch>
 | 
			
		||||
							<FormSwitch v-model="enableGlobalTimeline">{{ i18n.ts.enableGlobalTimeline }}</FormSwitch>
 | 
			
		||||
							<MkSwitch v-model="enableLocalTimeline">{{ i18n.ts.enableLocalTimeline }}</MkSwitch>
 | 
			
		||||
							<MkSwitch v-model="enableGlobalTimeline">{{ i18n.ts.enableGlobalTimeline }}</MkSwitch>
 | 
			
		||||
							<FormInfo>{{ i18n.ts.disablingTimelinesInfo }}</FormInfo>
 | 
			
		||||
						</div>
 | 
			
		||||
					</FormSection>
 | 
			
		||||
@@ -95,10 +95,10 @@
 | 
			
		||||
						<template #label>{{ i18n.ts.files }}</template>
 | 
			
		||||
 | 
			
		||||
						<div class="_gaps_m">
 | 
			
		||||
							<FormSwitch v-model="cacheRemoteFiles">
 | 
			
		||||
							<MkSwitch v-model="cacheRemoteFiles">
 | 
			
		||||
								<template #label>{{ i18n.ts.cacheRemoteFiles }}</template>
 | 
			
		||||
								<template #caption>{{ i18n.ts.cacheRemoteFilesDescription }}</template>
 | 
			
		||||
							</FormSwitch>
 | 
			
		||||
							</MkSwitch>
 | 
			
		||||
 | 
			
		||||
							<FormSplit :min-width="280">
 | 
			
		||||
								<FormInput v-model="localDriveCapacityMb" type="number">
 | 
			
		||||
@@ -120,10 +120,10 @@
 | 
			
		||||
						<template #label>ServiceWorker</template>
 | 
			
		||||
 | 
			
		||||
						<div class="_gaps_m">
 | 
			
		||||
							<FormSwitch v-model="enableServiceWorker">
 | 
			
		||||
							<MkSwitch v-model="enableServiceWorker">
 | 
			
		||||
								<template #label>{{ i18n.ts.enableServiceworker }}</template>
 | 
			
		||||
								<template #caption>{{ i18n.ts.serviceworkerInfo }}</template>
 | 
			
		||||
							</FormSwitch>
 | 
			
		||||
							</MkSwitch>
 | 
			
		||||
 | 
			
		||||
							<template v-if="enableServiceWorker">
 | 
			
		||||
								<FormInput v-model="swPublicKey">
 | 
			
		||||
@@ -147,9 +147,9 @@
 | 
			
		||||
								<template #prefix><i class="ti ti-key"></i></template>
 | 
			
		||||
								<template #label>DeepL Auth Key</template>
 | 
			
		||||
							</FormInput>
 | 
			
		||||
							<FormSwitch v-model="deeplIsPro">
 | 
			
		||||
							<MkSwitch v-model="deeplIsPro">
 | 
			
		||||
								<template #label>Pro account</template>
 | 
			
		||||
							</FormSwitch>
 | 
			
		||||
							</MkSwitch>
 | 
			
		||||
						</div>
 | 
			
		||||
					</FormSection>
 | 
			
		||||
				</div>
 | 
			
		||||
@@ -162,7 +162,7 @@
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { } from 'vue';
 | 
			
		||||
import XHeader from './_header_.vue';
 | 
			
		||||
import FormSwitch from '@/components/form/switch.vue';
 | 
			
		||||
import MkSwitch from '@/components/MkSwitch.vue';
 | 
			
		||||
import FormInput from '@/components/form/input.vue';
 | 
			
		||||
import FormTextarea from '@/components/form/textarea.vue';
 | 
			
		||||
import FormInfo from '@/components/MkInfo.vue';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user