mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-22 22:39:36 +02:00
feat: Add lodging types icons and update related components
This commit is contained in:
parent
a640934370
commit
c2fc249c92
3 changed files with 21 additions and 11 deletions
|
@ -324,6 +324,20 @@ export let ADVENTURE_TYPE_ICONS = {
|
||||||
other: '❓'
|
other: '❓'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export let LODGING_TYPES_ICONS = {
|
||||||
|
hotel: '🏨',
|
||||||
|
hostel: '🛏️',
|
||||||
|
resort: '🏝️',
|
||||||
|
bnb: '🍳',
|
||||||
|
campground: '🏕️',
|
||||||
|
cabin: '🏚️',
|
||||||
|
apartment: '🏢',
|
||||||
|
house: '🏠',
|
||||||
|
villa: '🏡',
|
||||||
|
motel: '🚗🏨',
|
||||||
|
other: '❓'
|
||||||
|
};
|
||||||
|
|
||||||
export function getAdventureTypeLabel(type: string) {
|
export function getAdventureTypeLabel(type: string) {
|
||||||
// return the emoji ADVENTURE_TYPE_ICONS label for the given type if not found return ? emoji
|
// return the emoji ADVENTURE_TYPE_ICONS label for the given type if not found return ? emoji
|
||||||
if (type in ADVENTURE_TYPE_ICONS) {
|
if (type in ADVENTURE_TYPE_ICONS) {
|
||||||
|
|
|
@ -203,7 +203,7 @@
|
||||||
"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",
|
||||||
"no_adventures_to_recommendations": "No adventures found. Add at leat one adventure to get recommendations.",
|
"no_adventures_to_recommendations": "No adventures found. Add at least one adventure to get recommendations.",
|
||||||
"display_name": "Display Name",
|
"display_name": "Display Name",
|
||||||
"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",
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
groupChecklistsByDate,
|
groupChecklistsByDate,
|
||||||
osmTagToEmoji,
|
osmTagToEmoji,
|
||||||
groupLodgingByDate,
|
groupLodgingByDate,
|
||||||
ADVENTURE_TYPE_ICONS
|
LODGING_TYPES_ICONS
|
||||||
} from '$lib';
|
} from '$lib';
|
||||||
import ChecklistCard from '$lib/components/ChecklistCard.svelte';
|
import ChecklistCard from '$lib/components/ChecklistCard.svelte';
|
||||||
import ChecklistModal from '$lib/components/ChecklistModal.svelte';
|
import ChecklistModal from '$lib/components/ChecklistModal.svelte';
|
||||||
|
@ -48,8 +48,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
function getLodgingIcon(type: string) {
|
function getLodgingIcon(type: string) {
|
||||||
if (type in ADVENTURE_TYPE_ICONS) {
|
if (type in LODGING_TYPES_ICONS) {
|
||||||
return ADVENTURE_TYPE_ICONS[type as keyof typeof ADVENTURE_TYPE_ICONS];
|
return LODGING_TYPES_ICONS[type as keyof typeof LODGING_TYPES_ICONS];
|
||||||
} else {
|
} else {
|
||||||
return '🏨';
|
return '🏨';
|
||||||
}
|
}
|
||||||
|
@ -613,10 +613,6 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if collection && !collection.start_date && adventures.length == 0 && transportations.length == 0 && notes.length == 0 && checklists.length == 0 && lodging.length == 0}
|
|
||||||
<NotFound error={undefined} />
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if collection.description}
|
{#if collection.description}
|
||||||
<div class="flex justify-center mt-4 max-w-screen-lg mx-auto">
|
<div class="flex justify-center mt-4 max-w-screen-lg mx-auto">
|
||||||
<article
|
<article
|
||||||
|
@ -1111,7 +1107,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="join flex items-center justify-center mt-4">
|
<div class="join flex items-center justify-center mt-4">
|
||||||
<input
|
<input
|
||||||
class="join-item btn"
|
class="join-item btn btn-neutral"
|
||||||
type="radio"
|
type="radio"
|
||||||
name="options"
|
name="options"
|
||||||
aria-label="Tourism"
|
aria-label="Tourism"
|
||||||
|
@ -1119,7 +1115,7 @@
|
||||||
on:click={() => (recomendationType = 'tourism')}
|
on:click={() => (recomendationType = 'tourism')}
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
class="join-item btn"
|
class="join-item btn btn-neutral"
|
||||||
type="radio"
|
type="radio"
|
||||||
name="options"
|
name="options"
|
||||||
aria-label="Food"
|
aria-label="Food"
|
||||||
|
@ -1127,7 +1123,7 @@
|
||||||
on:click={() => (recomendationType = 'food')}
|
on:click={() => (recomendationType = 'food')}
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
class="join-item btn"
|
class="join-item btn btn-neutral"
|
||||||
type="radio"
|
type="radio"
|
||||||
name="options"
|
name="options"
|
||||||
aria-label="Lodging"
|
aria-label="Lodging"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue