From 06daffbd1cb88134f805d662f5f3541af652c99c Mon Sep 17 00:00:00 2001 From: Eric van der Vlist Date: Thu, 9 Mar 2023 21:51:52 +0100 Subject: [PATCH] Add an update link for android --- src/components/updater/Updater.module.css | 3 ++ src/components/updater/Updater.tsx | 39 +++++++++++++++++++---- 2 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 src/components/updater/Updater.module.css diff --git a/src/components/updater/Updater.module.css b/src/components/updater/Updater.module.css new file mode 100644 index 0000000..748debc --- /dev/null +++ b/src/components/updater/Updater.module.css @@ -0,0 +1,3 @@ +.mobile { + padding-top: 20px; +} diff --git a/src/components/updater/Updater.tsx b/src/components/updater/Updater.tsx index d1033c4..cffc3c4 100644 --- a/src/components/updater/Updater.tsx +++ b/src/components/updater/Updater.tsx @@ -1,5 +1,7 @@ -import { Alert } from '@suid/material'; +import { Alert, Button } from '@suid/material'; import { Component, createSignal, onCleanup, Show } from 'solid-js'; +import { Browser } from '@capacitor/browser'; +import style from './Updater.module.css'; interface Props {} @@ -21,18 +23,41 @@ const Updater: Component = (props) => { setUpdateNeeded(latestRelease !== currentRelease); }; - const intervalId = setInterval(checkUpdate, 30 * 1000); + const intervalId = setInterval(checkUpdate, 60 * 60 * 1000); + + checkUpdate(); onCleanup(() => { clearInterval(intervalId); }); return ( - - - Please reload this page to update the application. - - + <> + + +
+ + The app needs to be updated + + +
+
+ + + Please reload this page to update the application. + + +
+ ); };