From a7eef656940cec1e2e28f576ca457e500c59b983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 13:16:41 +0100 Subject: [PATCH 01/12] fix pagination not correctly updating --- client/homebrew/pages/vaultPage/vaultPage.jsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index 21a8e8363..212e2e468 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -286,9 +286,9 @@ const VaultPage = (props)=>{ }; const renderPaginationControls = ()=>{ - if(!totalBrews) return null; + if(!totalBrews || totalBrews < 10) return null; - const countInt = parseInt(props.query.count || 20); + const countInt = parseInt(brewCollection.length || 20); const totalPages = Math.ceil(totalBrews / countInt); let startPage, endPage; @@ -415,14 +415,14 @@ const VaultPage = (props)=>{ {renderNavItems()} -
- -
{renderForm()}
-
- {renderSortBar()} - {renderFoundBrews()} -
-
+
+ +
{renderForm()}
+
+ {renderSortBar()} + {renderFoundBrews()} +
+
); From 3db778a6657bab20365114c875906babd08bf120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 13:30:06 +0100 Subject: [PATCH 02/12] fix 2 column issue --- client/homebrew/pages/vaultPage/vaultPage.less | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.less b/client/homebrew/pages/vaultPage/vaultPage.less index a69bcb33b..6381823de 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.less +++ b/client/homebrew/pages/vaultPage/vaultPage.less @@ -5,7 +5,7 @@ *:not(input) { user-select : none; } - .content .dataGroup { + :where(.content .dataGroup) { width : 100%; height : 100%; background : white; @@ -172,6 +172,7 @@ padding : 50px 50px 70px 50px; overflow-y : scroll; background-color : #2C3E50; + container-type : inline-size; h3 { font-size : 25px; } @@ -345,7 +346,7 @@ } // media query for when the page is smaller than 1079 px in width -@media screen and (max-width : 1079px) { +@container (max-width : 670px) { .vaultPage { .dataGroup.form .brewLookup { padding : 1px 20px 20px 10px; } From a0de6295c7cdd368109923abf490b5d23ee271a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 13:39:06 +0100 Subject: [PATCH 03/12] fix space in help text --- client/homebrew/pages/vaultPage/vaultPage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index 212e2e468..6c1b1ae4a 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -247,7 +247,7 @@ const VaultPage = (props)=>{
  • Some common words like "a", "after", "through", "itself", "here", etc., - are ignored in searches. The full list can be found   + are ignored in searches. The full list can be found  here From 4918dc52395c47c98cd55a5c8330b49a2040a1b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 13:42:29 +0100 Subject: [PATCH 04/12] manual lint --- client/homebrew/pages/vaultPage/vaultPage.jsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index 6c1b1ae4a..0725578a6 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -99,14 +99,14 @@ const VaultPage = (props)=>{ setSearching(true); setError(null); - const title = titleRef.current.value || ''; - const author = authorRef.current.value || ''; - const count = countRef.current.value || 10; - const v3 = v3Ref.current.checked != false; - const legacy = legacyRef.current.checked != false; + const title = titleRef.current.value || ''; + const author = authorRef.current.value || ''; + const count = countRef.current.value || 10; + const v3 = v3Ref.current.checked != false; + const legacy = legacyRef.current.checked != false; const sortOption = sort || 'title'; - const dirOption = dir || 'asc'; - const pageProp = page || 1; + const dirOption = dir || 'asc'; + const pageProp = page || 1; setSort(sortOption); setdir(dirOption); From e523886345e684a4086966fac11a9d41fe1866b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 13:42:49 +0100 Subject: [PATCH 05/12] lint server api --- server/vault.api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/vault.api.js b/server/vault.api.js index 6a7b9fb91..3a6c6e989 100644 --- a/server/vault.api.js +++ b/server/vault.api.js @@ -1,6 +1,6 @@ import express from 'express'; import asyncHandler from 'express-async-handler'; -import {model as HomebrewModel } from './homebrew.model.js'; +import { model as HomebrewModel } from './homebrew.model.js'; const router = express.Router(); @@ -29,7 +29,7 @@ const rendererConditions = (legacy, v3)=>{ return {}; // If all renderers selected, renderer field not needed in query for speed }; -const sortConditions = (sort, dir) => { +const sortConditions = (sort, dir)=>{ return { [sort]: dir === 'asc' ? 1 : -1 }; }; From 5f48b3044978a06f5d743d1839deb931eb7d67ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 13:46:11 +0100 Subject: [PATCH 06/12] lint styles --- client/homebrew/pages/vaultPage/vaultPage.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.less b/client/homebrew/pages/vaultPage/vaultPage.less index 6381823de..2587f0408 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.less +++ b/client/homebrew/pages/vaultPage/vaultPage.less @@ -270,8 +270,8 @@ .links { z-index : 2; } hr { - margin : 0px; visibility : hidden; + margin : 0px; } .thumbnail { z-index : -1; } @@ -301,8 +301,8 @@ font-family : 'Open Sans'; font-weight : 900; color : white; - text-underline-position : under; text-wrap : nowrap; + text-underline-position : under; cursor : pointer; &.currentPage { From 55618a10b9ad7084d8429b9f2a45bf822aa6b8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 17:16:23 +0100 Subject: [PATCH 07/12] fix container query --- client/homebrew/pages/vaultPage/vaultPage.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.less b/client/homebrew/pages/vaultPage/vaultPage.less index 2587f0408..ac7896e9d 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.less +++ b/client/homebrew/pages/vaultPage/vaultPage.less @@ -237,6 +237,7 @@ margin-right : 40px; color : black; isolation : isolate; + transition: all 0.3s; &::after { position : absolute; @@ -346,7 +347,7 @@ } // media query for when the page is smaller than 1079 px in width -@container (max-width : 670px) { +@container (width < 670px) { .vaultPage { .dataGroup.form .brewLookup { padding : 1px 20px 20px 10px; } From c0eef7530e6f04f51a548c9a3bd2b2d3706575c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 17:27:34 +0100 Subject: [PATCH 08/12] added transition to smooth change --- client/homebrew/pages/vaultPage/vaultPage.less | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.less b/client/homebrew/pages/vaultPage/vaultPage.less index ac7896e9d..dfa99e22c 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.less +++ b/client/homebrew/pages/vaultPage/vaultPage.less @@ -237,7 +237,7 @@ margin-right : 40px; color : black; isolation : isolate; - transition: all 0.3s; + transition : width 0.5s; &::after { position : absolute; @@ -331,7 +331,6 @@ } } } - } @keyframes trailingDots { @@ -346,7 +345,6 @@ 100% { content : ' ...'; } } -// media query for when the page is smaller than 1079 px in width @container (width < 670px) { .vaultPage { From b07317b0f72027e26223a5b54f265810f56cb981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 19:32:26 +0100 Subject: [PATCH 09/12] display pagination on top as well --- client/homebrew/pages/vaultPage/vaultPage.jsx | 1 + client/homebrew/pages/vaultPage/vaultPage.less | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index 0725578a6..2078004cd 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -395,6 +395,7 @@ const VaultPage = (props)=>{ {`Brews found: `} {totalBrews} + {brewCollection.length > 10 && renderPaginationControls()} {brewCollection.map((brew, index)=>{ return ( Date: Sat, 8 Mar 2025 19:35:12 +0100 Subject: [PATCH 10/12] remove visual glitch when performing aa search --- client/homebrew/pages/vaultPage/vaultPage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index 2078004cd..f979aa4f7 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -355,7 +355,7 @@ const VaultPage = (props)=>{ }; const renderFoundBrews = ()=>{ - if(searching) { + if(searching && !brewCollection) { return (

    Searching

    From 4cd5c13841893fb290b948b2cca7ae1e5250323e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 19:38:42 +0100 Subject: [PATCH 11/12] lint styles --- client/homebrew/pages/vaultPage/vaultPage.less | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.less b/client/homebrew/pages/vaultPage/vaultPage.less index 9a522cbfd..8a5f3a714 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.less +++ b/client/homebrew/pages/vaultPage/vaultPage.less @@ -285,27 +285,27 @@ display : grid; grid-template-areas : 'previousPage currentPage nextPage'; grid-template-columns : 50px 1fr 50px; - gap:20px; + gap : 20px; place-items : center; width : auto; + font-size : 15px; translate : -50%; - font-size:15px; &:last-child { top : unset; } .pages { display : flex; grid-area : currentPage; - gap:1em; + gap : 1em; justify-content : space-evenly; width : 100%; height : 100%; text-align : center; .pageNumber { - place-content:center; - min-width:2em; - width:fit-content; + place-content : center; + width : fit-content; + min-width : 2em; font-family : 'Open Sans'; font-weight : 900; color : white; From 2c63c01723d8186402b2dd5b38dd07f56de3a9c4 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 10 Mar 2025 19:37:32 -0400 Subject: [PATCH 12/12] Update Changelog --- changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.md b/changelog.md index e09c7e5d6..2a8ce15f4 100644 --- a/changelog.md +++ b/changelog.md @@ -114,6 +114,9 @@ Fixes issue [#1729](https://github.com/naturalcrit/homebrewery/issues/1729) ##### 5e-Cleric * [x] Style fixes for covers art and logos on A4 size pages * [x] Fix crash when trying to open brews that don't exist +* [x] Tweaks and style update styling on {{openSans **VAULT** :fas_dungeon:}} page. + +Fixes issue [#4079](https://github.com/naturalcrit/homebrewery/issues/4079) ##### Calculuschild * [x] `꞉꞉꞉꞉` now produces `
    ` instead of a `
    `