From b91ec1bdb2078f75ccd0b7db369cc02c649707d6 Mon Sep 17 00:00:00 2001 From: tiramisu_oTATo Date: Sat, 29 Jul 2023 11:14:02 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9C=80=E5=B0=8F=E6=A7=8B=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AudioCell.vue | 17 +++++++++++++++++ src/store/audio.ts | 10 ++++++++++ src/store/type.ts | 4 ++++ 3 files changed, 31 insertions(+) diff --git a/src/components/AudioCell.vue b/src/components/AudioCell.vue index e671a7b365..7e91657ba1 100644 --- a/src/components/AudioCell.vue +++ b/src/components/AudioCell.vue @@ -328,6 +328,8 @@ const contextMenudata = ref< MenuItemButton, MenuItemButton, MenuItemSeparator, + MenuItemButton, + MenuItemSeparator, MenuItemButton ] >([ @@ -378,6 +380,21 @@ const contextMenudata = ref< }, disableWhenUiLocked: true, }, + { type: "separator" }, + { + type: "button", + label: "テキストを台本のみに適用", + onClick: async () => { + contextMenu.value?.hide(); + isChangeFlag.value = false; + await store.dispatch("COMMAND_CHANGE_DISPLAY_TEXT", { + audioKey: props.audioKey, + text: audioTextBuffer.value, + }); + textfield.value?.blur(); + }, + disableWhenUiLocked: true, + }, ]); /** * コンテキストメニューの開閉によりFocusやBlurが発生する可能性のある間は`true`。 diff --git a/src/store/audio.ts b/src/store/audio.ts index 720e095870..87131fb78b 100644 --- a/src/store/audio.ts +++ b/src/store/audio.ts @@ -1966,6 +1966,16 @@ export const audioCommandStore = transformCommandStore( }, }, + COMMAND_CHANGE_DISPLAY_TEXT: { + action({ commit }, payload: { audioKey: AudioKey; text: string }) { + commit("COMMAND_CHANGE_AUDIO_TEXT", { + audioKey: payload.audioKey, + text: payload.text, + update: "Text", + }); + }, + }, + COMMAND_CHANGE_AUDIO_TEXT: { mutation( draft, diff --git a/src/store/type.ts b/src/store/type.ts index 652fb1a2fa..4328040151 100644 --- a/src/store/type.ts +++ b/src/store/type.ts @@ -506,6 +506,10 @@ export type AudioCommandStoreTypes = { action(payload: { audioKeys: AudioKey[] }): void; }; + COMMAND_CHANGE_DISPLAY_TEXT: { + action(payload: { audioKey: AudioKey; text: string }): void; + }; + COMMAND_CHANGE_AUDIO_TEXT: { mutation: { audioKey: AudioKey; text: string } & ( | { update: "Text" } From 57d7b59ef862ca543f0c3217a083e9991ecf5f6d Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Sun, 30 Jul 2023 08:07:16 +0900 Subject: [PATCH 2/3] Update src/store/audio.ts --- src/store/audio.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/store/audio.ts b/src/store/audio.ts index 87131fb78b..895dd71ce7 100644 --- a/src/store/audio.ts +++ b/src/store/audio.ts @@ -1967,6 +1967,9 @@ export const audioCommandStore = transformCommandStore( }, COMMAND_CHANGE_DISPLAY_TEXT: { + /** + * 読みを変えずにテキストだけを変える + */ action({ commit }, payload: { audioKey: AudioKey; text: string }) { commit("COMMAND_CHANGE_AUDIO_TEXT", { audioKey: payload.audioKey, From 78596174157f353cd5df167b67e6e633d3ddea2b Mon Sep 17 00:00:00 2001 From: tiramisu_oTATo Date: Mon, 31 Jul 2023 22:05:33 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E5=90=8D=E3=82=92=E3=80=8C=E5=86=85=E5=AE=B9=E3=82=92=E3=83=86?= =?UTF-8?q?=E3=82=AD=E3=82=B9=E3=83=88=E3=81=AE=E3=81=BF=E3=81=AB=E9=81=A9?= =?UTF-8?q?=E7=94=A8=E3=80=8D=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AudioCell.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AudioCell.vue b/src/components/AudioCell.vue index 7e91657ba1..8b2082cb51 100644 --- a/src/components/AudioCell.vue +++ b/src/components/AudioCell.vue @@ -383,7 +383,7 @@ const contextMenudata = ref< { type: "separator" }, { type: "button", - label: "テキストを台本のみに適用", + label: "内容をテキストのみに適用", onClick: async () => { contextMenu.value?.hide(); isChangeFlag.value = false;