From 49271ce89e1033fafa0be5aa56b775643ca80c7b Mon Sep 17 00:00:00 2001 From: Segu-g Date: Sun, 27 Oct 2024 04:02:04 +0900 Subject: [PATCH 1/3] src/components/Menu/MenuBar/MenuBar.vue: dot notation --- src/components/Menu/MenuBar/MenuBar.vue | 58 ++++++++++++------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/src/components/Menu/MenuBar/MenuBar.vue b/src/components/Menu/MenuBar/MenuBar.vue index 9118bce887..759304ed92 100644 --- a/src/components/Menu/MenuBar/MenuBar.vue +++ b/src/components/Menu/MenuBar/MenuBar.vue @@ -110,62 +110,60 @@ watch(titleText, (newTitle) => { }); const closeAllDialog = () => { - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isSettingDialogOpen: false, }); - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isHelpDialogOpen: false, }); - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isHotkeySettingDialogOpen: false, }); - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isToolbarSettingDialogOpen: false, }); - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isCharacterOrderDialogOpen: false, }); - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isDefaultStyleSelectDialogOpen: false, }); }; const openHelpDialog = () => { - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isHelpDialogOpen: true, }); }; const createNewProject = async () => { if (!uiLocked.value) { - await store.dispatch("CREATE_NEW_PROJECT", {}); + await store.actions.CREATE_NEW_PROJECT({}); } }; const saveProject = async () => { if (!uiLocked.value) { - await store.dispatch("SAVE_PROJECT_FILE", { overwrite: true }); + await store.actions.SAVE_PROJECT_FILE({ overwrite: true }); } }; const saveProjectAs = async () => { if (!uiLocked.value) { - await store.dispatch("SAVE_PROJECT_FILE", {}); + await store.actions.SAVE_PROJECT_FILE({}); } }; const importProject = () => { if (!uiLocked.value) { - void store.dispatch("LOAD_PROJECT_FILE", {}); + void store.actions.LOAD_PROJECT_FILE({}); } }; // 「最近使ったプロジェクト」のメニュー const recentProjectsSubMenuData = ref([]); const updateRecentProjects = async () => { - const recentlyUsedProjects = await store.dispatch( - "GET_RECENTLY_USED_PROJECTS", - ); + const recentlyUsedProjects = await store.actions.GET_RECENTLY_USED_PROJECTS(); recentProjectsSubMenuData.value = recentlyUsedProjects.length === 0 ? [ @@ -183,7 +181,7 @@ const updateRecentProjects = async () => { type: "button", label: projectFilePath, onClick: () => { - void store.dispatch("LOAD_PROJECT_FILE", { + void store.actions.LOAD_PROJECT_FILE({ filePath: projectFilePath, }); }, @@ -206,7 +204,7 @@ const engineSubMenuData = computed(() => { type: "button", label: "再起動", onClick: () => { - void store.dispatch("RESTART_ENGINES", { + void store.actions.RESTART_ENGINES({ engineIds: [engineInfo.uuid], }); }, @@ -228,7 +226,7 @@ const engineSubMenuData = computed(() => { type: "button", label: "フォルダを開く", onClick: () => { - void store.dispatch("OPEN_ENGINE_DIRECTORY", { + void store.actions.OPEN_ENGINE_DIRECTORY({ engineId: engineInfo.uuid, }); }, @@ -238,7 +236,7 @@ const engineSubMenuData = computed(() => { type: "button", label: "再起動", onClick: () => { - void store.dispatch("RESTART_ENGINES", { + void store.actions.RESTART_ENGINES({ engineIds: [engineInfo.uuid], }); }, @@ -254,7 +252,7 @@ const engineSubMenuData = computed(() => { type: "button", label: "全てのエンジンを再起動", onClick: () => { - void store.dispatch("RESTART_ENGINES", { + void store.actions.RESTART_ENGINES({ engineIds: engineIds.value, }); }, @@ -267,7 +265,7 @@ const engineSubMenuData = computed(() => { type: "button", label: "エンジンの管理", onClick: () => { - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isEngineManageDialogOpen: true, }); }, @@ -280,7 +278,7 @@ const engineSubMenuData = computed(() => { type: "button", label: "マルチエンジンをオンにして再読み込み", onClick() { - void store.dispatch("RELOAD_APP", { + void store.actions.RELOAD_APP({ isMultiEngineOffMode: false, }); }, @@ -355,7 +353,7 @@ const menudata = computed(() => [ label: "元に戻す", onClick: async () => { if (!uiLocked.value) { - await store.dispatch("UNDO", { editor: props.editor }); + await store.actions.UNDO({ editor: props.editor }); } }, disabled: !canUndo.value, @@ -366,7 +364,7 @@ const menudata = computed(() => [ label: "やり直す", onClick: async () => { if (!uiLocked.value) { - await store.dispatch("REDO", { editor: props.editor }); + await store.actions.REDO({ editor: props.editor }); } }, disabled: !canRedo.value, @@ -379,7 +377,7 @@ const menudata = computed(() => [ label: "すべて選択", onClick: async () => { if (!uiLocked.value && isMultiSelectEnabled.value) { - await store.dispatch("SET_SELECTED_AUDIO_KEYS", { + await store.actions.SET_SELECTED_AUDIO_KEYS({ audioKeys: audioKeys.value, }); } @@ -421,7 +419,7 @@ const menudata = computed(() => [ type: "button", label: "キー割り当て", onClick() { - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isHotkeySettingDialogOpen: true, }); }, @@ -431,7 +429,7 @@ const menudata = computed(() => [ type: "button", label: "ツールバーのカスタマイズ", onClick() { - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isToolbarSettingDialogOpen: true, }); }, @@ -441,7 +439,7 @@ const menudata = computed(() => [ type: "button", label: "キャラクター並び替え・試聴", onClick() { - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isCharacterOrderDialogOpen: true, }); }, @@ -451,7 +449,7 @@ const menudata = computed(() => [ type: "button", label: "デフォルトスタイル", onClick() { - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isDefaultStyleSelectDialogOpen: true, }); }, @@ -461,7 +459,7 @@ const menudata = computed(() => [ type: "button", label: "読み方&アクセント辞書", onClick() { - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isDictionaryManageDialogOpen: true, }); }, @@ -472,7 +470,7 @@ const menudata = computed(() => [ type: "button", label: "オプション", onClick() { - void store.dispatch("SET_DIALOG_OPEN", { + void store.actions.SET_DIALOG_OPEN({ isSettingDialogOpen: true, }); }, From b8bd42554394ad7732f2343d54a755bd619a7889 Mon Sep 17 00:00:00 2001 From: Segu-g Date: Sun, 27 Oct 2024 04:02:50 +0900 Subject: [PATCH 2/3] src/components/Menu/MenuBar/MinMaxCloseButtons.vue: dot notation --- src/components/Menu/MenuBar/MinMaxCloseButtons.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Menu/MenuBar/MinMaxCloseButtons.vue b/src/components/Menu/MenuBar/MinMaxCloseButtons.vue index 745a108c4e..baeb5973bd 100644 --- a/src/components/Menu/MenuBar/MinMaxCloseButtons.vue +++ b/src/components/Menu/MenuBar/MinMaxCloseButtons.vue @@ -97,7 +97,7 @@ const $q = useQuasar(); const store = useStore(); const closeWindow = async () => { - void store.dispatch("CHECK_EDITED_AND_NOT_SAVE", { closeOrReload: "close" }); + void store.actions.CHECK_EDITED_AND_NOT_SAVE({ closeOrReload: "close" }); }; const minimizeWindow = () => window.backend.minimizeWindow(); const maximizeWindow = () => window.backend.maximizeWindow(); From 0e21849788dbb8166977cda843edc34530c535cf Mon Sep 17 00:00:00 2001 From: Segu-g Date: Sun, 27 Oct 2024 04:03:11 +0900 Subject: [PATCH 3/3] src/components/Menu/MenuBar/TitleBarEditorSwitcher.vue: dot notation --- src/components/Menu/MenuBar/TitleBarEditorSwitcher.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Menu/MenuBar/TitleBarEditorSwitcher.vue b/src/components/Menu/MenuBar/TitleBarEditorSwitcher.vue index 2f5f8c4c86..6410cdae55 100644 --- a/src/components/Menu/MenuBar/TitleBarEditorSwitcher.vue +++ b/src/components/Menu/MenuBar/TitleBarEditorSwitcher.vue @@ -30,7 +30,7 @@ const openedEditor = computed(() => store.state.openedEditor); const uiLocked = computed(() => store.getters.UI_LOCKED); const switchEditor = async (editor: EditorType) => { - await store.dispatch("SET_OPENED_EDITOR", { editor }); + await store.actions.SET_OPENED_EDITOR({ editor }); };