From d4462649fd3ea3d9b704eb823663b74b547cb564 Mon Sep 17 00:00:00 2001 From: Michael Jedich Date: Sun, 31 Mar 2024 13:07:04 +0200 Subject: [PATCH] Minor refinements and bugs --- www/app/language/de.json | 3 ++- www/app/language/en.json | 3 ++- www/app/states/home/home.html | 4 +++- www/app/states/home/home.js | 15 +++++++++++++-- www/app/states/tracker/tracker.html | 4 +++- www/app/states/tracker/tracker.js | 7 ++++++- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/www/app/language/de.json b/www/app/language/de.json index 568f407..9697855 100644 --- a/www/app/language/de.json +++ b/www/app/language/de.json @@ -7,5 +7,6 @@ "LESS": "Weniger", "MORE": "Mehr", "NAME": "Name", - "UNEXPECTED_ERROR_OCCURRED": "Unerwartete Fehler aufgetreten" + "UNEXPECTED_ERROR_OCCURRED": "Unerwartete Fehler aufgetreten", + "PLEASE_WAIT": "Bitte warten..." } \ No newline at end of file diff --git a/www/app/language/en.json b/www/app/language/en.json index 9aebed4..f511270 100644 --- a/www/app/language/en.json +++ b/www/app/language/en.json @@ -7,5 +7,6 @@ "LESS": "Less", "MORE": "More", "NAME": "Name", - "UNEXPECTED_ERROR_OCCURRED": "Unexpected errors occurred" + "UNEXPECTED_ERROR_OCCURRED": "Unexpected errors occurred", + "PLEASE_WAIT": "Please wait.." } \ No newline at end of file diff --git a/www/app/states/home/home.html b/www/app/states/home/home.html index 69c4616..1ae4e74 100644 --- a/www/app/states/home/home.html +++ b/www/app/states/home/home.html @@ -4,7 +4,7 @@ Huely - + @@ -16,6 +16,8 @@
+ +
diff --git a/www/app/states/home/home.js b/www/app/states/home/home.js index ba12952..456ee0d 100644 --- a/www/app/states/home/home.js +++ b/www/app/states/home/home.js @@ -30,7 +30,16 @@ const refreshList = async () => { */ const backButtonListener = () => { if (window.Capacitor != null) { - window.Capacitor.addListener('App', 'backButton', closeModal); + window.Capacitor.addListener('App', 'backButton', window.closeModal); + } +}; + +/** + * @returns {void} + */ +const stateChangeListener = () => { + if (window.Capacitor != null) { + window.Capacitor.addListener('App', 'appStateChange', window.closeModal); } }; @@ -40,6 +49,7 @@ const backButtonListener = () => { window.load = async () => { await refreshList(); backButtonListener(); + stateChangeListener(); }; /* ------------------------------------------------------ */ @@ -237,7 +247,8 @@ function addLongPressEventListener(tracker, index) { * @returns {Promise} */ window.openTracker = async (index) => { - dom.hide('c1'); + dom.hide('c3'); + dom.show('loading'); await router.go(states.TRACKER, {tracker: index}); }; diff --git a/www/app/states/tracker/tracker.html b/www/app/states/tracker/tracker.html index 3684019..9b58425 100644 --- a/www/app/states/tracker/tracker.html +++ b/www/app/states/tracker/tracker.html @@ -4,7 +4,7 @@ {{name}} - + @@ -15,6 +15,8 @@
+ +