enhance(frontend): サーバーの初期設定ウィザードをやり直せるように
This commit is contained in:
parent
a7d1c94f48
commit
4c520fa693
|
@ -6558,6 +6558,14 @@ export interface Locale extends ILocale {
|
|||
* サーバーで受信したリモートのコンテンツを含め、サーバー内の全てのコンテンツを無条件でインターネットに公開することはリスクが伴います。特に、分散型の特性を知らない閲覧者にとっては、リモートのコンテンツであってもサーバー内で作成されたコンテンツであると誤って認識してしまう可能性があるため、注意が必要です。
|
||||
*/
|
||||
"userGeneratedContentsVisibilityForVisitor_description2": string;
|
||||
/**
|
||||
* サーバーの初期設定ウィザードをやり直しますか?
|
||||
*/
|
||||
"restartServerSetupWizardConfirm_title": string;
|
||||
/**
|
||||
* 現在の一部の設定はリセットされます。
|
||||
*/
|
||||
"restartServerSetupWizardConfirm_text": string;
|
||||
"_userGeneratedContentsVisibilityForVisitor": {
|
||||
/**
|
||||
* 全て公開
|
||||
|
|
|
@ -1667,6 +1667,8 @@ _serverSettings:
|
|||
userGeneratedContentsVisibilityForVisitor: "非利用者に対するユーザー作成コンテンツの公開範囲"
|
||||
userGeneratedContentsVisibilityForVisitor_description: "モデレーションが行き届きにくい不適切なリモートコンテンツなどが、自サーバー経由で図らずもインターネットに公開されてしまうことによるトラブル防止などに役立ちます。"
|
||||
userGeneratedContentsVisibilityForVisitor_description2: "サーバーで受信したリモートのコンテンツを含め、サーバー内の全てのコンテンツを無条件でインターネットに公開することはリスクが伴います。特に、分散型の特性を知らない閲覧者にとっては、リモートのコンテンツであってもサーバー内で作成されたコンテンツであると誤って認識してしまう可能性があるため、注意が必要です。"
|
||||
restartServerSetupWizardConfirm_title: "サーバーの初期設定ウィザードをやり直しますか?"
|
||||
restartServerSetupWizardConfirm_text: "現在の一部の設定はリセットされます。"
|
||||
|
||||
_userGeneratedContentsVisibilityForVisitor:
|
||||
all: "全て公開"
|
||||
|
|
|
@ -196,12 +196,14 @@ const props = withDefaults(defineProps<{
|
|||
}>(), {
|
||||
});
|
||||
|
||||
const q_name = ref('');
|
||||
const currentMeta = await misskeyApi('admin/meta');
|
||||
|
||||
const q_name = ref(currentMeta.name ?? '');
|
||||
const q_use = ref('single');
|
||||
const q_scale = ref('small');
|
||||
const q_federation = ref('yes');
|
||||
const q_adminName = ref('');
|
||||
const q_adminEmail = ref('');
|
||||
const q_federation = ref(currentMeta.federation === 'none' ? 'no' : 'yes');
|
||||
const q_adminName = ref(currentMeta.maintainerName ?? '');
|
||||
const q_adminEmail = ref(currentMeta.maintainerEmail ?? '');
|
||||
|
||||
const serverSettings = computed<Misskey.entities.AdminUpdateMetaRequest>(() => {
|
||||
let enableReactionsBuffering;
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkModalWindow
|
||||
ref="windowEl"
|
||||
:withOkButton="false"
|
||||
:okButtonDisabled="false"
|
||||
:width="500"
|
||||
:height="600"
|
||||
@close="onCloseModalWindow"
|
||||
@closed="emit('closed')"
|
||||
>
|
||||
<template #header>Server setup wizard</template>
|
||||
<div class="_spacer" style="--MI_SPACER-min: 20px; --MI_SPACER-max: 28px;">
|
||||
<Suspense>
|
||||
<template #default>
|
||||
<MkServerSetupWizard @finished="onWizardFinished"/>
|
||||
</template>
|
||||
<template #fallback>
|
||||
<MkLoading/>
|
||||
</template>
|
||||
</Suspense>
|
||||
</div>
|
||||
</MkModalWindow>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useTemplateRef } from 'vue';
|
||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||
import MkServerSetupWizard from '@/components/MkServerSetupWizard.vue';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'closed'),
|
||||
}>();
|
||||
|
||||
const windowEl = useTemplateRef('windowEl');
|
||||
|
||||
function onWizardFinished() {
|
||||
windowEl.value?.close();
|
||||
}
|
||||
|
||||
function onCloseModalWindow() {
|
||||
windowEl.value?.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
.root {
|
||||
max-height: 410px;
|
||||
height: 410px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
|
@ -287,6 +287,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkTextarea>
|
||||
</div>
|
||||
</MkFolder>
|
||||
|
||||
<MkButton primary @click="openSetupWizard">
|
||||
Open setup wizard
|
||||
</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</PageWithHeader>
|
||||
|
@ -425,6 +429,20 @@ const proxyAccountForm = useForm({
|
|||
fetchInstance(true);
|
||||
});
|
||||
|
||||
async function openSetupWizard() {
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'warning',
|
||||
title: i18n.ts._serverSettings.restartServerSetupWizardConfirm_title,
|
||||
text: i18n.ts._serverSettings.restartServerSetupWizardConfirm_text,
|
||||
});
|
||||
if (canceled) return;
|
||||
|
||||
const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkServerSetupWizardDialog.vue').then(x => x.default), {
|
||||
}, {
|
||||
closed: () => dispose(),
|
||||
});
|
||||
}
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePage(() => ({
|
||||
|
|
|
@ -87,7 +87,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div>{{ i18n.ts._serverSetupWizard.settingsYouMakeHereCanBeChangedLater }}</div>
|
||||
</div>
|
||||
|
||||
<MkServerSetupWizard :token="token" @finished="onWizardFinished"/>
|
||||
<Suspense>
|
||||
<template #default>
|
||||
<MkServerSetupWizard :token="token" @finished="onWizardFinished"/>
|
||||
</template>
|
||||
<template #fallback>
|
||||
<MkLoading/>
|
||||
</template>
|
||||
</Suspense>
|
||||
|
||||
<MkButton rounded style="margin: 0 auto;" @click="skipSettings">
|
||||
{{ i18n.ts._serverSetupWizard.skipSettings }}
|
||||
|
|
Loading…
Reference in New Issue