mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 14:04:12 +01:00
Show Warning is browser safari/brave is incompatible with vault on all pages
This commit is contained in:
parent
379286c366
commit
eda437995f
6 changed files with 29 additions and 40 deletions
|
@ -138,6 +138,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Watch Include="Views\**\*.*"></Watch>
|
||||
<Watch Remove="Views\Shared\LocalhostBrowserSupport.cshtml" />
|
||||
<Watch Remove="Views\UIAccount\CheatPermissions.cshtml" />
|
||||
<Watch Remove="Views\UIReports\StoreReports.cshtml" />
|
||||
<Content Update="Views\UIApps\_ViewImports.cshtml">
|
||||
|
|
22
BTCPayServer/Views/Shared/LocalhostBrowserSupport.cshtml
Normal file
22
BTCPayServer/Views/Shared/LocalhostBrowserSupport.cshtml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<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">
|
||||
<vc:icon symbol="close" />
|
||||
</button>
|
||||
<span id="alertMessage"></span>
|
||||
</div>
|
||||
<script>
|
||||
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>
|
|
@ -15,12 +15,7 @@
|
|||
<p class="lead text-secondary mt-3">Using BTCPay Server Vault (NFC)</p>
|
||||
</header>
|
||||
|
||||
<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">
|
||||
<vc:icon symbol="close" />
|
||||
</button>
|
||||
<span id="alertMessage"></span>
|
||||
</div>
|
||||
<partial name="LocalhostBrowserSupport" />
|
||||
|
||||
<div id="body" class="my-4">
|
||||
<form id="broadcastForm" method="post" style="display:none;">
|
||||
|
@ -65,19 +60,5 @@
|
|||
document.addEventListener("DOMContentLoaded", function () {
|
||||
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>
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
}
|
||||
|
||||
<partial name="LocalhostBrowserSupport" />
|
||||
|
||||
<template id="modal-template">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form class="modal-content" method="post" enctype="multipart/form-data">
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
}
|
||||
|
||||
<partial name="LocalhostBrowserSupport" />
|
||||
|
||||
<div class="row mt-5 mb-4">
|
||||
<div class="col-md-8 mx-auto">
|
||||
<div id="vault-status" class="mb-4"></div>
|
||||
|
|
|
@ -25,12 +25,7 @@
|
|||
<p class="lead text-secondary mt-3">Using BTCPay Server Vault</p>
|
||||
</header>
|
||||
|
||||
<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">
|
||||
<vc:icon symbol="close" />
|
||||
</button>
|
||||
<span id="alertMessage"></span>
|
||||
</div>
|
||||
<partial name="LocalhostBrowserSupport" />
|
||||
|
||||
<div id="body" class="my-4">
|
||||
<form id="broadcastForm" asp-action="WalletSendVault" asp-route-walletId="@walletId" method="post" style="display:none;">
|
||||
|
@ -77,19 +72,5 @@
|
|||
document.addEventListener("DOMContentLoaded", function () {
|
||||
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>
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue