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