diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/app/desktop/views/components/post-form.vue | 6 | ||||
| -rw-r--r-- | src/client/app/desktop/views/components/settings.vue | 12 | ||||
| -rw-r--r-- | src/client/app/mobile/views/components/post-form.vue | 6 | ||||
| -rw-r--r-- | src/client/app/mobile/views/pages/settings.vue | 6 | ||||
| -rw-r--r-- | src/client/app/store.ts | 1 |
5 files changed, 30 insertions, 1 deletions
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue index 9c2807663b..5b2a305404 100644 --- a/src/client/app/desktop/views/components/post-form.vue +++ b/src/client/app/desktop/views/components/post-form.vue @@ -222,6 +222,12 @@ export default Vue.extend({ }); } + // keep cw when reply + if (this.$store.state.settings.keepCw && this.reply && this.reply.cw) { + this.useCw = true; + this.cw = this.reply.cw; + } + this.$nextTick(() => { // 書きかけの投稿を復元 if (!this.instant && !this.mention) { diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index bd17018a6f..95c107a0d5 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -31,7 +31,12 @@ <ui-switch v-model="autoPopout">{{ $t('auto-popout') }} <span slot="desc">{{ $t('auto-popout-desc') }}</span> </ui-switch> - <ui-switch v-model="deckNav">{{ $t('deck-nav') }}<span slot="desc">{{ $t('deck-nav-desc') }}</span></ui-switch> + <ui-switch v-model="deckNav">{{ $t('deck-nav') }} + <span slot="desc">{{ $t('deck-nav-desc') }}</span> + </ui-switch> + <ui-switch v-model="keepCw">{{ $t('keep-cw') }} + <span slot="desc">{{ $t('keep-cw-desc') }}</span> + </ui-switch> </section> <section> @@ -336,6 +341,11 @@ export default Vue.extend({ set(value) { this.$store.commit('settings/set', { key: 'deckNav', value }); } }, + keepCw: { + get() { return this.$store.state.settings.keepCw; }, + set(value) { this.$store.commit('settings/set', { key: 'keepCw', value }); } + }, + darkmode: { get() { return this.$store.state.device.darkmode; }, set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); } diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index 24263d18fe..b6e70a5b11 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -210,6 +210,12 @@ export default Vue.extend({ }); } + // keep cw when reply + if (this.$store.state.settings.keepCw && this.reply && this.reply.cw) { + this.useCw = true; + this.cw = this.reply.cw; + } + this.focus(); this.$nextTick(() => { diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue index 80b15acdea..cc7eb1e300 100644 --- a/src/client/app/mobile/views/pages/settings.vue +++ b/src/client/app/mobile/views/pages/settings.vue @@ -66,6 +66,7 @@ <section> <ui-switch v-model="fetchOnScroll">{{ $t('fetch-on-scroll') }}</ui-switch> + <ui-switch v-model="keepCw">{{ $t('keep-cw') }}</ui-switch> <ui-switch v-model="disableViaMobile">{{ $t('disable-via-mobile') }}</ui-switch> <ui-switch v-model="loadRawImages">{{ $t('load-raw-images') }}</ui-switch> <ui-switch v-model="loadRemoteMedia">{{ $t('load-remote-media') }}</ui-switch> @@ -247,6 +248,11 @@ export default Vue.extend({ set(value) { this.$store.dispatch('settings/set', { key: 'fetchOnScroll', value }); } }, + keepCw: { + get() { return this.$store.state.settings.keepCw; }, + set(value) { this.$store.dispatch('settings/set', { key: 'keepCw', value }); } + }, + rememberNoteVisibility: { get() { return this.$store.state.settings.rememberNoteVisibility; }, set(value) { this.$store.dispatch('settings/set', { key: 'rememberNoteVisibility', value }); } diff --git a/src/client/app/store.ts b/src/client/app/store.ts index 350826e5ef..46655b7bd5 100644 --- a/src/client/app/store.ts +++ b/src/client/app/store.ts @@ -12,6 +12,7 @@ const defaultSettings = { mobileHome: [], deck: null, deckNav: true, + keepCw: false, tagTimelines: [], fetchOnScroll: true, showMaps: true, |