mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-30 18:29:37 +02:00
feat: enhance attachment handling with new localization strings and GPX upload tips
This commit is contained in:
parent
1b3cf6ab39
commit
6e28e5234e
13 changed files with 142 additions and 19 deletions
|
@ -997,7 +997,7 @@ it would also work to just use on:click on the MapLibre component itself. -->
|
|||
<input
|
||||
type="text"
|
||||
class="input input-bordered w-full"
|
||||
placeholder="Attachment Name"
|
||||
placeholder={$t('adventures.attachment_name')}
|
||||
bind:value={attachmentName}
|
||||
/>
|
||||
<button type="submit" class="btn btn-neutral">{$t('adventures.upload')}</button>
|
||||
|
@ -1014,7 +1014,7 @@ it would also work to just use on:click on the MapLibre component itself. -->
|
|||
<input
|
||||
type="text"
|
||||
class="input input-bordered w-full"
|
||||
placeholder="Attachment Name"
|
||||
placeholder={$t('adventures.attachment_name')}
|
||||
bind:value={attachmentToEdit.name}
|
||||
/>
|
||||
<button type="submit" class="btn btn-neutral"
|
||||
|
|
|
@ -75,13 +75,15 @@
|
|||
{attachment.name}
|
||||
</span>
|
||||
<div class="flex space-x-2">
|
||||
<button
|
||||
class="btn btn-sm btn-secondary btn-outline"
|
||||
type="button"
|
||||
on:click={() => window.open(attachment.file, '_blank')}
|
||||
>
|
||||
{$t('notes.open')}
|
||||
</button>
|
||||
{#if !allowEdit}
|
||||
<button
|
||||
class="btn btn-sm btn-secondary btn-outline"
|
||||
type="button"
|
||||
on:click={() => window.open(attachment.file, '_blank')}
|
||||
>
|
||||
{$t('notes.open')}
|
||||
</button>
|
||||
{/if}
|
||||
{#if allowEdit}
|
||||
<button
|
||||
class="btn btn-sm btn-info btn-outline"
|
||||
|
|
|
@ -221,7 +221,20 @@
|
|||
"cities_updated": "Städte aktualisiert",
|
||||
"create_adventure": "Erstelle Abenteuer",
|
||||
"no_adventures_to_recommendations": "Keine Abenteuer gefunden. \nFügen Sie mindestens ein Abenteuer hinzu, um Empfehlungen zu erhalten.",
|
||||
"finding_recommendations": "Entdecken Sie verborgene Schätze für Ihr nächstes Abenteuer"
|
||||
"finding_recommendations": "Entdecken Sie verborgene Schätze für Ihr nächstes Abenteuer",
|
||||
"attachment": "Anhang",
|
||||
"attachment_delete_success": "Anhang erfolgreich gelöscht!",
|
||||
"attachment_name": "Anhangsname",
|
||||
"attachment_update_error": "Fehler beim Aktualisieren des Anhangs",
|
||||
"attachment_update_success": "Anhang erfolgreich aktualisiert!",
|
||||
"attachment_upload_error": "Fehler beim Hochladen des Anhangs",
|
||||
"attachment_upload_success": "Anhang erfolgreich hochgeladen!",
|
||||
"attachments": "Anhänge",
|
||||
"gpx_tip": "Laden Sie GPX-Dateien als Anhänge hoch, um sie auf der Karte anzuzeigen!",
|
||||
"images": "Bilder",
|
||||
"primary": "Primär",
|
||||
"upload": "Hochladen",
|
||||
"view_attachment": "Anhang anzeigen"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Entdecken, planen und erkunden Sie mit Leichtigkeit",
|
||||
|
|
|
@ -255,6 +255,8 @@
|
|||
"upload": "Upload",
|
||||
"attachment_delete_success": "Attachment deleted successfully!",
|
||||
"attachment_update_success": "Attachment updated successfully!",
|
||||
"attachment_name": "Attachment Name",
|
||||
"gpx_tip": "Upload GPX files to attachments to view them on the map!",
|
||||
"attachment_update_error": "Error updating attachment",
|
||||
"activities": {
|
||||
"general": "General 🌍",
|
||||
|
|
|
@ -268,7 +268,20 @@
|
|||
"cities_updated": "ciudades actualizadas",
|
||||
"create_adventure": "Crear aventura",
|
||||
"no_adventures_to_recommendations": "No se encontraron aventuras. \nAñade al menos una aventura para obtener recomendaciones.",
|
||||
"finding_recommendations": "Descubriendo gemas ocultas para tu próxima aventura"
|
||||
"finding_recommendations": "Descubriendo gemas ocultas para tu próxima aventura",
|
||||
"attachment": "Adjunto",
|
||||
"attachment_delete_success": "¡El archivo adjunto se eliminó exitosamente!",
|
||||
"attachment_update_error": "Error al actualizar el archivo adjunto",
|
||||
"attachment_update_success": "¡Adjunto actualizado exitosamente!",
|
||||
"attachment_upload_error": "Error al cargar el archivo adjunto",
|
||||
"attachment_upload_success": "¡El archivo adjunto se cargó exitosamente!",
|
||||
"attachments": "Adjuntos",
|
||||
"gpx_tip": "¡Sube archivos GPX a archivos adjuntos para verlos en el mapa!",
|
||||
"images": "Imágenes",
|
||||
"primary": "Primario",
|
||||
"upload": "Subir",
|
||||
"view_attachment": "Ver archivo adjunto",
|
||||
"attachment_name": "Nombre del archivo adjunto"
|
||||
},
|
||||
"worldtravel": {
|
||||
"all": "Todo",
|
||||
|
|
|
@ -221,7 +221,20 @@
|
|||
"cities_updated": "villes mises à jour",
|
||||
"create_adventure": "Créer une aventure",
|
||||
"no_adventures_to_recommendations": "Aucune aventure trouvée. \nAjoutez au moins une aventure pour obtenir des recommandations.",
|
||||
"finding_recommendations": "Découvrir des trésors cachés pour votre prochaine aventure"
|
||||
"finding_recommendations": "Découvrir des trésors cachés pour votre prochaine aventure",
|
||||
"attachment": "Pièce jointe",
|
||||
"attachment_delete_success": "Pièce jointe supprimée avec succès !",
|
||||
"attachment_name": "Nom de la pièce jointe",
|
||||
"attachment_update_error": "Erreur lors de la mise à jour de la pièce jointe",
|
||||
"attachment_update_success": "Pièce jointe mise à jour avec succès !",
|
||||
"attachment_upload_error": "Erreur lors du téléchargement de la pièce jointe",
|
||||
"attachment_upload_success": "Pièce jointe téléchargée avec succès !",
|
||||
"attachments": "Pièces jointes",
|
||||
"gpx_tip": "Téléchargez des fichiers GPX en pièces jointes pour les afficher sur la carte !",
|
||||
"images": "Images",
|
||||
"primary": "Primaire",
|
||||
"upload": "Télécharger",
|
||||
"view_attachment": "Voir la pièce jointe"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Découvrez, planifiez et explorez en toute simplicité",
|
||||
|
|
|
@ -221,7 +221,20 @@
|
|||
"cities_updated": "città aggiornate",
|
||||
"create_adventure": "Crea Avventura",
|
||||
"no_adventures_to_recommendations": "Nessuna avventura trovata. \nAggiungi almeno un'avventura per ricevere consigli.",
|
||||
"finding_recommendations": "Alla scoperta di gemme nascoste per la tua prossima avventura"
|
||||
"finding_recommendations": "Alla scoperta di gemme nascoste per la tua prossima avventura",
|
||||
"attachment": "Allegato",
|
||||
"attachment_delete_success": "Allegato eliminato con successo!",
|
||||
"attachment_name": "Nome dell'allegato",
|
||||
"attachment_update_error": "Errore durante l'aggiornamento dell'allegato",
|
||||
"attachment_update_success": "Allegato aggiornato con successo!",
|
||||
"attachment_upload_error": "Errore durante il caricamento dell'allegato",
|
||||
"attachment_upload_success": "Allegato caricato con successo!",
|
||||
"attachments": "Allegati",
|
||||
"gpx_tip": "Carica i file GPX negli allegati per visualizzarli sulla mappa!",
|
||||
"images": "Immagini",
|
||||
"primary": "Primario",
|
||||
"upload": "Caricamento",
|
||||
"view_attachment": "Visualizza allegato"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Scopri, pianifica ed esplora con facilità",
|
||||
|
|
|
@ -221,7 +221,20 @@
|
|||
"cities_updated": "steden bijgewerkt",
|
||||
"create_adventure": "Creëer avontuur",
|
||||
"no_adventures_to_recommendations": "Geen avonturen gevonden. \nVoeg ten minste één avontuur toe om aanbevelingen te krijgen.",
|
||||
"finding_recommendations": "Ontdek verborgen juweeltjes voor je volgende avontuur"
|
||||
"finding_recommendations": "Ontdek verborgen juweeltjes voor je volgende avontuur",
|
||||
"attachment": "Bijlage",
|
||||
"attachment_delete_success": "Bijlage succesvol verwijderd!",
|
||||
"attachment_name": "Naam van bijlage",
|
||||
"attachment_update_error": "Fout bij bijwerken van bijlage",
|
||||
"attachment_update_success": "Bijlage succesvol bijgewerkt!",
|
||||
"attachment_upload_error": "Fout bij het uploaden van bijlage",
|
||||
"attachment_upload_success": "Bijlage succesvol geüpload!",
|
||||
"attachments": "Bijlagen",
|
||||
"gpx_tip": "Upload GPX-bestanden naar bijlagen om ze op de kaart te bekijken!",
|
||||
"images": "Afbeeldingen",
|
||||
"primary": "Primair",
|
||||
"upload": "Uploaden",
|
||||
"view_attachment": "Bijlage bekijken"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Ontdek, plan en verken met gemak",
|
||||
|
|
|
@ -268,7 +268,20 @@
|
|||
"cities_updated": "miasta zaktualizowane",
|
||||
"create_adventure": "Stwórz przygodę",
|
||||
"no_adventures_to_recommendations": "Nie znaleziono żadnych przygód. \nDodaj co najmniej jedną przygodę, aby uzyskać rekomendacje.",
|
||||
"finding_recommendations": "Odkrywanie ukrytych klejnotów na następną przygodę"
|
||||
"finding_recommendations": "Odkrywanie ukrytych klejnotów na następną przygodę",
|
||||
"attachment": "Załącznik",
|
||||
"attachment_delete_success": "Załącznik został pomyślnie usunięty!",
|
||||
"attachment_name": "Nazwa załącznika",
|
||||
"attachment_update_error": "Błąd podczas aktualizacji załącznika",
|
||||
"attachment_update_success": "Załącznik został pomyślnie zaktualizowany!",
|
||||
"attachment_upload_error": "Błąd podczas przesyłania załącznika",
|
||||
"attachment_upload_success": "Załącznik przesłany pomyślnie!",
|
||||
"attachments": "Załączniki",
|
||||
"gpx_tip": "Przesyłaj pliki GPX do załączników, aby wyświetlić je na mapie!",
|
||||
"images": "Obrazy",
|
||||
"primary": "Podstawowy",
|
||||
"upload": "Wgrywać",
|
||||
"view_attachment": "Zobacz załącznik"
|
||||
},
|
||||
"worldtravel": {
|
||||
"country_list": "Lista krajów",
|
||||
|
|
|
@ -221,7 +221,20 @@
|
|||
"cities_updated": "städer uppdaterade",
|
||||
"create_adventure": "Skapa äventyr",
|
||||
"no_adventures_to_recommendations": "Inga äventyr hittades. \nLägg till minst ett äventyr för att få rekommendationer.",
|
||||
"finding_recommendations": "Upptäck dolda pärlor för ditt nästa äventyr"
|
||||
"finding_recommendations": "Upptäck dolda pärlor för ditt nästa äventyr",
|
||||
"attachment": "Fastsättning",
|
||||
"attachment_delete_success": "Bilagan har raderats!",
|
||||
"attachment_name": "Bilagans namn",
|
||||
"attachment_update_error": "Fel vid uppdatering av bilaga",
|
||||
"attachment_update_success": "Bilagan har uppdaterats!",
|
||||
"attachment_upload_error": "Det gick inte att ladda upp bilagan",
|
||||
"attachment_upload_success": "Bilagan har laddats upp!",
|
||||
"attachments": "Bilagor",
|
||||
"gpx_tip": "Ladda upp GPX-filer till bilagor för att se dem på kartan!",
|
||||
"images": "Bilder",
|
||||
"primary": "Primär",
|
||||
"upload": "Ladda upp",
|
||||
"view_attachment": "Visa bilaga"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Upptäck, planera och utforska med lätthet",
|
||||
|
|
|
@ -221,7 +221,20 @@
|
|||
"cities_updated": "城市已更新",
|
||||
"create_adventure": "创造冒险",
|
||||
"no_adventures_to_recommendations": "没有发现任何冒险。\n至少添加一次冒险以获得推荐。",
|
||||
"finding_recommendations": "为您的下一次冒险发现隐藏的宝石"
|
||||
"finding_recommendations": "为您的下一次冒险发现隐藏的宝石",
|
||||
"attachment": "依恋",
|
||||
"attachment_delete_success": "附件删除成功!",
|
||||
"attachment_name": "附件名称",
|
||||
"attachment_update_error": "更新附件时出错",
|
||||
"attachment_update_success": "附件更新成功!",
|
||||
"attachment_upload_error": "上传附件时出错",
|
||||
"attachment_upload_success": "附件上传成功!",
|
||||
"attachments": "附件",
|
||||
"gpx_tip": "将 GPX 文件上传到附件即可在地图上查看!",
|
||||
"images": "图片",
|
||||
"primary": "基本的",
|
||||
"upload": "上传",
|
||||
"view_attachment": "查看附件"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "轻松发现、规划和探索",
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
// @ts-ignore
|
||||
import toGeoJSON from '@mapbox/togeojson';
|
||||
|
||||
import LightbulbOn from '~icons/mdi/lightbulb-on';
|
||||
|
||||
let geojson: any;
|
||||
|
||||
const renderMarkdown = (markdown: string) => {
|
||||
|
@ -447,7 +449,15 @@
|
|||
{#if adventure.attachments && adventure.attachments.length > 0}
|
||||
<div>
|
||||
<!-- attachments -->
|
||||
<h2 class="text-2xl font-bold mt-4">{$t('adventures.attachments')}</h2>
|
||||
<h2 class="text-2xl font-bold mt-4">
|
||||
{$t('adventures.attachments')}
|
||||
<div class="tooltip z-10" data-tip={$t('adventures.gpx_tip')}>
|
||||
<button class="btn btn-sm btn-circle btn-neutral">
|
||||
<LightbulbOn class="w-6 h-6" />
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
<div class="grid gap-4 mt-4">
|
||||
{#if adventure.attachments && adventure.attachments.length > 0}
|
||||
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<h2 class="text-3xl font-bold text-center m-4">Adventures</h2>
|
||||
<div class="flex flex-wrap gap-4 mr-4 ml-4 justify-center content-center">
|
||||
{#each adventures as adventure}
|
||||
<AdventureCard {adventure} user={data.user} />
|
||||
<AdventureCard {adventure} user={null} />
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -97,3 +97,8 @@
|
|||
{$t('adventures.no_results')}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<svelte:head>
|
||||
<title>Search: {query}</title>
|
||||
<meta name="description" content="AdventureLog global search results for {query}" />
|
||||
</svelte:head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue