2020-10-17 05:12:00 -06:00
|
|
|
<template>
|
2021-11-28 04:07:37 -07:00
|
|
|
<div class="_formRoot">
|
2022-07-20 07:24:26 -06:00
|
|
|
<FormSwitch v-model="isLocked" class="_formBlock" @update:modelValue="save()">{{ i18n.ts.makeFollowManuallyApprove }}<template #caption>{{ i18n.ts.lockedAccountInfo }}</template></FormSwitch>
|
|
|
|
<FormSwitch v-if="isLocked" v-model="autoAcceptFollowed" class="_formBlock" @update:modelValue="save()">{{ i18n.ts.autoAcceptFollowed }}</FormSwitch>
|
2021-11-28 04:07:37 -07:00
|
|
|
|
|
|
|
<FormSwitch v-model="publicReactions" class="_formBlock" @update:modelValue="save()">
|
2022-07-20 07:24:26 -06:00
|
|
|
{{ i18n.ts.makeReactionsPublic }}
|
|
|
|
<template #caption>{{ i18n.ts.makeReactionsPublicDescription }}</template>
|
2021-10-17 10:16:59 -06:00
|
|
|
</FormSwitch>
|
2022-09-07 16:09:23 -06:00
|
|
|
|
2022-02-08 20:43:59 -07:00
|
|
|
<FormSelect v-model="ffVisibility" class="_formBlock" @update:modelValue="save()">
|
2022-07-20 07:24:26 -06:00
|
|
|
<template #label>{{ i18n.ts.ffVisibility }}</template>
|
|
|
|
<option value="public">{{ i18n.ts._ffVisibility.public }}</option>
|
|
|
|
<option value="followers">{{ i18n.ts._ffVisibility.followers }}</option>
|
|
|
|
<option value="private">{{ i18n.ts._ffVisibility.private }}</option>
|
|
|
|
<template #caption>{{ i18n.ts.ffVisibilityDescription }}</template>
|
2021-11-28 04:07:37 -07:00
|
|
|
</FormSelect>
|
2022-09-07 16:09:23 -06:00
|
|
|
|
2021-11-28 04:07:37 -07:00
|
|
|
<FormSwitch v-model="hideOnlineStatus" class="_formBlock" @update:modelValue="save()">
|
2022-07-20 07:24:26 -06:00
|
|
|
{{ i18n.ts.hideOnlineStatus }}
|
|
|
|
<template #caption>{{ i18n.ts.hideOnlineStatusDescription }}</template>
|
2021-04-17 00:30:26 -06:00
|
|
|
</FormSwitch>
|
2021-11-28 04:07:37 -07:00
|
|
|
<FormSwitch v-model="noCrawle" class="_formBlock" @update:modelValue="save()">
|
2022-07-20 07:24:26 -06:00
|
|
|
{{ i18n.ts.noCrawle }}
|
|
|
|
<template #caption>{{ i18n.ts.noCrawleDescription }}</template>
|
2020-11-25 05:31:34 -07:00
|
|
|
</FormSwitch>
|
2021-11-28 04:07:37 -07:00
|
|
|
<FormSwitch v-model="isExplorable" class="_formBlock" @update:modelValue="save()">
|
2022-07-20 07:24:26 -06:00
|
|
|
{{ i18n.ts.makeExplorable }}
|
|
|
|
<template #caption>{{ i18n.ts.makeExplorableDescription }}</template>
|
2020-12-11 05:16:20 -07:00
|
|
|
</FormSwitch>
|
2021-11-28 04:07:37 -07:00
|
|
|
|
|
|
|
<FormSection>
|
2022-07-20 07:24:26 -06:00
|
|
|
<FormSwitch v-model="rememberNoteVisibility" class="_formBlock" @update:modelValue="save()">{{ i18n.ts.rememberNoteVisibility }}</FormSwitch>
|
2022-06-23 19:51:45 -06:00
|
|
|
<FormFolder v-if="!rememberNoteVisibility" class="_formBlock">
|
2022-07-20 07:24:26 -06:00
|
|
|
<template #label>{{ i18n.ts.defaultNoteVisibility }}</template>
|
|
|
|
<template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
|
|
|
|
<template v-else-if="defaultNoteVisibility === 'home'" #suffix>{{ i18n.ts._visibility.home }}</template>
|
|
|
|
<template v-else-if="defaultNoteVisibility === 'followers'" #suffix>{{ i18n.ts._visibility.followers }}</template>
|
|
|
|
<template v-else-if="defaultNoteVisibility === 'specified'" #suffix>{{ i18n.ts._visibility.specified }}</template>
|
2022-06-23 19:51:45 -06:00
|
|
|
|
2021-11-28 04:07:37 -07:00
|
|
|
<FormSelect v-model="defaultNoteVisibility" class="_formBlock">
|
2022-07-20 07:24:26 -06:00
|
|
|
<option value="public">{{ i18n.ts._visibility.public }}</option>
|
|
|
|
<option value="home">{{ i18n.ts._visibility.home }}</option>
|
|
|
|
<option value="followers">{{ i18n.ts._visibility.followers }}</option>
|
|
|
|
<option value="specified">{{ i18n.ts._visibility.specified }}</option>
|
2021-11-28 04:07:37 -07:00
|
|
|
</FormSelect>
|
2022-07-20 07:24:26 -06:00
|
|
|
<FormSwitch v-model="defaultNoteLocalOnly" class="_formBlock">{{ i18n.ts._visibility.localOnly }}</FormSwitch>
|
2022-06-23 19:51:45 -06:00
|
|
|
</FormFolder>
|
2021-11-28 04:07:37 -07:00
|
|
|
</FormSection>
|
|
|
|
|
2022-07-20 07:24:26 -06:00
|
|
|
<FormSwitch v-model="keepCw" class="_formBlock" @update:modelValue="save()">{{ i18n.ts.keepCw }}</FormSwitch>
|
2021-11-28 04:07:37 -07:00
|
|
|
</div>
|
2020-10-17 05:12:00 -06:00
|
|
|
</template>
|
|
|
|
|
2022-01-15 04:35:10 -07:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { } from 'vue';
|
2021-11-28 04:07:37 -07:00
|
|
|
import FormSwitch from '@/components/form/switch.vue';
|
|
|
|
import FormSelect from '@/components/form/select.vue';
|
|
|
|
import FormSection from '@/components/form/section.vue';
|
2022-06-23 19:51:45 -06:00
|
|
|
import FormFolder from '@/components/form/folder.vue';
|
2021-11-11 10:02:25 -07:00
|
|
|
import * as os from '@/os';
|
|
|
|
import { defaultStore } from '@/store';
|
2022-01-15 04:35:10 -07:00
|
|
|
import { i18n } from '@/i18n';
|
|
|
|
import { $i } from '@/account';
|
2022-06-20 02:38:49 -06:00
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
2020-10-17 05:12:00 -06:00
|
|
|
|
2022-01-15 04:35:10 -07:00
|
|
|
let isLocked = $ref($i.isLocked);
|
|
|
|
let autoAcceptFollowed = $ref($i.autoAcceptFollowed);
|
|
|
|
let noCrawle = $ref($i.noCrawle);
|
|
|
|
let isExplorable = $ref($i.isExplorable);
|
|
|
|
let hideOnlineStatus = $ref($i.hideOnlineStatus);
|
|
|
|
let publicReactions = $ref($i.publicReactions);
|
|
|
|
let ffVisibility = $ref($i.ffVisibility);
|
2020-10-17 05:12:00 -06:00
|
|
|
|
2022-01-15 04:35:10 -07:00
|
|
|
let defaultNoteVisibility = $computed(defaultStore.makeGetterSetter('defaultNoteVisibility'));
|
|
|
|
let defaultNoteLocalOnly = $computed(defaultStore.makeGetterSetter('defaultNoteLocalOnly'));
|
|
|
|
let rememberNoteVisibility = $computed(defaultStore.makeGetterSetter('rememberNoteVisibility'));
|
|
|
|
let keepCw = $computed(defaultStore.makeGetterSetter('keepCw'));
|
2020-10-17 05:12:00 -06:00
|
|
|
|
2022-01-15 04:35:10 -07:00
|
|
|
function save() {
|
|
|
|
os.api('i/update', {
|
|
|
|
isLocked: !!isLocked,
|
|
|
|
autoAcceptFollowed: !!autoAcceptFollowed,
|
|
|
|
noCrawle: !!noCrawle,
|
|
|
|
isExplorable: !!isExplorable,
|
|
|
|
hideOnlineStatus: !!hideOnlineStatus,
|
|
|
|
publicReactions: !!publicReactions,
|
|
|
|
ffVisibility: ffVisibility,
|
|
|
|
});
|
|
|
|
}
|
2020-10-17 05:12:00 -06:00
|
|
|
|
2022-06-20 02:38:49 -06:00
|
|
|
const headerActions = $computed(() => []);
|
|
|
|
|
|
|
|
const headerTabs = $computed(() => []);
|
|
|
|
|
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.privacy,
|
2022-11-06 19:30:26 -07:00
|
|
|
icon: 'ph-lock-open-bold',
|
2020-10-17 05:12:00 -06:00
|
|
|
});
|
|
|
|
</script>
|