diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-18 07:35:56 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-18 07:35:56 +0900 |
| commit | fa8a08f016bd72895dc15602ee021b20054d5c57 (patch) | |
| tree | 98bfedf418816a2f1f3790a8784ad60e7260c22d /src | |
| parent | :art: (diff) | |
| download | sharkey-fa8a08f016bd72895dc15602ee021b20054d5c57.tar.gz sharkey-fa8a08f016bd72895dc15602ee021b20054d5c57.tar.bz2 sharkey-fa8a08f016bd72895dc15602ee021b20054d5c57.zip | |
タイムラインでリプライ先の投稿を表示するか否か設定できるように
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/app/common/mios.ts | 15 | ||||
| -rw-r--r-- | src/client/app/desktop/views/components/notes.note.vue | 2 | ||||
| -rw-r--r-- | src/client/app/desktop/views/components/settings.vue | 7 | ||||
| -rw-r--r-- | src/client/app/mobile/views/components/note.vue | 2 |
4 files changed, 18 insertions, 8 deletions
diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts index 6d6d6b3e68..6fed267d6e 100644 --- a/src/client/app/common/mios.ts +++ b/src/client/app/common/mios.ts @@ -16,6 +16,14 @@ import Err from '../common/views/components/connect-failed.vue'; import { LocalTimelineStreamManager } from './scripts/streaming/local-timeline'; import { GlobalTimelineStreamManager } from './scripts/streaming/global-timeline'; +const defaultSettings = { + fetchOnScroll: true, + showMaps: true, + showPostFormOnTopOfTl: false, + gradientWindowHeader: false, + showReplyTarget: true +}; + //#region api requests let spinner = null; let pending = 0; @@ -298,12 +306,7 @@ export default class MiOS extends EventEmitter { const fetched = me => { if (me) { // デフォルトの設定をマージ - me.clientSettings = Object.assign({ - fetchOnScroll: true, - showMaps: true, - showPostFormOnTopOfTl: false, - gradientWindowHeader: false - }, me.clientSettings); + me.clientSettings = Object.assign(defaultSettings, me.clientSettings); // ローカルストレージにキャッシュ localStorage.setItem('me', JSON.stringify(me)); diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue index 070c42352e..752242d7d0 100644 --- a/src/client/app/desktop/views/components/notes.note.vue +++ b/src/client/app/desktop/views/components/notes.note.vue @@ -1,6 +1,6 @@ <template> <div class="note" tabindex="-1" :title="title" @keydown="onKeydown"> - <div class="reply-to" v-if="p.reply"> + <div class="reply-to" v-if="p.reply && (!os.isSignedIn || os.i.clientSettings.showReplyTarget)"> <x-sub :note="p.reply"/> </div> <div class="renote" v-if="isRenote"> diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index 3d88ccb6c2..f9d9bab187 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -40,6 +40,7 @@ <button class="ui button" @click="customizeHome">ホームをカスタマイズ</button> </div> <mk-switch v-model="os.i.clientSettings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/> + <mk-switch v-model="os.i.clientSettings.showReplyTarget" @change="onChangeShowReplyTarget" text="リプライ先を表示する"/> <mk-switch v-model="os.i.clientSettings.showMaps" @change="onChangeShowMaps" text="マップの自動展開"> <span>位置情報が添付された投稿のマップを自動的に展開します。</span> </mk-switch> @@ -303,6 +304,12 @@ export default Vue.extend({ value: v }); }, + onChangeShowReplyTarget(v) { + (this as any).api('i/update_client_setting', { + name: 'showReplyTarget', + value: v + }); + }, onChangeShowMaps(v) { (this as any).api('i/update_client_setting', { name: 'showMaps', diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue index 088275311b..5d3a6c7362 100644 --- a/src/client/app/mobile/views/components/note.vue +++ b/src/client/app/mobile/views/components/note.vue @@ -1,6 +1,6 @@ <template> <div class="note" :class="{ renote: isRenote }"> - <div class="reply-to" v-if="p.reply"> + <div class="reply-to" v-if="p.reply && (!os.isSignedIn || os.i.clientSettings.showReplyTarget)"> <x-sub :note="p.reply"/> </div> <div class="renote" v-if="isRenote"> |