mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 17:36:34 +00:00
chore: Confirm theme removal before uninstalling
```
This commit is contained in:
@@ -94,6 +94,9 @@ var gZenMarketplaceManager = {
|
|||||||
fragment.querySelector(".zenThemeMarketplaceItemTitle").textContent = theme.name;
|
fragment.querySelector(".zenThemeMarketplaceItemTitle").textContent = theme.name;
|
||||||
fragment.querySelector(".zenThemeMarketplaceItemDescription").textContent = theme.description;
|
fragment.querySelector(".zenThemeMarketplaceItemDescription").textContent = theme.description;
|
||||||
fragment.querySelector(".zenThemeMarketplaceItemUninstallButton").addEventListener("click", async (event) => {
|
fragment.querySelector(".zenThemeMarketplaceItemUninstallButton").addEventListener("click", async (event) => {
|
||||||
|
if (!confirm("Are you sure you want to remove this theme?")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const target = event.target;
|
const target = event.target;
|
||||||
const themeId = target.getAttribute("zen-theme-id");
|
const themeId = target.getAttribute("zen-theme-id");
|
||||||
await this.removeTheme(themeId);
|
await this.removeTheme(themeId);
|
||||||
|
Reference in New Issue
Block a user