1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-25 20:18:18 +09:00
MisskeyIO/packages/client/src/pages/settings/other.vue
Andreas Nedbal 8489afa3d7
Refactor settings/other to use Composition API (#8589)
* refactor(client): refactor settings/other to use Composition API

* fix(client): fix 'show featured notes' checkbox
2022-05-04 10:12:08 +09:00

45 lines
1.4 KiB
Vue

<template>
<div class="_formRoot">
<FormSwitch v-model="$i.injectFeaturedNote" class="_formBlock" @update:modelValue="onChangeInjectFeaturedNote">
{{ i18n.ts.showFeaturedNotesInTimeline }}
</FormSwitch>
<!--
<FormSwitch v-model="reportError" class="_formBlock">{{ i18n.ts.sendErrorReports }}<template #caption>{{ i18n.ts.sendErrorReportsDescription }}</template></FormSwitch>
-->
<FormLink to="/settings/account-info" class="_formBlock">{{ i18n.ts.accountInfo }}</FormLink>
<FormLink to="/settings/delete-account" class="_formBlock"><template #icon><i class="fas fa-exclamation-triangle"></i></template>{{ i18n.ts.closeAccount }}</FormLink>
</div>
</template>
<script lang="ts" setup>
import { computed, defineExpose } from 'vue';
import FormSwitch from '@/components/form/switch.vue';
import FormLink from '@/components/form/link.vue';
import * as os from '@/os';
import { defaultStore } from '@/store';
import * as symbols from '@/symbols';
import { $i } from '@/account';
import { i18n } from '@/i18n';
const reportError = computed(defaultStore.makeGetterSetter('reportError'));
function onChangeInjectFeaturedNote(v) {
os.api('i/update', {
injectFeaturedNote: v
}).then((i) => {
$i!.injectFeaturedNote = i.injectFeaturedNote;
});
}
defineExpose({
[symbols.PAGE_INFO]: {
title: i18n.ts.other,
icon: 'fas fa-ellipsis-h',
bg: 'var(--bg)',
}
});
</script>