Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
28e5882
初期設定ダイアログデバッグ用のボタンを設置
jdkfx Dec 10, 2024
728da61
簡易的な初期設定ダイアログを表示
jdkfx Dec 10, 2024
a86855a
ボタンによるエディタ切り替え
jdkfx Dec 11, 2024
8a9a8e5
Merge branch 'main' into feature/#2011
jdkfx Dec 13, 2024
b653097
エディタ選択後にダイアログを非表示にする
jdkfx Dec 13, 2024
1d60c07
デザインを少し考えてみる
jdkfx Dec 13, 2024
7ce0017
Merge branch 'main' into feature/#2011
jdkfx Dec 15, 2024
8b09574
過去に開いていたエディタがundefinedの時ダイアログを開く
jdkfx Dec 15, 2024
5f799d0
Merge branch 'main' into feature/#2011
jdkfx Dec 19, 2024
253e843
Merge branch 'main' into feature/#2011
jdkfx Dec 20, 2024
47c42c7
Merge branch 'main' into feature/#2011
Hiroshiba Dec 29, 2024
101bd4c
feat: 初期設定ダイアログの状態管理を追加し、openedEditorをオプショナルに変更
Hiroshiba Dec 29, 2024
cdbc3d7
Merge branch 'VOICEVOX:main' into feature/#2011
jdkfx Jan 11, 2025
6f7c945
Merge pull request #5 from Hiroshiba/hiho-counter-pr-101bd4c3
jdkfx Jan 20, 2025
ea58503
Merge branch 'main' into feature/#2011
jdkfx Jan 20, 2025
2eb2c57
Merge branch 'main' into feature/#2011
jdkfx Jan 26, 2025
7fdd64d
デバッグ用ボタン削除
jdkfx Jan 26, 2025
6184761
Merge branch 'main' into feature/#2011
jdkfx Feb 18, 2025
94fd07c
スナップショットの更新
jdkfx Feb 19, 2025
d1489a8
Merge branch 'main' into feature/#2011
jdkfx Mar 1, 2025
253a9c5
いらないvoidを消す
jdkfx Mar 11, 2025
d5cc9fd
e2eテストを改善
jdkfx Mar 14, 2025
98fb3c5
Revert "e2eテストを改善"
jdkfx Mar 14, 2025
c66c7da
Merge branch 'main' into feature/#2011
jdkfx Mar 20, 2025
63a4520
SET_INIT_OPEN_EDITORを追加
jdkfx Mar 20, 2025
27cf935
Merge branch 'main' into feature/#2011
jdkfx Mar 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ onMounted(async () => {
isAcceptTermsDialogOpen:
import.meta.env.MODE !== "development" &&
store.state.acceptTerms !== "Accepted",
isInitialSettingsDialogOpen: store.state.openedEditor == undefined,
});

// プロジェクトファイルが指定されていればロード
Expand Down
16 changes: 16 additions & 0 deletions src/components/Dialog/AllDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/>
<ExportSongAudioDialog v-model:dialogOpened="isExportSongAudioDialogOpen" />
<ImportSongProjectDialog v-model="isImportSongProjectDialogOpenComputed" />
<InitialSettingsDialog v-model="isInitialSettingsDialogOpenComputed" />
<PresetManageDialog v-model:dialogOpened="isPresetManageDialogOpenComputed" />
<HelpDialog v-model:dialogOpened="isHelpDialogOpenComputed" />
</template>
Expand All @@ -46,6 +47,7 @@ import DictionaryManageDialog from "@/components/Dialog/DictionaryManageDialog.v
import EngineManageDialog from "@/components/Dialog/EngineManageDialog.vue";
import UpdateNotificationDialogContainer from "@/components/Dialog/UpdateNotificationDialog/Container.vue";
import ImportSongProjectDialog from "@/components/Dialog/ImportSongProjectDialog.vue";
import InitialSettingsDialog from "@/components/Dialog/InitialSettingsDialog.vue";
import ExportSongAudioDialog from "@/components/Dialog/ExportSongAudioDialog/Container.vue";
import PresetManageDialog from "@/components/Dialog/PresetManageDialog.vue";
import HelpDialog from "@/components/Dialog/HelpDialog/HelpDialog.vue";
Expand Down Expand Up @@ -152,6 +154,20 @@ const isAcceptRetrieveTelemetryDialogOpenComputed = computed({
}),
});

// 初期設定ダイアログ
const isInitialSettingsDialogOpenComputed = computed({
get: () =>
!store.state.isAcceptTermsDialogOpen &&
!store.state.isCharacterOrderDialogOpen &&
!store.state.isDefaultStyleSelectDialogOpen &&
!store.state.isAcceptRetrieveTelemetryDialogOpen &&
store.state.isInitialSettingsDialogOpen,
set: (val) =>
store.actions.SET_DIALOG_OPEN({
isInitialSettingsDialogOpen: val,
}),
});

