chore: move showFeaturedNotesInTimeline setting to appropriate section

This commit is contained in:
naskya 2023-10-02 00:21:30 +09:00
parent 58bd0e904f
commit bdbecce61a
No known key found for this signature in database
GPG Key ID: 164DFF24E2D40139
2 changed files with 21 additions and 23 deletions

View File

@ -80,6 +80,19 @@
{{ i18n.ts.reflectMayTakeTime }}</template {{ i18n.ts.reflectMayTakeTime }}</template
></FormSwitch ></FormSwitch
> >
<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
> -->
<FormSwitch v-model="detectPostLanguage" class="_formBlock">{{ <FormSwitch v-model="detectPostLanguage" class="_formBlock">{{
i18n.ts.detectPostLanguage i18n.ts.detectPostLanguage
}}</FormSwitch> }}</FormSwitch>
@ -391,6 +404,14 @@ const openServerInfo = computed(
defaultStore.makeGetterSetter("openServerInfo"), defaultStore.makeGetterSetter("openServerInfo"),
); );
function onChangeInjectFeaturedNote(v) {
os.api("i/update", {
injectFeaturedNote: v,
}).then((i) => {
$i!.injectFeaturedNote = i.injectFeaturedNote;
});
}
watch(swipeOnDesktop, () => { watch(swipeOnDesktop, () => {
defaultStore.set("swipeOnMobile", true); defaultStore.set("swipeOnMobile", true);
}); });

View File

@ -1,17 +1,5 @@
<template> <template>
<div class="_formRoot"> <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">{{ <FormLink to="/settings/account-info" class="_formBlock">{{
i18n.ts.accountInfo i18n.ts.accountInfo
}}</FormLink> }}</FormLink>
@ -29,21 +17,10 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import FormSwitch from "@/components/form/switch.vue";
import FormLink from "@/components/form/link.vue"; import FormLink from "@/components/form/link.vue";
import * as os from "@/os";
import { $i } from "@/account";
import { i18n } from "@/i18n"; import { i18n } from "@/i18n";
import { definePageMetadata } from "@/scripts/page-metadata"; import { definePageMetadata } from "@/scripts/page-metadata";
function onChangeInjectFeaturedNote(v) {
os.api("i/update", {
injectFeaturedNote: v,
}).then((i) => {
$i!.injectFeaturedNote = i.injectFeaturedNote;
});
}
definePageMetadata({ definePageMetadata({
title: i18n.ts.other, title: i18n.ts.other,
icon: "ph-dots-three-outline ph-bold ph-lg", icon: "ph-dots-three-outline ph-bold ph-lg",