@@ -430,6 +430,7 @@ interface KeyBindProperties {
430430 label : string ;
431431 boundViaChrome : boolean ;
432432 hide ?: boolean ;
433+ additionalControl ?: React . ReactNode ;
433434}
434435
435436// hotkeys only returns strings for a Mac while requiring the OS-specific keys for the actual binds
@@ -836,6 +837,74 @@ export default function SettingsForm({
836837 [ onSettingsChanged ]
837838 ) ;
838839 const { t } = useTranslation ( ) ;
840+
841+ const {
842+ ankiConnectUrl,
843+ deck,
844+ noteType,
845+ sentenceField,
846+ definitionField,
847+ audioField,
848+ imageField,
849+ wordField,
850+ sourceField,
851+ urlField,
852+ track1Field,
853+ track2Field,
854+ track3Field,
855+ ankiFieldSettings,
856+ subtitlePreview,
857+ subtitlePositionOffset : subtitlePositionOffset ,
858+ topSubtitlePositionOffset,
859+ subtitlesWidth,
860+ audioPaddingStart,
861+ audioPaddingEnd,
862+ maxImageWidth,
863+ maxImageHeight,
864+ surroundingSubtitlesCountRadius,
865+ surroundingSubtitlesTimeRadius,
866+ autoPausePreference,
867+ seekDuration,
868+ speedChangeStep,
869+ fastForwardModePlaybackRate,
870+ keyBindSet,
871+ clickToMineDefaultAction,
872+ postMiningPlaybackState,
873+ recordWithAudioPlayback,
874+ preferMp3,
875+ miningHistoryStorageLimit,
876+ themeType,
877+ copyToClipboardOnMine,
878+ rememberSubtitleOffset,
879+ autoCopyCurrentSubtitle,
880+ alwaysPlayOnSubtitleRepeat,
881+ tabName,
882+ subtitleRegexFilter,
883+ subtitleRegexFilterTextReplacement,
884+ subtitleHtml,
885+ language,
886+ customAnkiFields,
887+ customAnkiFieldSettings,
888+ tags,
889+ imageBasedSubtitleScaleFactor,
890+ streamingAppUrl,
891+ streamingDisplaySubtitles,
892+ streamingRecordMedia,
893+ streamingTakeScreenshot,
894+ streamingCleanScreenshot,
895+ streamingCropScreenshot,
896+ streamingSubsDragAndDrop,
897+ streamingAutoSync,
898+ streamingAutoSyncPromptOnFailure,
899+ streamingCondensedPlaybackMinimumSkipIntervalMs,
900+ streamingScreenshotDelay,
901+ streamingSubtitleListPreference,
902+ streamingEnableOverlay,
903+ webSocketClientEnabled,
904+ webSocketServerUrl,
905+ pauseOnHoverMode,
906+ } = settings ;
907+
839908 const keyBindProperties = useMemo < { [ key in AllKeyNames ] : KeyBindProperties } > (
840909 ( ) => ( {
841910 copySubtitle : { label : t ( 'binds.copySubtitle' ) ! , boundViaChrome : true } ,
@@ -896,7 +965,21 @@ export default function SettingsForm({
896965 boundViaChrome : false ,
897966 } ,
898967 seekBackward : { label : t ( 'binds.seekBackward' ) ! , boundViaChrome : false } ,
899- seekForward : { label : t ( 'binds.seekForward' ) ! , boundViaChrome : false } ,
968+ seekForward : { label : t ( 'binds.seekForward' ) ! , boundViaChrome : false , additionalControl : (
969+ < TextField
970+ type = "number"
971+ label = { t ( 'settings.seekDuration' ) }
972+ fullWidth
973+ value = { seekDuration }
974+ color = "primary"
975+ onChange = { ( event ) => handleSettingChanged ( 'seekDuration' , Number ( event . target . value ) ) }
976+ inputProps = { {
977+ min : 1 ,
978+ max : 60 ,
979+ step : 1 ,
980+ } }
981+ /> )
982+ } ,
900983 seekToPreviousSubtitle : { label : t ( 'binds.seekToPreviousSubtitle' ) ! , boundViaChrome : false } ,
901984 seekToNextSubtitle : { label : t ( 'binds.seekToNextSubtitle' ) ! , boundViaChrome : false } ,
902985 seekToBeginningOfCurrentSubtitle : {
@@ -922,76 +1005,9 @@ export default function SettingsForm({
9221005 hide : ! extensionInstalled || ! extensionSupportsSidePanel ,
9231006 } ,
9241007 } ) ,
925- [ t , extensionInstalled , extensionSupportsSidePanel , extensionSupportsExportCardBind ]
1008+ [ t , extensionInstalled , extensionSupportsSidePanel , extensionSupportsExportCardBind , seekDuration ]
9261009 ) ;
9271010
928- const {
929- ankiConnectUrl,
930- deck,
931- noteType,
932- sentenceField,
933- definitionField,
934- audioField,
935- imageField,
936- wordField,
937- sourceField,
938- urlField,
939- track1Field,
940- track2Field,
941- track3Field,
942- ankiFieldSettings,
943- subtitlePreview,
944- subtitlePositionOffset : subtitlePositionOffset ,
945- topSubtitlePositionOffset,
946- subtitlesWidth,
947- audioPaddingStart,
948- audioPaddingEnd,
949- maxImageWidth,
950- maxImageHeight,
951- surroundingSubtitlesCountRadius,
952- surroundingSubtitlesTimeRadius,
953- autoPausePreference,
954- seekDuration,
955- speedChangeStep,
956- fastForwardModePlaybackRate,
957- keyBindSet,
958- clickToMineDefaultAction,
959- postMiningPlaybackState,
960- recordWithAudioPlayback,
961- preferMp3,
962- miningHistoryStorageLimit,
963- themeType,
964- copyToClipboardOnMine,
965- rememberSubtitleOffset,
966- autoCopyCurrentSubtitle,
967- alwaysPlayOnSubtitleRepeat,
968- tabName,
969- subtitleRegexFilter,
970- subtitleRegexFilterTextReplacement,
971- subtitleHtml,
972- language,
973- customAnkiFields,
974- customAnkiFieldSettings,
975- tags,
976- imageBasedSubtitleScaleFactor,
977- streamingAppUrl,
978- streamingDisplaySubtitles,
979- streamingRecordMedia,
980- streamingTakeScreenshot,
981- streamingCleanScreenshot,
982- streamingCropScreenshot,
983- streamingSubsDragAndDrop,
984- streamingAutoSync,
985- streamingAutoSyncPromptOnFailure,
986- streamingCondensedPlaybackMinimumSkipIntervalMs,
987- streamingScreenshotDelay,
988- streamingSubtitleListPreference,
989- streamingEnableOverlay,
990- webSocketClientEnabled,
991- webSocketServerUrl,
992- pauseOnHoverMode,
993- } = settings ;
994-
9951011 const [ selectedSubtitleAppearanceTrack , setSelectedSubtitleAppearanceTrack ] = useState < number > ( ) ;
9961012 const {
9971013 subtitleSize,
@@ -2320,18 +2336,21 @@ export default function SettingsForm({
23202336 }
23212337
23222338 return (
2323- < KeyBindField
2324- key = { key }
2325- label = { properties . label }
2326- keys = {
2327- extensionInstalled && properties . boundViaChrome
2328- ? ( chromeKeyBinds [ keyBindName ] ?? '' )
2329- : keyBindSet [ keyBindName ] . keys
2330- }
2331- boundViaChrome = { extensionInstalled && properties . boundViaChrome }
2332- onKeysChange = { ( keys ) => handleKeysChange ( keys , keyBindName ) }
2333- onOpenExtensionShortcuts = { onOpenChromeExtensionShortcuts }
2334- />
2339+ < div >
2340+ < KeyBindField
2341+ key = { key }
2342+ label = { properties . label }
2343+ keys = {
2344+ extensionInstalled && properties . boundViaChrome
2345+ ? ( chromeKeyBinds [ keyBindName ] ?? '' )
2346+ : keyBindSet [ keyBindName ] . keys
2347+ }
2348+ boundViaChrome = { extensionInstalled && properties . boundViaChrome }
2349+ onKeysChange = { ( keys ) => handleKeysChange ( keys , keyBindName ) }
2350+ onOpenExtensionShortcuts = { onOpenChromeExtensionShortcuts }
2351+ />
2352+ { properties . additionalControl }
2353+ </ div >
23352354 ) ;
23362355 } ) }
23372356 </ FormGroup >
@@ -2788,19 +2807,6 @@ export default function SettingsForm({
27882807 ) }
27892808 < Grid item >
27902809 < FormGroup className = { classes . formGroup } >
2791- < TextField
2792- type = "number"
2793- label = { t ( 'settings.seekDuration' ) }
2794- fullWidth
2795- value = { seekDuration }
2796- color = "primary"
2797- onChange = { ( event ) => handleSettingChanged ( 'seekDuration' , Number ( event . target . value ) ) }
2798- inputProps = { {
2799- min : 1 ,
2800- max : 60 ,
2801- step : 1 ,
2802- } }
2803- />
28042810 < TextField
28052811 type = "number"
28062812 label = { t ( 'settings.speedChangeStep' ) }
0 commit comments