Skip to content

Commit

Permalink
record cancel works (#4260)
Browse files Browse the repository at this point in the history
* record cancel works

* Translation function added

* Click on stop sharing
  • Loading branch information
Commanderk3 authored Jan 12, 2025
1 parent 3d2cab9 commit 675702a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,16 @@ class Activity {
}
);

const filename = window.prompt("Enter file name"),
downloadLink = document.createElement("a");
const filename = window.prompt(_("Enter file name"));
if (filename === null || filename.trim() === "") {
alert(_("File save canceled"));
flag = 0;
recording();
doRecordButton();
return; // Exit without saving the file
}

const downloadLink = document.createElement("a");
downloadLink.href = URL.createObjectURL(blob);
downloadLink.download = `${filename}.webm`;

Expand All @@ -1295,7 +1303,7 @@ class Activity {
// eslint-disable-next-line no-use-before-define
recording();
doRecordButton();
that.textMsg("click on stop sharing");
that.textMsg(_("Click on stop sharing"));
}
/**
* Stops the recording process.
Expand Down

0 comments on commit 675702a

Please sign in to comment.