diff --git a/src/routes/AppTop.svelte b/src/routes/AppTop.svelte index 79ec487..fd29c6c 100644 --- a/src/routes/AppTop.svelte +++ b/src/routes/AppTop.svelte @@ -28,6 +28,10 @@ list listing + + list + listing by sellers + shopping_cart cart diff --git a/src/routes/sellers/+page.svelte b/src/routes/sellers/+page.svelte new file mode 100644 index 0000000..0a6c2a8 --- /dev/null +++ b/src/routes/sellers/+page.svelte @@ -0,0 +1,91 @@ +
+ {#if $games.length == 0} +
+
+ + +
gathering games...
+
+
+ {:else} + {#each Object.keys($sellers).sort() as username (username)} +
+

+ + link + +

+ + {#if $sellers[username].neighbourhood} + ({$sellers[username].neighbourhood}) + {/if} + + + {nbr_games_for(username)} + +
+ + game.username === username)} /> + {/each} + {/if} +
+ + + + diff --git a/src/routes/sellers/Game.svelte b/src/routes/sellers/Game.svelte new file mode 100644 index 0000000..39236d4 --- /dev/null +++ b/src/routes/sellers/Game.svelte @@ -0,0 +1,121 @@ +
+
+
+ + +
+
+
+
+ {#if is_in_cart} + star + {/if} + + + {name} + +       + link +
+
+
+ {price ? '$' + price : ''} +
+
+ {notes} +
+
+ {#if updated_at} + {pretty_date(updated_at)} + {/if} +
+
+
+ +
+
+
+
+ + + + diff --git a/src/routes/sellers/GameList.svelte b/src/routes/sellers/GameList.svelte new file mode 100644 index 0000000..26705e1 --- /dev/null +++ b/src/routes/sellers/GameList.svelte @@ -0,0 +1,62 @@ +
+ {#each games as game} + toggle_visibility(game.id)} + on:toggle_cart={() => toggle_cart(game.id)} + {...game} + seller={sellers[game.username]} /> +
+ {/each} +
+ + + +