1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-29 01:39:36 +02:00

Enhance category management: update adventure category assignment logic, improve category display in UI components, and add dynamic sorting for category dropdown

This commit is contained in:
Sean Morley 2024-11-26 20:06:52 -05:00
parent adf45ff557
commit f878167a36
6 changed files with 441 additions and 429 deletions

View file

@ -122,6 +122,7 @@ export default defineConfig({
}, },
{ {
text: "Changelogs", text: "Changelogs",
collapsed: false,
items: [ items: [
{ {
text: "v0.7.1", text: "v0.7.1",

View file

@ -405,16 +405,20 @@
console.log(adventure); console.log(adventure);
if (adventure.id === '') { if (adventure.id === '') {
console.log(categories); console.log(categories);
if (categories.some((category) => category.name === 'general')) { if (adventure.category?.display_name == '') {
adventure.category = categories.find((category) => category.name === 'general') as Category; if (categories.some((category) => category.name === 'general')) {
} else { adventure.category = categories.find(
adventure.category = { (category) => category.name === 'general'
id: '', ) as Category;
name: 'general', } else {
display_name: 'General', adventure.category = {
icon: '🌍', id: '',
user_id: '' name: 'general',
}; display_name: 'General',
icon: '🌍',
user_id: ''
};
}
} }
let res = await fetch('/api/adventures', { let res = await fetch('/api/adventures', {
method: 'POST', method: 'POST',

View file

@ -77,16 +77,19 @@
> >
</div> </div>
<div class="flex flex-wrap gap-2 mt-2"> <div class="flex flex-wrap gap-2 mt-2">
<!-- svelte-ignore a11y-no-static-element-interactions --> <!-- Sort the categories dynamically before rendering -->
{#each categories as category} {#each categories
<!-- svelte-ignore a11y-click-events-have-key-events --> .slice()
<!-- svelte-ignore a11y-no-static-element-interactions --> .sort((a, b) => (b.num_adventures || 0) - (a.num_adventures || 0)) as category}
<div <button
type="button"
class="btn btn-neutral flex items-center space-x-2" class="btn btn-neutral flex items-center space-x-2"
on:click={() => selectCategory(category)} on:click={() => selectCategory(category)}
role="option"
aria-selected={selected_category && selected_category.id === category.id}
> >
<span>{category.display_name} {category.icon} ({category.num_adventures})</span> <span>{category.display_name} {category.icon} ({category.num_adventures})</span>
</div> </button>
{/each} {/each}
</div> </div>
</div> </div>

View file

@ -6,6 +6,8 @@
let modal: HTMLDialogElement; let modal: HTMLDialogElement;
import { t } from 'svelte-i18n'; import { t } from 'svelte-i18n';
import InformationSlabCircle from '~icons/mdi/information-slab-circle';
export let categories: Category[] = []; export let categories: Category[] = [];
let category_to_edit: Category | null = null; let category_to_edit: Category | null = null;
@ -86,6 +88,8 @@
<button on:click={removeCategory(category)} class="btn btn-warning btn-sm" <button on:click={removeCategory(category)} class="btn btn-warning btn-sm"
>{$t('adventures.remove')}</button >{$t('adventures.remove')}</button
> >
{:else}
<button class="btn btn-warning btn-sm btn-disabled">{$t('adventures.remove')}</button>
{/if} {/if}
</div> </div>
</div> </div>

View file

@ -1,414 +1,414 @@
{ {
"navbar": { "navbar": {
"adventures": "Adventures", "adventures": "Adventures",
"collections": "Collections", "collections": "Collections",
"worldtravel": "World Travel", "worldtravel": "World Travel",
"map": "Map", "map": "Map",
"users": "Users", "users": "Users",
"search": "Search", "search": "Search",
"profile": "Profile", "profile": "Profile",
"greeting": "Hi", "greeting": "Hi",
"my_adventures": "My Adventures", "my_adventures": "My Adventures",
"my_tags": "My Tags", "my_tags": "My Tags",
"tag": "Tag", "tag": "Tag",
"shared_with_me": "Shared With Me", "shared_with_me": "Shared With Me",
"settings": "Settings", "settings": "Settings",
"logout": "Logout", "logout": "Logout",
"about": "About AdventureLog", "about": "About AdventureLog",
"documentation": "Documentation", "documentation": "Documentation",
"discord": "Discord", "discord": "Discord",
"language_selection": "Language", "language_selection": "Language",
"support": "Support", "support": "Support",
"theme_selection": "Theme Selection", "theme_selection": "Theme Selection",
"themes": { "themes": {
"light": "Light", "light": "Light",
"dark": "Dark", "dark": "Dark",
"night": "Night", "night": "Night",
"forest": "Forest", "forest": "Forest",
"aestheticLight": "Aesthetic Light", "aestheticLight": "Aesthetic Light",
"aestheticDark": "Aesthetic Dark", "aestheticDark": "Aesthetic Dark",
"aqua": "Aqua" "aqua": "Aqua"
} }
}, },
"about": { "about": {
"about": "About", "about": "About",
"license": "Licensed under the GPL-3.0 License.", "license": "Licensed under the GPL-3.0 License.",
"source_code": "Source Code", "source_code": "Source Code",
"message": "Made with ❤️ in the United States.", "message": "Made with ❤️ in the United States.",
"oss_attributions": "Open Source Attributions", "oss_attributions": "Open Source Attributions",
"nominatim_1": "Location Search and Geocoding is provided by", "nominatim_1": "Location Search and Geocoding is provided by",
"nominatim_2": "Their data is liscensed under the ODbL license.", "nominatim_2": "Their data is liscensed under the ODbL license.",
"other_attributions": "Additional attributions can be found in the README file.", "other_attributions": "Additional attributions can be found in the README file.",
"close": "Close" "close": "Close"
}, },
"home": { "home": {
"hero_1": "Discover the World's Most Thrilling Adventures", "hero_1": "Discover the World's Most Thrilling Adventures",
"hero_2": "Discover and plan your next adventure with AdventureLog. Explore breathtaking destinations, create custom itineraries, and stay connected on the go.", "hero_2": "Discover and plan your next adventure with AdventureLog. Explore breathtaking destinations, create custom itineraries, and stay connected on the go.",
"go_to": "Go To AdventureLog", "go_to": "Go To AdventureLog",
"key_features": "Key Features", "key_features": "Key Features",
"desc_1": "Discover, Plan, and Explore with Ease", "desc_1": "Discover, Plan, and Explore with Ease",
"desc_2": "AdventureLog is designed to simplify your journey, providing you with the tools and resources to plan, pack, and navigate your next unforgettable adventure.", "desc_2": "AdventureLog is designed to simplify your journey, providing you with the tools and resources to plan, pack, and navigate your next unforgettable adventure.",
"feature_1": "Travel Log", "feature_1": "Travel Log",
"feature_1_desc": "Keep track of your adventures with a personalized travel log and share your experiences with friends and family.", "feature_1_desc": "Keep track of your adventures with a personalized travel log and share your experiences with friends and family.",
"feature_2": "Trip Planning", "feature_2": "Trip Planning",
"feature_2_desc": "Easily create custom itineraries and get a day-by-day breakdown of your trip.", "feature_2_desc": "Easily create custom itineraries and get a day-by-day breakdown of your trip.",
"feature_3": "Travel Map", "feature_3": "Travel Map",
"feature_3_desc": "View your travels throughout the world with an interactive map and explore new destinations." "feature_3_desc": "View your travels throughout the world with an interactive map and explore new destinations."
}, },
"adventures": { "adventures": {
"collection_remove_success": "Adventure removed from collection successfully!", "collection_remove_success": "Adventure removed from collection successfully!",
"collection_remove_error": "Error removing adventure from collection", "collection_remove_error": "Error removing adventure from collection",
"collection_link_success": "Adventure linked to collection successfully!", "collection_link_success": "Adventure linked to collection successfully!",
"no_image_found": "No image found", "no_image_found": "No image found",
"collection_link_error": "Error linking adventure to collection", "collection_link_error": "Error linking adventure to collection",
"adventure_delete_confirm": "Are you sure you want to delete this adventure? This action cannot be undone.", "adventure_delete_confirm": "Are you sure you want to delete this adventure? This action cannot be undone.",
"open_details": "Open Details", "open_details": "Open Details",
"edit_adventure": "Edit Adventure", "edit_adventure": "Edit Adventure",
"remove_from_collection": "Remove from Collection", "remove_from_collection": "Remove from Collection",
"add_to_collection": "Add to Collection", "add_to_collection": "Add to Collection",
"delete": "Delete", "delete": "Delete",
"not_found": "Adventure not found", "not_found": "Adventure not found",
"not_found_desc": "The adventure you were looking for could not be found. Please try a different adventure or check back later.", "not_found_desc": "The adventure you were looking for could not be found. Please try a different adventure or check back later.",
"homepage": "Homepage", "homepage": "Homepage",
"adventure_details": "Adventure Details", "adventure_details": "Adventure Details",
"collection": "Collection", "collection": "Collection",
"adventure_type": "Adventure Type", "adventure_type": "Adventure Type",
"longitude": "Longitude", "longitude": "Longitude",
"latitude": "Latitude", "latitude": "Latitude",
"visit": "Visit", "visit": "Visit",
"visits": "Visits", "visits": "Visits",
"create_new": "Create New...", "create_new": "Create New...",
"adventure": "Adventure", "adventure": "Adventure",
"count_txt": "results matching your search", "count_txt": "results matching your search",
"sort": "Sort", "sort": "Sort",
"order_by": "Order By", "order_by": "Order By",
"order_direction": "Order Direction", "order_direction": "Order Direction",
"ascending": "Ascending", "ascending": "Ascending",
"descending": "Descending", "descending": "Descending",
"updated": "Updated", "updated": "Updated",
"name": "Name", "name": "Name",
"date": "Date", "date": "Date",
"activity_types": "Activity Types", "activity_types": "Activity Types",
"tags": "Tags", "tags": "Tags",
"add_a_tag": "Add a tag", "add_a_tag": "Add a tag",
"date_constrain": "Constrain to collection dates", "date_constrain": "Constrain to collection dates",
"rating": "Rating", "rating": "Rating",
"my_images": "My Images", "my_images": "My Images",
"add_an_activity": "Add an activity", "add_an_activity": "Add an activity",
"no_images": "No Images", "no_images": "No Images",
"upload_images_here": "Upload images here", "upload_images_here": "Upload images here",
"share_adventure": "Share this Adventure!", "share_adventure": "Share this Adventure!",
"copy_link": "Copy Link", "copy_link": "Copy Link",
"image": "Image", "image": "Image",
"upload_image": "Upload Image", "upload_image": "Upload Image",
"url": "URL", "url": "URL",
"fetch_image": "Fetch Image", "fetch_image": "Fetch Image",
"wikipedia": "Wikipedia", "wikipedia": "Wikipedia",
"add_notes": "Add notes", "add_notes": "Add notes",
"warning": "Warning", "warning": "Warning",
"my_adventures": "My Adventures", "my_adventures": "My Adventures",
"no_linkable_adventures": "No adventures found that can be linked to this collection.", "no_linkable_adventures": "No adventures found that can be linked to this collection.",
"add": "Add", "add": "Add",
"save_next": "Save & Next", "save_next": "Save & Next",
"end_date": "End Date", "end_date": "End Date",
"my_visits": "My Visits", "my_visits": "My Visits",
"start_date": "Start Date", "start_date": "Start Date",
"remove": "Remove", "remove": "Remove",
"location": "Location", "location": "Location",
"search_for_location": "Search for a location", "search_for_location": "Search for a location",
"clear_map": "Clear map", "clear_map": "Clear map",
"search_results": "Searh results", "search_results": "Searh results",
"no_results": "No results found", "no_results": "No results found",
"wiki_desc": "Pulls excerpt from Wikipedia article matching the name of the adventure.", "wiki_desc": "Pulls excerpt from Wikipedia article matching the name of the adventure.",
"generate_desc": "Generate Description", "generate_desc": "Generate Description",
"public_adventure": "Public Adventure", "public_adventure": "Public Adventure",
"location_information": "Location Information", "location_information": "Location Information",
"link": "Link", "link": "Link",
"links": "Links", "links": "Links",
"description": "Description", "description": "Description",
"sources": "Sources", "sources": "Sources",
"collection_adventures": "Include Collection Adventures", "collection_adventures": "Include Collection Adventures",
"filter": "Filter", "filter": "Filter",
"category_filter": "Category Filter", "category_filter": "Category Filter",
"category": "Category", "category": "Category",
"select_adventure_category": "Select Adventure Category", "select_adventure_category": "Select Adventure Category",
"clear": "Clear", "clear": "Clear",
"my_collections": "My Collections", "my_collections": "My Collections",
"open_filters": "Open Filters", "open_filters": "Open Filters",
"close_filters": "Close Filters", "close_filters": "Close Filters",
"archived_collections": "Archived Collections", "archived_collections": "Archived Collections",
"share": "Share", "share": "Share",
"private": "Private", "private": "Private",
"public": "Public", "public": "Public",
"archived": "Archived", "archived": "Archived",
"edit_collection": "Edit Collection", "edit_collection": "Edit Collection",
"unarchive": "Unarchive", "unarchive": "Unarchive",
"archive": "Archive", "archive": "Archive",
"no_collections_found": "No collections found to add this adventure to.", "no_collections_found": "No collections found to add this adventure to.",
"not_visited": "Not Visited", "not_visited": "Not Visited",
"archived_collection_message": "Collection archived successfully!", "archived_collection_message": "Collection archived successfully!",
"unarchived_collection_message": "Collection unarchived successfully!", "unarchived_collection_message": "Collection unarchived successfully!",
"delete_collection_success": "Collection deleted 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.", "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", "cancel": "Cancel",
"delete_collection": "Delete Collection", "delete_collection": "Delete Collection",
"delete_adventure": "Delete Adventure", "delete_adventure": "Delete Adventure",
"adventure_delete_success": "Adventure deleted successfully!", "adventure_delete_success": "Adventure deleted successfully!",
"visited": "Visited", "visited": "Visited",
"planned": "Planned", "planned": "Planned",
"duration": "Duration", "duration": "Duration",
"all": "All", "all": "All",
"image_removed_success": "Image removed successfully!", "image_removed_success": "Image removed successfully!",
"image_removed_error": "Error removing image", "image_removed_error": "Error removing image",
"no_image_url": "No image found at that URL.", "no_image_url": "No image found at that URL.",
"image_upload_success": "Image uploaded successfully!", "image_upload_success": "Image uploaded successfully!",
"image_upload_error": "Error uploading image", "image_upload_error": "Error uploading image",
"dates": "Dates", "dates": "Dates",
"wiki_image_error": "Error fetching image from Wikipedia", "wiki_image_error": "Error fetching image from Wikipedia",
"start_before_end_error": "Start date must be before end date", "start_before_end_error": "Start date must be before end date",
"activity": "Activity", "activity": "Activity",
"actions": "Actions", "actions": "Actions",
"no_end_date": "Please enter an end date", "no_end_date": "Please enter an end date",
"see_adventures": "See Adventures", "see_adventures": "See Adventures",
"image_fetch_failed": "Failed to fetch image", "image_fetch_failed": "Failed to fetch image",
"no_location": "Please enter a location", "no_location": "Please enter a location",
"no_start_date": "Please enter a start date", "no_start_date": "Please enter a start date",
"no_description_found": "No description found", "no_description_found": "No description found",
"adventure_created": "Adventure created", "adventure_created": "Adventure created",
"adventure_create_error": "Failed to create adventure", "adventure_create_error": "Failed to create adventure",
"adventure_updated": "Adventure updated", "adventure_updated": "Adventure updated",
"adventure_update_error": "Failed to update adventure", "adventure_update_error": "Failed to update adventure",
"set_to_pin": "Set to Pin", "set_to_pin": "Set to Pin",
"category_fetch_error": "Error fetching categories", "category_fetch_error": "Error fetching categories",
"new_adventure": "New Adventure", "new_adventure": "New Adventure",
"basic_information": "Basic Information", "basic_information": "Basic Information",
"adventure_not_found": "There are no adventures to display. Add some using the plus button at the bottom right or try changing filters!", "adventure_not_found": "There are no adventures to display. Add some using the plus button at the bottom right or try changing filters!",
"no_adventures_found": "No adventures found", "no_adventures_found": "No adventures found",
"mark_region_as_visited": "Mark region {region}, {country} as visited?", "mark_region_as_visited": "Mark region {region}, {country} as visited?",
"mark_visited": "Mark Visited", "mark_visited": "Mark Visited",
"error_updating_regions": "Error updating regions", "error_updating_regions": "Error updating regions",
"regions_updated": "regions updated", "regions_updated": "regions updated",
"visited_region_check": "Visited Region Check", "visited_region_check": "Visited Region Check",
"visited_region_check_desc": "By selecting this, the server will check all of your visited adventures and mark the regions they are located in as visited in world travel.", "visited_region_check_desc": "By selecting this, the server will check all of your visited adventures and mark the regions they are located in as visited in world travel.",
"update_visited_regions": "Update Visited Regions", "update_visited_regions": "Update Visited Regions",
"update_visited_regions_disclaimer": "This may take a while depending on the number of adventures you have visited.", "update_visited_regions_disclaimer": "This may take a while depending on the number of adventures you have visited.",
"link_new": "Link New...", "link_new": "Link New...",
"add_new": "Add New...", "add_new": "Add New...",
"transportation": "Transportation", "transportation": "Transportation",
"note": "Note", "note": "Note",
"checklist": "Checklist", "checklist": "Checklist",
"collection_archived": "This collection has been archived.", "collection_archived": "This collection has been archived.",
"visit_link": "Visit Link", "visit_link": "Visit Link",
"collection_completed": "You've completed this collection!", "collection_completed": "You've completed this collection!",
"collection_stats": "Collection Stats", "collection_stats": "Collection Stats",
"keep_exploring": "Keep Exploring!", "keep_exploring": "Keep Exploring!",
"linked_adventures": "Linked Adventures", "linked_adventures": "Linked Adventures",
"notes": "Notes", "notes": "Notes",
"checklists": "Checklists", "checklists": "Checklists",
"transportations": "Transportations", "transportations": "Transportations",
"day": "Day", "day": "Day",
"itineary_by_date": "Itinerary by Date", "itineary_by_date": "Itinerary by Date",
"nothing_planned": "Nothing planned for this day. Enjoy the journey!", "nothing_planned": "Nothing planned for this day. Enjoy the journey!",
"days": "days", "days": "days",
"activities": { "activities": {
"general": "General 🌍", "general": "General 🌍",
"outdoor": "Outdoor 🏞️", "outdoor": "Outdoor 🏞️",
"lodging": "Lodging 🛌", "lodging": "Lodging 🛌",
"dining": "Dining 🍽️", "dining": "Dining 🍽️",
"activity": "Activity 🏄", "activity": "Activity 🏄",
"attraction": "Attraction 🎢", "attraction": "Attraction 🎢",
"shopping": "Shopping 🛍️", "shopping": "Shopping 🛍️",
"nightlife": "Nightlife 🌃", "nightlife": "Nightlife 🌃",
"event": "Event 🎉", "event": "Event 🎉",
"transportation": "Transportation 🚗", "transportation": "Transportation 🚗",
"culture": "Culture 🎭", "culture": "Culture 🎭",
"water_sports": "Water Sports 🚤", "water_sports": "Water Sports 🚤",
"hiking": "Hiking 🥾", "hiking": "Hiking 🥾",
"wildlife": "Wildlife 🦒", "wildlife": "Wildlife 🦒",
"historical_sites": "Historical Sites 🏛️", "historical_sites": "Historical Sites 🏛️",
"music_concerts": "Music & Concerts 🎶", "music_concerts": "Music & Concerts 🎶",
"fitness": "Fitness 🏋️", "fitness": "Fitness 🏋️",
"art_museums": "Art & Museums 🎨", "art_museums": "Art & Museums 🎨",
"festivals": "Festivals 🎪", "festivals": "Festivals 🎪",
"spiritual_journeys": "Spiritual Journeys 🧘‍♀️", "spiritual_journeys": "Spiritual Journeys 🧘‍♀️",
"volunteer_work": "Volunteer Work 🤝", "volunteer_work": "Volunteer Work 🤝",
"other": "Other" "other": "Other"
} }
}, },
"worldtravel": { "worldtravel": {
"country_list": "Country List", "country_list": "Country List",
"num_countries": "countries found", "num_countries": "countries found",
"all": "All", "all": "All",
"partially_visited": "Partially Visited", "partially_visited": "Partially Visited",
"not_visited": "Not Visited", "not_visited": "Not Visited",
"completely_visited": "Completely Visited", "completely_visited": "Completely Visited",
"all_subregions": "All Subregions", "all_subregions": "All Subregions",
"clear_search": "Clear Search", "clear_search": "Clear Search",
"no_countries_found": "No countries found" "no_countries_found": "No countries found"
}, },
"auth": { "auth": {
"username": "Username", "username": "Username",
"password": "Password", "password": "Password",
"forgot_password": "Forgot Password?", "forgot_password": "Forgot Password?",
"signup": "Signup", "signup": "Signup",
"login_error": "Unable to login with the provided credentials.", "login_error": "Unable to login with the provided credentials.",
"login": "Login", "login": "Login",
"email": "Email", "email": "Email",
"first_name": "First Name", "first_name": "First Name",
"last_name": "Last Name", "last_name": "Last Name",
"confirm_password": "Confirm Password", "confirm_password": "Confirm Password",
"registration_disabled": "Registration is currently disabled.", "registration_disabled": "Registration is currently disabled.",
"profile_picture": "Profile Picture", "profile_picture": "Profile Picture",
"public_profile": "Public Profile", "public_profile": "Public Profile",
"public_tooltip": "With a public profile, users can share collections with you and view your profile on the users page." "public_tooltip": "With a public profile, users can share collections with you and view your profile on the users page."
}, },
"users": { "users": {
"no_users_found": "No users found with public profiles." "no_users_found": "No users found with public profiles."
}, },
"settings": { "settings": {
"update_error": "Error updating settings", "update_error": "Error updating settings",
"update_success": "Settings updated successfully!", "update_success": "Settings updated successfully!",
"settings_page": "Settings Page", "settings_page": "Settings Page",
"account_settings": "User Account Settings", "account_settings": "User Account Settings",
"update": "Update", "update": "Update",
"password_change": "Change Password", "password_change": "Change Password",
"new_password": "New Password", "new_password": "New Password",
"confirm_new_password": "Confirm New Password", "confirm_new_password": "Confirm New Password",
"email_change": "Change Email", "email_change": "Change Email",
"current_email": "Current Email", "current_email": "Current Email",
"no_email_set": "No email set", "no_email_set": "No email set",
"new_email": "New Email", "new_email": "New Email",
"change_password": "Change Password", "change_password": "Change Password",
"login_redir": "You will then be redirected to the login page.", "login_redir": "You will then be redirected to the login page.",
"token_required": "Token and UID are required for password reset.", "token_required": "Token and UID are required for password reset.",
"reset_password": "Reset Password", "reset_password": "Reset Password",
"possible_reset": "If the email address you provided is associated with an account, you will receive an email with instructions to reset your password!", "possible_reset": "If the email address you provided is associated with an account, you will receive an email with instructions to reset your password!",
"missing_email": "Please enter an email address", "missing_email": "Please enter an email address",
"submit": "Submit", "submit": "Submit",
"password_does_not_match": "Passwords do not match", "password_does_not_match": "Passwords do not match",
"password_is_required": "Password is required", "password_is_required": "Password is required",
"invalid_token": "Token is invalid or has expired", "invalid_token": "Token is invalid or has expired",
"about_this_background": "About this background", "about_this_background": "About this background",
"photo_by": "Photo by", "photo_by": "Photo by",
"join_discord": "Join the Discord", "join_discord": "Join the Discord",
"join_discord_desc": "to share your own photos. Post them in the #travel-share channel." "join_discord_desc": "to share your own photos. Post them in the #travel-share channel."
}, },
"collection": { "collection": {
"collection_created": "Collection created successfully!", "collection_created": "Collection created successfully!",
"error_creating_collection": "Error creating collection", "error_creating_collection": "Error creating collection",
"new_collection": "New Collection", "new_collection": "New Collection",
"create": "Create", "create": "Create",
"collection_edit_success": "Collection edited successfully!", "collection_edit_success": "Collection edited successfully!",
"error_editing_collection": "Error editing collection", "error_editing_collection": "Error editing collection",
"edit_collection": "Edit Collection" "edit_collection": "Edit Collection"
}, },
"notes": { "notes": {
"note_deleted": "Note deleted successfully!", "note_deleted": "Note deleted successfully!",
"note_delete_error": "Error deleting note", "note_delete_error": "Error deleting note",
"open": "Open", "open": "Open",
"failed_to_save": "Failed to save note", "failed_to_save": "Failed to save note",
"note_editor": "Note Editor", "note_editor": "Note Editor",
"editing_note": "Editing note", "editing_note": "Editing note",
"content": "Content", "content": "Content",
"save": "Save", "save": "Save",
"note_public": "This note is public because it is in a public collection.", "note_public": "This note is public because it is in a public collection.",
"add_a_link": "Add a link", "add_a_link": "Add a link",
"invalid_url": "Invalid URL" "invalid_url": "Invalid URL"
}, },
"checklist": { "checklist": {
"checklist_deleted": "Checklist deleted successfully!", "checklist_deleted": "Checklist deleted successfully!",
"checklist_delete_error": "Error deleting checklist", "checklist_delete_error": "Error deleting checklist",
"failed_to_save": "Failed to save checklist", "failed_to_save": "Failed to save checklist",
"checklist_editor": "Checklist Editor", "checklist_editor": "Checklist Editor",
"editing_checklist": "Editing checklist", "editing_checklist": "Editing checklist",
"item": "Item", "item": "Item",
"items": "Items", "items": "Items",
"add_item": "Add Item", "add_item": "Add Item",
"new_item": "New Item", "new_item": "New Item",
"save": "Save", "save": "Save",
"checklist_public": "This checklist is public because it is in a public collection.", "checklist_public": "This checklist is public because it is in a public collection.",
"item_cannot_be_empty": "Item cannot be empty", "item_cannot_be_empty": "Item cannot be empty",
"item_already_exists": "Item already exists" "item_already_exists": "Item already exists"
}, },
"transportation": { "transportation": {
"transportation_deleted": "Transportation deleted successfully!", "transportation_deleted": "Transportation deleted successfully!",
"transportation_delete_error": "Error deleting transportation", "transportation_delete_error": "Error deleting transportation",
"provide_start_date": "Please provide a start date", "provide_start_date": "Please provide a start date",
"transport_type": "Transport Type", "transport_type": "Transport Type",
"type": "Type", "type": "Type",
"transportation_added": "Transportation added successfully!", "transportation_added": "Transportation added successfully!",
"error_editing_transportation": "Error editing transportation", "error_editing_transportation": "Error editing transportation",
"new_transportation": "New Transportation", "new_transportation": "New Transportation",
"date_time": "Start Date & Time", "date_time": "Start Date & Time",
"end_date_time": "End Date & Time", "end_date_time": "End Date & Time",
"flight_number": "Flight Number", "flight_number": "Flight Number",
"from_location": "From Location", "from_location": "From Location",
"to_location": "To Location", "to_location": "To Location",
"edit": "Edit", "edit": "Edit",
"modes": { "modes": {
"car": "Car", "car": "Car",
"plane": "Plane", "plane": "Plane",
"train": "Train", "train": "Train",
"bus": "Bus", "bus": "Bus",
"boat": "Boat", "boat": "Boat",
"bike": "Bike", "bike": "Bike",
"walking": "Walking", "walking": "Walking",
"other": "Other" "other": "Other"
}, },
"transportation_edit_success": "Transportation edited successfully!", "transportation_edit_success": "Transportation edited successfully!",
"edit_transportation": "Edit Transportation", "edit_transportation": "Edit Transportation",
"start": "Start", "start": "Start",
"date_and_time": "Date & Time" "date_and_time": "Date & Time"
}, },
"search": { "search": {
"adventurelog_results": "AdventureLog Results", "adventurelog_results": "AdventureLog Results",
"public_adventures": "Public Adventures", "public_adventures": "Public Adventures",
"online_results": "Online Results" "online_results": "Online Results"
}, },
"map": { "map": {
"view_details": "View Details", "view_details": "View Details",
"adventure_map": "Adventure Map", "adventure_map": "Adventure Map",
"map_options": "Map Options", "map_options": "Map Options",
"show_visited_regions": "Show Visited Regions", "show_visited_regions": "Show Visited Regions",
"add_adventure_at_marker": "Add New Adventure at Marker", "add_adventure_at_marker": "Add New Adventure at Marker",
"clear_marker": "Clear Marker", "clear_marker": "Clear Marker",
"add_adventure": "Add New Adventure" "add_adventure": "Add New Adventure"
}, },
"share": { "share": {
"shared": "Shared", "shared": "Shared",
"with": "with", "with": "with",
"unshared": "Unshared", "unshared": "Unshared",
"share_desc": "Share this collection with other users.", "share_desc": "Share this collection with other users.",
"shared_with": "Shared With", "shared_with": "Shared With",
"no_users_shared": "No users shared with", "no_users_shared": "No users shared with",
"not_shared_with": "Not Shared With", "not_shared_with": "Not Shared With",
"no_shared_found": "No collections found that are shared with you.", "no_shared_found": "No collections found that are shared with you.",
"set_public": "In order to allow users to share with you, you need your profile set to public.", "set_public": "In order to allow users to share with you, you need your profile set to public.",
"go_to_settings": "Go to settings" "go_to_settings": "Go to settings"
}, },
"languages": { "languages": {
"en": "English", "en": "English",
"de": "German", "de": "German",
"es": "Spanish", "es": "Spanish",
"fr": "French", "fr": "French",
"it": "Italian", "it": "Italian",
"nl": "Dutch", "nl": "Dutch",
"sv": "Swedish", "sv": "Swedish",
"zh": "Chinese" "zh": "Chinese"
}, },
"profile": { "profile": {
"member_since": "Member since", "member_since": "Member since",
"user_stats": "User Stats", "user_stats": "User Stats",
"visited_countries": "Visited Countries", "visited_countries": "Visited Countries",
"visited_regions": "Visited Regions" "visited_regions": "Visited Regions"
}, },
"categories": { "categories": {
"manage_categories": "Manage Categories", "manage_categories": "Manage Categories",
"no_categories_found": "No categories found.", "no_categories_found": "No categories found.",
"edit_category": "Edit Category", "edit_category": "Edit Category",
"icon": "Icon", "icon": "Icon",
"update_after_refresh": "The adventure cards will be updated once you refresh the page.", "update_after_refresh": "The adventure cards will be updated once you refresh the page.",
"select_category": "Select Category", "select_category": "Select Category",
"category_name": "Category Name" "category_name": "Category Name"
} }
} }

View file

@ -126,7 +126,7 @@
on:click={togglePopup} on:click={togglePopup}
> >
<span class="text-xl"> <span class="text-xl">
{adventure.category?.display_name + ' ' + adventure.category?.icon} {adventure.category?.icon}
</span> </span>
{#if isPopupOpen} {#if isPopupOpen}
<Popup openOn="click" offset={[0, -10]} on:close={() => (isPopupOpen = false)}> <Popup openOn="click" offset={[0, -10]} on:close={() => (isPopupOpen = false)}>