diff --git a/src/backend/browser/sandbox.ts b/src/backend/browser/sandbox.ts index bf76bb9382..a722a36189 100644 --- a/src/backend/browser/sandbox.ts +++ b/src/backend/browser/sandbox.ts @@ -9,7 +9,6 @@ import { import { getConfigManager } from "./browserConfig"; import { IpcSOData } from "@/type/ipc"; import { - defaultHotkeySettings, defaultToolbarButtonSetting, EngineId, EngineSettingType, @@ -247,9 +246,6 @@ export const api: Sandbox = { changePinWindow() { throw new Error(`Not supported on Browser version: changePinWindow`); }, - getDefaultHotkeySettings() { - return Promise.resolve(defaultHotkeySettings); - }, getDefaultToolbarSetting() { return Promise.resolve(defaultToolbarButtonSetting); }, diff --git a/src/backend/electron/main.ts b/src/backend/electron/main.ts index bfcef34952..c8da2eac37 100644 --- a/src/backend/electron/main.ts +++ b/src/backend/electron/main.ts @@ -40,7 +40,6 @@ import { AssetTextFileNames } from "@/type/staticResources"; import { EngineInfo, SystemError, - defaultHotkeySettings, defaultToolbarButtonSetting, EngineId, TextAsset, @@ -695,10 +694,6 @@ registerIpcMainHandle({ } }, - GET_DEFAULT_HOTKEY_SETTINGS: () => { - return defaultHotkeySettings; - }, - GET_DEFAULT_TOOLBAR_SETTING: () => { return defaultToolbarButtonSetting; }, diff --git a/src/backend/electron/preload.ts b/src/backend/electron/preload.ts index 03c590daf2..2d3015b124 100644 --- a/src/backend/electron/preload.ts +++ b/src/backend/electron/preload.ts @@ -176,10 +176,6 @@ const api: Sandbox = { return ipcRendererInvokeProxy.HOTKEY_SETTINGS({ newData }); }, - getDefaultHotkeySettings: async () => { - return await ipcRendererInvokeProxy.GET_DEFAULT_HOTKEY_SETTINGS(); - }, - getDefaultToolbarSetting: async () => { return await ipcRendererInvokeProxy.GET_DEFAULT_TOOLBAR_SETTING(); }, diff --git a/src/components/Dialog/DictionaryEditWordDialog.vue b/src/components/Dialog/DictionaryEditWordDialog.vue new file mode 100644 index 0000000000..98df081902 --- /dev/null +++ b/src/components/Dialog/DictionaryEditWordDialog.vue @@ -0,0 +1,467 @@ + + + + + diff --git a/src/components/Dialog/DictionaryManageDialog.vue b/src/components/Dialog/DictionaryManageDialog.vue index 50564d6c19..0bea44fccf 100644 --- a/src/components/Dialog/DictionaryManageDialog.vue +++ b/src/components/Dialog/DictionaryManageDialog.vue @@ -116,184 +116,53 @@ - -
-
-
単語
- - - -
-
-
読み
- - - - -
-
アクセント調整
-
- 語尾のアクセントを考慮するため、「が」が自動で挿入されます。 -
-
-
- - -
-
-
- - -
-
-
-
単語優先度
-
- 単語を登録しても反映されない場合は優先度を高くしてください。 -
-
- -
-
- - リセット - キャンセル - 保存 -
-
+ + + diff --git a/src/components/Dialog/HotkeySettingDialog.vue b/src/components/Dialog/HotkeySettingDialog.vue index d69d76da2d..09e7d75e16 100644 --- a/src/components/Dialog/HotkeySettingDialog.vue +++ b/src/components/Dialog/HotkeySettingDialog.vue @@ -127,9 +127,9 @@ import BaseIconButton from "@/components/Base/BaseIconButton.vue"; import BaseScrollArea from "@/components/Base/BaseScrollArea.vue"; import { useStore } from "@/store"; import { + defaultHotkeySettings, HotkeyActionNameType, HotkeyCombination, - HotkeySettingType, } from "@/type/preload"; import { useHotkeyManager, eventToCombination } from "@/plugins/hotkeyPlugin"; @@ -225,13 +225,8 @@ const setHotkeyDialogOpened = () => { document.removeEventListener("keydown", recordCombination); }; -const defaultSettings = ref([]); -void window.backend - .getDefaultHotkeySettings() - .then((settings) => (defaultSettings.value = settings)); - const isDefaultCombination = (action: string) => { - const defaultSetting = defaultSettings.value.find( + const defaultSetting = defaultHotkeySettings.find( (value) => value.action === action, ); const hotkeySetting = hotkeySettings.value.find( @@ -249,7 +244,7 @@ const resetHotkey = async (action: string) => { if (result !== "OK") return; - const setting = defaultSettings.value.find((value) => value.action == action); + const setting = defaultHotkeySettings.find((value) => value.action == action); if (setting == undefined) { return; } diff --git a/src/store/audio.ts b/src/store/audio.ts index 8fc45d7c7b..f93c7d2f91 100644 --- a/src/store/audio.ts +++ b/src/store/audio.ts @@ -570,9 +570,10 @@ export const audioStore = createPartialStore({ audioKeys, }); await actions - .INITIALIZE_ENGINE_SPEAKER({ + .INITIALIZE_ENGINE_CHARACTER({ engineId, styleId, + uiLock: true, }) .finally(() => { mutations.SET_AUDIO_KEYS_WITH_INITIALIZING_SPEAKER({ diff --git a/src/store/engine.ts b/src/store/engine.ts index 47f013266c..b478eb98e2 100644 --- a/src/store/engine.ts +++ b/src/store/engine.ts @@ -330,23 +330,29 @@ export const engineStore = createPartialStore({ }, }, - INITIALIZE_ENGINE_SPEAKER: { + INITIALIZE_ENGINE_CHARACTER: { /** - * 指定した話者(スタイルID)に対してエンジン側の初期化を行い、即座に音声合成ができるようにする。 + * 指定したキャラクター(スタイルID)に対してエンジン側の初期化を行い、即座に音声合成ができるようにする。 */ - async action({ actions }, { engineId, styleId }) { - await actions.ASYNC_UI_LOCK({ - callback: () => - actions - .INSTANTIATE_ENGINE_CONNECTOR({ - engineId, - }) - .then((instance) => - instance.invoke("initializeSpeakerInitializeSpeakerPost")({ - speaker: styleId, - }), - ), - }); + async action({ actions }, { engineId, styleId, uiLock }) { + const requestEngineToInitializeCharacter = () => + actions + .INSTANTIATE_ENGINE_CONNECTOR({ + engineId, + }) + .then((instance) => + instance.invoke("initializeSpeakerInitializeSpeakerPost")({ + speaker: styleId, + }), + ); + + if (uiLock) { + await actions.ASYNC_UI_LOCK({ + callback: requestEngineToInitializeCharacter, + }); + } else { + await requestEngineToInitializeCharacter(); + } }, }, VALIDATE_ENGINE_DIR: { diff --git a/src/store/singing.ts b/src/store/singing.ts index 05e071e2e4..ef86fbe4a7 100644 --- a/src/store/singing.ts +++ b/src/store/singing.ts @@ -823,7 +823,11 @@ export const singingStore = createPartialStore({ // 指定されたstyleIdに対して、エンジン側の初期化を行う const isInitialized = await actions.IS_INITIALIZED_ENGINE_SPEAKER(singer); if (!isInitialized) { - await actions.INITIALIZE_ENGINE_SPEAKER(singer); + await actions.INITIALIZE_ENGINE_CHARACTER({ + engineId: singer.engineId, + styleId: singer.styleId, + uiLock: false, + }); } }, }, diff --git a/src/store/type.ts b/src/store/type.ts index ed67caa593..c966bdd098 100644 --- a/src/store/type.ts +++ b/src/store/type.ts @@ -1638,8 +1638,12 @@ export type EngineStoreTypes = { action(payload: { engineId: EngineId; styleId: StyleId }): Promise; }; - INITIALIZE_ENGINE_SPEAKER: { - action(payload: { engineId: EngineId; styleId: StyleId }): void; + INITIALIZE_ENGINE_CHARACTER: { + action(payload: { + engineId: EngineId; + styleId: StyleId; + uiLock: boolean; + }): void; }; VALIDATE_ENGINE_DIR: { diff --git a/src/type/ipc.ts b/src/type/ipc.ts index 7642a633b3..6a3f8bdba3 100644 --- a/src/type/ipc.ts +++ b/src/type/ipc.ts @@ -178,11 +178,6 @@ export type IpcIHData = { return: HotkeySettingType[]; }; - GET_DEFAULT_HOTKEY_SETTINGS: { - args: []; - return: HotkeySettingType[]; - }; - GET_DEFAULT_TOOLBAR_SETTING: { args: []; return: ToolbarSettingType; diff --git a/src/type/preload.ts b/src/type/preload.ts index a339b660fa..5895e7adaf 100644 --- a/src/type/preload.ts +++ b/src/type/preload.ts @@ -268,7 +268,6 @@ export interface Sandbox { hotkeySettings(newData?: HotkeySettingType): Promise; checkFileExists(file: string): Promise; changePinWindow(): void; - getDefaultHotkeySettings(): Promise; getDefaultToolbarSetting(): Promise; setNativeTheme(source: NativeThemeType): void; vuexReady(): void;