From 43d7b5728d8df364760198fe3ece9737a77bae0d Mon Sep 17 00:00:00 2001 From: Samuel Zielke Date: Mon, 3 Mar 2025 22:37:59 +0100 Subject: [PATCH] UpdateFix: v1.3.2-2 --- app/static/app/js/serviceworker.js | 26 +++++++++++++------------- app/templates/app/updateinfo.html | 4 ++-- app/urls.py | 3 ++- app/views.py | 10 ++++++++-- piomint/pwa_settings.py | 3 ++- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/app/static/app/js/serviceworker.js b/app/static/app/js/serviceworker.js index 4eba65c..ec39338 100644 --- a/app/static/app/js/serviceworker.js +++ b/app/static/app/js/serviceworker.js @@ -8,7 +8,7 @@ self.addEventListener("install", event => { '/static/app/css/custom.css', '/static/app/js/dbcontrol.js', '/static/app/js/home.js', - '/static/app/js/timer.js', + '/static/app/js/timer.js', '/static/app/js/welcomeControl.js', '/static/app/js/exportDB.js', '/static/app/js/importDB.js', @@ -56,15 +56,15 @@ self.addEventListener('activate', event => { ); }); -// Serve from Cache -self.addEventListener("fetch", event => { - event.respondWith( - caches.match(event.request) - .then(response => { - return response || fetch(event.request); - }) - .catch(() => { - return caches.match('/app/home'); - }) - ) -}); \ No newline at end of file +// // Serve from Cache +// self.addEventListener("fetch", event => { +// event.respondWith( +// caches.match(event.request) +// .then(response => { +// return response || fetch(event.request); +// }) +// .catch(() => { +// return caches.match('/app/home'); +// }) +// ) +// }); \ No newline at end of file diff --git a/app/templates/app/updateinfo.html b/app/templates/app/updateinfo.html index 0aaf750..f4d9bb4 100644 --- a/app/templates/app/updateinfo.html +++ b/app/templates/app/updateinfo.html @@ -1,7 +1,7 @@

Update Time!


-
v1.3.2_1
+
v1.3.2-2

Fehler Behebung! 🔥
Monatswechsel funktioniert! @@ -19,4 +19,4 @@


- \ No newline at end of file + \ No newline at end of file diff --git a/app/urls.py b/app/urls.py index 1d95036..1bea1c7 100644 --- a/app/urls.py +++ b/app/urls.py @@ -10,5 +10,6 @@ urlpatterns = [ path("home/", views.home), path('offline/', TemplateView.as_view(template_name="offline.html")), path("install/", views.install), - path("v1321/", views.home) + path("v1321/", views.v1322), + path("v1322/", views.v1322), ] diff --git a/app/views.py b/app/views.py index 44e20e9..411cf4f 100644 --- a/app/views.py +++ b/app/views.py @@ -8,7 +8,13 @@ def install(request): return render(request, "app/install.html") def home(request): - return render(request, "app/home.html") + return redirect("/app/v1322") def login(request): - return render(request, "app/login.html") \ No newline at end of file + return render(request, "app/login.html") + +def v1321(request): + return redirect("/app/v1322") + +def v1322(request): + return render(request, "app/home.html") \ No newline at end of file diff --git a/piomint/pwa_settings.py b/piomint/pwa_settings.py index 816a7e7..935f4b2 100644 --- a/piomint/pwa_settings.py +++ b/piomint/pwa_settings.py @@ -9,12 +9,13 @@ PWA_APP_BACKGROUND_COLOR = '#9FEDD7' PWA_APP_DISPLAY = 'standalone' PWA_APP_SCOPE = '/' PWA_APP_ORIENTATION = 'portrait' -PWA_APP_START_URL = '/app/v1321/' +PWA_APP_START_URL = '/app/v1322/' PWA_APP_STATUS_BAR_COLOR = 'black-translucent' PWA_SERVICE_WORKER_PATH = os.path.join(BASE_DIR, 'app/static/app/js', 'serviceworker.js') PWA_APP_ICONS = [ { 'src': '/static/app/images/appleicon_whitebg.png', + 'sizes': '160x160' } ]