diff --git a/src/store/setting.ts b/src/store/setting.ts index 2d149560cd..ba9c53548d 100644 --- a/src/store/setting.ts +++ b/src/store/setting.ts @@ -18,6 +18,7 @@ import { import { IsEqual } from "@/type/utility"; export const settingStoreState: SettingStoreState = { + openedEditor: undefined, savingSetting: { fileEncoding: "UTF-8", fileNamePattern: "", @@ -71,7 +72,6 @@ export const settingStoreState: SettingStoreState = { }, showSingCharacterPortrait: true, playheadPositionDisplayFormat: "MINUTES_SECONDS", - openedEditor: "talk", }; export const settingStore = createPartialStore({ diff --git a/src/store/type.ts b/src/store/type.ts index cfe438912f..fae93613da 100644 --- a/src/store/type.ts +++ b/src/store/type.ts @@ -1825,7 +1825,9 @@ export type SettingStoreState = { experimentalSetting: ExperimentalSettingType; confirmedTips: ConfirmedTips; engineSettings: EngineSettings; -} & RootMiscSettingType; +} & Omit & { + openedEditor: EditorType | undefined; // undefinedのときはどのエディタを開くか定まっていない + }; // keyとvalueの型を連動するようにしたPayloadを作る type KeyValuePayload = K extends keyof R diff --git a/src/type/preload.ts b/src/type/preload.ts index 11faf381ec..8ded07113e 100644 --- a/src/type/preload.ts +++ b/src/type/preload.ts @@ -571,6 +571,7 @@ export type ConfirmedTips = { // ルート直下にある雑多な設定値 export const rootMiscSettingSchema = z.object({ + openedEditor: z.enum(["talk", "song"]).default("talk"), editorFont: z.enum(["default", "os"]).default("default"), showTextLineNumber: z.boolean().default(false), showAddAudioItemButton: z.boolean().default(true), @@ -594,7 +595,6 @@ export const rootMiscSettingSchema = z.object({ playheadPositionDisplayFormat: z .enum(["MINUTES_SECONDS", "MEASURES_BEATS"]) .default("MINUTES_SECONDS"), // 再生ヘッド位置の表示モード - openedEditor: z.enum(["talk", "song"]).default("talk"), }); export type RootMiscSettingType = z.infer;