mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 14:59:36 +02:00
Update map filtering
This commit is contained in:
parent
5ff4f66fdb
commit
d0791faad5
5 changed files with 56 additions and 26 deletions
|
@ -19,7 +19,7 @@
|
|||
import DotsHorizontal from '~icons/mdi/dots-horizontal';
|
||||
import DeleteWarning from './DeleteWarning.svelte';
|
||||
import ImageDisplayModal from './ImageDisplayModal.svelte';
|
||||
import { typeToString } from '$lib';
|
||||
import { isAdventureVisited, typeToString } from '$lib';
|
||||
|
||||
export let type: string;
|
||||
export let user: User | null;
|
||||
|
@ -28,7 +28,6 @@
|
|||
let isCollectionModalOpen: boolean = false;
|
||||
let isWarningModalOpen: boolean = false;
|
||||
|
||||
let keyword: string = '';
|
||||
let image_url: string | null = null;
|
||||
export let adventure: Adventure;
|
||||
|
||||
|
@ -201,7 +200,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<div class="badge badge-primary">{typeToString(adventure.type)}</div>
|
||||
<div class="badge badge-success">{adventure.visits.length > 0 ? 'Visited' : 'Planned'}</div>
|
||||
<div class="badge badge-success">{isAdventureVisited(adventure) ? 'Visited' : 'Planned'}</div>
|
||||
<div class="badge badge-secondary">{adventure.is_public ? 'Public' : 'Private'}</div>
|
||||
</div>
|
||||
{#if adventure.location && adventure.location !== ''}
|
||||
|
|
|
@ -27,13 +27,12 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<div class="collapse collapse-plus bg-base-300 mb-4 overflow-visible">
|
||||
<div class="collapse collapse-plus mb-4">
|
||||
<input type="checkbox" />
|
||||
<div class="collapse-title text-xl font-medium">Category Filter</div>
|
||||
<div class="collapse-content">
|
||||
<button class="btn btn-wide mb-1 btn-neutral-300" on:click={clearTypes}>Clear</button>
|
||||
<div class="collapse-title text-xl bg-base-300 font-medium">Category Filter</div>
|
||||
<div class="collapse-content bg-base-300">
|
||||
<button class="btn btn-wide btn-neutral-300" on:click={clearTypes}>Clear</button>
|
||||
{#each ADVENTURE_TYPES as type}
|
||||
<!-- checkbox for each -->
|
||||
<li>
|
||||
<label class="cursor-pointer">
|
||||
<input
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue