diff --git a/src/client/components/post-form.vue b/src/client/components/post-form.vue index 9a13f523a..b2c27ec5d 100644 --- a/src/client/components/post-form.vue +++ b/src/client/components/post-form.vue @@ -177,6 +177,12 @@ export default Vue.extend({ } }, + watch: { + localOnly() { + this.$store.commit('device/setLocalOnly', this.localOnly); + } + }, + mounted() { if (this.initialText) { this.text = this.initialText; @@ -209,7 +215,9 @@ export default Vue.extend({ } // デフォルト公開範囲 - this.applyVisibility(this.$store.state.settings.rememberNoteVisibility ? (this.$store.state.device.visibility || this.$store.state.settings.defaultNoteVisibility) : this.$store.state.settings.defaultNoteVisibility); + this.applyVisibility(this.$store.state.settings.rememberNoteVisibility ? this.$store.state.device.visibility : this.$store.state.settings.defaultNoteVisibility); + + this.localOnly = this.$store.state.settings.rememberNoteVisibility ? this.$store.state.device.localOnly : false; // 公開以外へのリプライ時は元の公開範囲を引き継ぐ if (this.reply && ['home', 'followers', 'specified'].includes(this.reply.visibility)) { diff --git a/src/client/pages/settings/privacy.vue b/src/client/pages/settings/privacy.vue index af2c3f501..3019f6b10 100644 --- a/src/client/pages/settings/privacy.vue +++ b/src/client/pages/settings/privacy.vue @@ -6,13 +6,13 @@ {{ $t('autoAcceptFollowed') }}
- + {{ $t('rememberNoteVisibility') }} + - {{ $t('rememberNoteVisibility') }}
diff --git a/src/client/store.ts b/src/client/store.ts index c9f61b811..73112829e 100644 --- a/src/client/store.ts +++ b/src/client/store.ts @@ -24,6 +24,8 @@ const defaultDeviceSettings = { useOsDefaultEmojis: false, accounts: [], recentEmojis: [], + visibility: 'public', + localOnly: false, themes: [], theme: 'light', }; @@ -110,6 +112,10 @@ export default (os: MiOS) => new Vuex.Store({ setVisibility(state, visibility) { state.visibility = visibility; }, + + setLocalOnly(state, localOnly) { + state.localOnly = localOnly; + }, } },