* Revert "Revert "Resolve #3813 (#3814)""

This reverts commit f433182c4c.

* Keep CW is back

* New Wave

https://github.com/syuilo/misskey/pull/3949#pullrequestreview-194787210
This commit is contained in:
Acid Chicken (硫酸鶏) 2019-01-23 20:43:06 +09:00 committed by GitHub
parent 44a3df0acf
commit 4632eecb76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 1 deletions

View File

@ -884,6 +884,8 @@ desktop/views/components/settings.vue:
auto-popout-desc: "ウィンドウが開かれるとき、ポップアウト(ブラウザ外に切り離す)可能なら自動でポップアウトします。この設定はブラウザに記憶されます。" auto-popout-desc: "ウィンドウが開かれるとき、ポップアウト(ブラウザ外に切り離す)可能なら自動でポップアウトします。この設定はブラウザに記憶されます。"
deck-nav: "デッキ内ナビゲーション" deck-nav: "デッキ内ナビゲーション"
deck-nav-desc: "デッキを使用しているとき、ナビゲーションが発生する際にページ遷移を行わずに一時的なカラムで受けるようにします。" deck-nav-desc: "デッキを使用しているとき、ナビゲーションが発生する際にページ遷移を行わずに一時的なカラムで受けるようにします。"
keep-cw: "CW保持"
keep-cw-desc: "投稿にリプライする際、リプライ元の投稿にCWが設定されていたとき、デフォルトで同じCWを設定するようにします。"
deck-default: "デッキをデフォルトのUIにする" deck-default: "デッキをデフォルトのUIにする"
display: "デザインと表示" display: "デザインと表示"
@ -1664,6 +1666,7 @@ mobile/views/pages/settings.vue:
notification-position-top: "上" notification-position-top: "上"
behavior: "動作" behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み" fetch-on-scroll: "スクロールで自動読み込み"
keep-cw: "CW保持"
note-visibility: "投稿の公開範囲" note-visibility: "投稿の公開範囲"
default-note-visibility: "デフォルトの公開範囲" default-note-visibility: "デフォルトの公開範囲"
remember-note-visibility: "投稿の公開範囲を記憶する" remember-note-visibility: "投稿の公開範囲を記憶する"

View File

@ -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(() => { this.$nextTick(() => {
// 稿 // 稿
if (!this.instant && !this.mention) { if (!this.instant && !this.mention) {

View File

@ -31,7 +31,12 @@
<ui-switch v-model="autoPopout">{{ $t('auto-popout') }} <ui-switch v-model="autoPopout">{{ $t('auto-popout') }}
<span slot="desc">{{ $t('auto-popout-desc') }}</span> <span slot="desc">{{ $t('auto-popout-desc') }}</span>
</ui-switch> </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>
<section> <section>
@ -336,6 +341,11 @@ export default Vue.extend({
set(value) { this.$store.commit('settings/set', { key: 'deckNav', value }); } 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: { darkmode: {
get() { return this.$store.state.device.darkmode; }, get() { return this.$store.state.device.darkmode; },
set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); } set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); }

View File

@ -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.focus();
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -66,6 +66,7 @@
<section> <section>
<ui-switch v-model="fetchOnScroll">{{ $t('fetch-on-scroll') }}</ui-switch> <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="disableViaMobile">{{ $t('disable-via-mobile') }}</ui-switch>
<ui-switch v-model="loadRawImages">{{ $t('load-raw-images') }}</ui-switch> <ui-switch v-model="loadRawImages">{{ $t('load-raw-images') }}</ui-switch>
<ui-switch v-model="loadRemoteMedia">{{ $t('load-remote-media') }}</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 }); } 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: { rememberNoteVisibility: {
get() { return this.$store.state.settings.rememberNoteVisibility; }, get() { return this.$store.state.settings.rememberNoteVisibility; },
set(value) { this.$store.dispatch('settings/set', { key: 'rememberNoteVisibility', value }); } set(value) { this.$store.dispatch('settings/set', { key: 'rememberNoteVisibility', value }); }

View File

@ -12,6 +12,7 @@ const defaultSettings = {
mobileHome: [], mobileHome: [],
deck: null, deck: null,
deckNav: true, deckNav: true,
keepCw: false,
tagTimelines: [], tagTimelines: [],
fetchOnScroll: true, fetchOnScroll: true,
showMaps: true, showMaps: true,