@@ -29,7 +29,6 @@ import {
2929 commands ,
3030 events ,
3131 type GeneralSettingsStore ,
32- type InstantModeResolution ,
3332 type MainWindowRecordingStartBehaviour ,
3433 type PostDeletionBehaviour ,
3534 type PostStudioRecordingBehaviour ,
@@ -62,9 +61,7 @@ const getWindowOptionLabel = (window: CaptureWindow) => {
6261 return parts . join ( " • " ) ;
6362} ;
6463
65- type ExtendedGeneralSettingsStore = GeneralSettingsStore & {
66- instantModeResolution ?: InstantModeResolution ;
67- } ;
64+ type ExtendedGeneralSettingsStore = GeneralSettingsStore ;
6865
6966const createDefaultGeneralSettings = ( ) : ExtendedGeneralSettingsStore => ( {
7067 uploadIndividualFiles : false ,
@@ -76,7 +73,7 @@ const createDefaultGeneralSettings = (): ExtendedGeneralSettingsStore => ({
7673 autoZoomOnClicks : false ,
7774 custom_cursor_capture2 : true ,
7875 excludedWindows : [ ] ,
79- instantModeResolution : "fhd1080" ,
76+ instantModeMaxResolution : 1920 ,
8077} ) ;
8178
8279const deriveInitialSettings = (
@@ -92,12 +89,12 @@ const deriveInitialSettings = (
9289} ;
9390
9491const INSTANT_MODE_RESOLUTION_OPTIONS = [
95- { value : "hd720" , label : "720p" , height : 720 } ,
96- { value : "fhd1080" , label : "1080p" , height : 1080 } ,
97- { value : "qhd1440" , label : "1440p" , height : 1440 } ,
98- { value : "uhd2160" , label : "4K" , height : 2160 } ,
92+ { value : 1280 , label : "720p" , height : 720 } ,
93+ { value : 1920 , label : "1080p" , height : 1080 } ,
94+ { value : 2560 , label : "1440p" , height : 1440 } ,
95+ { value : 3840 , label : "4K" , height : 2160 } ,
9996] satisfies {
100- value : InstantModeResolution ;
97+ value : number ;
10198 label : string ;
10299 height : number ;
103100} [ ] ;
@@ -267,9 +264,6 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
267264 return data . filter ( isWindowAvailable ) ;
268265 } ) ;
269266
270- const instantResolutionDescription =
271- "Choose the resolution for Instant Mode recordings." ;
272-
273267 const refreshAvailableWindows = async ( ) : Promise < CaptureWindow [ ] > => {
274268 try {
275269 const refreshed = ( await refetchWindows ( ) ) ?? windows ( ) ?? [ ] ;
@@ -324,7 +318,6 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
324318 | MainWindowRecordingStartBehaviour
325319 | PostStudioRecordingBehaviour
326320 | PostDeletionBehaviour
327- | InstantModeResolution
328321 | number ,
329322 > ( props : {
330323 label : string ;
@@ -439,17 +432,11 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
439432
440433 < SettingGroup title = "Recording" >
441434 < SelectSettingItem
442- label = "Instant mode resolution"
443- description = { instantResolutionDescription }
444- value = {
445- settings . instantModeResolution ??
446- ( "fhd1080" as InstantModeResolution )
447- }
435+ label = "Instant mode max resolution"
436+ description = "Choose the maximum resolution for Instant Mode recordings."
437+ value = { settings . instantModeMaxResolution ?? 1920 }
448438 onChange = { ( value ) =>
449- handleChange (
450- "instantModeResolution" ,
451- value as InstantModeResolution ,
452- )
439+ handleChange ( "instantModeMaxResolution" , value )
453440 }
454441 options = { INSTANT_MODE_RESOLUTION_OPTIONS . map ( ( option ) => ( {
455442 text : option . label ,
@@ -460,9 +447,7 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
460447 label = "Recording countdown"
461448 description = "Countdown before recording starts"
462449 value = { settings . recordingCountdown ?? 0 }
463- onChange = { ( value ) =>
464- handleChange ( "recordingCountdown" , value as number )
465- }
450+ onChange = { ( value ) => handleChange ( "recordingCountdown" , value ) }
466451 options = { [
467452 { text : "Off" , value : 0 } ,
468453 { text : "3 seconds" , value : 3 } ,
@@ -475,10 +460,7 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
475460 description = "The main window recording start behaviour"
476461 value = { settings . mainWindowRecordingStartBehaviour ?? "close" }
477462 onChange = { ( value ) =>
478- handleChange (
479- "mainWindowRecordingStartBehaviour" ,
480- value as MainWindowRecordingStartBehaviour ,
481- )
463+ handleChange ( "mainWindowRecordingStartBehaviour" , value )
482464 }
483465 options = { [
484466 { text : "Close" , value : "close" } ,
@@ -490,10 +472,7 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
490472 description = "The studio recording finish behaviour"
491473 value = { settings . postStudioRecordingBehaviour ?? "openEditor" }
492474 onChange = { ( value ) =>
493- handleChange (
494- "postStudioRecordingBehaviour" ,
495- value as PostStudioRecordingBehaviour ,
496- )
475+ handleChange ( "postStudioRecordingBehaviour" , value )
497476 }
498477 options = { [
499478 { text : "Open editor" , value : "openEditor" } ,
@@ -507,12 +486,7 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
507486 label = "After deleting recording behaviour"
508487 description = "Should Cap reopen after deleting an in progress recording?"
509488 value = { settings . postDeletionBehaviour ?? "doNothing" }
510- onChange = { ( value ) =>
511- handleChange (
512- "postDeletionBehaviour" ,
513- value as PostDeletionBehaviour ,
514- )
515- }
489+ onChange = { ( value ) => handleChange ( "postDeletionBehaviour" , value ) }
516490 options = { [
517491 { text : "Do Nothing" , value : "doNothing" } ,
518492 {
0 commit comments