handle no js and lockdown mode case

This commit is contained in:
Paul Miller
2023-11-08 14:58:50 -06:00
parent 07ca81a5e6
commit 704a6564e0
2 changed files with 61 additions and 1 deletions

View File

@@ -38,9 +38,69 @@
/>
<link rel="apple-touch-icon" href="/images/icon.png" sizes="512x512" />
<link rel="mask-icon" href="/mutiny_logo_mask.svg" color="#000" />
<style>
#no-wasm {
display: none;
}
#no-wasm,
#no-script {
margin: 1rem;
}
</style>
</head>
<body>
<!---->
<div id="no-wasm">
<p>
<img
src="/mutiny-pixel-logo.png"
width="75px"
alt="Mutiny Wallet"
/>
</p>
<p>
Your browser does not support WebAssembly, or it's disabled.
Please update or enable WebAssembly to run this app.
</p>
<p>
If you're running iOS in lockdown mode you'll need to <a href="https://support.apple.com/en-us/HT212650">add an
exception for Mutiny Wallet.</a>
</p>
</div>
<noscript>
<div id="no-script">
<p>
<img
src="/mutiny-pixel-logo.png"
width="75px"
alt="Mutiny Wallet"
/>
</p>
<p>
Mutiny is a self-custodial wallet that runs in the browser.
JavaScript must be enabled.
</p>
</div>
</noscript>
<script type="module" async src="./src/entry-client.tsx"></script>
<script>
// Check for WebAssembly support
if (
typeof WebAssembly === "object" &&
typeof WebAssembly.instantiate === "function"
) {
var module = new WebAssembly.Module(
new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0])
); // This is an empty wasm module
if (
WebAssembly.Module instanceof Function &&
module instanceof WebAssembly.Module
)
console.log("WebAssembly is supported");
else document.getElementById("no-wasm").style.display = "block";
} else {
document.getElementById("no-wasm").style.display = "block";
}
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B