1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 04:49:37 +02:00

feat: Enhance CollectionLink component with search functionality and statistics display

- Implemented search functionality to filter collections based on user input.
- Added statistics display for linked collections and total collections.
- Updated modal layout for better user experience, including a search bar and clear filters option.
- Improved accessibility and visual design of the modal and its components.

refactor: Update localization files for multiple languages

- Removed outdated delete collection warning messages.
- Added new keys for adventures available, collections linked, and other relevant phrases in various languages.
- Ensured consistency across localization files for better user experience.

fix: Adjust styles in worldtravel and collections pages

- Updated styles for quick stats section in worldtravel page for improved visibility.
- Ensured proper handling of sorting parameters in collections page navigation.
This commit is contained in:
Sean Morley 2025-06-15 18:28:48 -04:00
parent ced1f94473
commit cee9345bf1
16 changed files with 560 additions and 73 deletions

View file

@ -7,18 +7,70 @@
import AdventureCard from './AdventureCard.svelte';
let modal: HTMLDialogElement;
let adventures: Adventure[] = [];
// Icons - following the worldtravel pattern
import Adventures from '~icons/mdi/map-marker-path';
import Search from '~icons/mdi/magnify';
import Clear from '~icons/mdi/close';
import Link from '~icons/mdi/link-variant';
import Filter from '~icons/mdi/filter-variant';
import Calendar from '~icons/mdi/calendar';
import Check from '~icons/mdi/check-circle';
import Cancel from '~icons/mdi/cancel';
import Public from '~icons/mdi/earth';
import Private from '~icons/mdi/lock';
let adventures: Adventure[] = [];
let filteredAdventures: Adventure[] = [];
let searchQuery: string = '';
let filterOption: string = 'all';
let isLoading: boolean = true;
export let user: User | null;
export let collectionId: string;
// Search and filter functionality following worldtravel pattern
$: {
let filtered = adventures;
// Apply search filter - include name and location
if (searchQuery !== '') {
filtered = filtered.filter((adventure) => {
const nameMatch = adventure.name.toLowerCase().includes(searchQuery.toLowerCase());
const locationMatch =
adventure.location?.toLowerCase().includes(searchQuery.toLowerCase()) || false;
const descriptionMatch =
adventure.description?.toLowerCase().includes(searchQuery.toLowerCase()) || false;
return nameMatch || locationMatch || descriptionMatch;
});
}
// Apply status filter
if (filterOption === 'public') {
filtered = filtered.filter((adventure) => adventure.is_public);
} else if (filterOption === 'private') {
filtered = filtered.filter((adventure) => !adventure.is_public);
} else if (filterOption === 'visited') {
filtered = filtered.filter((adventure) => adventure.visits && adventure.visits.length > 0);
} else if (filterOption === 'not_visited') {
filtered = filtered.filter((adventure) => !adventure.visits || adventure.visits.length === 0);
}
filteredAdventures = filtered;
}
// Statistics following worldtravel pattern
$: totalAdventures = adventures.length;
$: publicAdventures = adventures.filter((a) => a.is_public).length;
$: privateAdventures = adventures.filter((a) => !a.is_public).length;
$: visitedAdventures = adventures.filter((a) => a.visits && a.visits.length > 0).length;
$: notVisitedAdventures = adventures.filter((a) => !a.visits || a.visits.length === 0).length;
onMount(async () => {
modal = document.getElementById('my_modal_1') as HTMLDialogElement;
if (modal) {
modal.showModal();
}
let res = await fetch(`/api/adventures/all/?include_collections=true`, {
method: 'GET'
});
@ -26,17 +78,14 @@
const newAdventures = await res.json();
// Filter out adventures that are already linked to the collections
// basically for each adventure, check if collections array contains the id of the current collection
if (collectionId) {
adventures = newAdventures.filter((adventure: Adventure) => {
// adventure.collections is an array of ids, collectionId is a single id
return !(adventure.collections ?? []).includes(collectionId);
});
} else {
adventures = newAdventures;
}
// No need to reassign adventures to newAdventures here, keep the filtered result
isLoading = false;
});
@ -54,28 +103,200 @@
dispatch('close');
}
}
function clearFilters() {
searchQuery = '';
filterOption = 'all';
}
</script>
<dialog id="my_modal_1" class="modal">
<dialog id="my_modal_1" class="modal backdrop-blur-sm">
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<div class="modal-box w-11/12 max-w-5xl" role="dialog" on:keydown={handleKeydown} tabindex="0">
<h1 class="text-center font-bold text-4xl mb-6">{$t('adventures.my_adventures')}</h1>
<div
class="modal-box w-11/12 max-w-6xl bg-gradient-to-br from-base-100 via-base-100 to-base-200 border border-base-300 shadow-2xl"
role="dialog"
on:keydown={handleKeydown}
tabindex="0"
>
<!-- Header Section - Following worldtravel pattern -->
<div
class="top-0 z-10 bg-base-100/90 backdrop-blur-lg border-b border-base-300 -mx-6 -mt-6 px-6 py-4 mb-6"
>
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="p-2 bg-primary/10 rounded-xl">
<Adventures class="w-8 h-8 text-primary" />
</div>
<div>
<h1 class="text-3xl font-bold text-primary bg-clip-text">
{$t('adventures.my_adventures')}
</h1>
<p class="text-sm text-base-content/60">
{filteredAdventures.length}
{$t('worldtravel.of')}
{totalAdventures}
{$t('navbar.adventures')}
</p>
</div>
</div>
<!-- Quick Stats -->
<div class="hidden md:flex items-center gap-2">
<div class="stats stats-horizontal bg-base-200/50 border border-base-300/50">
<div class="stat py-2 px-4">
<div class="stat-title text-xs">{$t('collection.available')}</div>
<div class="stat-value text-lg text-info">{totalAdventures}</div>
</div>
<div class="stat py-2 px-4">
<div class="stat-title text-xs">{$t('adventures.visited')}</div>
<div class="stat-value text-lg text-success">{visitedAdventures}</div>
</div>
</div>
</div>
<!-- Close Button -->
<button class="btn btn-ghost btn-square" on:click={close}>
<Clear class="w-5 h-5" />
</button>
</div>
<!-- Search Bar -->
<div class="mt-4 flex items-center gap-4">
<div class="relative flex-1 max-w-md">
<Search class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-base-content/40" />
<input
type="text"
placeholder="{$t('navbar.search')} {$t('adventures.name_location')}..."
class="input input-bordered w-full pl-10 pr-10 bg-base-100/80"
bind:value={searchQuery}
/>
{#if searchQuery.length > 0}
<button
class="absolute right-3 top-1/2 -translate-y-1/2 text-base-content/40 hover:text-base-content"
on:click={() => (searchQuery = '')}
>
<Clear class="w-4 h-4" />
</button>
{/if}
</div>
{#if searchQuery || filterOption !== 'all'}
<button class="btn btn-ghost btn-xs gap-1" on:click={clearFilters}>
<Clear class="w-3 h-3" />
{$t('worldtravel.clear_all')}
</button>
{/if}
</div>
<!-- Filter Chips -->
<div class="mt-4 flex flex-wrap items-center gap-2">
<span class="text-sm font-medium text-base-content/60">
{$t('worldtravel.filter_by')}:
</span>
<div class="tabs tabs-boxed bg-base-200">
<button
class="tab tab-sm gap-2 {filterOption === 'all' ? 'tab-active' : ''}"
on:click={() => (filterOption = 'all')}
>
<Adventures class="w-3 h-3" />
{$t('adventures.all')}
</button>
<button
class="tab tab-sm gap-2 {filterOption === 'visited' ? 'tab-active' : ''}"
on:click={() => (filterOption = 'visited')}
>
<Check class="w-3 h-3" />
{$t('adventures.visited')}
</button>
<button
class="tab tab-sm gap-2 {filterOption === 'not_visited' ? 'tab-active' : ''}"
on:click={() => (filterOption = 'not_visited')}
>
<Cancel class="w-3 h-3" />
{$t('adventures.not_visited')}
</button>
<button
class="tab tab-sm gap-2 {filterOption === 'public' ? 'tab-active' : ''}"
on:click={() => (filterOption = 'public')}
>
<Public class="w-3 h-3" />
{$t('adventures.public')}
</button>
<button
class="tab tab-sm gap-2 {filterOption === 'private' ? 'tab-active' : ''}"
on:click={() => (filterOption = 'private')}
>
<Private class="w-3 h-3" />
{$t('adventures.private')}
</button>
</div>
</div>
</div>
<!-- Loading State -->
{#if isLoading}
<div class="flex justify-center items-center w-full mt-16">
<span class="loading loading-spinner w-24 h-24"></span>
<div class="flex flex-col items-center justify-center py-16">
<div class="p-6 bg-base-200/50 rounded-2xl mb-6">
<span class="loading loading-spinner w-16 h-16 text-primary"></span>
</div>
<h3 class="text-xl font-semibold text-base-content/70 mb-2">
{$t('adventures.loading_adventures')}
</h3>
</div>
{:else}
<!-- Main Content -->
<div class="px-2">
{#if filteredAdventures.length === 0}
<div class="flex flex-col items-center justify-center py-16">
<div class="p-6 bg-base-200/50 rounded-2xl mb-6">
<Adventures class="w-16 h-16 text-base-content/30" />
</div>
{#if searchQuery || filterOption !== 'all'}
<h3 class="text-xl font-semibold text-base-content/70 mb-2">
{$t('adventures.no_adventures_found')}
</h3>
<p class="text-base-content/50 text-center max-w-md mb-6">
{$t('collection.try_different_search')}
</p>
<button class="btn btn-primary gap-2" on:click={clearFilters}>
<Clear class="w-4 h-4" />
{$t('worldtravel.clear_filters')}
</button>
{:else}
<h3 class="text-xl font-semibold text-base-content/70 mb-2">
{$t('adventures.no_linkable_adventures')}
</h3>
<p class="text-base-content/50 text-center max-w-md">
{$t('adventures.all_adventures_already_linked')}
</p>
{/if}
</div>
{:else}
<!-- Adventures Grid -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mb-6 p-4">
{#each filteredAdventures as adventure}
<AdventureCard {user} type="link" {adventure} on:link={add} />
{/each}
</div>
{/if}
</div>
{/if}
<div class="flex flex-wrap gap-4 mr-4 justify-center content-center">
{#each adventures as adventure}
<AdventureCard {user} type="link" {adventure} on:link={add} />
{/each}
{#if adventures.length === 0 && !isLoading}
<p class="text-center text-lg">
{$t('adventures.no_linkable_adventures')}
</p>
{/if}
<!-- Footer Actions -->
<div
class="sticky bottom-0 bg-base-100/90 backdrop-blur-lg border-t border-base-300 -mx-6 -mb-6 px-6 py-4 mt-6 rounded-lg"
>
<div class="flex items-center justify-between">
<div class="text-sm text-base-content/60">
{filteredAdventures.length}
{$t('adventures.adventures_available')}
</div>
<button class="btn btn-primary gap-2" on:click={close}>
<Link class="w-4 h-4" />
{$t('adventures.done')}
</button>
</div>
</div>
<button class="btn btn-primary" on:click={close}>{$t('about.close')}</button>
</div>
</dialog>

View file

@ -7,10 +7,29 @@
let modal: HTMLDialogElement;
import { t } from 'svelte-i18n';
// Icons - following the worldtravel pattern
import Collections from '~icons/mdi/folder-multiple';
import Search from '~icons/mdi/magnify';
import Clear from '~icons/mdi/close';
import Link from '~icons/mdi/link-variant';
let collections: Collection[] = [];
let filteredCollections: Collection[] = [];
let searchQuery: string = '';
export let linkedCollectionList: string[] | null = null;
// Search functionality following worldtravel pattern
$: {
if (searchQuery === '') {
filteredCollections = collections;
} else {
filteredCollections = collections.filter((collection) =>
collection.name.toLowerCase().includes(searchQuery.toLowerCase())
);
}
}
onMount(async () => {
modal = document.getElementById('my_modal_1') as HTMLDialogElement;
if (modal) {
@ -37,6 +56,8 @@
return aLinked === bLinked ? 0 : aLinked ? -1 : 1;
});
}
filteredCollections = collections;
});
function close() {
@ -56,28 +77,150 @@
dispatch('close');
}
}
// Statistics following worldtravel pattern
$: linkedCount = linkedCollectionList ? linkedCollectionList.length : 0;
$: totalCollections = collections.length;
</script>
<dialog id="my_modal_1" class="modal">
<dialog id="my_modal_1" class="modal backdrop-blur-sm">
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<div class="modal-box w-11/12 max-w-5xl" role="dialog" on:keydown={handleKeydown} tabindex="0">
<h1 class="text-center font-bold text-4xl mb-6">{$t('adventures.my_collections')}</h1>
<div class="flex flex-wrap gap-4 mr-4 justify-center content-center mb-4">
{#each collections as collection}
<CollectionCard
{collection}
type="link"
on:link={link}
bind:linkedCollectionList
on:unlink={unlink}
user={null}
/>
{/each}
{#if collections.length === 0}
<p class="text-center text-lg">{$t('adventures.no_collections_found')}</p>
<div
class="modal-box w-11/12 max-w-6xl bg-gradient-to-br from-base-100 via-base-100 to-base-200 border border-base-300 shadow-2xl"
role="dialog"
on:keydown={handleKeydown}
tabindex="0"
>
<!-- Header Section - Following worldtravel pattern -->
<div
class="sticky top-0 z-10 bg-base-100/90 backdrop-blur-lg border-b border-base-300 -mx-6 -mt-6 px-6 py-4 mb-6"
>
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="p-2 bg-primary/10 rounded-xl">
<Collections class="w-8 h-8 text-primary" />
</div>
<div>
<h1 class="text-3xl font-bold text-primary bg-clip-text">
{$t('adventures.my_collections')}
</h1>
<p class="text-sm text-base-content/60">
{filteredCollections.length}
{$t('worldtravel.of')}
{totalCollections}
{$t('navbar.collections')}
</p>
</div>
</div>
<!-- Quick Stats -->
<div class="hidden md:flex items-center gap-2">
<div class="stats stats-horizontal bg-base-200/50 border border-base-300/50">
<div class="stat py-2 px-4">
<div class="stat-title text-xs">{$t('collection.linked')}</div>
<div class="stat-value text-lg text-success">{linkedCount}</div>
</div>
<div class="stat py-2 px-4">
<div class="stat-title text-xs">{$t('collection.available')}</div>
<div class="stat-value text-lg text-info">{totalCollections}</div>
</div>
</div>
</div>
<!-- Close Button -->
<button class="btn btn-ghost btn-square" on:click={close}>
<Clear class="w-5 h-5" />
</button>
</div>
<!-- Search Bar -->
<div class="mt-4 flex items-center gap-4">
<div class="relative flex-1 max-w-md">
<Search class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-base-content/40" />
<input
type="text"
placeholder={$t('navbar.search')}
class="input input-bordered w-full pl-10 pr-10 bg-base-100/80"
bind:value={searchQuery}
/>
{#if searchQuery.length > 0}
<button
class="absolute right-3 top-1/2 -translate-y-1/2 text-base-content/40 hover:text-base-content"
on:click={() => (searchQuery = '')}
>
<Clear class="w-4 h-4" />
</button>
{/if}
</div>
{#if searchQuery}
<button class="btn btn-ghost btn-xs gap-1" on:click={() => (searchQuery = '')}>
<Clear class="w-3 h-3" />
{$t('worldtravel.clear_all')}
</button>
{/if}
</div>
</div>
<!-- Main Content -->
<div class="px-2">
{#if filteredCollections.length === 0}
<div class="flex flex-col items-center justify-center py-16">
<div class="p-6 bg-base-200/50 rounded-2xl mb-6">
<Collections class="w-16 h-16 text-base-content/30" />
</div>
{#if searchQuery}
<h3 class="text-xl font-semibold text-base-content/70 mb-2">
{$t('adventures.no_collections_found')}
</h3>
<p class="text-base-content/50 text-center max-w-md mb-6">
{$t('collection.try_different_search')}
</p>
<button class="btn btn-primary gap-2" on:click={() => (searchQuery = '')}>
<Clear class="w-4 h-4" />
{$t('worldtravel.clear_filters')}
</button>
{:else}
<h3 class="text-xl font-semibold text-base-content/70 mb-2">
{$t('adventures.no_collections_found')}
</h3>
<p class="text-base-content/50 text-center max-w-md">
{$t('adventures.create_collection_first')}
</p>
{/if}
</div>
{:else}
<!-- Collections Grid -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mb-6 p-4">
{#each filteredCollections as collection}
<CollectionCard
{collection}
type="link"
on:link={link}
bind:linkedCollectionList
on:unlink={unlink}
user={null}
/>
{/each}
</div>
{/if}
</div>
<button class="btn btn-primary" on:click={close}>{$t('about.close')}</button>
<!-- Footer Actions -->
<div
class="sticky bottom-0 bg-base-100/90 backdrop-blur-lg border-t border-base-300 -mx-6 -mb-6 px-6 py-4 mt-6"
>
<div class="flex items-center justify-between">
<div class="text-sm text-base-content/60">
{linkedCount}
{$t('adventures.collections_linked')}
</div>
<button class="btn btn-primary gap-2" on:click={close}>
<Link class="w-4 h-4" />
{$t('adventures.done')}
</button>
</div>
</div>
</div>
</dialog>

View file

@ -42,7 +42,6 @@
"delete_adventure": "Abenteuer löschen",
"delete_collection": "Sammlung löschen",
"delete_collection_success": "Sammlung erfolgreich gelöscht!",
"delete_collection_warning": "Sind Sie sicher, dass Sie diese Sammlung löschen möchten? \nDadurch werden auch alle verknüpften Abenteuer gelöscht. \nDiese Aktion kann nicht rückgängig gemacht werden.",
"descending": "Absteigend",
"duration": "Dauer",
"edit_collection": "Sammlung bearbeiten",
@ -236,7 +235,15 @@
"filters_and_sort": "Filter",
"filters_and_stats": "Filter",
"no_adventures_message": "Dokumentieren Sie Ihre Abenteuer und planen Sie neue. \nJede Reise hat eine Geschichte, die es wert ist, erzählt zu werden.",
"travel_progress": "Reisefortschritt"
"travel_progress": "Reisefortschritt",
"adventures_available": "Abenteuer verfügbar",
"all_adventures_already_linked": "Alle Abenteuer sind bereits mit dieser Sammlung verknüpft.",
"collections_linked": "Kollektionen verknüpft",
"create_collection_first": "Erstellen Sie zuerst eine Sammlung, um Ihre Abenteuer und Erinnerungen zu organisieren.",
"delete_collection_warning": "Sind Sie sicher, dass Sie diese Sammlung löschen möchten? \nDiese Aktion kann nicht rückgängig gemacht werden.",
"done": "Erledigt",
"loading_adventures": "Ladeabenteuer ...",
"name_location": "Name, Ort"
},
"home": {
"desc_1": "Entdecken, planen und erkunden Sie mühelos",
@ -507,7 +514,10 @@
"no_archived_collections": "Keine archivierten Sammlungen.",
"no_collections_yet": "Noch keine Sammlungen",
"no_shared_collections": "Keine gemeinsamen Sammlungen.",
"shared_collections": "Gemeinsame Sammlungen"
"shared_collections": "Gemeinsame Sammlungen",
"available": "Verfügbar",
"linked": "Verknüpft",
"try_different_search": "Versuchen Sie eine andere Suche oder Filter."
},
"notes": {
"add_a_link": "Fügen Sie einen Link hinzu",

View file

@ -170,16 +170,23 @@
"private": "Private",
"public": "Public",
"archived": "Archived",
"name_location": "name, location",
"loading_adventures": "Loading adventures...",
"all_adventures_already_linked": "All adventures are already linked to this collection.",
"edit_collection": "Edit Collection",
"unarchive": "Unarchive",
"archive": "Archive",
"no_collections_found": "No collections found to add this adventure to.",
"create_collection_first": "Create a collection first to organize your adventures and memories.",
"done": "Done",
"adventures_available": "Adventures Available",
"collections_linked": "Collections Linked",
"not_visited": "Not Visited",
"archived_collection_message": "Collection archived successfully!",
"unarchived_collection_message": "Collection unarchived successfully!",
"delete_collection_success": "Collection deleted successfully!",
"delete_collection_warning": "Are you sure you want to delete this collection? This will also delete all of the linked adventures. This action cannot be undone.",
"cancel": "Cancel",
"delete_collection_warning": "Are you sure you want to delete this collection? This action cannot be undone.",
"delete_collection": "Delete Collection",
"delete_adventure": "Delete Adventure",
"adventure_delete_success": "Adventure deleted successfully!",
@ -495,7 +502,10 @@
"no_archived_collections": "No archived collections.",
"create_first": "Create your first collection to organize your adventures and memories.",
"make_sure_public": "Make sure your profile is public so others can share with you.",
"archived_appear_here": "Archived collections will appear here."
"archived_appear_here": "Archived collections will appear here.",
"linked": "Linked",
"available": "Available",
"try_different_search": "Try a different search or filter."
},
"notes": {
"note_deleted": "Note deleted successfully!",

View file

@ -109,7 +109,6 @@
"archived_collection_message": "¡Colección archivada exitosamente!",
"delete_collection": "Eliminar colección",
"delete_collection_success": "¡Colección eliminada exitosamente!",
"delete_collection_warning": "¿Estás seguro de que deseas eliminar esta colección? \nEsto también eliminará todas las aventuras vinculadas. \nEsta acción no se puede deshacer.",
"unarchived_collection_message": "¡Colección desarchivada exitosamente!",
"archive": "Archivo",
"archived": "Archivado",
@ -288,7 +287,15 @@
"filters_and_sort": "Filtros",
"no_adventures_message": "Comience a documentar sus aventuras y planificar nuevas. \nCada viaje tiene una historia que vale la pena contar.",
"filters_and_stats": "Filtros",
"travel_progress": "Progreso del viaje"
"travel_progress": "Progreso del viaje",
"adventures_available": "Aventuras disponibles",
"all_adventures_already_linked": "Todas las aventuras ya están vinculadas a esta colección.",
"collections_linked": "Colecciones vinculadas",
"create_collection_first": "Cree una colección primero para organizar sus aventuras y recuerdos.",
"delete_collection_warning": "¿Estás seguro de que quieres eliminar esta colección? \nEsta acción no se puede deshacer.",
"done": "Hecho",
"loading_adventures": "Cargando aventuras ...",
"name_location": "Nombre, ubicación"
},
"worldtravel": {
"all": "Todo",
@ -507,7 +514,10 @@
"no_archived_collections": "No hay colecciones archivadas.",
"no_collections_yet": "Todavía no hay colecciones",
"no_shared_collections": "No hay colecciones compartidas.",
"shared_collections": "Colecciones compartidas"
"shared_collections": "Colecciones compartidas",
"available": "Disponible",
"linked": "Vinculado",
"try_different_search": "Pruebe una búsqueda o filtro diferente."
},
"notes": {
"add_a_link": "Agregar un enlace",

View file

@ -43,7 +43,6 @@
"delete_adventure": "Supprimer l'aventure",
"delete_collection": "Supprimer la collection",
"delete_collection_success": "Collection supprimée avec succès !",
"delete_collection_warning": "Etes-vous sûr de vouloir supprimer cette collection ? \nCela supprimera également toutes les aventures liées. \nCette action ne peut pas être annulée.",
"descending": "Descendant",
"duration": "Durée",
"edit_collection": "Modifier la collection",
@ -236,7 +235,15 @@
"filters_and_sort": "Filtres",
"filters_and_stats": "Filtres",
"no_adventures_message": "Commencez à documenter vos aventures et à planifier de nouvelles. \nChaque voyage a une histoire qui mérite d'être racontée.",
"travel_progress": "Progrès du voyage"
"travel_progress": "Progrès du voyage",
"adventures_available": "Aventures disponibles",
"all_adventures_already_linked": "Toutes les aventures sont déjà liées à cette collection.",
"collections_linked": "Collections liées",
"create_collection_first": "Créez d'abord une collection pour organiser vos aventures et vos souvenirs.",
"delete_collection_warning": "Êtes-vous sûr de vouloir supprimer cette collection? \nCette action ne peut pas être annulée.",
"done": "Fait",
"loading_adventures": "Chargement des aventures ...",
"name_location": "nom, emplacement"
},
"home": {
"desc_1": "Découvrez, planifiez et explorez en toute simplicité",
@ -507,7 +514,10 @@
"no_archived_collections": "Aucune collection archivée.",
"no_collections_yet": "Pas encore de collections",
"no_shared_collections": "Pas de collections partagées.",
"shared_collections": "Collections partagées"
"shared_collections": "Collections partagées",
"available": "Disponible",
"linked": "Lié",
"try_different_search": "Essayez une recherche ou un filtre différent."
},
"notes": {
"add_a_link": "Ajouter un lien",

View file

@ -34,7 +34,6 @@
"delete": "Eliminare",
"delete_collection": "Elimina collezione",
"delete_collection_success": "Collezione eliminata con successo!",
"delete_collection_warning": "Sei sicuro di voler eliminare questa collezione? \nCiò eliminerà anche tutte le avventure collegate. \nQuesta azione non può essere annullata.",
"descending": "Discendente",
"edit_adventure": "Modifica Avventura",
"edit_collection": "Modifica collezione",
@ -236,7 +235,15 @@
"filters_and_sort": "Filtri",
"filters_and_stats": "Filtri",
"no_adventures_message": "Inizia a documentare le tue avventure e pianificarne di nuove. \nOgni viaggio ha una storia che vale la pena raccontare.",
"travel_progress": "Progresso di viaggio"
"travel_progress": "Progresso di viaggio",
"adventures_available": "Avventure disponibili",
"all_adventures_already_linked": "Tutte le avventure sono già legate a questa collezione.",
"collections_linked": "Collezioni collegate",
"create_collection_first": "Crea prima una collezione per organizzare le tue avventure e i tuoi ricordi.",
"delete_collection_warning": "Sei sicuro di voler eliminare questa collezione? \nQuesta azione non può essere annullata.",
"done": "Fatto",
"loading_adventures": "Caricamento di avventure ...",
"name_location": "Nome, posizione"
},
"home": {
"desc_1": "Scopri, pianifica ed esplora con facilità",
@ -507,7 +514,10 @@
"no_archived_collections": "Nessuna collezione archiviata.",
"no_collections_yet": "Nessuna collezione ancora",
"no_shared_collections": "Nessuna collezione condivisa.",
"shared_collections": "Collezioni condivise"
"shared_collections": "Collezioni condivise",
"available": "Disponibile",
"linked": "Collegato",
"try_different_search": "Prova una ricerca o un filtro diverso."
},
"notes": {
"add_a_link": "Aggiungi un collegamento",

View file

@ -78,7 +78,6 @@
"delete_checklist": "체크리스트 삭제",
"delete_collection": "컬렉션 삭제",
"delete_collection_success": "컬렉션이 성공적으로 삭제되었습니다!",
"delete_collection_warning": "이 컬렉션을 삭제 하시겠습니까? 링크된 모든 모험을 삭제합니다. 이 행동은 취소할 수 없습니다.",
"delete_note": "노트 삭제",
"delete_transportation": "교통수단 삭제",
"descending": "내림차순",
@ -236,7 +235,15 @@
"filters_and_sort": "필터",
"filters_and_stats": "필터",
"no_adventures_message": "모험을 문서화하고 새로운 모험을 계획하십시오. \n모든 여정에는 말할 가치가있는 이야기가 있습니다.",
"travel_progress": "여행 진행"
"travel_progress": "여행 진행",
"adventures_available": "이용 가능",
"all_adventures_already_linked": "모든 모험은 이미이 컬렉션과 연결되어 있습니다.",
"collections_linked": "컬렉션 링크",
"create_collection_first": "먼저 모험과 추억을 조직하기 위해 먼저 컬렉션을 만드십시오.",
"delete_collection_warning": "이 컬렉션을 삭제 하시겠습니까? \n이 조치는 취소 할 수 없습니다.",
"done": "완료",
"loading_adventures": "적재 모험 ...",
"name_location": "이름, 위치"
},
"auth": {
"confirm_password": "비밀번호 확인",
@ -298,7 +305,10 @@
"no_archived_collections": "보관 된 컬렉션이 없습니다.",
"no_collections_yet": "아직 컬렉션이 없습니다",
"no_shared_collections": "공유 컬렉션이 없습니다.",
"shared_collections": "공유 컬렉션"
"shared_collections": "공유 컬렉션",
"available": "사용 가능",
"linked": "연결되어 있습니다",
"try_different_search": "다른 검색 또는 필터를 사용해보십시오."
},
"dashboard": {
"add_some": "다음 모험을 계획해 보는게 어떨까요? 아래 버튼을 클릭하여 새로운 모험을 추가할 수 있습니다.",

View file

@ -36,7 +36,6 @@
"delete": "Verwijderen",
"delete_collection": "Collectie verwijderen",
"delete_collection_success": "Collectie succesvol verwijderd!",
"delete_collection_warning": "Weet u zeker dat u deze collectie wilt verwijderen? \nHiermee worden ook alle gekoppelde avonturen verwijderd. \nDeze actie kan niet ongedaan worden gemaakt.",
"descending": "Aflopend",
"edit_adventure": "Avontuur bewerken",
"edit_collection": "Collectie bewerken",
@ -236,7 +235,15 @@
"filters_and_sort": "Filters",
"filters_and_stats": "Filters",
"no_adventures_message": "Begin met het documenteren van uw avonturen en het plannen van nieuwe. \nElke reis heeft een verhaal dat het vertellen waard is.",
"travel_progress": "Reisvoortgang"
"travel_progress": "Reisvoortgang",
"adventures_available": "Avonturen beschikbaar",
"all_adventures_already_linked": "Alle avonturen zijn al gekoppeld aan deze collectie.",
"collections_linked": "Collecties gekoppeld",
"create_collection_first": "Maak eerst een collectie om je avonturen en herinneringen te organiseren.",
"delete_collection_warning": "Weet u zeker dat u deze collectie wilt verwijderen? \nDeze actie kan niet ongedaan worden gemaakt.",
"done": "Klaar",
"loading_adventures": "Adventuren laden ...",
"name_location": "naam, locatie"
},
"home": {
"desc_1": "Ontdek, plan en verken met gemak",
@ -507,7 +514,10 @@
"no_archived_collections": "Geen gearchiveerde collecties.",
"no_collections_yet": "Nog geen collecties",
"no_shared_collections": "Geen gedeelde collecties.",
"shared_collections": "Gedeelde collecties"
"shared_collections": "Gedeelde collecties",
"available": "Beschikbaar",
"linked": "Gekoppeld",
"try_different_search": "Probeer een ander zoek of filter."
},
"notes": {
"add_a_link": "Voeg een link toe",

View file

@ -162,7 +162,6 @@
"archived_collection_message": "Samlingen ble arkivert!",
"unarchived_collection_message": "Samlingen ble fjernet fra arkivet!",
"delete_collection_success": "Samlingen ble slettet!",
"delete_collection_warning": "Er du sikker på at du vil slette denne samlingen? Dette vil også slette alle lenkede eventyr. Denne handlingen kan ikke angres.",
"cancel": "Avbryt",
"delete_collection": "Slett samling",
"delete_adventure": "Slett eventyr",
@ -288,7 +287,15 @@
"filters_and_sort": "Filtre",
"filters_and_stats": "Filtre",
"no_adventures_message": "Begynn å dokumentere eventyrene dine og planlegge nye. \nHver reise har en historie som er verdt å fortelle.",
"travel_progress": "Reisefremgang"
"travel_progress": "Reisefremgang",
"adventures_available": "Eventyr tilgjengelig",
"all_adventures_already_linked": "Alle eventyr er allerede knyttet til denne samlingen.",
"collections_linked": "Samlinger koblet",
"create_collection_first": "Lag en samling først for å organisere dine eventyr og minner.",
"delete_collection_warning": "Er du sikker på at du vil slette denne samlingen? \nDenne handlingen kan ikke angres.",
"done": "Ferdig",
"loading_adventures": "Laster opp eventyr ...",
"name_location": "Navn, plassering"
},
"worldtravel": {
"country_list": "Liste over land",
@ -495,7 +502,10 @@
"no_archived_collections": "Ingen arkiverte samlinger.",
"no_collections_yet": "Ingen samlinger ennå",
"no_shared_collections": "Ingen delte samlinger.",
"shared_collections": "Delte samlinger"
"shared_collections": "Delte samlinger",
"available": "Tilgjengelig",
"linked": "Koblet",
"try_different_search": "Prøv et annet søk eller filter."
},
"notes": {
"note_deleted": "Notat slettet!",

View file

@ -150,7 +150,6 @@
"archived_collection_message": "Kolekcja została pomyślnie zarchiwizowana!",
"unarchived_collection_message": "Kolekcja została pomyślnie przywrócona z archiwum!",
"delete_collection_success": "Kolekcja została pomyślnie usunięta!",
"delete_collection_warning": "Czy na pewno chcesz usunąć tę kolekcję? Spowoduje to również usunięcie wszystkich powiązanych podróży. Ta akcja jest nieodwracalna.",
"cancel": "Anuluj",
"delete_collection": "Usuń kolekcję",
"delete_adventure": "Usuń wyprawę",
@ -288,7 +287,15 @@
"filters_and_sort": "Filtry",
"filters_and_stats": "Filtry",
"no_adventures_message": "Zacznij dokumentować swoje przygody i planować nowe. \nKażda podróż ma historię, którą warto opowiedzieć.",
"travel_progress": "Postęp podróży"
"travel_progress": "Postęp podróży",
"adventures_available": "Dostępne przygody",
"all_adventures_already_linked": "Wszystkie przygody są już powiązane z tą kolekcją.",
"collections_linked": "Połączone kolekcje",
"create_collection_first": "Utwórz kolekcję najpierw, aby zorganizować swoje przygody i wspomnienia.",
"done": "Zrobione",
"loading_adventures": "Ładowanie przygód ...",
"name_location": "Nazwa, lokalizacja",
"delete_collection_warning": "Czy na pewno chcesz usunąć tę kolekcję? \nTego działania nie można cofnąć."
},
"worldtravel": {
"country_list": "Lista krajów",
@ -477,7 +484,8 @@
"social_auth_desc_1": "Zarządzaj opcjami logowania społecznościowego i ustawieniami haseł",
"social_auth_setup": "Konfiguracja uwierzytelniania społecznego",
"staff_status": "Status personelu",
"staff_user": "Użytkownik personelu"
"staff_user": "Użytkownik personelu",
"invalid_credentials": "Nieprawidłowe poświadczenia"
},
"collection": {
"collection_created": "Kolekcja została pomyślnie utworzona!",
@ -494,7 +502,10 @@
"no_archived_collections": "Brak zarchiwizowanych kolekcji.",
"no_collections_yet": "Brak kolekcji",
"no_shared_collections": "Brak wspólnych kolekcji.",
"shared_collections": "Wspólne kolekcje"
"shared_collections": "Wspólne kolekcje",
"available": "Dostępny",
"linked": "Połączony",
"try_different_search": "Wypróbuj inne wyszukiwanie lub filtr."
},
"notes": {
"note_deleted": "Notatka została pomyślnie usunięta!",

View file

@ -177,7 +177,6 @@
"archived_collection_message": "Коллекция успешно архивирована!",
"unarchived_collection_message": "Коллекция успешно разархивирована!",
"delete_collection_success": "Коллекция успешно удалена!",
"delete_collection_warning": "Вы уверены, что хотите удалить эту коллекцию? Это также удалит все связанные приключения. Это действие нельзя отменить.",
"cancel": "Отмена",
"delete_collection": "Удалить коллекцию",
"delete_adventure": "Удалить приключение",
@ -288,7 +287,15 @@
"filters_and_sort": "Фильтры",
"filters_and_stats": "Фильтры",
"no_adventures_message": "Начните документировать ваши приключения и планировать новые. \nУ каждого путешествия есть история, которую стоит рассказать.",
"travel_progress": "Прогресс путешествий"
"travel_progress": "Прогресс путешествий",
"adventures_available": "Приключения доступны",
"all_adventures_already_linked": "Все приключения уже связаны с этой коллекцией.",
"collections_linked": "Коллекции связаны",
"create_collection_first": "Сначала создайте коллекцию, чтобы организовать ваши приключения и воспоминания.",
"delete_collection_warning": "Вы уверены, что хотите удалить эту коллекцию? \nЭто действие не может быть отменено.",
"done": "Сделанный",
"loading_adventures": "Загрузка приключений ...",
"name_location": "имя, местоположение"
},
"worldtravel": {
"country_list": "Список стран",
@ -495,7 +502,10 @@
"no_archived_collections": "Нет архивированных коллекций.",
"no_collections_yet": "Пока нет коллекций",
"no_shared_collections": "Нет общих коллекций.",
"shared_collections": "Общие коллекции"
"shared_collections": "Общие коллекции",
"available": "Доступный",
"linked": "Связанный",
"try_different_search": "Попробуйте другой поиск или фильтр."
},
"notes": {
"note_deleted": "Заметка успешно удалена!",

View file

@ -39,7 +39,6 @@
"delete_adventure": "Ta bort äventyr",
"delete_collection": "Ta bort samling",
"delete_collection_success": "Samlingen har raderats!",
"delete_collection_warning": "Är du säker på att du vill ta bort den här samlingen? \nDetta tar också bort alla länkade äventyr. \nDenna åtgärd kan inte ångras.",
"descending": "Fallande",
"duration": "Varaktighet",
"edit_adventure": "Redigera äventyr",
@ -236,7 +235,15 @@
"filters_and_sort": "Filter",
"filters_and_stats": "Filter",
"no_adventures_message": "Börja dokumentera dina äventyr och planera nya. \nVarje resa har en historia som är värd att berätta.",
"travel_progress": "Reseframsteg"
"travel_progress": "Reseframsteg",
"adventures_available": "Äventyr tillgängliga",
"all_adventures_already_linked": "Alla äventyr är redan kopplade till denna samling.",
"collections_linked": "Samlingar kopplade",
"create_collection_first": "Skapa en samling först för att organisera dina äventyr och minnen.",
"delete_collection_warning": "Är du säker på att du vill ta bort den här samlingen? \nDenna åtgärd kan inte ångras.",
"done": "Gjort",
"loading_adventures": "Laddar äventyr ...",
"name_location": "namn, plats"
},
"home": {
"desc_1": "Upptäck, planera och utforska med lätthet",
@ -507,7 +514,10 @@
"no_archived_collections": "Inga arkiverade samlingar.",
"no_collections_yet": "Inga samlingar än",
"no_shared_collections": "Inga delade samlingar.",
"shared_collections": "Delade samlingar"
"shared_collections": "Delade samlingar",
"available": "Tillgänglig",
"linked": "I samband med",
"try_different_search": "Prova en annan sökning eller filter."
},
"notes": {
"add_a_link": "Lägg till en länk",

View file

@ -161,7 +161,6 @@
"archived_collection_message": "成功归档合集!",
"unarchived_collection_message": "成功取消归档合集!",
"delete_collection_success": "成功删除合集!",
"delete_collection_warning": "你确定要删除此合集吗?这将同时删除所有链接的冒险。此操作无法撤销。",
"cancel": "取消",
"delete_collection": "删除合集",
"delete_adventure": "删除冒险",
@ -288,7 +287,15 @@
"filters_and_sort": "过滤器",
"filters_and_stats": "过滤器",
"no_adventures_message": "开始记录您的冒险经历,并计划新的冒险。\n每个旅程都有一个值得讲述的故事。",
"travel_progress": "旅行进度"
"travel_progress": "旅行进度",
"adventures_available": "冒险可用",
"all_adventures_already_linked": "所有冒险已经链接到此集合。",
"collections_linked": "链接的集合",
"create_collection_first": "首先创建一个集合来组织您的冒险和回忆。",
"delete_collection_warning": "您确定要删除此系列吗?\n该动作不能撤消。",
"done": "完毕",
"loading_adventures": "加载冒险...",
"name_location": "名称,位置"
},
"auth": {
"forgot_password": "忘记密码?",
@ -507,7 +514,10 @@
"no_archived_collections": "没有存档的收藏。",
"no_collections_yet": "还没有收藏",
"no_shared_collections": "没有共享的收藏。",
"shared_collections": "共享收藏"
"shared_collections": "共享收藏",
"available": "可用的",
"linked": "链接",
"try_different_search": "尝试其他搜索或过滤器。"
},
"notes": {
"add_a_link": "添加链接",

View file

@ -82,6 +82,8 @@
url.searchParams.set('order_direction', direction);
url.searchParams.set('page', '1'); // Reset to first page when sorting changes
currentPage = 1;
orderBy = by;
orderDirection = direction;
await goto(url.toString(), { invalidateAll: true, replaceState: true });
if (data.props.adventures) {
collections = data.props.adventures;

View file

@ -123,7 +123,7 @@
<!-- Quick Stats -->
<div class="hidden md:flex items-center gap-2">
<div class="stats stats-horizontal bg-base-100 shadow-lg">
<div class="stats stats-horizontal bg-base-200/50 border border-base-300/50">
<div class="stat py-2 px-4">
<div class="stat-title text-xs">{$t('adventures.visited')}</div>
<div class="stat-value text-lg text-success">{visitedCountries}</div>