2023-07-27 07:31:52 +02:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2020-10-17 13:12:00 +02:00
|
|
|
<template>
|
2023-01-06 05:40:17 +01:00
|
|
|
<div class="_gaps_m">
|
2023-05-05 01:34:05 +02:00
|
|
|
<!--
|
2023-01-07 06:59:54 +01:00
|
|
|
<MkSwitch v-model="$i.injectFeaturedNote" @update:model-value="onChangeInjectFeaturedNote">
|
2023-05-05 01:34:05 +02:00
|
|
|
<template #label>{{ i18n.ts.showFeaturedNotesInTimeline }}</template>
|
2023-01-07 06:59:54 +01:00
|
|
|
</MkSwitch>
|
2023-05-05 01:34:05 +02:00
|
|
|
-->
|
2020-11-25 13:31:34 +01:00
|
|
|
|
2022-03-04 16:35:59 +01:00
|
|
|
<!--
|
2023-01-07 06:59:54 +01:00
|
|
|
<MkSwitch v-model="reportError">{{ i18n.ts.sendErrorReports }}<template #caption>{{ i18n.ts.sendErrorReportsDescription }}</template></MkSwitch>
|
2022-03-04 16:35:59 +01:00
|
|
|
-->
|
2021-01-08 13:43:56 +01:00
|
|
|
|
2023-05-07 03:07:26 +02:00
|
|
|
<FormSection first>
|
|
|
|
<div class="_gaps_s">
|
|
|
|
<MkFolder>
|
|
|
|
<template #icon><i class="ti ti-info-circle"></i></template>
|
|
|
|
<template #label>{{ i18n.ts.accountInfo }}</template>
|
2023-05-05 01:47:02 +02:00
|
|
|
|
2023-05-07 03:07:26 +02:00
|
|
|
<div class="_gaps_m">
|
|
|
|
<MkKeyValue>
|
|
|
|
<template #key>ID</template>
|
|
|
|
<template #value><span class="_monospace">{{ $i.id }}</span></template>
|
|
|
|
</MkKeyValue>
|
2023-05-05 01:47:02 +02:00
|
|
|
|
2023-05-07 03:07:26 +02:00
|
|
|
<MkKeyValue>
|
|
|
|
<template #key>{{ i18n.ts.registeredDate }}</template>
|
|
|
|
<template #value><MkTime :time="$i.createdAt" mode="detail"/></template>
|
|
|
|
</MkKeyValue>
|
2023-11-23 19:26:58 +01:00
|
|
|
|
|
|
|
<FormLink to="/settings/account-stats"><template #icon><i class="ti ti-info-circle"/></template>{{ i18n.ts.statistics }}</FormLink>
|
2023-05-07 03:07:26 +02:00
|
|
|
</div>
|
|
|
|
</MkFolder>
|
2023-05-05 01:47:02 +02:00
|
|
|
|
2023-05-07 03:07:26 +02:00
|
|
|
<MkFolder>
|
|
|
|
<template #icon><i class="ti ti-alert-triangle"></i></template>
|
|
|
|
<template #label>{{ i18n.ts.closeAccount }}</template>
|
2020-11-25 13:31:34 +01:00
|
|
|
|
2023-05-07 03:07:26 +02:00
|
|
|
<div class="_gaps_m">
|
|
|
|
<FormInfo warn>{{ i18n.ts._accountDelete.mayTakeTime }}</FormInfo>
|
|
|
|
<FormInfo>{{ i18n.ts._accountDelete.sendEmail }}</FormInfo>
|
|
|
|
<MkButton v-if="!$i.isDeleted" danger @click="deleteAccount">{{ i18n.ts._accountDelete.requestAccountDelete }}</MkButton>
|
|
|
|
<MkButton v-else disabled>{{ i18n.ts._accountDelete.inProgress }}</MkButton>
|
|
|
|
</div>
|
|
|
|
</MkFolder>
|
2022-07-16 16:11:05 +02:00
|
|
|
|
2023-05-07 03:07:26 +02:00
|
|
|
<MkFolder>
|
|
|
|
<template #icon><i class="ti ti-flask"></i></template>
|
|
|
|
<template #label>{{ i18n.ts.experimentalFeatures }}</template>
|
2023-05-05 01:47:02 +02:00
|
|
|
|
2023-05-07 03:07:26 +02:00
|
|
|
<div class="_gaps_m">
|
|
|
|
<MkSwitch v-model="enableCondensedLineForAcct">
|
|
|
|
<template #label>Enable condensed line for acct</template>
|
|
|
|
</MkSwitch>
|
|
|
|
</div>
|
|
|
|
</MkFolder>
|
2023-05-15 09:40:19 +02:00
|
|
|
|
|
|
|
<MkFolder>
|
|
|
|
<template #icon><i class="ti ti-code"></i></template>
|
|
|
|
<template #label>{{ i18n.ts.developer }}</template>
|
|
|
|
|
|
|
|
<div class="_gaps_m">
|
|
|
|
<MkSwitch v-model="devMode">
|
|
|
|
<template #label>{{ i18n.ts.devMode }}</template>
|
|
|
|
</MkSwitch>
|
|
|
|
</div>
|
|
|
|
</MkFolder>
|
2023-05-07 03:07:26 +02:00
|
|
|
</div>
|
|
|
|
</FormSection>
|
2023-05-05 01:47:02 +02:00
|
|
|
|
2023-05-07 03:07:26 +02:00
|
|
|
<FormSection>
|
|
|
|
<FormLink to="/registry"><template #icon><i class="ti ti-adjustments"></i></template>{{ i18n.ts.registry }}</FormLink>
|
|
|
|
</FormSection>
|
2023-10-22 09:12:01 +02:00
|
|
|
|
|
|
|
<FormSection>
|
|
|
|
<div class="_gaps_s">
|
2023-11-04 08:44:14 +01:00
|
|
|
<MkSwitch v-model="defaultWithReplies">{{ i18n.ts.withRepliesByDefaultForNewlyFollowed }}</MkSwitch>
|
2023-10-22 09:12:01 +02:00
|
|
|
<MkButton danger @click="updateRepliesAll(true)"><i class="ti ti-messages"></i> {{ i18n.ts.showRepliesToOthersInTimelineAll }}</MkButton>
|
|
|
|
<MkButton danger @click="updateRepliesAll(false)"><i class="ti ti-messages-off"></i> {{ i18n.ts.hideRepliesToOthersInTimelineAll }}</MkButton>
|
|
|
|
</div>
|
|
|
|
</FormSection>
|
2021-12-05 04:47:57 +01:00
|
|
|
</div>
|
2020-10-17 13:12:00 +02:00
|
|
|
</template>
|
|
|
|
|
2022-05-04 03:12:08 +02:00
|
|
|
<script lang="ts" setup>
|
2023-05-05 01:34:05 +02:00
|
|
|
import { computed, watch } from 'vue';
|
2023-01-07 06:59:54 +01:00
|
|
|
import MkSwitch from '@/components/MkSwitch.vue';
|
2022-01-02 16:41:01 +01:00
|
|
|
import FormLink from '@/components/form/link.vue';
|
2023-05-05 01:34:05 +02:00
|
|
|
import MkFolder from '@/components/MkFolder.vue';
|
2023-05-05 01:47:02 +02:00
|
|
|
import FormInfo from '@/components/MkInfo.vue';
|
|
|
|
import MkKeyValue from '@/components/MkKeyValue.vue';
|
|
|
|
import MkButton from '@/components/MkButton.vue';
|
2023-09-19 09:37:43 +02:00
|
|
|
import * as os from '@/os.js';
|
|
|
|
import { defaultStore } from '@/store.js';
|
|
|
|
import { signout, $i } from '@/account.js';
|
|
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
|
|
|
import { unisonReload } from '@/scripts/unison-reload.js';
|
2023-05-07 03:07:26 +02:00
|
|
|
import FormSection from '@/components/form/section.vue';
|
2022-05-04 03:12:08 +02:00
|
|
|
|
|
|
|
const reportError = computed(defaultStore.makeGetterSetter('reportError'));
|
2023-05-05 01:34:05 +02:00
|
|
|
const enableCondensedLineForAcct = computed(defaultStore.makeGetterSetter('enableCondensedLineForAcct'));
|
2023-05-15 09:40:19 +02:00
|
|
|
const devMode = computed(defaultStore.makeGetterSetter('devMode'));
|
2023-11-04 08:44:14 +01:00
|
|
|
const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies'));
|
2022-05-04 03:12:08 +02:00
|
|
|
|
|
|
|
function onChangeInjectFeaturedNote(v) {
|
|
|
|
os.api('i/update', {
|
2022-06-20 10:38:49 +02:00
|
|
|
injectFeaturedNote: v,
|
2022-05-04 03:12:08 +02:00
|
|
|
}).then((i) => {
|
|
|
|
$i!.injectFeaturedNote = i.injectFeaturedNote;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-05-05 01:47:02 +02:00
|
|
|
async function deleteAccount() {
|
|
|
|
{
|
|
|
|
const { canceled } = await os.confirm({
|
|
|
|
type: 'warning',
|
|
|
|
text: i18n.ts.deleteAccountConfirm,
|
|
|
|
});
|
|
|
|
if (canceled) return;
|
|
|
|
}
|
|
|
|
|
2023-09-22 07:12:33 +02:00
|
|
|
const auth = await os.authenticateDialog();
|
|
|
|
if (auth.canceled) return;
|
2023-05-05 01:47:02 +02:00
|
|
|
|
|
|
|
await os.apiWithDialog('i/delete-account', {
|
2023-09-22 07:12:33 +02:00
|
|
|
password: auth.result.password,
|
|
|
|
token: auth.result.token,
|
2023-05-05 01:47:02 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
await os.alert({
|
|
|
|
title: i18n.ts._accountDelete.started,
|
|
|
|
});
|
|
|
|
|
|
|
|
await signout();
|
|
|
|
}
|
|
|
|
|
2023-05-05 01:34:05 +02:00
|
|
|
async function reloadAsk() {
|
|
|
|
const { canceled } = await os.confirm({
|
|
|
|
type: 'info',
|
|
|
|
text: i18n.ts.reloadToApplySetting,
|
|
|
|
});
|
|
|
|
if (canceled) return;
|
|
|
|
|
|
|
|
unisonReload();
|
|
|
|
}
|
|
|
|
|
2023-10-22 09:12:01 +02:00
|
|
|
async function updateRepliesAll(withReplies: boolean) {
|
2023-11-11 08:34:46 +01:00
|
|
|
const { canceled } = await os.confirm({
|
2023-10-22 09:12:01 +02:00
|
|
|
type: 'warning',
|
|
|
|
text: withReplies ? i18n.ts.confirmShowRepliesAll : i18n.ts.confirmHideRepliesAll,
|
|
|
|
});
|
|
|
|
if (canceled) return;
|
2023-11-11 08:34:46 +01:00
|
|
|
|
|
|
|
os.api('following/update-all', { withReplies });
|
2023-10-22 09:12:01 +02:00
|
|
|
}
|
|
|
|
|
2023-05-05 01:34:05 +02:00
|
|
|
watch([
|
|
|
|
enableCondensedLineForAcct,
|
|
|
|
], async () => {
|
|
|
|
await reloadAsk();
|
|
|
|
});
|
|
|
|
|
2022-06-20 10:38:49 +02:00
|
|
|
const headerActions = $computed(() => []);
|
|
|
|
|
|
|
|
const headerTabs = $computed(() => []);
|
|
|
|
|
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.other,
|
2022-12-19 11:01:30 +01:00
|
|
|
icon: 'ti ti-dots',
|
2020-10-17 13:12:00 +02:00
|
|
|
});
|
|
|
|
</script>
|