2021-02-10 14:02:06 +01:00
|
|
|
function unsupported(e) {
|
|
|
|
|
console.error("Failed to import the app", e)
|
|
|
|
|
|
|
|
|
|
const img = document.createElement("img")
|
|
|
|
|
img.src = "images/logo-solo-red.svg"
|
|
|
|
|
img.style.display = "block"
|
|
|
|
|
img.style.margin = "0 auto"
|
|
|
|
|
document.body.appendChild(img)
|
|
|
|
|
|
|
|
|
|
const h1 = document.createElement("h1")
|
|
|
|
|
h1.innerText = "Tutanota"
|
|
|
|
|
h1.style.fontFamily = "sans-serif"
|
|
|
|
|
h1.style.fontSize = "40px"
|
|
|
|
|
h1.style.textAlign = "center"
|
|
|
|
|
document.body.appendChild(h1)
|
|
|
|
|
|
|
|
|
|
const div = document.createElement("div")
|
|
|
|
|
div.style.fontFamily = "sans-serif"
|
|
|
|
|
div.style.textAlign = "center"
|
|
|
|
|
div.style.fontSize = "24px"
|
|
|
|
|
document.body.appendChild(div)
|
|
|
|
|
|
|
|
|
|
const text = document.createElement("p")
|
|
|
|
|
const isAndroidApp = navigator.userAgent.indexOf("Android") !== -1 && navigator.userAgent.indexOf("wv") !== -1
|
|
|
|
|
if (isAndroidApp) {
|
|
|
|
|
text.textContent = "Seems like your system WebView is outdated. Please see FAQ entry for more information"
|
|
|
|
|
} else {
|
|
|
|
|
text.textContent = "Seems like your browser is not supported or outdated. Please see FAQ entry for more information"
|
|
|
|
|
}
|
|
|
|
|
div.appendChild(text)
|
|
|
|
|
|
|
|
|
|
const link = document.createElement("a")
|
|
|
|
|
if (isAndroidApp) {
|
2023-10-19 16:26:43 +02:00
|
|
|
link.href = "https://tuta.com/faq/#webview"
|
2021-02-10 14:02:06 +01:00
|
|
|
} else {
|
2023-10-19 16:26:43 +02:00
|
|
|
link.href = "https://tuta.com/faq/#browser-support"
|
2021-02-10 14:02:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
link.target = "_blank"
|
|
|
|
|
link.textContent = link.href
|
|
|
|
|
div.appendChild(link)
|
|
|
|
|
|
|
|
|
|
const err = document.createElement("pre")
|
|
|
|
|
err.textContent = navigator.userAgent + "\n" + e.toString() + "\n" + e.stack
|
|
|
|
|
div.appendChild(err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
2022-12-27 15:37:40 +01:00
|
|
|
System.import("./app.js").catch(unsupported)
|
2021-02-10 14:02:06 +01:00
|
|
|
} catch (e) {
|
|
|
|
|
unsupported(e)
|
2022-12-27 15:37:40 +01:00
|
|
|
}
|