1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-05 05:05:17 +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;
}

View file

@ -165,13 +165,16 @@
{#if filteredCountries.length === 0}
<p class="text-center font-bold text-2xl mt-12">{$t('worldtravel.no_countries_found')}</p>
<div class="text-center mt-4">
<a
class="link link-primary"
href="https://adventurelog.app/docs/configuration/updating.html#updating-the-region-data"
target="_blank">{$t('settings.documentation_link')}</a
>
</div>
<!-- If there are no allCountries then likely the download country command has not run on the server -->
{#if allCountries.length === 0}
<div class="text-center mt-4">
<a
class="link link-primary"
href="https://adventurelog.app/docs/configuration/updating.html#updating-the-region-data"
target="_blank">{$t('settings.documentation_link')}</a
>
</div>
{/if}
{/if}
<svelte:head>