From da696505056e20320e25fcc21c939f10370b8e71 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 14 Oct 2019 01:41:25 +0900 Subject: [PATCH] Resolve #5500 --- locales/ja-JP.yml | 2 ++ .../app/common/views/components/reaction-picker.vue | 11 +---------- .../common/views/components/settings/settings.vue | 12 ++++++++++++ src/client/app/store.ts | 1 + 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 240df3e4a..7055cdb4c 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -212,6 +212,8 @@ common: other: "その他" appearance: "デザイン" behavior: "動作" + reactions: "リアクション" + reactions-description: "リアクションピッカーに表示するリアクションを改行で区切って設定します。" fetch-on-scroll: "スクロールで自動読み込み" fetch-on-scroll-desc: "ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます。" note-visibility: "投稿の公開範囲" diff --git a/src/client/app/common/views/components/reaction-picker.vue b/src/client/app/common/views/components/reaction-picker.vue index ff534d37c..17a92c72e 100644 --- a/src/client/app/common/views/components/reaction-picker.vue +++ b/src/client/app/common/views/components/reaction-picker.vue @@ -4,16 +4,7 @@

{{ title }}

- - - - - - - - - - +
diff --git a/src/client/app/common/views/components/settings/settings.vue b/src/client/app/common/views/components/settings/settings.vue index 914d5bf84..6ea1147c5 100644 --- a/src/client/app/common/views/components/settings/settings.vue +++ b/src/client/app/common/views/components/settings/settings.vue @@ -108,6 +108,13 @@ {{ $t('@._settings.disable-via-mobile') }} +
+
{{ $t('@._settings.reactions') }}
+ + {{ $t('@._settings.reactions') }} + +
+
{{ $t('@._settings.timeline') }}
{{ $t('@._settings.show-my-renotes') }} @@ -407,6 +414,11 @@ export default Vue.extend({ set(value) { this.$store.dispatch('settings/set', { key: 'disableViaMobile', value }); } }, + reactions: { + get() { return this.$store.state.settings.reactions.join('\n'); }, + set(value: string) { this.$store.dispatch('settings/set', { key: 'reactions', value: value.split('\n') }); } + }, + useShadow: { get() { return this.$store.state.device.useShadow; }, set(value) { this.$store.commit('device/set', { key: 'useShadow', value }); } diff --git a/src/client/app/store.ts b/src/client/app/store.ts index 92fb1568b..f4ec9e501 100644 --- a/src/client/app/store.ts +++ b/src/client/app/store.ts @@ -41,6 +41,7 @@ const defaultSettings = { uploadFolder: null, pastedFileName: 'yyyy-MM-dd HH-mm-ss [{{number}}]', pasteDialog: false, + reactions: ['like', 'love', 'laugh', 'hmm', 'surprise', 'congrats', 'angry', 'confused', 'rip', 'pudding'] }; const defaultDeviceSettings = {