mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
Slowly fixing up games that don't have data because they are accessories or fun items with no player data etc.
This commit is contained in:
parent
0cabb2f466
commit
34a3526eaa
5 changed files with 69 additions and 66 deletions
|
|
@ -20,11 +20,11 @@
|
|||
"@rgossiaux/svelte-heroicons": "^0.1.2",
|
||||
"@sveltejs/adapter-auto": "^1.0.2",
|
||||
"@sveltejs/adapter-vercel": "^1.0.5",
|
||||
"@sveltejs/kit": "^1.2.2",
|
||||
"@sveltejs/kit": "^1.2.6",
|
||||
"@types/cookie": "^0.5.1",
|
||||
"@types/node": "^18.11.18",
|
||||
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
||||
"@typescript-eslint/parser": "^5.48.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.49.0",
|
||||
"@typescript-eslint/parser": "^5.49.0",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"eslint": "^8.32.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
|
|
|
|||
100
pnpm-lock.yaml
100
pnpm-lock.yaml
|
|
@ -12,12 +12,12 @@ specifiers:
|
|||
'@rgossiaux/svelte-heroicons': ^0.1.2
|
||||
'@sveltejs/adapter-auto': ^1.0.2
|
||||
'@sveltejs/adapter-vercel': ^1.0.5
|
||||
'@sveltejs/kit': ^1.2.2
|
||||
'@sveltejs/kit': ^1.2.6
|
||||
'@types/cookie': ^0.5.1
|
||||
'@types/feather-icons': ^4.29.1
|
||||
'@types/node': ^18.11.18
|
||||
'@typescript-eslint/eslint-plugin': ^5.48.2
|
||||
'@typescript-eslint/parser': ^5.48.2
|
||||
'@typescript-eslint/eslint-plugin': ^5.49.0
|
||||
'@typescript-eslint/parser': ^5.49.0
|
||||
autoprefixer: ^10.4.13
|
||||
cookie: ^0.5.0
|
||||
eslint: ^8.32.0
|
||||
|
|
@ -68,13 +68,13 @@ devDependencies:
|
|||
'@playwright/test': 1.29.2
|
||||
'@rgossiaux/svelte-headlessui': 1.0.2_svelte@3.55.1
|
||||
'@rgossiaux/svelte-heroicons': 0.1.2_svelte@3.55.1
|
||||
'@sveltejs/adapter-auto': 1.0.2_@sveltejs+kit@1.2.2
|
||||
'@sveltejs/adapter-vercel': 1.0.5_@sveltejs+kit@1.2.2
|
||||
'@sveltejs/kit': 1.2.2_svelte@3.55.1+vite@4.0.4
|
||||
'@sveltejs/adapter-auto': 1.0.2_@sveltejs+kit@1.2.6
|
||||
'@sveltejs/adapter-vercel': 1.0.5_@sveltejs+kit@1.2.6
|
||||
'@sveltejs/kit': 1.2.6_svelte@3.55.1+vite@4.0.4
|
||||
'@types/cookie': 0.5.1
|
||||
'@types/node': 18.11.18
|
||||
'@typescript-eslint/eslint-plugin': 5.48.2_caon6io6stgpr7lz2rtbhekxqy
|
||||
'@typescript-eslint/parser': 5.48.2_7uibuqfxkfaozanbtbziikiqje
|
||||
'@typescript-eslint/eslint-plugin': 5.49.0_iu322prlnwsygkcra5kbpy22si
|
||||
'@typescript-eslint/parser': 5.49.0_7uibuqfxkfaozanbtbziikiqje
|
||||
autoprefixer: 10.4.13_postcss@8.4.21
|
||||
eslint: 8.32.0
|
||||
eslint-config-prettier: 8.6.0_eslint@8.32.0
|
||||
|
|
@ -495,21 +495,21 @@ packages:
|
|||
picomatch: 2.3.1
|
||||
dev: true
|
||||
|
||||
/@sveltejs/adapter-auto/1.0.2_@sveltejs+kit@1.2.2:
|
||||
/@sveltejs/adapter-auto/1.0.2_@sveltejs+kit@1.2.6:
|
||||
resolution: {integrity: sha512-UXpEO/gutERZnD+Z5Vi4J/ifD3WSRuCI7xwtLJTcKNQvJ6t5Xsj1X3Mw2F8Vv/XTUuxf7xPLYUgThU331r0Y9w==}
|
||||
peerDependencies:
|
||||
'@sveltejs/kit': ^1.0.0
|
||||
dependencies:
|
||||
'@sveltejs/kit': 1.2.2_svelte@3.55.1+vite@4.0.4
|
||||
'@sveltejs/kit': 1.2.6_svelte@3.55.1+vite@4.0.4
|
||||
import-meta-resolve: 2.2.0
|
||||
dev: true
|
||||
|
||||
/@sveltejs/adapter-vercel/1.0.5_@sveltejs+kit@1.2.2:
|
||||
/@sveltejs/adapter-vercel/1.0.5_@sveltejs+kit@1.2.6:
|
||||
resolution: {integrity: sha512-TnFw+2ZwUuzguIeh013h0eiFmHylBuL1aV3jcUWbJmBLRo6YA0Ti8X8VXgFP4izP7XGuLKdpUIMg7HaZe21LbA==}
|
||||
peerDependencies:
|
||||
'@sveltejs/kit': ^1.0.0
|
||||
dependencies:
|
||||
'@sveltejs/kit': 1.2.2_svelte@3.55.1+vite@4.0.4
|
||||
'@sveltejs/kit': 1.2.6_svelte@3.55.1+vite@4.0.4
|
||||
'@vercel/nft': 0.22.6
|
||||
esbuild: 0.16.8
|
||||
transitivePeerDependencies:
|
||||
|
|
@ -517,8 +517,8 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@sveltejs/kit/1.2.2_svelte@3.55.1+vite@4.0.4:
|
||||
resolution: {integrity: sha512-aZUjAZ/6gWEYFQDrDNINuvOi6VxlG86kCcIDRWDIFJjI38Ueieo1fySb0j0d2VkQVrYXU7VqjTVMBZFix+hByA==}
|
||||
/@sveltejs/kit/1.2.6_svelte@3.55.1+vite@4.0.4:
|
||||
resolution: {integrity: sha512-dESK7mYjIm9yQWA7esAbHg7MoWOpB8Ztgzmc7LAvrGlsg2bs1+NPhSPaMKs7CQFznkunzrlE4Q4irMPiXJQmIw==}
|
||||
engines: {node: ^16.14 || >=18}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
|
|
@ -539,7 +539,7 @@ packages:
|
|||
sirv: 2.0.2
|
||||
svelte: 3.55.1
|
||||
tiny-glob: 0.2.9
|
||||
undici: 5.15.1
|
||||
undici: 5.16.0
|
||||
vite: 4.0.4_ovmyjmuuyckt3r3gpaexj2onji
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
|
@ -604,8 +604,8 @@ packages:
|
|||
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/eslint-plugin/5.48.2_caon6io6stgpr7lz2rtbhekxqy:
|
||||
resolution: {integrity: sha512-sR0Gja9Ky1teIq4qJOl0nC+Tk64/uYdX+mi+5iB//MH8gwyx8e3SOyhEzeLZEFEEfCaLf8KJq+Bd/6je1t+CAg==}
|
||||
/@typescript-eslint/eslint-plugin/5.49.0_iu322prlnwsygkcra5kbpy22si:
|
||||
resolution: {integrity: sha512-IhxabIpcf++TBaBa1h7jtOWyon80SXPRLDq0dVz5SLFC/eW6tofkw/O7Ar3lkx5z5U6wzbKDrl2larprp5kk5Q==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^5.0.0
|
||||
|
|
@ -615,10 +615,10 @@ packages:
|
|||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.48.2_7uibuqfxkfaozanbtbziikiqje
|
||||
'@typescript-eslint/scope-manager': 5.48.2
|
||||
'@typescript-eslint/type-utils': 5.48.2_7uibuqfxkfaozanbtbziikiqje
|
||||
'@typescript-eslint/utils': 5.48.2_7uibuqfxkfaozanbtbziikiqje
|
||||
'@typescript-eslint/parser': 5.49.0_7uibuqfxkfaozanbtbziikiqje
|
||||
'@typescript-eslint/scope-manager': 5.49.0
|
||||
'@typescript-eslint/type-utils': 5.49.0_7uibuqfxkfaozanbtbziikiqje
|
||||
'@typescript-eslint/utils': 5.49.0_7uibuqfxkfaozanbtbziikiqje
|
||||
debug: 4.3.4
|
||||
eslint: 8.32.0
|
||||
ignore: 5.2.1
|
||||
|
|
@ -631,8 +631,8 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/parser/5.48.2_7uibuqfxkfaozanbtbziikiqje:
|
||||
resolution: {integrity: sha512-38zMsKsG2sIuM5Oi/olurGwYJXzmtdsHhn5mI/pQogP+BjYVkK5iRazCQ8RGS0V+YLk282uWElN70zAAUmaYHw==}
|
||||
/@typescript-eslint/parser/5.49.0_7uibuqfxkfaozanbtbziikiqje:
|
||||
resolution: {integrity: sha512-veDlZN9mUhGqU31Qiv2qEp+XrJj5fgZpJ8PW30sHU+j/8/e5ruAhLaVDAeznS7A7i4ucb/s8IozpDtt9NqCkZg==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||
|
|
@ -641,9 +641,9 @@ packages:
|
|||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 5.48.2
|
||||
'@typescript-eslint/types': 5.48.2
|
||||
'@typescript-eslint/typescript-estree': 5.48.2_typescript@4.9.4
|
||||
'@typescript-eslint/scope-manager': 5.49.0
|
||||
'@typescript-eslint/types': 5.49.0
|
||||
'@typescript-eslint/typescript-estree': 5.49.0_typescript@4.9.4
|
||||
debug: 4.3.4
|
||||
eslint: 8.32.0
|
||||
typescript: 4.9.4
|
||||
|
|
@ -651,16 +651,16 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/scope-manager/5.48.2:
|
||||
resolution: {integrity: sha512-zEUFfonQid5KRDKoI3O+uP1GnrFd4tIHlvs+sTJXiWuypUWMuDaottkJuR612wQfOkjYbsaskSIURV9xo4f+Fw==}
|
||||
/@typescript-eslint/scope-manager/5.49.0:
|
||||
resolution: {integrity: sha512-clpROBOiMIzpbWNxCe1xDK14uPZh35u4QaZO1GddilEzoCLAEz4szb51rBpdgurs5k2YzPtJeTEN3qVbG+LRUQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 5.48.2
|
||||
'@typescript-eslint/visitor-keys': 5.48.2
|
||||
'@typescript-eslint/types': 5.49.0
|
||||
'@typescript-eslint/visitor-keys': 5.49.0
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/type-utils/5.48.2_7uibuqfxkfaozanbtbziikiqje:
|
||||
resolution: {integrity: sha512-QVWx7J5sPMRiOMJp5dYshPxABRoZV1xbRirqSk8yuIIsu0nvMTZesKErEA3Oix1k+uvsk8Cs8TGJ6kQ0ndAcew==}
|
||||
/@typescript-eslint/type-utils/5.49.0_7uibuqfxkfaozanbtbziikiqje:
|
||||
resolution: {integrity: sha512-eUgLTYq0tR0FGU5g1YHm4rt5H/+V2IPVkP0cBmbhRyEmyGe4XvJ2YJ6sYTmONfjmdMqyMLad7SB8GvblbeESZA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: '*'
|
||||
|
|
@ -669,8 +669,8 @@ packages:
|
|||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 5.48.2_typescript@4.9.4
|
||||
'@typescript-eslint/utils': 5.48.2_7uibuqfxkfaozanbtbziikiqje
|
||||
'@typescript-eslint/typescript-estree': 5.49.0_typescript@4.9.4
|
||||
'@typescript-eslint/utils': 5.49.0_7uibuqfxkfaozanbtbziikiqje
|
||||
debug: 4.3.4
|
||||
eslint: 8.32.0
|
||||
tsutils: 3.21.0_typescript@4.9.4
|
||||
|
|
@ -679,13 +679,13 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/types/5.48.2:
|
||||
resolution: {integrity: sha512-hE7dA77xxu7ByBc6KCzikgfRyBCTst6dZQpwaTy25iMYOnbNljDT4hjhrGEJJ0QoMjrfqrx+j1l1B9/LtKeuqA==}
|
||||
/@typescript-eslint/types/5.49.0:
|
||||
resolution: {integrity: sha512-7If46kusG+sSnEpu0yOz2xFv5nRz158nzEXnJFCGVEHWnuzolXKwrH5Bsf9zsNlOQkyZuk0BZKKoJQI+1JPBBg==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/typescript-estree/5.48.2_typescript@4.9.4:
|
||||
resolution: {integrity: sha512-bibvD3z6ilnoVxUBFEgkO0k0aFvUc4Cttt0dAreEr+nrAHhWzkO83PEVVuieK3DqcgL6VAK5dkzK8XUVja5Zcg==}
|
||||
/@typescript-eslint/typescript-estree/5.49.0_typescript@4.9.4:
|
||||
resolution: {integrity: sha512-PBdx+V7deZT/3GjNYPVQv1Nc0U46dAHbIuOG8AZ3on3vuEKiPDwFE/lG1snN2eUB9IhF7EyF7K1hmTcLztNIsA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
|
|
@ -693,8 +693,8 @@ packages:
|
|||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 5.48.2
|
||||
'@typescript-eslint/visitor-keys': 5.48.2
|
||||
'@typescript-eslint/types': 5.49.0
|
||||
'@typescript-eslint/visitor-keys': 5.49.0
|
||||
debug: 4.3.4
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
|
|
@ -705,17 +705,17 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/utils/5.48.2_7uibuqfxkfaozanbtbziikiqje:
|
||||
resolution: {integrity: sha512-2h18c0d7jgkw6tdKTlNaM7wyopbLRBiit8oAxoP89YnuBOzCZ8g8aBCaCqq7h208qUTroL7Whgzam7UY3HVLow==}
|
||||
/@typescript-eslint/utils/5.49.0_7uibuqfxkfaozanbtbziikiqje:
|
||||
resolution: {integrity: sha512-cPJue/4Si25FViIb74sHCLtM4nTSBXtLx1d3/QT6mirQ/c65bV8arBEebBJJizfq8W2YyMoPI/WWPFWitmNqnQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||
dependencies:
|
||||
'@types/json-schema': 7.0.11
|
||||
'@types/semver': 7.3.13
|
||||
'@typescript-eslint/scope-manager': 5.48.2
|
||||
'@typescript-eslint/types': 5.48.2
|
||||
'@typescript-eslint/typescript-estree': 5.48.2_typescript@4.9.4
|
||||
'@typescript-eslint/scope-manager': 5.49.0
|
||||
'@typescript-eslint/types': 5.49.0
|
||||
'@typescript-eslint/typescript-estree': 5.49.0_typescript@4.9.4
|
||||
eslint: 8.32.0
|
||||
eslint-scope: 5.1.1
|
||||
eslint-utils: 3.0.0_eslint@8.32.0
|
||||
|
|
@ -725,11 +725,11 @@ packages:
|
|||
- typescript
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/visitor-keys/5.48.2:
|
||||
resolution: {integrity: sha512-z9njZLSkwmjFWUelGEwEbdf4NwKvfHxvGC0OcGN1Hp/XNDIcJ7D5DpPNPv6x6/mFvc1tQHsaWmpD/a4gOvvCJQ==}
|
||||
/@typescript-eslint/visitor-keys/5.49.0:
|
||||
resolution: {integrity: sha512-v9jBMjpNWyn8B6k/Mjt6VbUS4J1GvUlR4x3Y+ibnP1z7y7V4n0WRz+50DY6+Myj0UaXVSuUlHohO+eZ8IJEnkg==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 5.48.2
|
||||
'@typescript-eslint/types': 5.49.0
|
||||
eslint-visitor-keys: 3.3.0
|
||||
dev: true
|
||||
|
||||
|
|
@ -2478,8 +2478,8 @@ packages:
|
|||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/undici/5.15.1:
|
||||
resolution: {integrity: sha512-XLk8g0WAngdvFqTI+VKfBtM4YWXgdxkf1WezC771Es0Dd+Pm1KmNx8t93WTC+Hh9tnghmVxkclU1HN+j+CvIUA==}
|
||||
/undici/5.16.0:
|
||||
resolution: {integrity: sha512-KWBOXNv6VX+oJQhchXieUznEmnJMqgXMbs0xxH2t8q/FUAWSJvOSr/rMaZKnX5RIVq7JDn0JbP4BOnKG2SGXLQ==}
|
||||
engines: {node: '>=12.18'}
|
||||
dependencies:
|
||||
busboy: 1.6.0
|
||||
|
|
|
|||
|
|
@ -87,16 +87,18 @@
|
|||
<!-- loading="lazy" decoding="async" -->
|
||||
</a>
|
||||
|
||||
<div class="game-details">
|
||||
<p>Players: {game.players}</p>
|
||||
<p>Time: {game.playtime} minutes</p>
|
||||
{#if isGameType(game) && game?.min_age}
|
||||
<p>Min Age: {game.min_age}</p>
|
||||
{/if}
|
||||
{#if detailed && isGameType(game) && game?.description}
|
||||
<div class="description">{@html game.description}</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="game-details">
|
||||
{#if game?.players}
|
||||
<p>Players: {game.players}</p>
|
||||
<p>Time: {game.playtime} minutes</p>
|
||||
{#if isGameType(game) && game?.min_age}
|
||||
<p>Min Age: {game.min_age}</p>
|
||||
{/if}
|
||||
{#if detailed && isGameType(game) && game?.description}
|
||||
<div class="description">{@html game.description}</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="game-buttons">
|
||||
<Button size="md" kind={existsInCollection ? 'danger' : 'primary'} icon on:click={onCollectionClick}>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
import type { PageData } from '.svelte-kit/types/src/routes/$types';
|
||||
|
||||
export let data: PageData;
|
||||
console.log('advanced search data', data);
|
||||
|
||||
let submitting = $boredState?.loading;
|
||||
let minAge = +data?.minAge || 1;
|
||||
|
|
|
|||
|
|
@ -113,8 +113,10 @@ export const load: PageServerLoad = async ({ fetch, url }) => {
|
|||
console.log('totalCount', totalCount);
|
||||
const games: GameType[] = [];
|
||||
gameList.forEach((game) => {
|
||||
game.players = `${game.min_players}-${game.max_players}`;
|
||||
game.playtime = `${game.min_playtime}-${game.max_playtime}`;
|
||||
if (game?.min_players && game?.max_players) {
|
||||
game.players = `${game.min_players}-${game.max_players}`;
|
||||
game.playtime = `${game.min_playtime}-${game.max_playtime}`;
|
||||
}
|
||||
games.push(mapAPIGameToBoredGame(game));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue