From 03f54c5b021e8901cc118412a9357b9ed2347249 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Wed, 26 Feb 2020 16:48:23 +0900 Subject: リアクション絵文字設定をいい感じに (#6074) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * リアクション絵文字設定をいい感じに * みじかく --- src/client/pages/my-settings/reaction.vue | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'src/client') diff --git a/src/client/pages/my-settings/reaction.vue b/src/client/pages/my-settings/reaction.vue index 250769ec9e..7ce39380fd 100644 --- a/src/client/pages/my-settings/reaction.vue +++ b/src/client/pages/my-settings/reaction.vue @@ -2,11 +2,14 @@
{{ $t('reaction') }}
- {{ $t('reaction') }} + + {{ $t('reaction') }} +
@@ -14,24 +17,26 @@ -- cgit v1.2.3-freya From 569be15705b570d5295e2dc9a1af4b2e6a0a725f Mon Sep 17 00:00:00 2001 From: Oni-Men Date: Wed, 26 Feb 2020 17:22:43 +0900 Subject: 同じホットキーが連続で発動しないように (#6082) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add cooldown to hotkey * remove blank * use repeat flag * format * Add Repeatable option to Hotkey * Boolean型のみに * console.log消すの忘れてた --- src/client/scripts/hotkey.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/scripts/hotkey.ts b/src/client/scripts/hotkey.ts index ec627ab15b..672dbedde1 100644 --- a/src/client/scripts/hotkey.ts +++ b/src/client/scripts/hotkey.ts @@ -12,14 +12,22 @@ type action = { patterns: pattern[]; callback: Function; + + allowRepeat: boolean; }; const getKeyMap = keymap => Object.entries(keymap).map(([patterns, callback]): action => { const result = { patterns: [], - callback: callback + callback: callback, + allowRepeat: true } as action; + if (patterns.match(/^\(.*\)$/) !== null) { + result.allowRepeat = false; + patterns = patterns.slice(1, -1); + } + result.patterns = patterns.split('|').map(part => { const pattern = { which: [], @@ -77,6 +85,7 @@ export default { const matched = match(e, action.patterns); if (matched) { + if (!action.allowRepeat && e.repeat) return; if (el._hotkey_global && match(e, targetReservedKeys)) return; e.preventDefault(); -- cgit v1.2.3-freya From 969cd16638698a19dc707c01b48270871b5e2f6d Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 27 Feb 2020 07:04:28 +0900 Subject: Resolve #6091 --- locales/ja-JP.yml | 1 + src/client/pages/my-settings/reaction.vue | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/client') diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 4813f6f91f..27609ef527 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -433,6 +433,7 @@ listen: "聴く" none: "なし" volume: "音量" details: "詳細" +chooseEmoji: "絵文字を選択" _sfx: note: "ノート" diff --git a/src/client/pages/my-settings/reaction.vue b/src/client/pages/my-settings/reaction.vue index 7ce39380fd..b2df3f0231 100644 --- a/src/client/pages/my-settings/reaction.vue +++ b/src/client/pages/my-settings/reaction.vue @@ -3,13 +3,13 @@
{{ $t('reaction') }}
- {{ $t('reaction') }} + {{ $t('reaction') }} + {{ $t('default') }}
@@ -72,6 +72,15 @@ export default Vue.extend({ setDefault() { this.reactions = '👍❤😆🤔😮🎉💢😥😇🍮'; }, + + async chooseEmoji(ev) { + const vm = this.$root.new(await import('../../components/emoji-picker.vue').then(m => m.default), { + source: ev.currentTarget || ev.target + }).$once('chosen', emoji => { + this.reactions += emoji; + vm.close(); + }); + } } }); -- cgit v1.2.3-freya From 3bd827d7dacd72ff83967fee48bbd2c45f31d0f0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 27 Feb 2020 15:13:46 +0900 Subject: Update google.vue --- src/client/components/google.vue | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/client') diff --git a/src/client/components/google.vue b/src/client/components/google.vue index 21560008f6..01dcf24bf8 100644 --- a/src/client/components/google.vue +++ b/src/client/components/google.vue @@ -1,12 +1,13 @@ + + diff --git a/src/client/pages/preferences/index.vue b/src/client/pages/preferences/index.vue index eddf69653d..3bc305a229 100644 --- a/src/client/pages/preferences/index.vue +++ b/src/client/pages/preferences/index.vue @@ -8,8 +8,10 @@
{{ $t('sounds') }}
- {{ $t('volume') }} - + + + {{ $t('volume') }} +
@@ -85,12 +87,13 @@ diff --git a/src/client/pages/drive.vue b/src/client/pages/drive.vue index 7b648939f2..8f8e949dcb 100644 --- a/src/client/pages/drive.vue +++ b/src/client/pages/drive.vue @@ -1,5 +1,5 @@