From 05f9aed12a97ed43f70f2f2bf6900d34c6b9ae55 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Thu, 7 Apr 2022 19:14:34 +0200 Subject: [PATCH 1/3] Downgrade to v0.5.0 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index df5a7089..69d109dd 100644 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ * @author Jay Trees */ -define('VERSION', '0.6.0'); +define('VERSION', '0.5.0'); define('ROOT', __DIR__); define('DEFAULT_LOCALE', 'en_GB'); From 0ca354cfc3ad0d034cc9777e8ba454c26357bfac Mon Sep 17 00:00:00 2001 From: grandeljay Date: Thu, 7 Apr 2022 20:10:25 +0200 Subject: [PATCH 2/3] Fix wishlist change on wish add --- src/assets/js/default.js | 4 ++-- src/assets/js/wishlists.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/assets/js/default.js b/src/assets/js/default.js index ffe81db8..b3e1b77b 100644 --- a/src/assets/js/default.js +++ b/src/assets/js/default.js @@ -40,8 +40,8 @@ $(function() { placeholder: text.wishlist_no_selection }) - if ($_GET.wishlist) { - element.dropdown('set selected', $_GET.wishlist); + if ($_GET.id) { + element.dropdown('set selected', $_GET.id); } else { if (response.results[0]) { element.dropdown('set selected', response.results[0].value); diff --git a/src/assets/js/wishlists.js b/src/assets/js/wishlists.js index 5ac7e952..bfbfbd02 100644 --- a/src/assets/js/wishlists.js +++ b/src/assets/js/wishlists.js @@ -43,7 +43,7 @@ $(function () { progress.addClass('indeterminate'); if (wishlistValue) { - $_GET.wishlist = wishlistValue; + $_GET.id = wishlistValue; $('.wishlist-share').attr('href', '/?wishlist=' + wishlists[wishlistIndex].hash); @@ -274,7 +274,7 @@ $(function () { wishlists.dropdown('clear'); - urlParams.delete('wishlist'); + urlParams.delete('id'); $('body').toast({ message:text.toast_wishlist_delete }); @@ -426,7 +426,7 @@ $(function () { .then(function(response) { modalWishlistCreate.modal('hide'); - urlParams.set('wishlist', response.data.lastInsertId); + urlParams.set('id', response.data.lastInsertId); $('body').toast({ message: text.toast_wish_create }); From 1a6e6ff31f75c71cf32bc5f49b27b0ca2b3dc87a Mon Sep 17 00:00:00 2001 From: grandeljay Date: Thu, 7 Apr 2022 20:10:34 +0200 Subject: [PATCH 3/3] Improve PWA detection --- src/assets/js/profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/js/profile.js b/src/assets/js/profile.js index dbcedbe4..c31b2e2a 100644 --- a/src/assets/js/profile.js +++ b/src/assets/js/profile.js @@ -31,7 +31,7 @@ $(function() { }); $('.ui.progress').progress(); - var isPWA = window.matchMedia('(display-mode: standalone)').matches; + var isPWA = navigator.standalone || window.matchMedia('(display-mode: standalone)').matches; if (isPWA) { $('.ui.dropdown.channel').dropdown('set selected', 'stable');