Skip to content

Commit

Permalink
Merge pull request #4 from Hiroshiba/hiho-counter-pr-ed3d4ab6
Browse files Browse the repository at this point in the history
VOICEVOX#2355 の変更提案プルリクエスト
  • Loading branch information
X-20A authored Nov 18, 2024
2 parents 467c5a9 + ed3d4ab commit 8f41006
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/store/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
import { IsEqual } from "@/type/utility";

export const settingStoreState: SettingStoreState = {
openedEditor: undefined,
savingSetting: {
fileEncoding: "UTF-8",
fileNamePattern: "",
Expand Down Expand Up @@ -71,7 +72,6 @@ export const settingStoreState: SettingStoreState = {
},
showSingCharacterPortrait: true,
playheadPositionDisplayFormat: "MINUTES_SECONDS",
openedEditor: "talk",
};

export const settingStore = createPartialStore<SettingStoreTypes>({
Expand Down
4 changes: 3 additions & 1 deletion src/store/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,9 @@ export type SettingStoreState = {
experimentalSetting: ExperimentalSettingType;
confirmedTips: ConfirmedTips;
engineSettings: EngineSettings;
} & RootMiscSettingType;
} & Omit<RootMiscSettingType, "openedEditor"> & {
openedEditor: EditorType | undefined; // undefinedのときはどのエディタを開くか定まっていない
};

// keyとvalueの型を連動するようにしたPayloadを作る
type KeyValuePayload<R, K extends keyof R = keyof R> = K extends keyof R
Expand Down
2 changes: 1 addition & 1 deletion src/type/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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<typeof rootMiscSettingSchema>;

Expand Down

0 comments on commit 8f41006

Please sign in to comment.