adds new empty states

This commit is contained in:
Christian Beutel
2025-01-04 17:05:35 +01:00
parent 474e21ae55
commit a704db6366
32 changed files with 306 additions and 63 deletions

View File

@@ -2,6 +2,8 @@
import type { SummitLog } from "$lib/models/summit_log";
import { _ } from "svelte-i18n";
import Dropdown, { type DropdownItem } from "../base/dropdown.svelte";
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 {
formatDistance,
@@ -9,8 +11,10 @@
formatTimeHHMM,
} from "$lib/util/format_util";
import { getFileURL, readAsDataURLAsync } from "$lib/util/file_util";
import { theme } from "$lib/stores/theme_store";
let thumbnail: string = "/imgs/default_thumbnail.webp";
let thumbnail: string =
$theme === "light" ? emptyStateTrailLight : emptyStateTrailDark;
$: Promise.all(
(log._photos ?? []).map(async (f) => {
@@ -22,7 +26,8 @@
} else if (v.length) {
thumbnail = v[0];
} else {
thumbnail = "/imgs/default_thumbnail.webp";
thumbnail =
$theme === "light" ? emptyStateTrailLight : emptyStateTrailDark;
}
});