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

Enhance geocoding functionality with host resolution and improved error handling; update AdventureModal for loading state management; refine LocationDropdown toast display logic; adjust world travel page for better documentation link visibility.

This commit is contained in:
Sean Morley 2025-05-23 10:46:37 -04:00
parent 0d800e8986
commit 2ccb8f5e0b
5 changed files with 54 additions and 17 deletions

View file

@ -177,6 +177,8 @@
let wikiImageError: string = '';
let triggerMarkVisted: boolean = false;
let isLoading: boolean = false;
images = adventure.images || [];
$: {
if (!adventure.rating) {
@ -414,6 +416,7 @@
async function handleSubmit(event: Event) {
event.preventDefault();
triggerMarkVisted = true;
isLoading = true;
// if category icon is empty, set it to the default icon
if (adventure.category?.icon == '' || adventure.category?.icon == null) {
@ -477,6 +480,7 @@
}
}
imageSearch = adventure.name;
isLoading = false;
}
</script>
@ -669,7 +673,14 @@
</div>
{/if}
<div class="flex flex-row gap-2">
<button type="submit" class="btn btn-primary">{$t('adventures.save_next')}</button>
{#if !isLoading}
<button type="submit" class="btn btn-primary">{$t('adventures.save_next')}</button
>
{:else}
<button type="button" class="btn btn-primary"
><span class="loading loading-spinner loading-md"></span></button
>
{/if}
<button type="button" class="btn" on:click={close}>{$t('about.close')}</button>
</div>
</div>

View file

@ -55,7 +55,7 @@
}
$: if (triggerMarkVisted && willBeMarkedVisited) {
displaySuccessToast(); // since the server will trigger the geocode automatically, we just need to show the toast and let the server handle the rest. It's kinda a placebo effect...
displaySuccessToast(); // since the server will trigger the geocode automatically, we just need to show the toast and let the server handle the rest. It's kinda a placebo effect
triggerMarkVisted = false;
}