
-
+
{$page.status}
-
+
{$page.error?.message}
diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte
index 2ad1788a..16ee19dc 100644
--- a/web/src/routes/+page.svelte
+++ b/web/src/routes/+page.svelte
@@ -11,6 +11,9 @@
import { country_codes } from "$lib/util/country_code_util";
import { Canvas } from "@threlte/core";
import { _ } from "svelte-i18n";
+ import emptyStateTrailDark from "$lib/assets/svgs/empty_states/empty_state_trail_dark.svg";
+ import emptyStateTrailLight from "$lib/assets/svgs/empty_states/empty_state_trail_light.svg";
+ import { theme } from "$lib/stores/theme_store";
export let data;
@@ -110,20 +113,21 @@
class="flex flex-wrap justify-items-center gap-8 py-8 order-1 md:order-none"
>
{#if data.trails.length == 0}
-
-

-
+

+ {:else}
+ {#each { length: Math.min(data.trails.length, 4) } as _, i}
+
+
+ {/each}
{/if}
- {#each { length: Math.min(data.trails.length, 4) } as _, i}
-
-
- {/each}
{#if data.trails.length == 0}
diff --git a/web/src/routes/lists/+page.svelte b/web/src/routes/lists/+page.svelte
index 9ff6460d..57195973 100644
--- a/web/src/routes/lists/+page.svelte
+++ b/web/src/routes/lists/+page.svelte
@@ -9,6 +9,7 @@
import Select from "$lib/components/base/select.svelte";
import SkeletonCard from "$lib/components/base/skeleton_card.svelte";
import ConfirmModal from "$lib/components/confirm_modal.svelte";
+ import EmptyStateSearch from "$lib/components/empty_states/empty_state_search.svelte";
import ListCard from "$lib/components/list/list_card.svelte";
import ListPanel from "$lib/components/list/list_panel.svelte";
import ListShareModal from "$lib/components/list/list_share_modal.svelte";
@@ -104,8 +105,8 @@
) {
for (const trail of item.expand.trails) {
const gpxData: string = await fetchGPX(trail);
- if(!trail.expand) {
- (trail as any).expand = {}
+ if (!trail.expand) {
+ (trail as any).expand = {};
}
trail.expand!.gpx_data = gpxData;
}
@@ -321,6 +322,8 @@
{#each { length: 3 } as _, index}
{/each}
+ {:else if data.lists.items.length == 0}
+
{:else}
{#each data.lists.items as item, i}
diff --git a/web/src/routes/map/+page.svelte b/web/src/routes/map/+page.svelte
index df9934ab..9cf7ef1a 100644
--- a/web/src/routes/map/+page.svelte
+++ b/web/src/routes/map/+page.svelte
@@ -132,15 +132,6 @@
function handleMapInit() {
if (
- $page.url.searchParams.has("lat") &&
- $page.url.searchParams.has("lon")
- ) {
- const lat = $page.url.searchParams.get("lat");
- const lon = $page.url.searchParams.get("lon");
- map.setCenter([parseFloat(lon!), parseFloat(lat!)]);
- map.setZoom(14);
- console.log("Set map center to: " + lat + " " + lon);
- } else if (
$page.url.searchParams.has("tl_lat") &&
$page.url.searchParams.has("tl_lon") &&
$page.url.searchParams.has("br_lat") &&
@@ -157,6 +148,14 @@
],
];
map.fitBounds(boundingBox, { animate: false });
+ } else if (
+ $page.url.searchParams.has("lat") &&
+ $page.url.searchParams.has("lon")
+ ) {
+ const lat = $page.url.searchParams.get("lat");
+ const lon = $page.url.searchParams.get("lon");
+ map.setZoom(14);
+ map.setCenter([parseFloat(lon!), parseFloat(lat!)]);
} else if (settings && settings.mapFocus == "trails") {
const boundingBox: M.LngLatBoundsLike = [
[maxBoundingBox.min_lon, maxBoundingBox.max_lat],
@@ -168,15 +167,15 @@
settings.mapFocus == "location" &&
settings.location
) {
- map.setCenter([settings.location.lon, settings.location.lat]);
map.setZoom(12);
+ map.setCenter([settings.location.lon, settings.location.lat]);
} else {
navigator.geolocation.getCurrentPosition(
(position) => {
const lat = position.coords.latitude;
const lon = position.coords.longitude;
- map.setCenter([lon, lat]);
map.setZoom(12);
+ map.setCenter([lon, lat]);
},
(error) => {
console.error("Error getting user location:", error);
diff --git a/web/src/routes/profile/[id]/+page.svelte b/web/src/routes/profile/[id]/+page.svelte
index dafb3bc8..60ce1739 100644
--- a/web/src/routes/profile/[id]/+page.svelte
+++ b/web/src/routes/profile/[id]/+page.svelte
@@ -3,6 +3,9 @@
import { activities_index } from "$lib/stores/activity_store.js";
import { getFileURL } from "$lib/util/file_util.js";
import { _ } from "svelte-i18n";
+ import emptyStateTrailDark from "$lib/assets/svgs/empty_states/empty_state_trail_dark.svg";
+ import emptyStateTrailLight from "$lib/assets/svgs/empty_states/empty_state_trail_light.svg";
+ import { theme } from "$lib/stores/theme_store.js";
export let data;
@@ -86,7 +89,9 @@
class="w-full h-full object-cover transition-transform group-hover:scale-110"
src={list.avatar
? getFileURL(list, list.avatar)
- : "/imgs/default_list_thumbnail.webp"}
+ : $theme === "light"
+ ? emptyStateTrailLight
+ : emptyStateTrailDark}
alt="avatar"
/>
diff --git a/web/src/routes/trail/edit/[id]/+page.svelte b/web/src/routes/trail/edit/[id]/+page.svelte
index e80c6d8f..2f276160 100644
--- a/web/src/routes/trail/edit/[id]/+page.svelte
+++ b/web/src/routes/trail/edit/[id]/+page.svelte
@@ -67,6 +67,9 @@
import { backInOut } from "svelte/easing";
import { scale } from "svelte/transition";
import { z } from "zod";
+ import emptyStateTrailDark from "$lib/assets/svgs/empty_states/empty_state_trail_dark.svg";
+ import emptyStateTrailLight from "$lib/assets/svgs/empty_states/empty_state_trail_light.svg";
+ import { theme } from "$lib/stores/theme_store.js";
export let data;
@@ -851,7 +854,9 @@
class="w-8 aspect-square rounded-full object-cover"
src={list.avatar
? getFileURL(list, list.avatar)
- : "/imgs/default_list_thumbnail.webp"}
+ : $theme === "light"
+ ? emptyStateTrailLight
+ : emptyStateTrailDark}
alt="avatar"
/>
diff --git a/web/static/imgs/default_list_thumbnail.webp b/web/static/imgs/default_list_thumbnail.webp
deleted file mode 100644
index 15ce61ef..00000000
Binary files a/web/static/imgs/default_list_thumbnail.webp and /dev/null differ
diff --git a/web/static/imgs/default_thumbnail.webp b/web/static/imgs/default_thumbnail.webp
deleted file mode 100644
index beab0a0f..00000000
Binary files a/web/static/imgs/default_thumbnail.webp and /dev/null differ
diff --git a/web/static/imgs/empty_state.png b/web/static/imgs/empty_state.png
deleted file mode 100644
index f474a1f7..00000000
Binary files a/web/static/imgs/empty_state.png and /dev/null differ
diff --git a/web/static/imgs/error.webp b/web/static/imgs/error.webp
deleted file mode 100644
index 58ef6bb0..00000000
Binary files a/web/static/imgs/error.webp and /dev/null differ
diff --git a/web/static/imgs/hero.jpg b/web/static/imgs/hero.jpg
deleted file mode 100644
index aaedf44c..00000000
Binary files a/web/static/imgs/hero.jpg and /dev/null differ
diff --git a/web/static/imgs/logo_text_dark.png b/web/static/imgs/logo_text_dark.png
index 058ca9ad..89260e34 100644
Binary files a/web/static/imgs/logo_text_dark.png and b/web/static/imgs/logo_text_dark.png differ
diff --git a/web/static/imgs/logo_text_light.png b/web/static/imgs/logo_text_light.png
index 158cb37a..13f43a94 100644
Binary files a/web/static/imgs/logo_text_light.png and b/web/static/imgs/logo_text_light.png differ