-
-
Notifications
You must be signed in to change notification settings - Fork 544
feat(subtitle): add shadow/outline adjustments, expand fonts selection, and fix YouTube API error handling #1660
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
c3c451e
8ef502b
d88d274
7a96175
386c81c
432e0d2
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 |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ import { DEFAULT_TRANSLATE_PROMPTS_CONFIG } from "./prompt" | |
| import { DEFAULT_PROVIDER_CONFIG_LIST } from "./providers" | ||
| import { DEFAULT_SELECTION_OVERLAY_OPACITY } from "./selection" | ||
| import { DEFAULT_SIDE_CONTENT_WIDTH } from "./side" | ||
| import { DEFAULT_BACKGROUND_OPACITY, DEFAULT_DISPLAY_MODE, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SCALE, DEFAULT_FONT_WEIGHT, DEFAULT_SUBTITLE_COLOR, DEFAULT_SUBTITLE_POSITION, DEFAULT_TRANSLATION_POSITION } from "./subtitles" | ||
| import { DEFAULT_BACKGROUND_OPACITY, DEFAULT_DISPLAY_MODE, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SCALE, DEFAULT_FONT_SHADOW_INTENSITY, DEFAULT_FONT_STROKE_WIDTH, DEFAULT_FONT_WEIGHT, DEFAULT_SUBTITLE_COLOR, DEFAULT_SUBTITLE_POSITION, DEFAULT_TRANSLATION_POSITION } from "./subtitles" | ||
| import { DEFAULT_AUTO_TRANSLATE_SHORTCUT_KEY, DEFAULT_BATCH_CONFIG, DEFAULT_MIN_CHARACTERS_PER_NODE, DEFAULT_MIN_WORDS_PER_NODE, DEFAULT_PRELOAD_MARGIN, DEFAULT_PRELOAD_THRESHOLD, DEFAULT_REQUEST_CAPACITY, DEFAULT_REQUEST_RATE } from "./translate" | ||
| import { TRANSLATION_NODE_STYLE_ON_INSTALLED } from "./translation-node-style" | ||
| import { DEFAULT_TTS_CONFIG } from "./tts" | ||
|
|
@@ -18,7 +18,7 @@ export const GOOGLE_DRIVE_TOKEN_STORAGE_KEY = "__googleDriveToken" | |
|
|
||
| export const THEME_STORAGE_KEY = "theme" | ||
| export const DEFAULT_DETECTED_CODE = "eng" as const | ||
| export const CONFIG_SCHEMA_VERSION = 75 | ||
| export const CONFIG_SCHEMA_VERSION = 76 | ||
|
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.
When this schema bump is present, Useful? React with 👍 / 👎. |
||
|
|
||
| export const DEFAULT_FLOATING_BUTTON_POSITION = 0.66 | ||
| export const DEFAULT_FLOATING_BUTTON_SIDE: FloatingButtonSide = "right" | ||
|
|
@@ -144,12 +144,16 @@ export const DEFAULT_CONFIG: Config = { | |
| fontScale: DEFAULT_FONT_SCALE, | ||
| color: DEFAULT_SUBTITLE_COLOR, | ||
| fontWeight: DEFAULT_FONT_WEIGHT, | ||
| fontShadowIntensity: DEFAULT_FONT_SHADOW_INTENSITY, | ||
| fontStrokeWidth: DEFAULT_FONT_STROKE_WIDTH, | ||
| }, | ||
| translation: { | ||
| fontFamily: DEFAULT_FONT_FAMILY, | ||
| fontScale: DEFAULT_FONT_SCALE, | ||
| color: DEFAULT_SUBTITLE_COLOR, | ||
| fontWeight: DEFAULT_FONT_WEIGHT, | ||
| fontShadowIntensity: DEFAULT_FONT_SHADOW_INTENSITY, | ||
| fontStrokeWidth: DEFAULT_FONT_STROKE_WIDTH, | ||
| }, | ||
| container: { | ||
| backgroundOpacity: DEFAULT_BACKGROUND_OPACITY, | ||
|
|
||
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.
When an installed user upgrades from schema 75, this bump makes
initializeConfigcallrunMigration(76, ...), but repo-wide search ofsrc/utils/config/migration-scriptsshows the latest script isv074-to-v075.tsand there is nov075-to-v076.ts.runMigrationtherefore throws, the loop advances anyway, and the stricter subtitle schema rejects the old config becausefontShadowIntensityandfontStrokeWidthare missing, causing the extension to fall back toDEFAULT_CONFIGand lose the user's settings;migrateConfigpaths such as Google Drive sync/import will throw the missing-migration error directly.Useful? React with 👍 / 👎.