chore: Confirm theme removal before uninstalling

```
This commit is contained in:
Mauro Balades
2024-08-17 17:26:06 +02:00
parent 2c4cb2edd5
commit e737c55c74

View File

@@ -94,6 +94,9 @@ var gZenMarketplaceManager = {
fragment.querySelector(".zenThemeMarketplaceItemTitle").textContent = theme.name;
fragment.querySelector(".zenThemeMarketplaceItemDescription").textContent = theme.description;
fragment.querySelector(".zenThemeMarketplaceItemUninstallButton").addEventListener("click", async (event) => {
if (!confirm("Are you sure you want to remove this theme?")) {
return;
}
const target = event.target;
const themeId = target.getAttribute("zen-theme-id");
await this.removeTheme(themeId);