Skip to content

Commit 675702a

Browse files
authored
record cancel works (#4260)
* record cancel works * Translation function added * Click on stop sharing
1 parent 3d2cab9 commit 675702a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

js/activity.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)