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
+6
+6
View File
@@ -24,9 +24,15 @@
} }
async function apply() { async function apply() {
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); await PlayletApi.setPlayletLibVersion(selectedRelease);
alert("Playlet Library version set. Restart playlet to apply changes."); alert("Playlet Library version set. Restart playlet to apply changes.");
} }
}
</script> </script>
<div class="m-5"> <div class="m-5">