mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-24 15:29:36 +02:00
Fix date handling in CollectionModal to set null values for missing start and end dates; update localization files to add new confirmation messages and labels.
This commit is contained in:
parent
697c40fca0
commit
7cf634def8
10 changed files with 301 additions and 113 deletions
|
@ -64,6 +64,11 @@
|
|||
collection.start_date = collection.end_date;
|
||||
}
|
||||
|
||||
if (!collection.start_date && !collection.end_date) {
|
||||
collection.start_date = null;
|
||||
collection.end_date = null;
|
||||
}
|
||||
|
||||
if (collection.id === '') {
|
||||
let res = await fetch('/api/collections', {
|
||||
method: 'POST',
|
||||
|
|
|
@ -197,7 +197,25 @@
|
|||
"show": "Zeigen",
|
||||
"download_calendar": "Kalender herunterladen",
|
||||
"md_instructions": "Schreiben Sie hier Ihren Abschlag...",
|
||||
"preview": "Vorschau"
|
||||
"preview": "Vorschau",
|
||||
"checklist_delete_confirm": "Sind Sie sicher, dass Sie diese Checkliste löschen möchten? \nDiese Aktion kann nicht rückgängig gemacht werden.",
|
||||
"clear_location": "Standort löschen",
|
||||
"date_information": "Datumsinformationen",
|
||||
"delete_checklist": "Checkliste löschen",
|
||||
"delete_note": "Notiz löschen",
|
||||
"delete_transportation": "Transport löschen",
|
||||
"end": "Ende",
|
||||
"ending_airport": "Endflughafen",
|
||||
"flight_information": "Fluginformationen",
|
||||
"from": "Aus",
|
||||
"no_location_found": "Kein Standort gefunden",
|
||||
"note_delete_confirm": "Sind Sie sicher, dass Sie diese Notiz löschen möchten? \nDiese Aktion kann nicht rückgängig gemacht werden.",
|
||||
"out_of_range": "Nicht im Datumsbereich der Reiseroute",
|
||||
"show_region_labels": "Regionsbeschriftungen anzeigen",
|
||||
"start": "Start",
|
||||
"starting_airport": "Startflughafen",
|
||||
"to": "Zu",
|
||||
"transportation_delete_confirm": "Sind Sie sicher, dass Sie diesen Transport löschen möchten? \nDiese Aktion kann nicht rückgängig gemacht werden."
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Entdecken, planen und erkunden Sie mit Leichtigkeit",
|
||||
|
@ -364,7 +382,9 @@
|
|||
"item_cannot_be_empty": "Das Element darf nicht leer sein",
|
||||
"items": "Artikel",
|
||||
"new_item": "Neuer Artikel",
|
||||
"save": "Speichern"
|
||||
"save": "Speichern",
|
||||
"checklist_viewer": "Checklisten-Viewer",
|
||||
"new_checklist": "Neue Checkliste"
|
||||
},
|
||||
"collection": {
|
||||
"collection_created": "Sammlung erfolgreich erstellt!",
|
||||
|
@ -373,7 +393,8 @@
|
|||
"edit_collection": "Sammlung bearbeiten",
|
||||
"error_creating_collection": "Fehler beim Erstellen der Sammlung",
|
||||
"error_editing_collection": "Fehler beim Bearbeiten der Sammlung",
|
||||
"new_collection": "Neue Kollektion"
|
||||
"new_collection": "Neue Kollektion",
|
||||
"public_collection": "Öffentliche Sammlung"
|
||||
},
|
||||
"notes": {
|
||||
"add_a_link": "Fügen Sie einen Link hinzu",
|
||||
|
@ -386,7 +407,8 @@
|
|||
"note_public": "Diese Notiz ist öffentlich, da sie sich in einer öffentlichen Sammlung befindet.",
|
||||
"open": "Offen",
|
||||
"save": "Speichern",
|
||||
"invalid_url": "Ungültige URL"
|
||||
"invalid_url": "Ungültige URL",
|
||||
"note_viewer": "Notizenbetrachter"
|
||||
},
|
||||
"transportation": {
|
||||
"date_and_time": "Datum",
|
||||
|
|
|
@ -244,7 +244,25 @@
|
|||
"show": "Espectáculo",
|
||||
"download_calendar": "Descargar Calendario",
|
||||
"md_instructions": "Escriba su descuento aquí...",
|
||||
"preview": "Avance"
|
||||
"preview": "Avance",
|
||||
"checklist_delete_confirm": "¿Está seguro de que desea eliminar esta lista de verificación? \nEsta acción no se puede deshacer.",
|
||||
"clear_location": "Borrar ubicación",
|
||||
"date_information": "Información de fecha",
|
||||
"delete_checklist": "Eliminar lista de verificación",
|
||||
"delete_note": "Eliminar nota",
|
||||
"delete_transportation": "Eliminar transporte",
|
||||
"end": "Fin",
|
||||
"ending_airport": "Aeropuerto final",
|
||||
"flight_information": "Información de vuelo",
|
||||
"from": "De",
|
||||
"no_location_found": "No se encontró ninguna ubicación",
|
||||
"note_delete_confirm": "¿Estás seguro de que deseas eliminar esta nota? \nEsta acción no se puede deshacer.",
|
||||
"out_of_range": "No en el rango de fechas del itinerario",
|
||||
"show_region_labels": "Mostrar etiquetas de región",
|
||||
"start": "Comenzar",
|
||||
"starting_airport": "Aeropuerto de inicio",
|
||||
"to": "A",
|
||||
"transportation_delete_confirm": "¿Está seguro de que desea eliminar este transporte? \nEsta acción no se puede deshacer."
|
||||
},
|
||||
"worldtravel": {
|
||||
"all": "Todo",
|
||||
|
@ -364,7 +382,9 @@
|
|||
"item_cannot_be_empty": "El artículo no puede estar vacío",
|
||||
"items": "Elementos",
|
||||
"new_item": "Nuevo artículo",
|
||||
"save": "Ahorrar"
|
||||
"save": "Ahorrar",
|
||||
"checklist_viewer": "Visor de lista de verificación",
|
||||
"new_checklist": "Nueva lista de verificación"
|
||||
},
|
||||
"collection": {
|
||||
"collection_created": "¡Colección creada con éxito!",
|
||||
|
@ -373,7 +393,8 @@
|
|||
"edit_collection": "Editar colección",
|
||||
"error_creating_collection": "Error al crear la colección",
|
||||
"error_editing_collection": "Error al editar la colección",
|
||||
"new_collection": "Nueva colección"
|
||||
"new_collection": "Nueva colección",
|
||||
"public_collection": "Colección pública"
|
||||
},
|
||||
"notes": {
|
||||
"add_a_link": "Agregar un enlace",
|
||||
|
@ -386,7 +407,8 @@
|
|||
"note_public": "Esta nota es pública porque está en una colección pública.",
|
||||
"open": "Abierto",
|
||||
"save": "Ahorrar",
|
||||
"invalid_url": "URL no válida"
|
||||
"invalid_url": "URL no válida",
|
||||
"note_viewer": "Visor de notas"
|
||||
},
|
||||
"transportation": {
|
||||
"date_and_time": "Fecha",
|
||||
|
|
|
@ -197,7 +197,25 @@
|
|||
"show": "Montrer",
|
||||
"download_calendar": "Télécharger le calendrier",
|
||||
"md_instructions": "Écrivez votre démarque ici...",
|
||||
"preview": "Aperçu"
|
||||
"preview": "Aperçu",
|
||||
"checklist_delete_confirm": "Êtes-vous sûr de vouloir supprimer cette liste de contrôle ? \nCette action ne peut pas être annulée.",
|
||||
"clear_location": "Effacer l'emplacement",
|
||||
"date_information": "Informations sur les dates",
|
||||
"delete_checklist": "Supprimer la liste de contrôle",
|
||||
"delete_note": "Supprimer la note",
|
||||
"delete_transportation": "Supprimer le transport",
|
||||
"end": "Fin",
|
||||
"ending_airport": "Aéroport de fin",
|
||||
"flight_information": "Informations sur le vol",
|
||||
"from": "Depuis",
|
||||
"no_location_found": "Aucun emplacement trouvé",
|
||||
"note_delete_confirm": "Êtes-vous sûr de vouloir supprimer cette note ? \nCette action ne peut pas être annulée.",
|
||||
"out_of_range": "Pas dans la plage de dates de l'itinéraire",
|
||||
"show_region_labels": "Afficher les étiquettes de région",
|
||||
"start": "Commencer",
|
||||
"starting_airport": "Aéroport de départ",
|
||||
"to": "À",
|
||||
"transportation_delete_confirm": "Etes-vous sûr de vouloir supprimer ce transport ? \nCette action ne peut pas être annulée."
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Découvrez, planifiez et explorez en toute simplicité",
|
||||
|
@ -364,7 +382,9 @@
|
|||
"item_cannot_be_empty": "L'élément ne peut pas être vide",
|
||||
"items": "Articles",
|
||||
"new_item": "Nouvel article",
|
||||
"save": "Sauvegarder"
|
||||
"save": "Sauvegarder",
|
||||
"checklist_viewer": "Visionneuse de liste de contrôle",
|
||||
"new_checklist": "Nouvelle liste de contrôle"
|
||||
},
|
||||
"collection": {
|
||||
"collection_created": "Collection créée avec succès !",
|
||||
|
@ -373,7 +393,8 @@
|
|||
"edit_collection": "Modifier la collection",
|
||||
"error_creating_collection": "Erreur lors de la création de la collection",
|
||||
"error_editing_collection": "Erreur lors de la modification de la collection",
|
||||
"new_collection": "Nouvelle collection"
|
||||
"new_collection": "Nouvelle collection",
|
||||
"public_collection": "Collection publique"
|
||||
},
|
||||
"notes": {
|
||||
"add_a_link": "Ajouter un lien",
|
||||
|
@ -386,7 +407,8 @@
|
|||
"note_public": "Cette note est publique car elle fait partie d'une collection publique.",
|
||||
"open": "Ouvrir",
|
||||
"save": "Sauvegarder",
|
||||
"invalid_url": "URL invalide"
|
||||
"invalid_url": "URL invalide",
|
||||
"note_viewer": "Visionneuse de notes"
|
||||
},
|
||||
"transportation": {
|
||||
"date_time": "Date de début",
|
||||
|
|
|
@ -197,7 +197,25 @@
|
|||
"show": "Spettacolo",
|
||||
"download_calendar": "Scarica Calendario",
|
||||
"md_instructions": "Scrivi qui il tuo ribasso...",
|
||||
"preview": "Anteprima"
|
||||
"preview": "Anteprima",
|
||||
"checklist_delete_confirm": "Sei sicuro di voler eliminare questa lista di controllo? \nQuesta azione non può essere annullata.",
|
||||
"clear_location": "Cancella posizione",
|
||||
"date_information": "Informazioni sulla data",
|
||||
"delete_checklist": "Elimina lista di controllo",
|
||||
"delete_note": "Elimina nota",
|
||||
"delete_transportation": "Elimina trasporto",
|
||||
"end": "FINE",
|
||||
"ending_airport": "Fine dell'aeroporto",
|
||||
"flight_information": "Informazioni sul volo",
|
||||
"from": "Da",
|
||||
"no_location_found": "Nessuna posizione trovata",
|
||||
"note_delete_confirm": "Sei sicuro di voler eliminare questa nota? \nQuesta azione non può essere annullata.",
|
||||
"out_of_range": "Non nell'intervallo di date dell'itinerario",
|
||||
"show_region_labels": "Mostra etichette regione",
|
||||
"start": "Inizio",
|
||||
"starting_airport": "Inizio aeroporto",
|
||||
"to": "A",
|
||||
"transportation_delete_confirm": "Sei sicuro di voler eliminare questo trasporto? \nQuesta azione non può essere annullata."
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Scopri, pianifica ed esplora con facilità",
|
||||
|
@ -364,7 +382,9 @@
|
|||
"item_cannot_be_empty": "L'articolo non può essere vuoto",
|
||||
"items": "Elementi",
|
||||
"save": "Salva",
|
||||
"new_item": "Nuovo articolo"
|
||||
"new_item": "Nuovo articolo",
|
||||
"checklist_viewer": "Visualizzatore della lista di controllo",
|
||||
"new_checklist": "Nuova lista di controllo"
|
||||
},
|
||||
"collection": {
|
||||
"edit_collection": "Modifica raccolta",
|
||||
|
@ -373,7 +393,8 @@
|
|||
"new_collection": "Nuova collezione",
|
||||
"collection_created": "Collezione creata con successo!",
|
||||
"collection_edit_success": "Raccolta modificata con successo!",
|
||||
"create": "Creare"
|
||||
"create": "Creare",
|
||||
"public_collection": "Collezione pubblica"
|
||||
},
|
||||
"notes": {
|
||||
"add_a_link": "Aggiungi un collegamento",
|
||||
|
@ -386,7 +407,8 @@
|
|||
"note_public": "Questa nota è pubblica perché è in una collezione pubblica.",
|
||||
"open": "Aprire",
|
||||
"save": "Salva",
|
||||
"invalid_url": "URL non valido"
|
||||
"invalid_url": "URL non valido",
|
||||
"note_viewer": "Visualizzatore di note"
|
||||
},
|
||||
"transportation": {
|
||||
"date_and_time": "Data",
|
||||
|
|
|
@ -197,7 +197,25 @@
|
|||
"show": "Show",
|
||||
"download_calendar": "Agenda downloaden",
|
||||
"md_instructions": "Schrijf hier uw korting...",
|
||||
"preview": "Voorbeeld"
|
||||
"preview": "Voorbeeld",
|
||||
"checklist_delete_confirm": "Weet u zeker dat u deze checklist wilt verwijderen? \nDeze actie kan niet ongedaan worden gemaakt.",
|
||||
"clear_location": "Locatie wissen",
|
||||
"date_information": "Datuminformatie",
|
||||
"delete_checklist": "Controlelijst verwijderen",
|
||||
"delete_note": "Notitie verwijderen",
|
||||
"delete_transportation": "Transport verwijderen",
|
||||
"end": "Einde",
|
||||
"flight_information": "Vluchtinformatie",
|
||||
"from": "Van",
|
||||
"no_location_found": "Geen locatie gevonden",
|
||||
"note_delete_confirm": "Weet u zeker dat u deze notitie wilt verwijderen? \nDeze actie kan niet ongedaan worden gemaakt.",
|
||||
"out_of_range": "Niet binnen het datumbereik van het reisplan",
|
||||
"show_region_labels": "Toon regiolabels",
|
||||
"start": "Begin",
|
||||
"starting_airport": "Startende luchthaven",
|
||||
"to": "Naar",
|
||||
"transportation_delete_confirm": "Weet u zeker dat u dit transport wilt verwijderen? \nDeze actie kan niet ongedaan worden gemaakt.",
|
||||
"ending_airport": "Einde luchthaven"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Ontdek, plan en verken met gemak",
|
||||
|
@ -364,7 +382,9 @@
|
|||
"item_cannot_be_empty": "Artikel mag niet leeg zijn",
|
||||
"items": "Artikelen",
|
||||
"new_item": "Nieuw artikel",
|
||||
"save": "Opslaan"
|
||||
"save": "Opslaan",
|
||||
"checklist_viewer": "Controlelijstviewer",
|
||||
"new_checklist": "Nieuwe checklist"
|
||||
},
|
||||
"collection": {
|
||||
"collection_created": "Collectie succesvol aangemaakt!",
|
||||
|
@ -373,7 +393,8 @@
|
|||
"edit_collection": "Collectie bewerken",
|
||||
"error_creating_collection": "Fout bij aanmaken collectie",
|
||||
"error_editing_collection": "Fout bij bewerken collectie",
|
||||
"new_collection": "Nieuwe collectie"
|
||||
"new_collection": "Nieuwe collectie",
|
||||
"public_collection": "Openbare collectie"
|
||||
},
|
||||
"notes": {
|
||||
"add_a_link": "Voeg een link toe",
|
||||
|
@ -386,7 +407,8 @@
|
|||
"note_public": "Deze opmerking is openbaar omdat deze zich in een openbare collectie bevindt.",
|
||||
"open": "Open",
|
||||
"save": "Opslaan",
|
||||
"invalid_url": "Ongeldige URL"
|
||||
"invalid_url": "Ongeldige URL",
|
||||
"note_viewer": "Notitieviewer"
|
||||
},
|
||||
"transportation": {
|
||||
"date_and_time": "Datum",
|
||||
|
|
|
@ -244,7 +244,25 @@
|
|||
"show": "Pokazywać",
|
||||
"download_calendar": "Pobierz Kalendarz",
|
||||
"md_instructions": "Napisz tutaj swoją przecenę...",
|
||||
"preview": "Zapowiedź"
|
||||
"preview": "Zapowiedź",
|
||||
"checklist_delete_confirm": "Czy na pewno chcesz usunąć tę listę kontrolną? \nTej akcji nie można cofnąć.",
|
||||
"clear_location": "Wyczyść lokalizację",
|
||||
"date_information": "Informacje o dacie",
|
||||
"delete_checklist": "Usuń listę kontrolną",
|
||||
"delete_note": "Usuń notatkę",
|
||||
"delete_transportation": "Usuń transport",
|
||||
"end": "Koniec",
|
||||
"ending_airport": "Kończy się lotnisko",
|
||||
"flight_information": "Informacje o locie",
|
||||
"from": "Z",
|
||||
"no_location_found": "Nie znaleziono lokalizacji",
|
||||
"note_delete_confirm": "Czy na pewno chcesz usunąć tę notatkę? \nTej akcji nie można cofnąć.",
|
||||
"out_of_range": "Nie mieści się w zakresie dat planu podróży",
|
||||
"show_region_labels": "Pokaż etykiety regionów",
|
||||
"start": "Start",
|
||||
"starting_airport": "Początkowe lotnisko",
|
||||
"to": "Do",
|
||||
"transportation_delete_confirm": "Czy na pewno chcesz usunąć ten transport? \nTej akcji nie można cofnąć."
|
||||
},
|
||||
"worldtravel": {
|
||||
"country_list": "Lista krajów",
|
||||
|
@ -358,7 +376,8 @@
|
|||
"create": "Utwórz",
|
||||
"collection_edit_success": "Kolekcja została pomyślnie edytowana!",
|
||||
"error_editing_collection": "Błąd podczas edytowania kolekcji",
|
||||
"edit_collection": "Edytuj kolekcję"
|
||||
"edit_collection": "Edytuj kolekcję",
|
||||
"public_collection": "Kolekcja publiczna"
|
||||
},
|
||||
"notes": {
|
||||
"note_deleted": "Notatka została pomyślnie usunięta!",
|
||||
|
@ -371,7 +390,8 @@
|
|||
"save": "Zapisz",
|
||||
"note_public": "Ta notatka jest publiczna, ponieważ znajduje się w publicznej kolekcji.",
|
||||
"add_a_link": "Dodaj link",
|
||||
"invalid_url": "Nieprawidłowy URL"
|
||||
"invalid_url": "Nieprawidłowy URL",
|
||||
"note_viewer": "Przeglądarka notatek"
|
||||
},
|
||||
"checklist": {
|
||||
"checklist_deleted": "Lista kontrolna została pomyślnie usunięta!",
|
||||
|
@ -386,7 +406,9 @@
|
|||
"save": "Zapisz",
|
||||
"checklist_public": "Ta lista kontrolna jest publiczna, ponieważ znajduje się w publicznej kolekcji.",
|
||||
"item_cannot_be_empty": "Element nie może być pusty",
|
||||
"item_already_exists": "Element już istnieje"
|
||||
"item_already_exists": "Element już istnieje",
|
||||
"checklist_viewer": "Przeglądarka listy kontrolnej",
|
||||
"new_checklist": "Nowa lista kontrolna"
|
||||
},
|
||||
"transportation": {
|
||||
"transportation_deleted": "Transport został pomyślnie usunięty!",
|
||||
|
|
|
@ -197,7 +197,25 @@
|
|||
"show": "Visa",
|
||||
"download_calendar": "Ladda ner kalender",
|
||||
"md_instructions": "Skriv din avskrivning här...",
|
||||
"preview": "Förhandsvisning"
|
||||
"preview": "Förhandsvisning",
|
||||
"checklist_delete_confirm": "Är du säker på att du vill ta bort den här checklistan? \nDenna åtgärd kan inte ångras.",
|
||||
"clear_location": "Rensa plats",
|
||||
"date_information": "Datuminformation",
|
||||
"delete_checklist": "Ta bort checklista",
|
||||
"delete_note": "Ta bort anteckning",
|
||||
"delete_transportation": "Ta bort Transport",
|
||||
"end": "Avsluta",
|
||||
"ending_airport": "Slutar flygplats",
|
||||
"flight_information": "Flyginformation",
|
||||
"from": "Från",
|
||||
"no_location_found": "Ingen plats hittades",
|
||||
"note_delete_confirm": "Är du säker på att du vill ta bort den här anteckningen? \nDenna åtgärd kan inte ångras.",
|
||||
"out_of_range": "Inte inom resplanens datumintervall",
|
||||
"show_region_labels": "Visa regionetiketter",
|
||||
"start": "Start",
|
||||
"starting_airport": "Startar flygplats",
|
||||
"to": "Till",
|
||||
"transportation_delete_confirm": "Är du säker på att du vill ta bort denna transport? \nDenna åtgärd kan inte ångras."
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Upptäck, planera och utforska med lätthet",
|
||||
|
@ -364,7 +382,9 @@
|
|||
"item_cannot_be_empty": "Objektet får inte vara tomt",
|
||||
"items": "Föremål",
|
||||
"new_item": "Nytt föremål",
|
||||
"save": "Spara"
|
||||
"save": "Spara",
|
||||
"checklist_viewer": "Checklista Viewer",
|
||||
"new_checklist": "Ny checklista"
|
||||
},
|
||||
"collection": {
|
||||
"collection_created": "Samlingen har skapats!",
|
||||
|
@ -373,7 +393,8 @@
|
|||
"edit_collection": "Redigera samling",
|
||||
"error_creating_collection": "Det gick inte att skapa samlingen",
|
||||
"error_editing_collection": "Fel vid redigering av samling",
|
||||
"new_collection": "Ny samling"
|
||||
"new_collection": "Ny samling",
|
||||
"public_collection": "Offentlig samling"
|
||||
},
|
||||
"notes": {
|
||||
"add_a_link": "Lägg till en länk",
|
||||
|
@ -386,7 +407,8 @@
|
|||
"note_public": "Den här anteckningen är offentlig eftersom den finns i en offentlig samling.",
|
||||
"open": "Öppna",
|
||||
"save": "Spara",
|
||||
"invalid_url": "Ogiltig URL"
|
||||
"invalid_url": "Ogiltig URL",
|
||||
"note_viewer": "Note Viewer"
|
||||
},
|
||||
"transportation": {
|
||||
"date_and_time": "Datum",
|
||||
|
|
|
@ -197,7 +197,25 @@
|
|||
"show": "展示",
|
||||
"download_calendar": "下载日历",
|
||||
"md_instructions": "在这里写下你的标记...",
|
||||
"preview": "预览"
|
||||
"preview": "预览",
|
||||
"checklist_delete_confirm": "您确定要删除此清单吗?\n此操作无法撤消。",
|
||||
"clear_location": "明确的位置",
|
||||
"date_information": "日期信息",
|
||||
"delete_checklist": "删除清单",
|
||||
"delete_note": "删除注释",
|
||||
"delete_transportation": "删除交通",
|
||||
"end": "结尾",
|
||||
"ending_airport": "结束机场",
|
||||
"flight_information": "航班信息",
|
||||
"from": "从",
|
||||
"no_location_found": "没有找到位置",
|
||||
"note_delete_confirm": "您确定要删除此注释吗?\n此操作无法撤消。",
|
||||
"out_of_range": "不在行程日期范围内",
|
||||
"show_region_labels": "显示区域标签",
|
||||
"start": "开始",
|
||||
"starting_airport": "出发机场",
|
||||
"to": "到",
|
||||
"transportation_delete_confirm": "您确定要删除此交通工具吗?\n此操作无法撤消。"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "轻松发现、规划和探索",
|
||||
|
@ -364,7 +382,9 @@
|
|||
"item_cannot_be_empty": "项目不能为空",
|
||||
"items": "项目",
|
||||
"new_item": "新商品",
|
||||
"save": "节省"
|
||||
"save": "节省",
|
||||
"checklist_viewer": "清单查看器",
|
||||
"new_checklist": "新清单"
|
||||
},
|
||||
"collection": {
|
||||
"collection_created": "收藏创建成功!",
|
||||
|
@ -373,7 +393,8 @@
|
|||
"edit_collection": "编辑收藏",
|
||||
"error_creating_collection": "创建集合时出错",
|
||||
"error_editing_collection": "编辑集合时出错",
|
||||
"new_collection": "新系列"
|
||||
"new_collection": "新系列",
|
||||
"public_collection": "公共收藏"
|
||||
},
|
||||
"notes": {
|
||||
"add_a_link": "添加链接",
|
||||
|
@ -386,7 +407,8 @@
|
|||
"note_public": "该笔记是公开的,因为它属于公共收藏。",
|
||||
"open": "打开",
|
||||
"save": "节省",
|
||||
"invalid_url": "无效网址"
|
||||
"invalid_url": "无效网址",
|
||||
"note_viewer": "笔记查看器"
|
||||
},
|
||||
"transportation": {
|
||||
"date_and_time": "日期",
|
||||
|
|
|
@ -171,6 +171,11 @@
|
|||
if (collection.checklists) {
|
||||
checklists = collection.checklists;
|
||||
}
|
||||
if (!collection.start_date) {
|
||||
currentView = 'all';
|
||||
} else {
|
||||
currentView = 'itinerary';
|
||||
}
|
||||
});
|
||||
|
||||
function deleteAdventure(event: CustomEvent<string>) {
|
||||
|
@ -468,18 +473,20 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
{#if collection.start_date}
|
||||
{#if collection.id}
|
||||
<div class="flex justify-center mx-auto">
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<div role="tablist" class="tabs tabs-boxed tabs-lg max-w-xl">
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<a
|
||||
role="tab"
|
||||
class="tab {currentView === 'itinerary' ? 'tab-active' : ''}"
|
||||
tabindex="0"
|
||||
on:click={() => (currentView = 'itinerary')}
|
||||
on:keydown={(e) => e.key === 'Enter' && (currentView = 'itinerary')}>Itinerary</a
|
||||
>
|
||||
{#if collection.start_date}
|
||||
<a
|
||||
role="tab"
|
||||
class="tab {currentView === 'itinerary' ? 'tab-active' : ''}"
|
||||
tabindex="0"
|
||||
on:click={() => (currentView = 'itinerary')}
|
||||
on:keydown={(e) => e.key === 'Enter' && (currentView = 'itinerary')}>Itinerary</a
|
||||
>
|
||||
{/if}
|
||||
<a
|
||||
role="tab"
|
||||
class="tab {currentView === 'all' ? 'tab-active' : ''}"
|
||||
|
@ -714,84 +721,84 @@
|
|||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{#if currentView == 'map'}
|
||||
<div class="card bg-base-200 shadow-xl my-8 mx-auto w-10/12">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title text-3xl justify-center mb-4">Trip Map</h2>
|
||||
<MapLibre
|
||||
style="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json"
|
||||
class="aspect-[9/16] max-h-[70vh] sm:aspect-video sm:max-h-full w-full rounded-lg"
|
||||
standardControls
|
||||
>
|
||||
{#each adventures as adventure}
|
||||
{#if adventure.longitude && adventure.latitude}
|
||||
<DefaultMarker lngLat={{ lng: adventure.longitude, lat: adventure.latitude }}>
|
||||
<Popup openOn="click" offset={[0, -10]}>
|
||||
<div class="text-lg text-black font-bold">{adventure.name}</div>
|
||||
<p class="font-semibold text-black text-md">
|
||||
{adventure.category?.display_name + ' ' + adventure.category?.icon}
|
||||
</p>
|
||||
</Popup>
|
||||
</DefaultMarker>
|
||||
{/if}
|
||||
{/each}
|
||||
{#each transportations as transportation}
|
||||
{#if transportation.destination_latitude && transportation.destination_longitude}
|
||||
<Marker
|
||||
lngLat={{
|
||||
lng: transportation.destination_longitude,
|
||||
lat: transportation.destination_latitude
|
||||
}}
|
||||
class="grid h-8 w-8 place-items-center rounded-full border border-gray-200
|
||||
{#if currentView == 'map'}
|
||||
<div class="card bg-base-200 shadow-xl my-8 mx-auto w-10/12">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title text-3xl justify-center mb-4">Trip Map</h2>
|
||||
<MapLibre
|
||||
style="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json"
|
||||
class="aspect-[9/16] max-h-[70vh] sm:aspect-video sm:max-h-full w-full rounded-lg"
|
||||
standardControls
|
||||
>
|
||||
{#each adventures as adventure}
|
||||
{#if adventure.longitude && adventure.latitude}
|
||||
<DefaultMarker lngLat={{ lng: adventure.longitude, lat: adventure.latitude }}>
|
||||
<Popup openOn="click" offset={[0, -10]}>
|
||||
<div class="text-lg text-black font-bold">{adventure.name}</div>
|
||||
<p class="font-semibold text-black text-md">
|
||||
{adventure.category?.display_name + ' ' + adventure.category?.icon}
|
||||
</p>
|
||||
</Popup>
|
||||
</DefaultMarker>
|
||||
{/if}
|
||||
{/each}
|
||||
{#each transportations as transportation}
|
||||
{#if transportation.destination_latitude && transportation.destination_longitude}
|
||||
<Marker
|
||||
lngLat={{
|
||||
lng: transportation.destination_longitude,
|
||||
lat: transportation.destination_latitude
|
||||
}}
|
||||
class="grid h-8 w-8 place-items-center rounded-full border border-gray-200
|
||||
bg-red-300 text-black focus:outline-6 focus:outline-black"
|
||||
>
|
||||
<span class="text-xl">
|
||||
{getTransportationEmoji(transportation.type)}
|
||||
</span>
|
||||
<Popup openOn="click" offset={[0, -10]}>
|
||||
<div class="text-lg text-black font-bold">{transportation.name}</div>
|
||||
<p class="font-semibold text-black text-md">
|
||||
{transportation.type}
|
||||
</p>
|
||||
</Popup>
|
||||
</Marker>
|
||||
{/if}
|
||||
{#if transportation.origin_latitude && transportation.origin_longitude}
|
||||
<Marker
|
||||
lngLat={{
|
||||
lng: transportation.origin_longitude,
|
||||
lat: transportation.origin_latitude
|
||||
}}
|
||||
class="grid h-8 w-8 place-items-center rounded-full border border-gray-200
|
||||
>
|
||||
<span class="text-xl">
|
||||
{getTransportationEmoji(transportation.type)}
|
||||
</span>
|
||||
<Popup openOn="click" offset={[0, -10]}>
|
||||
<div class="text-lg text-black font-bold">{transportation.name}</div>
|
||||
<p class="font-semibold text-black text-md">
|
||||
{transportation.type}
|
||||
</p>
|
||||
</Popup>
|
||||
</Marker>
|
||||
{/if}
|
||||
{#if transportation.origin_latitude && transportation.origin_longitude}
|
||||
<Marker
|
||||
lngLat={{
|
||||
lng: transportation.origin_longitude,
|
||||
lat: transportation.origin_latitude
|
||||
}}
|
||||
class="grid h-8 w-8 place-items-center rounded-full border border-gray-200
|
||||
bg-green-300 text-black focus:outline-6 focus:outline-black"
|
||||
>
|
||||
<span class="text-xl">
|
||||
{getTransportationEmoji(transportation.type)}
|
||||
</span>
|
||||
<Popup openOn="click" offset={[0, -10]}>
|
||||
<div class="text-lg text-black font-bold">{transportation.name}</div>
|
||||
<p class="font-semibold text-black text-md">
|
||||
{transportation.type}
|
||||
</p>
|
||||
</Popup>
|
||||
</Marker>
|
||||
{/if}
|
||||
{/each}
|
||||
</MapLibre>
|
||||
</div>
|
||||
>
|
||||
<span class="text-xl">
|
||||
{getTransportationEmoji(transportation.type)}
|
||||
</span>
|
||||
<Popup openOn="click" offset={[0, -10]}>
|
||||
<div class="text-lg text-black font-bold">{transportation.name}</div>
|
||||
<p class="font-semibold text-black text-md">
|
||||
{transportation.type}
|
||||
</p>
|
||||
</Popup>
|
||||
</Marker>
|
||||
{/if}
|
||||
{/each}
|
||||
</MapLibre>
|
||||
</div>
|
||||
{/if}
|
||||
{#if currentView == 'calendar'}
|
||||
<div class="card bg-base-200 shadow-xl my-8 mx-auto w-10/12">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title text-3xl justify-center mb-4">
|
||||
{$t('adventures.adventure_calendar')}
|
||||
</h2>
|
||||
<Calendar {plugins} {options} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if currentView == 'calendar'}
|
||||
<div class="card bg-base-200 shadow-xl my-8 mx-auto w-10/12">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title text-3xl justify-center mb-4">
|
||||
{$t('adventures.adventure_calendar')}
|
||||
</h2>
|
||||
<Calendar {plugins} {options} />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue