Compare commits
4 Commits
46f186e227
...
fe5c408d6b
Author | SHA1 | Date | |
---|---|---|---|
fe5c408d6b | |||
ebebe25c12 | |||
723c37d06b | |||
2200fc6884 |
8
db/migrations/20240206141649_ck13.sql
Normal file
8
db/migrations/20240206141649_ck13.sql
Normal file
@ -0,0 +1,8 @@
|
||||
-- migrate:up
|
||||
|
||||
insert into bgg_user (username,neighbourhood) VALUES ('ck13','Hintonburg');
|
||||
|
||||
-- migrate:down
|
||||
|
||||
delete from bgg_user where username = 'ck13';
|
||||
|
@ -18,4 +18,5 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20240130205124'),
|
||||
('20240201201248'),
|
||||
('20240204153045'),
|
||||
('20240205142447');
|
||||
('20240205142447'),
|
||||
('20240206141649');
|
||||
|
@ -3,10 +3,21 @@
|
||||
<input type="checkbox" bind:checked={show_hidden} />
|
||||
<span> show hidden </span>
|
||||
</label>
|
||||
<div class="field label prefix border">
|
||||
<i>search</i>
|
||||
<input type="text" bind:value={search_text} />
|
||||
<label>Search</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="games">
|
||||
{#each games as game}
|
||||
{#each games.filter((game) => {
|
||||
if (search_text.length < 3) return true;
|
||||
const target = search_text.toLowerCase();
|
||||
return game.name.toLowerCase().includes(target) || game.username
|
||||
.toLowerCase()
|
||||
.includes(target);
|
||||
}) as game}
|
||||
{#if show_hidden || !$games_hidden[[game.username, game.bgg_id].join('!')]}
|
||||
<div
|
||||
transition:slide={{ delay: 250, duration: 300 }}
|
||||
@ -94,6 +105,8 @@
|
||||
|
||||
let show_hidden = false;
|
||||
|
||||
let search_text = '';
|
||||
|
||||
// add filter
|
||||
// add sort (user, game, price)
|
||||
|
||||
@ -144,4 +157,7 @@
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.options > div {
|
||||
margin-right: 1em;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user