Add confirm dialog for changing playlet lib version

This commit is contained in:
Brahim Hadriche committed 2023-06-25 03:56:07 -04:00
1 parent 3223fbd8f2
commit cf102d1bd1
1 file changed
+8 -2
+8 -2
View File
@@ -24,8 +24,14 @@
}
async function apply() {
await PlayletApi.setPlayletLibVersion(selectedRelease);
alert("Playlet Library version set. Restart playlet to apply changes.");
let version = selectedRelease;
if (version === "") {
version = "latest";
}
if (confirm(`Are you sure you want to change the Playlet Library version to "${version}"?`)) {
await PlayletApi.setPlayletLibVersion(selectedRelease);
alert("Playlet Library version set. Restart playlet to apply changes.");
}
}
</script>