mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-28 12:55:17 -07:00
feat(config): unify mpv plugin options under main config and add CSS/Ani
- Replace subminer.conf plugin config with mpv.* fields in config.jsonc - Add socketPath, backend, autoStartSubMiner, pauseUntilOverlayReady, aniskipEnabled/buttonKey, subminerBinaryPath to mpv config - Add subtitleSidebar.css field; migrate legacy sidebar appearance fields - Add paintOrder and WebkitTextStroke to subtitle style options - Update default subtitle/sidebar fontFamily to CJK-first stack - Fix overlay visible state surviving mpv y-r restart - Fix live config saves applying subtitle CSS immediately to open overlays - Migrate legacy primary/secondary subtitle appearance into subtitleStyle.css on load - Switch AniSkip button key setting to click-to-learn key capture
This commit is contained in:
@@ -521,6 +521,19 @@ export function applySubtitleDomainConfig(context: ResolveContext): void {
|
||||
...(src.subtitleSidebar as ResolvedConfig['subtitleSidebar']),
|
||||
};
|
||||
|
||||
const css = asCssDeclarations((src.subtitleSidebar as { css?: unknown }).css);
|
||||
if (css !== undefined) {
|
||||
resolved.subtitleSidebar.css = css;
|
||||
} else if ((src.subtitleSidebar as { css?: unknown }).css !== undefined) {
|
||||
resolved.subtitleSidebar.css = fallback.css;
|
||||
warn(
|
||||
'subtitleSidebar.css',
|
||||
(src.subtitleSidebar as { css?: unknown }).css,
|
||||
resolved.subtitleSidebar.css,
|
||||
'Expected an object whose values are CSS declaration strings.',
|
||||
);
|
||||
}
|
||||
|
||||
const enabled = asBoolean((src.subtitleSidebar as { enabled?: unknown }).enabled);
|
||||
if (enabled !== undefined) {
|
||||
resolved.subtitleSidebar.enabled = enabled;
|
||||
|
||||
Reference in New Issue
Block a user