File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1282,8 +1282,16 @@ class Activity {
12821282 }
12831283 ) ;
12841284
1285- const filename = window . prompt ( "Enter file name" ) ,
1286- downloadLink = document . createElement ( "a" ) ;
1285+ const filename = window . prompt ( _ ( "Enter file name" ) ) ;
1286+ if ( filename === null || filename . trim ( ) === "" ) {
1287+ alert ( _ ( "File save canceled" ) ) ;
1288+ flag = 0 ;
1289+ recording ( ) ;
1290+ doRecordButton ( ) ;
1291+ return ; // Exit without saving the file
1292+ }
1293+
1294+ const downloadLink = document . createElement ( "a" ) ;
12871295 downloadLink . href = URL . createObjectURL ( blob ) ;
12881296 downloadLink . download = `${ filename } .webm` ;
12891297
@@ -1295,7 +1303,7 @@ class Activity {
12951303 // eslint-disable-next-line no-use-before-define
12961304 recording ( ) ;
12971305 doRecordButton ( ) ;
1298- that . textMsg ( "click on stop sharing") ;
1306+ that . textMsg ( _ ( "Click on stop sharing") ) ;
12991307 }
13001308 /**
13011309 * Stops the recording process.
You can’t perform that action at this time.
0 commit comments