feat(overlay): add primary subtitle bar visibility modes

- Cycle `v` through `hidden | visible | hover` instead of a boolean toggle
- Add `subtitleStyle.primaryDefaultMode` config with default `visible`
- Carry primary mode independently from secondary in hot-reload payload
- Add hover CSS: transparent until hovered, then fully visible
- Show primary-specific OSD text on each mode change
This commit is contained in:
2026-05-12 20:30:42 -07:00
parent 430373f010
commit 6af9a19ff3
20 changed files with 221 additions and 13 deletions
+4 -1
View File
@@ -55,7 +55,9 @@ export interface SubtitleStyle {
fontSize: number;
}
export type SecondarySubMode = 'hidden' | 'visible' | 'hover';
export type SubtitleBarMode = 'hidden' | 'visible' | 'hover';
export type PrimarySubMode = SubtitleBarMode;
export type SecondarySubMode = SubtitleBarMode;
export interface SecondarySubConfig {
secondarySubLanguages?: string[];
@@ -67,6 +69,7 @@ export type NPlusOneMatchMode = 'headword' | 'surface';
export type FrequencyDictionaryMatchMode = 'headword' | 'surface';
export interface SubtitleStyleConfig {
primaryDefaultMode?: PrimarySubMode;
enableJlpt?: boolean;
preserveLineBreaks?: boolean;
autoPauseVideoOnHover?: boolean;