2020-10-17 13:12:00 +02:00
|
|
|
<template>
|
2020-11-25 13:31:34 +01:00
|
|
|
<FormBase>
|
|
|
|
<FormGroup>
|
2020-12-26 02:47:36 +01:00
|
|
|
<FormSwitch v-model:value="isLocked" @update:value="save()">{{ $ts.makeFollowManuallyApprove }}</FormSwitch>
|
|
|
|
<FormSwitch v-model:value="autoAcceptFollowed" :disabled="!isLocked" @update:value="save()">{{ $ts.autoAcceptFollowed }}</FormSwitch>
|
|
|
|
<template #caption>{{ $ts.lockedAccountInfo }}</template>
|
2020-11-25 13:31:34 +01:00
|
|
|
</FormGroup>
|
2021-04-17 08:30:26 +02:00
|
|
|
<FormSwitch v-model:value="hideOnlineStatus" @update:value="save()">
|
|
|
|
{{ $ts.hideOnlineStatus }}
|
|
|
|
<template #desc>{{ $ts.hideOnlineStatusDescription }}</template>
|
|
|
|
</FormSwitch>
|
2020-11-25 13:31:34 +01:00
|
|
|
<FormSwitch v-model:value="noCrawle" @update:value="save()">
|
2020-12-26 02:47:36 +01:00
|
|
|
{{ $ts.noCrawle }}
|
|
|
|
<template #desc>{{ $ts.noCrawleDescription }}</template>
|
2020-11-25 13:31:34 +01:00
|
|
|
</FormSwitch>
|
2020-12-11 13:16:20 +01:00
|
|
|
<FormSwitch v-model:value="isExplorable" @update:value="save()">
|
2020-12-26 02:47:36 +01:00
|
|
|
{{ $ts.makeExplorable }}
|
|
|
|
<template #desc>{{ $ts.makeExplorableDescription }}</template>
|
2020-12-11 13:16:20 +01:00
|
|
|
</FormSwitch>
|
2020-12-26 02:47:36 +01:00
|
|
|
<FormSwitch v-model:value="rememberNoteVisibility" @update:value="save()">{{ $ts.rememberNoteVisibility }}</FormSwitch>
|
2020-11-25 13:31:34 +01:00
|
|
|
<FormGroup v-if="!rememberNoteVisibility">
|
2020-12-26 02:47:36 +01:00
|
|
|
<template #label>{{ $ts.defaultNoteVisibility }}</template>
|
2020-11-25 13:31:34 +01:00
|
|
|
<FormSelect v-model:value="defaultNoteVisibility">
|
2020-12-26 02:47:36 +01:00
|
|
|
<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>
|
2020-11-25 13:31:34 +01:00
|
|
|
</FormSelect>
|
2020-12-26 02:47:36 +01:00
|
|
|
<FormSwitch v-model:value="defaultNoteLocalOnly">{{ $ts._visibility.localOnly }}</FormSwitch>
|
2020-11-25 13:31:34 +01:00
|
|
|
</FormGroup>
|
|
|
|
</FormBase>
|
2020-10-17 13:12:00 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2021-03-23 09:30:14 +01:00
|
|
|
import FormSwitch from '@client/components/form/switch.vue';
|
|
|
|
import FormSelect from '@client/components/form/select.vue';
|
|
|
|
import FormBase from '@client/components/form/base.vue';
|
|
|
|
import FormGroup from '@client/components/form/group.vue';
|
|
|
|
import * as os from '@client/os';
|
|
|
|
import { defaultStore } from '@client/store';
|
2021-04-10 05:54:12 +02:00
|
|
|
import * as symbols from '@client/symbols';
|
2020-10-17 13:12:00 +02:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2020-11-25 13:31:34 +01:00
|
|
|
FormBase,
|
|
|
|
FormSelect,
|
|
|
|
FormGroup,
|
|
|
|
FormSwitch,
|
2020-10-17 13:12:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
emits: ['info'],
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
2021-04-10 05:54:12 +02:00
|
|
|
[symbols.PAGE_INFO]: {
|
2020-12-26 02:47:36 +01:00
|
|
|
title: this.$ts.privacy,
|
2021-04-20 16:22:59 +02:00
|
|
|
icon: 'fas fa-lock-open'
|
2020-10-17 13:12:00 +02:00
|
|
|
},
|
|
|
|
isLocked: false,
|
|
|
|
autoAcceptFollowed: false,
|
2020-11-25 13:31:34 +01:00
|
|
|
noCrawle: false,
|
2020-12-11 13:16:20 +01:00
|
|
|
isExplorable: false,
|
2021-04-17 08:30:26 +02:00
|
|
|
hideOnlineStatus: false,
|
2020-10-17 13:12:00 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
2020-12-19 02:55:52 +01:00
|
|
|
defaultNoteVisibility: defaultStore.makeGetterSetter('defaultNoteVisibility'),
|
|
|
|
defaultNoteLocalOnly: defaultStore.makeGetterSetter('defaultNoteLocalOnly'),
|
|
|
|
rememberNoteVisibility: defaultStore.makeGetterSetter('rememberNoteVisibility'),
|
2020-10-17 13:12:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
2020-12-19 02:55:52 +01:00
|
|
|
this.isLocked = this.$i.isLocked;
|
|
|
|
this.autoAcceptFollowed = this.$i.autoAcceptFollowed;
|
|
|
|
this.noCrawle = this.$i.noCrawle;
|
|
|
|
this.isExplorable = this.$i.isExplorable;
|
2021-04-17 08:30:26 +02:00
|
|
|
this.hideOnlineStatus = this.$i.hideOnlineStatus;
|
2020-10-17 13:12:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
2021-04-10 05:54:12 +02:00
|
|
|
this.$emit('info', this[symbols.PAGE_INFO]);
|
2020-10-17 13:12:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
save() {
|
|
|
|
os.api('i/update', {
|
|
|
|
isLocked: !!this.isLocked,
|
|
|
|
autoAcceptFollowed: !!this.autoAcceptFollowed,
|
2020-11-25 13:31:34 +01:00
|
|
|
noCrawle: !!this.noCrawle,
|
2020-12-11 13:16:20 +01:00
|
|
|
isExplorable: !!this.isExplorable,
|
2021-04-17 08:30:26 +02:00
|
|
|
hideOnlineStatus: !!this.hideOnlineStatus,
|
2020-10-17 13:12:00 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|