From 7d6bec8918d1d418ed28d8077498d4d0b6d74313 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:08:32 +0100 Subject: [PATCH 01/54] Update .gitattributes --- .gitattributes | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 55235784..516c8ae2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,2 @@ Force LF endings * text eol=lf - -* binary eol=auto From 9473340341f187184ed90aa11bac695893b0b842 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:08:50 +0100 Subject: [PATCH 02/54] Fix duplicate provider name --- src/assets/js/wishlist-view.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/assets/js/wishlist-view.js b/src/assets/js/wishlist-view.js index af6a737d..b00be8f5 100644 --- a/src/assets/js/wishlist-view.js +++ b/src/assets/js/wishlist-view.js @@ -135,7 +135,13 @@ $(function() { /** Provider name */ if (info.providerName) { - $('' + info.providerName + '').insertBefore(elementImage.children().last()); + var elementProviderName = elementImage.children('span.provider'); + + if (!elementProviderName.length) { + $('' + info.providerName + '').insertBefore(elementImage.children().last()); + } else { + elementProviderName.text(info.providerName); + } } /** From fffe2a06fcbad1c5bd9b70aa2e54ffbed2a4510f Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:24:16 +0100 Subject: [PATCH 03/54] Refactor --- src/assets/js/wishlist-view.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/assets/js/wishlist-view.js b/src/assets/js/wishlist-view.js index b00be8f5..89dae7c0 100644 --- a/src/assets/js/wishlist-view.js +++ b/src/assets/js/wishlist-view.js @@ -123,8 +123,6 @@ $(function() { var elementFavicon = elementImage.children('img.favicon'); if (!elementFavicon.length) { - console.log(elementImage.children()); - elementImage.children().first().after( '' ); From b0076f4aa66b4dc22e3aecb7420770bda0cb40d0 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:24:31 +0100 Subject: [PATCH 04/54] Fix refresh using cache --- src/classes/embed-cache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/embed-cache.php b/src/classes/embed-cache.php index 2762608f..dc83c9b2 100644 --- a/src/classes/embed-cache.php +++ b/src/classes/embed-cache.php @@ -24,13 +24,13 @@ class EmbedCache $this->filepath = $this->directory . '/' . $this->identifier; } - public function get(bool $generateCache = true): mixed + public function get(bool $generateCache = false): mixed { $info = null; $maxAge = 2592000; // 30 days $age = file_exists($this->filepath) ? time() - filemtime($this->filepath) : $maxAge; - if ($this->exists() && $age <= $maxAge) { + if ($this->exists() && $age <= $maxAge && false === $generateCache) { $info = json_decode(file_get_contents($this->filepath)); } else { /** From 95c87ba7f9778739a764a066d1b864e61337efe3 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:24:41 +0100 Subject: [PATCH 05/54] Decrease product preview image height --- src/assets/css/default.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/css/default.css b/src/assets/css/default.css index b76426ae..46839ecd 100644 --- a/src/assets/css/default.css +++ b/src/assets/css/default.css @@ -37,7 +37,7 @@ /** Image */ .ui.card > .image > img.preview{ - height: 30vh; + height: 20vh; object-fit: cover; background-color: #fff; } From de7d2975a9bfe8403c7c31ccf19143995ddbd968 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:35:31 +0100 Subject: [PATCH 06/54] Improve wishlist product view --- src/assets/js/wishlist-view.js | 17 ----------------- src/classes/wishlist.php | 32 ++++++++++++++++---------------- 2 files changed, 16 insertions(+), 33 deletions(-) diff --git a/src/assets/js/wishlist-view.js b/src/assets/js/wishlist-view.js index 89dae7c0..f3a89c3d 100644 --- a/src/assets/js/wishlist-view.js +++ b/src/assets/js/wishlist-view.js @@ -179,23 +179,6 @@ $(function() { } } - /** - * Details - */ - if (info.publishedTime) { - if (!elementDetails.length) { - elementButtons.before().append( - '
' - ); - - if (info.publishedTime) { - elementContent.children('.extra.content.details').append( - '' + info.publishedTime + '' - ); - } - } - } - /** * Finish */ diff --git a/src/classes/wishlist.php b/src/classes/wishlist.php index 3ddf1677..7637d2d3 100644 --- a/src/classes/wishlist.php +++ b/src/classes/wishlist.php @@ -129,25 +129,25 @@ class Wishlist - publishedTime || $info->providerName) { ?> -
- publishedTime) { ?> - - publishedTime ?> - - -
- -
- url) { ?> - View + data['user'] === $_SESSION['user']['id']; ?> + + + + + Commit + - data['user'] === $_SESSION['user']['id']) { ?> - Delete - - Commit + url) { ?> + + + View + + + + + Delete
From efd8352d67c3067131d6c9e7fd19d48b917e712e Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:36:28 +0100 Subject: [PATCH 07/54] Improve provider text style --- src/assets/css/default.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assets/css/default.css b/src/assets/css/default.css index 46839ecd..52125dfb 100644 --- a/src/assets/css/default.css +++ b/src/assets/css/default.css @@ -69,6 +69,7 @@ line-height: 1; background-color: rgba(255, 255, 255, 0.6); + user-select: none; opacity: 0; } From 2b6aa4a4c8396e01e5f47c96efe6c54ad456b688 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:38:51 +0100 Subject: [PATCH 08/54] Improve buttons --- src/classes/wishlist.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/classes/wishlist.php b/src/classes/wishlist.php index 7637d2d3..d56b8ddc 100644 --- a/src/classes/wishlist.php +++ b/src/classes/wishlist.php @@ -133,7 +133,7 @@ class Wishlist data['user'] === $_SESSION['user']['id']; ?> - + Commit @@ -147,7 +147,10 @@ class Wishlist - Delete + + + Delete + From 3edd85af08527220ca54cc1b06f820c990d8db1f Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:45:00 +0100 Subject: [PATCH 09/54] Improve wishlist instructions --- src/pages/wishlist.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/wishlist.php b/src/pages/wishlist.php index b20a465e..25e0c368 100644 --- a/src/pages/wishlist.php +++ b/src/pages/wishlist.php @@ -58,8 +58,11 @@ $page->navigation();

What to do?

If you found something you would like to buy, - click the Commit button - and it will become unavailable for others. + click the + + Commit + + button and it will become unavailable for others.

From 4f45bc84f1d21f1c8a05847ce3ffad5eb66b4c59 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 18:46:22 +0100 Subject: [PATCH 10/54] Remove refresh button for wishlist viewers --- src/classes/wishlist.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/classes/wishlist.php b/src/classes/wishlist.php index d56b8ddc..3aa1bdd5 100644 --- a/src/classes/wishlist.php +++ b/src/classes/wishlist.php @@ -77,6 +77,8 @@ class Wishlist /** * Cards */ + $userIsCurrent = isset($_SESSION['user']) && $this->data['user'] === $_SESSION['user']['id']; + if (!empty($products)) { ?>
providerName ?> - + + +
@@ -130,8 +134,6 @@ class Wishlist
- data['user'] === $_SESSION['user']['id']; ?> - From 932e42edc0f50eec82c079b4c0a2837abdf9185c Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 23 Feb 2022 22:07:53 +0100 Subject: [PATCH 11/54] Combine wishlist create and view --- .../js/{wishlist-view.js => wishlists.js} | 0 src/classes/page.php | 6 +- src/pages/wishlist-create.php | 55 ------------------- .../{wishlist-view.php => wishlists.php} | 53 ++++++++++++++++-- 4 files changed, 50 insertions(+), 64 deletions(-) rename src/assets/js/{wishlist-view.js => wishlists.js} (100%) delete mode 100644 src/pages/wishlist-create.php rename src/pages/{wishlist-view.php => wishlists.php} (54%) diff --git a/src/assets/js/wishlist-view.js b/src/assets/js/wishlists.js similarity index 100% rename from src/assets/js/wishlist-view.js rename to src/assets/js/wishlists.js diff --git a/src/classes/page.php b/src/classes/page.php index 120d4e3c..9155c15a 100644 --- a/src/classes/page.php +++ b/src/classes/page.php @@ -208,11 +208,7 @@ class Page Wishlist