diff --git a/frontend/src/lib/components/AdventureLink.svelte b/frontend/src/lib/components/AdventureLink.svelte index 74cfd13..4210170 100644 --- a/frontend/src/lib/components/AdventureLink.svelte +++ b/frontend/src/lib/components/AdventureLink.svelte @@ -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'; + } - + - diff --git a/frontend/src/lib/components/CollectionLink.svelte b/frontend/src/lib/components/CollectionLink.svelte index 7f6ab0c..6786cf1 100644 --- a/frontend/src/lib/components/CollectionLink.svelte +++ b/frontend/src/lib/components/CollectionLink.svelte @@ -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; - + - diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 79df037..2261896 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -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", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index ba1fd57..9114857 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -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!", diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json index bce3bab..fbf87d0 100644 --- a/frontend/src/locales/es.json +++ b/frontend/src/locales/es.json @@ -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", diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json index 4e4cd3f..7f66cdf 100644 --- a/frontend/src/locales/fr.json +++ b/frontend/src/locales/fr.json @@ -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", diff --git a/frontend/src/locales/it.json b/frontend/src/locales/it.json index d5e8a41..d20257c 100644 --- a/frontend/src/locales/it.json +++ b/frontend/src/locales/it.json @@ -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", diff --git a/frontend/src/locales/ko.json b/frontend/src/locales/ko.json index 62d06b5..c40063d 100644 --- a/frontend/src/locales/ko.json +++ b/frontend/src/locales/ko.json @@ -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": "다음 모험을 계획해 보는게 어떨까요? 아래 버튼을 클릭하여 새로운 모험을 추가할 수 있습니다.", diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json index 8c5e5f4..bed5f2f 100644 --- a/frontend/src/locales/nl.json +++ b/frontend/src/locales/nl.json @@ -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", diff --git a/frontend/src/locales/no.json b/frontend/src/locales/no.json index 2382b2d..bc828b1 100644 --- a/frontend/src/locales/no.json +++ b/frontend/src/locales/no.json @@ -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!", diff --git a/frontend/src/locales/pl.json b/frontend/src/locales/pl.json index 3926a69..39768d6 100644 --- a/frontend/src/locales/pl.json +++ b/frontend/src/locales/pl.json @@ -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!", diff --git a/frontend/src/locales/ru.json b/frontend/src/locales/ru.json index bae1e0c..7314798 100644 --- a/frontend/src/locales/ru.json +++ b/frontend/src/locales/ru.json @@ -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": "Заметка успешно удалена!", diff --git a/frontend/src/locales/sv.json b/frontend/src/locales/sv.json index 010d8d7..3e47582 100644 --- a/frontend/src/locales/sv.json +++ b/frontend/src/locales/sv.json @@ -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", diff --git a/frontend/src/locales/zh.json b/frontend/src/locales/zh.json index f81dd21..30eb783 100644 --- a/frontend/src/locales/zh.json +++ b/frontend/src/locales/zh.json @@ -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": "添加链接", diff --git a/frontend/src/routes/collections/+page.svelte b/frontend/src/routes/collections/+page.svelte index 4b87b29..1a2c6c1 100644 --- a/frontend/src/routes/collections/+page.svelte +++ b/frontend/src/routes/collections/+page.svelte @@ -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; diff --git a/frontend/src/routes/worldtravel/+page.svelte b/frontend/src/routes/worldtravel/+page.svelte index a381deb..85701df 100644 --- a/frontend/src/routes/worldtravel/+page.svelte +++ b/frontend/src/routes/worldtravel/+page.svelte @@ -123,7 +123,7 @@