// エディタのアップデート確認ダイアログ
const canOpenNotificationDialog = computed(() => {
return (
Expand Down
91 changes: 91 additions & 0 deletions src/components/Dialog/InitialSettingsDialog.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<template>
<QDialog v-model="isInitialSettingsDialogOpenComputed">
<QCard class="q-pa-md">
<QCardSection class="dialog-text">
<div class="text-h5">どちらに興味がありますか?</div>
<div class="text-body2 text-grey-8">
選択したエディタを開きます。アプリケーション右上からトークとソングを切り替えることができます。
</div>
</QCardSection>
<QCardActions class="q-px-md q-py-sm">
<div class="button-group col q-px-md">
<QBtn
outline
textColor="display"
class="text-no-wrap text-h4 text-bold q-mr-sm"
@click="selectEditor('talk')"
@update:modelValue="selectEditor"
>
<label>トーク</label>
<QIcon
name="mic"
class="q-icon material-icons"
aria-hidden="true"
size="5rem"
/>
</QBtn>
<QBtn
outline
textColor="display"
class="text-no-wrap text-h4 text-bold q-mr-sm"
@click="selectEditor('song')"
@update:modelValue="selectEditor"
>
<label>ソング</label>
<QIcon
name="music_note"
class="q-icon material-icons"
aria-hidden="true"
size="5rem"
/>
</QBtn>
</div>
</QCardActions>
</QCard>
</QDialog>
</template>

<script setup lang="ts">
import { computed } from "vue";
import { QIcon } from "quasar";
import { useStore } from "@/store";
import { EditorType } from "@/type/preload";

const props = defineProps<{
modelValue: boolean;
}>();
const emit = defineEmits<{
(e: "update:modelValue", value: boolean): void;
}>();

const isInitialSettingsDialogOpenComputed = computed({
get: () => props.modelValue,
set: (val) => emit("update:modelValue", val),
});

const store = useStore();

const selectEditor = async (editorType: EditorType) => {
await store.actions.SET_INIT_OPEN_EDITOR({
editorType: editorType,
});

isInitialSettingsDialogOpenComputed.value = false;
};
</script>

<style scoped lang="scss">
@use "@/styles/colors" as colors;

.dialog-text {
text-align: center;
}

.button-group {
display: grid;
grid-auto-columns: 1fr;
grid-auto-flow: column;
gap: 1rem;
width: fit-content;
}
</style>
11 changes: 11 additions & 0 deletions src/store/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
EngineId,
ConfirmedTips,
RootMiscSettingType,
EditorType,
} from "@/type/preload";
import { IsEqual } from "@/type/utility";
import { HotkeySettingType } from "@/domain/hotkeyAction";
Expand Down Expand Up @@ -431,4 +432,14 @@ export const settingStore = createPartialStore<SettingStoreTypes>({
);
},
},

SET_INIT_OPEN_EDITOR: {
mutation(state, { editorType }: { editorType: EditorType }) {
state.openedEditor = editorType;
},
action({ mutations }, { editorType }: { editorType: EditorType }) {
void window.backend.setSetting("openedEditor", editorType);
mutations.SET_INIT_OPEN_EDITOR({ editorType });
},
},
});
10 changes: 7 additions & 3 deletions src/store/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1905,9 +1905,7 @@ export type SettingStoreState = {
experimentalSetting: ExperimentalSettingType;
confirmedTips: ConfirmedTips;
engineSettings: EngineSettings;
} & Omit<RootMiscSettingType, "openedEditor"> & {
openedEditor: EditorType | undefined; // undefinedのときはどのエディタを開くか定まっていない
};
} & RootMiscSettingType;

// keyとvalueの型を連動するようにしたPayloadを作る
type KeyValuePayload<R, K extends keyof R = keyof R> = K extends keyof R
Expand Down Expand Up @@ -1996,6 +1994,11 @@ export type SettingStoreTypes = {
APPEND_RECENTLY_USED_PROJECT: {
action(payload: { filePath: string }): Promise<void>;
};

SET_INIT_OPEN_EDITOR: {
mutation: { editorType: EditorType };
action(payload: { editorType: EditorType }): void;
};
};

/*
Expand Down Expand Up @@ -2028,6 +2031,7 @@ export type DialogStates = {
isUpdateNotificationDialogOpen: boolean;
isExportSongAudioDialogOpen: boolean;
isImportSongProjectDialogOpen: boolean;
isInitialSettingsDialogOpen: boolean;
isPresetManageDialogOpen: boolean;
isHelpDialogOpen: boolean;
};
Expand Down
1 change: 1 addition & 0 deletions src/store/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const uiStoreState: UiStoreState = {
isUpdateNotificationDialogOpen: false,
isExportSongAudioDialogOpen: false,
isImportSongProjectDialogOpen: false,
isInitialSettingsDialogOpen: false,
isPresetManageDialogOpen: false,
isHelpDialogOpen: false,
isMaximized: false,
Expand Down
2 changes: 1 addition & 1 deletion src/type/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export type ConfirmedTips = {

// ルート直下にある雑多な設定値
export const rootMiscSettingSchema = z.object({
openedEditor: z.enum(["talk", "song"]).default("talk"),
openedEditor: z.enum(["talk", "song"]).optional(),
editorFont: z.enum(["default", "os"]).default("default"),
showTextLineNumber: z.boolean().default(false),
showAddAudioItemButton: z.boolean().default(true),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading