mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
feat: improve background startup and launcher control
Detach --background launches from terminals with quieter runtime output, make wrapper/plugin overlay start explicit, and allow trailing commas in JSONC configs for safer hot-reload edits. Includes pending Anki/docs/backlog updates in this unreleased batch.
This commit is contained in:
@@ -15,6 +15,7 @@ export interface AppLifecycleRuntimeDepsFactoryInput {
|
||||
onWillQuitCleanup: () => void;
|
||||
shouldRestoreWindowsOnActivate: () => boolean;
|
||||
restoreWindowsOnActivate: () => void;
|
||||
shouldQuitOnWindowAllClosed: () => boolean;
|
||||
}
|
||||
|
||||
export interface AppReadyRuntimeDepsFactoryInput {
|
||||
@@ -59,6 +60,7 @@ export function createAppLifecycleRuntimeDeps(
|
||||
onWillQuitCleanup: params.onWillQuitCleanup,
|
||||
shouldRestoreWindowsOnActivate: params.shouldRestoreWindowsOnActivate,
|
||||
restoreWindowsOnActivate: params.restoreWindowsOnActivate,
|
||||
shouldQuitOnWindowAllClosed: params.shouldQuitOnWindowAllClosed,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ export interface AppLifecycleRuntimeRunnerParams {
|
||||
onWillQuitCleanup: () => void;
|
||||
shouldRestoreWindowsOnActivate: () => boolean;
|
||||
restoreWindowsOnActivate: () => void;
|
||||
shouldQuitOnWindowAllClosed: () => boolean;
|
||||
}
|
||||
|
||||
export function createAppLifecycleRuntimeRunner(
|
||||
@@ -37,6 +38,7 @@ export function createAppLifecycleRuntimeRunner(
|
||||
onWillQuitCleanup: params.onWillQuitCleanup,
|
||||
shouldRestoreWindowsOnActivate: params.shouldRestoreWindowsOnActivate,
|
||||
restoreWindowsOnActivate: params.restoreWindowsOnActivate,
|
||||
shouldQuitOnWindowAllClosed: params.shouldQuitOnWindowAllClosed,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -78,6 +78,7 @@ export interface AppState {
|
||||
backendOverride: string | null;
|
||||
autoStartOverlay: boolean;
|
||||
texthookerOnlyMode: boolean;
|
||||
backgroundMode: boolean;
|
||||
jlptLevelLookup: (term: string) => JlptLevel | null;
|
||||
frequencyRankLookup: FrequencyDictionaryLookup;
|
||||
anilistSetupPageOpened: boolean;
|
||||
@@ -90,6 +91,7 @@ export interface AppStateInitialValues {
|
||||
backendOverride?: string | null;
|
||||
autoStartOverlay?: boolean;
|
||||
texthookerOnlyMode?: boolean;
|
||||
backgroundMode?: boolean;
|
||||
}
|
||||
|
||||
export interface StartupState {
|
||||
@@ -99,6 +101,7 @@ export interface StartupState {
|
||||
backendOverride: AppState['backendOverride'];
|
||||
autoStartOverlay: AppState['autoStartOverlay'];
|
||||
texthookerOnlyMode: AppState['texthookerOnlyMode'];
|
||||
backgroundMode: AppState['backgroundMode'];
|
||||
}
|
||||
|
||||
export function createAppState(values: AppStateInitialValues): AppState {
|
||||
@@ -152,6 +155,7 @@ export function createAppState(values: AppStateInitialValues): AppState {
|
||||
backendOverride: values.backendOverride ?? null,
|
||||
autoStartOverlay: values.autoStartOverlay ?? false,
|
||||
texthookerOnlyMode: values.texthookerOnlyMode ?? false,
|
||||
backgroundMode: values.backgroundMode ?? false,
|
||||
jlptLevelLookup: () => null,
|
||||
frequencyRankLookup: () => null,
|
||||
anilistSetupPageOpened: false,
|
||||
@@ -172,4 +176,5 @@ export function applyStartupState(appState: AppState, startupState: StartupState
|
||||
appState.backendOverride = startupState.backendOverride;
|
||||
appState.autoStartOverlay = startupState.autoStartOverlay;
|
||||
appState.texthookerOnlyMode = startupState.texthookerOnlyMode;
|
||||
appState.backgroundMode = startupState.backgroundMode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user