-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
前回開いていたエディタ(トーク or ソング)画面を起動時に表示 #2355
Changes from 1 commit
f743e45
093c6d2
98ca600
0697dc6
0308c3e
467c5a9
ed3d4ab
8f41006
6f91632
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,7 @@ export const settingStoreState: SettingStoreState = { | |
}, | ||
showSingCharacterPortrait: true, | ||
playheadPositionDisplayFormat: "MINUTES_SECONDS", | ||
editorType: "talk", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. openedEditorに |
||
}; | ||
|
||
export const settingStore = createPartialStore<SettingStoreTypes>({ | ||
|
@@ -148,6 +149,7 @@ export const settingStore = createPartialStore<SettingStoreTypes>({ | |
"undoableTrackOperations", | ||
"showSingCharacterPortrait", | ||
"playheadPositionDisplayFormat", | ||
"editorType", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここも |
||
] as const; | ||
|
||
// rootMiscSettingKeysに値を足し忘れていたときに型エラーを出す検出用コード | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2053,6 +2053,11 @@ export type UiStoreTypes = { | |
action(payload: { activePointScrollMode: ActivePointScrollMode }): void; | ||
}; | ||
|
||
SET_EDITOR_TYPE: { | ||
mutation: { editorType: EditorType }; | ||
action(payload: { editorType: EditorType }): void; | ||
}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. これもなくせるはず |
||
|
||
SET_AVAILABLE_THEMES: { | ||
mutation: { themes: ThemeConf[] }; | ||
}; | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12,7 +12,7 @@ import { | |||||||||||||||
UiStoreTypes, | ||||||||||||||||
} from "./type"; | ||||||||||||||||
import { createPartialStore } from "./vuex"; | ||||||||||||||||
import { ActivePointScrollMode } from "@/type/preload"; | ||||||||||||||||
import { ActivePointScrollMode, EditorType } from "@/type/preload"; | ||||||||||||||||
import { | ||||||||||||||||
AlertDialogOptions, | ||||||||||||||||
ConfirmDialogOptions, | ||||||||||||||||
|
@@ -260,6 +260,10 @@ export const uiStore = createPartialStore<UiStoreTypes>({ | |||||||||||||||
), | ||||||||||||||||
}); | ||||||||||||||||
|
||||||||||||||||
mutations.SET_OPENED_EDITOR({ | ||||||||||||||||
editor: await window.backend.getSetting("editorType"), | ||||||||||||||||
}); | ||||||||||||||||
|
||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
(さらに言うと上の |
||||||||||||||||
// electron-window-stateがvuex初期化前に働くので | ||||||||||||||||
// ここで改めてelectron windowの最大化状態をVuex storeに同期 | ||||||||||||||||
if (await window.backend.isMaximizedWindow()) { | ||||||||||||||||
|
@@ -335,6 +339,17 @@ export const uiStore = createPartialStore<UiStoreTypes>({ | |||||||||||||||
}, | ||||||||||||||||
}, | ||||||||||||||||
|
||||||||||||||||
SET_EDITOR_TYPE: { | ||||||||||||||||
mutation(state, { editorType }: { editorType: EditorType }) { | ||||||||||||||||
state.editorType = editorType; | ||||||||||||||||
}, | ||||||||||||||||
async action({ mutations }, { editorType }: { editorType: EditorType }) { | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここもなくせそう! |
||||||||||||||||
mutations.SET_OPENED_EDITOR({ | ||||||||||||||||
editor: await window.backend.setSetting("editorType", editorType), | ||||||||||||||||
}); | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
普通に分けた方が良さそう。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 私もそちらが分かりやすそうに思えます。ただ、既存のSET_INHERIT_AUDIOINFOやSET_ACTIVE_POINT_SCROLL_MODEでは引数内で記述されているので統一感を考慮してSET_EDITOR_TYPEもそれに倣いました。これらの関数がどのような意図や都合で書かれたか分からないため、判断に迷っています。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 確かにこれ混乱しますね!! 最初は設定ごとにSETのためのmutation/actionがあったのですが、後々に統合された 今回の場合は多分 |
||||||||||||||||
}, | ||||||||||||||||
}, | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* 選択可能なテーマをセットする。 | ||||||||||||||||
* NOTE: カスタムテーマが導入された場合を見越して残している。 | ||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -594,6 +594,7 @@ export const rootMiscSettingSchema = z.object({ | |
playheadPositionDisplayFormat: z | ||
.enum(["MINUTES_SECONDS", "MEASURES_BEATS"]) | ||
.default("MINUTES_SECONDS"), // 再生ヘッド位置の表示モード | ||
editorType: z.enum(["talk", "song"]).default("talk"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここをopenedEditorに変える感じで・・・! |
||
}); | ||
export type RootMiscSettingType = z.infer<typeof rootMiscSettingSchema>; | ||
|
||
|
@@ -603,6 +604,7 @@ export const configSchema = z | |
activePointScrollMode: z | ||
.enum(["CONTINUOUSLY", "PAGE", "OFF"]) | ||
.default("OFF"), | ||
editorType: z.enum(["talk", "song"]).default("talk"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
savingSetting: z | ||
.object({ | ||
fileEncoding: z.enum(["UTF-8", "Shift_JIS"]).default("UTF-8"), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここはなくなる