refactor: remove archived collections page and related components; enhance world travel pages with improved UI and filtering options

This commit is contained in:
Sean Morley
2025-06-13 21:41:10 -04:00
parent 14eb4ca802
commit a99553ba0d
9 changed files with 797 additions and 361 deletions

View File

@@ -37,25 +37,34 @@
<div class="collapse collapse-plus mb-4">
<input type="checkbox" />
<div class="collapse-title text-xl bg-base-300 font-medium">
{$t('adventures.category_filter')}
</div>
<div class="collapse-content bg-base-300">
<button class="btn btn-wide btn-neutral-300" on:click={clearTypes}
>{$t(`adventures.clear`)}</button
>
{#each adventure_types as type}
<li>
<label class="cursor-pointer">
<input
type="checkbox"
value={type.name}
on:change={() => toggleSelect(type.name)}
checked={types.indexOf(type.name) > -1}
/>
<span>{type.display_name + ' ' + type.icon + ` (${type.num_adventures})`}</span>
</label>
</li>
{/each}
<button class="btn btn-sm btn-neutral-300 w-full mb-2" on:click={clearTypes}>
{$t('adventures.clear')}
</button>
<ul>
{#each adventure_types as type}
<li class="mb-1">
<label class="cursor-pointer flex items-center gap-2">
<input
type="checkbox"
class="checkbox"
value={type.name}
on:change={() => toggleSelect(type.name)}
checked={types.indexOf(type.name) > -1}
/>
<span>
{type.display_name}
{type.icon} ({type.num_adventures})
</span>
</label>
</li>
{/each}
</ul>
</div>
</div>

View File

@@ -44,10 +44,11 @@
if (res.ok) {
if (is_archived) {
addToast('info', $t('adventures.archived_collection_message'));
dispatch('archive', collection.id);
} else {
addToast('info', $t('adventures.unarchived_collection_message'));
dispatch('unarchive', collection.id);
}
dispatch('delete', collection.id);
} else {
console.log('Error archiving collection');
}

View File

@@ -60,6 +60,7 @@
on:link={link}
bind:linkedCollectionList
on:unlink={unlink}
user={null}
/>
{/each}
{#if collections.length === 0}