Add dearrow link to install page and add close button

This commit is contained in:
Ajay
2023-11-07 20:49:25 -05:00
parent cfe314742d
commit 14d50b9e70
8 changed files with 97 additions and 2 deletions

View File

@@ -74,13 +74,22 @@ async function init() {
}
// DeArrow promotion
if (Config.config.showNewFeaturePopups && Config.config.showUpsells) {
if (Config.config.showNewFeaturePopups && Config.config.showUpsells && Config.config.showDeArrowInSettings) {
isDeArrowInstalled().then((installed) => {
if (!installed) {
const deArrowPromotion = document.getElementById("deArrowPromotion");
deArrowPromotion.classList.remove("hidden");
deArrowPromotion.addEventListener("click", () => Config.config.showDeArrowPromotion = false);
const closeButton = deArrowPromotion.querySelector(".close-button");
closeButton.addEventListener("click", (e) => {
e.preventDefault();
deArrowPromotion.classList.add("hidden");
Config.config.showDeArrowPromotion = false;
Config.config.showDeArrowInSettings = false;
});
}
});
}