2020-10-17 11:12:00 +00:00
|
|
|
<template>
|
2020-11-25 12:31:34 +00:00
|
|
|
<FormBase>
|
|
|
|
<FormGroup>
|
|
|
|
<FormSwitch v-model:value="isLocked" @update:value="save()">{{ $t('makeFollowManuallyApprove') }}</FormSwitch>
|
|
|
|
<FormSwitch v-model:value="autoAcceptFollowed" :disabled="!isLocked" @update:value="save()">{{ $t('autoAcceptFollowed') }}</FormSwitch>
|
|
|
|
<template #caption>{{ $t('lockedAccountInfo') }}</template>
|
|
|
|
</FormGroup>
|
|
|
|
<FormSwitch v-model:value="noCrawle" @update:value="save()">
|
|
|
|
{{ $t('noCrawle') }}
|
|
|
|
<template #desc>{{ $t('noCrawleDescription') }}</template>
|
|
|
|
</FormSwitch>
|
2020-12-11 12:16:20 +00:00
|
|
|
<FormSwitch v-model:value="isExplorable" @update:value="save()">
|
|
|
|
{{ $t('makeExplorable') }}
|
|
|
|
<template #desc>{{ $t('makeExplorableDescription') }}</template>
|
|
|
|
</FormSwitch>
|
2020-11-25 12:31:34 +00:00
|
|
|
<FormSwitch v-model:value="rememberNoteVisibility" @update:value="save()">{{ $t('rememberNoteVisibility') }}</FormSwitch>
|
|
|
|
<FormGroup v-if="!rememberNoteVisibility">
|
|
|
|
<template #label>{{ $t('defaultNoteVisibility') }}</template>
|
|
|
|
<FormSelect v-model:value="defaultNoteVisibility">
|
|
|
|
<option value="public">{{ $t('_visibility.public') }}</option>
|
|
|
|
<option value="home">{{ $t('_visibility.home') }}</option>
|
|
|
|
<option value="followers">{{ $t('_visibility.followers') }}</option>
|
|
|
|
<option value="specified">{{ $t('_visibility.specified') }}</option>
|
|
|
|
</FormSelect>
|
|
|
|
<FormSwitch v-model:value="defaultNoteLocalOnly">{{ $t('_visibility.localOnly') }}</FormSwitch>
|
|
|
|
</FormGroup>
|
|
|
|
</FormBase>
|
2020-10-17 11:12:00 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
import { faLockOpen } from '@fortawesome/free-solid-svg-icons';
|
2020-11-25 12:31:34 +00:00
|
|
|
import FormSwitch from '@/components/form/switch.vue';
|
|
|
|
import FormSelect from '@/components/form/select.vue';
|
|
|
|
import FormBase from '@/components/form/base.vue';
|
|
|
|
import FormGroup from '@/components/form/group.vue';
|
2020-10-17 11:12:00 +00:00
|
|
|
import * as os from '@/os';
|
2020-12-19 01:55:52 +00:00
|
|
|
import { defaultStore } from '@/store';
|
2020-10-17 11:12:00 +00:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2020-11-25 12:31:34 +00:00
|
|
|
FormBase,
|
|
|
|
FormSelect,
|
|
|
|
FormGroup,
|
|
|
|
FormSwitch,
|
2020-10-17 11:12:00 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
emits: ['info'],
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
INFO: {
|
2020-11-03 11:36:12 +00:00
|
|
|
title: this.$t('privacy'),
|
|
|
|
icon: faLockOpen
|
2020-10-17 11:12:00 +00:00
|
|
|
},
|
|
|
|
isLocked: false,
|
|
|
|
autoAcceptFollowed: false,
|
2020-11-25 12:31:34 +00:00
|
|
|
noCrawle: false,
|
2020-12-11 12:16:20 +00:00
|
|
|
isExplorable: false,
|
2020-10-17 11:12:00 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
2020-12-19 01:55:52 +00:00
|
|
|
defaultNoteVisibility: defaultStore.makeGetterSetter('defaultNoteVisibility'),
|
|
|
|
defaultNoteLocalOnly: defaultStore.makeGetterSetter('defaultNoteLocalOnly'),
|
|
|
|
rememberNoteVisibility: defaultStore.makeGetterSetter('rememberNoteVisibility'),
|
2020-10-17 11:12:00 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
2020-12-19 01:55:52 +00:00
|
|
|
this.isLocked = this.$i.isLocked;
|
|
|
|
this.autoAcceptFollowed = this.$i.autoAcceptFollowed;
|
|
|
|
this.noCrawle = this.$i.noCrawle;
|
|
|
|
this.isExplorable = this.$i.isExplorable;
|
2020-10-17 11:12:00 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
this.$emit('info', this.INFO);
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
save() {
|
|
|
|
os.api('i/update', {
|
|
|
|
isLocked: !!this.isLocked,
|
|
|
|
autoAcceptFollowed: !!this.autoAcceptFollowed,
|
2020-11-25 12:31:34 +00:00
|
|
|
noCrawle: !!this.noCrawle,
|
2020-12-11 12:16:20 +00:00
|
|
|
isExplorable: !!this.isExplorable,
|
2020-10-17 11:12:00 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|