From 0775a999442215b20125c4d472b6b022d4a5fb87 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Sat, 4 May 2024 19:26:16 +0800 Subject: [PATCH] feat: simplify open app or download --- .../pages/open_appflowy_or_download.html | 49 +++++++------------ 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/admin_frontend/templates/pages/open_appflowy_or_download.html b/admin_frontend/templates/pages/open_appflowy_or_download.html index 7b1ee402..237e0b61 100644 --- a/admin_frontend/templates/pages/open_appflowy_or_download.html +++ b/admin_frontend/templates/pages/open_appflowy_or_download.html @@ -1,5 +1,3 @@ - - @@ -7,42 +5,29 @@ AppFlowy - - - - - + function checkFocus() { + if (document.hasFocus()) { + window.location = fallbackLink; + return; + } + setTimeout(checkFocus, 1000); + } + setTimeout(checkFocus, 500); // initial delay to wait for the app to open(or not) -

Opening AppFlowy

-

If AppFlowy does not open, you can click here to launch the app.

-

If AppFlowy is not installed, you can download AppFlowy manually.

+