mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-13 19:37:37 +01:00
Add warnings in btcpay vault page for safari and brave (Fix https://github.com/btcpayserver/BTCPayServer.Vault/issues/54) (#4226)
* Add warnings in btcpay vault page for safari and brave (Fix https://github.com/btcpayserver/BTCPayServer.Vault/issues/54) * Apply suggestions from code review Co-authored-by: d11n <mail@dennisreimann.de>
This commit is contained in:
parent
0fd47eeee0
commit
da1dd7448e
1 changed files with 15 additions and 1 deletions
|
@ -25,7 +25,7 @@
|
||||||
<p class="lead text-secondary mt-3">Using BTCPay Server Vault</p>
|
<p class="lead text-secondary mt-3">Using BTCPay Server Vault</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div id="walletAlert" class="alert alert-danger alert-dismissible my-4" style="display:none;" role="alert">
|
<div id="walletAlert" class="alert alert-warning alert-dismissible my-4" style="display:none;" role="alert">
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
|
||||||
<vc:icon symbol="close" />
|
<vc:icon symbol="close" />
|
||||||
</button>
|
</button>
|
||||||
|
@ -77,5 +77,19 @@
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
askSign();
|
askSign();
|
||||||
});
|
});
|
||||||
|
var alertMsg = document.getElementById("alertMessage");
|
||||||
|
var walletAlert = document.getElementById("walletAlert");
|
||||||
|
var isSafari = window.safari !== undefined;
|
||||||
|
if (isSafari)
|
||||||
|
{
|
||||||
|
alertMsg.innerHTML = "Safari doesn't support BTCPay Server Vault. Please use a different browser. (<a class=\"alert-link\" href=\"https://bugs.webkit.org/show_bug.cgi?id=171934\" target=\"_blank\" rel=\"noreferrer noopener\">More information</a>)";
|
||||||
|
walletAlert.style.display = null;
|
||||||
|
}
|
||||||
|
var isBrave = navigator.brave !== undefined;
|
||||||
|
if (isBrave)
|
||||||
|
{
|
||||||
|
alertMsg.innerHTML = "Brave supports BTCPay Server Vault, but you need to disable Brave Shields. (<a class=\"alert-link\" href=\"https://www.updateland.com/how-to-turn-off-brave-shields/\" target=\"_blank\" rel=\"noreferrer noopener\">More information</a>)";
|
||||||
|
walletAlert.style.display = null;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue