2020-01-29 20:37:25 +01:00
|
|
|
<template>
|
2020-01-30 03:10:42 +01:00
|
|
|
<section class="_card">
|
2020-01-29 20:37:25 +01:00
|
|
|
<div class="_title"><fa :icon="faLock"/> {{ $t('privacy') }}</div>
|
|
|
|
<div class="_content">
|
|
|
|
<mk-switch v-model="isLocked" @change="save()">{{ $t('makeFollowManuallyApprove') }}</mk-switch>
|
2020-02-05 01:43:55 +01:00
|
|
|
<mk-switch v-model="autoAcceptFollowed" v-if="isLocked" @change="save()">{{ $t('autoAcceptFollowed') }}</mk-switch>
|
2020-01-29 20:37:25 +01:00
|
|
|
</div>
|
|
|
|
<div class="_content">
|
2020-02-05 01:42:58 +01:00
|
|
|
<mk-switch v-model="rememberNoteVisibility" @change="save()">{{ $t('rememberNoteVisibility') }}</mk-switch>
|
|
|
|
<mk-select v-model="defaultNoteVisibility" style="margin-bottom: 8px;" v-if="!rememberNoteVisibility">
|
2020-01-29 20:37:25 +01:00
|
|
|
<template #label>{{ $t('defaultNoteVisibility') }}</template>
|
|
|
|
<option value="public">{{ $t('_visibility.public') }}</option>
|
2020-02-08 12:02:15 +01:00
|
|
|
<option value="home">{{ $t('_visibility.home') }}</option>
|
2020-01-29 20:37:25 +01:00
|
|
|
<option value="followers">{{ $t('_visibility.followers') }}</option>
|
|
|
|
<option value="specified">{{ $t('_visibility.specified') }}</option>
|
|
|
|
</mk-select>
|
2020-02-08 12:02:15 +01:00
|
|
|
<mk-switch v-model="defaultNoteLocalOnly" v-if="!rememberNoteVisibility">{{ $t('_visibility.localOnly') }}</mk-switch>
|
2020-01-29 20:37:25 +01:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import { faLock } from '@fortawesome/free-solid-svg-icons';
|
|
|
|
import MkSelect from '../../components/ui/select.vue';
|
|
|
|
import MkSwitch from '../../components/ui/switch.vue';
|
|
|
|
import i18n from '../../i18n';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
i18n,
|
|
|
|
|
|
|
|
components: {
|
|
|
|
MkSelect,
|
|
|
|
MkSwitch,
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
isLocked: false,
|
|
|
|
autoAcceptFollowed: false,
|
|
|
|
faLock
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
defaultNoteVisibility: {
|
|
|
|
get() { return this.$store.state.settings.defaultNoteVisibility; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'defaultNoteVisibility', value }); }
|
|
|
|
},
|
|
|
|
|
2020-02-08 12:02:15 +01:00
|
|
|
defaultNoteLocalOnly: {
|
|
|
|
get() { return this.$store.state.settings.defaultNoteLocalOnly; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'defaultNoteLocalOnly', value }); }
|
|
|
|
},
|
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
rememberNoteVisibility: {
|
|
|
|
get() { return this.$store.state.settings.rememberNoteVisibility; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'rememberNoteVisibility', value }); }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
this.isLocked = this.$store.state.i.isLocked;
|
|
|
|
this.autoAcceptFollowed = this.$store.state.i.autoAcceptFollowed;
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
save() {
|
|
|
|
this.$root.api('i/update', {
|
|
|
|
isLocked: !!this.isLocked,
|
|
|
|
autoAcceptFollowed: !!this.autoAcceptFollowed,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|