adds map view for lists
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
reverseCoords: false,
|
||||
acceleration: false,
|
||||
slope: true,
|
||||
speed: false,
|
||||
speed: true,
|
||||
altitude: true,
|
||||
time: true,
|
||||
distance: true,
|
||||
|
||||
@@ -54,10 +54,12 @@
|
||||
update();
|
||||
}
|
||||
|
||||
function setDifficultyFilter(difficulty: "easy" | "moderate" | "difficult") {
|
||||
function setDifficultyFilter(
|
||||
difficulty: "easy" | "moderate" | "difficult",
|
||||
) {
|
||||
const difficultyIndex = filter.difficulty.findIndex(
|
||||
(d) => d == difficulty,
|
||||
);
|
||||
);
|
||||
if (difficultyIndex !== -1) {
|
||||
filter.difficulty.splice(difficultyIndex, 1);
|
||||
} else {
|
||||
@@ -102,8 +104,9 @@
|
||||
|
||||
searchDropdownItems = result.hits.map((h: Record<string, any>) => ({
|
||||
text: h.name,
|
||||
description:
|
||||
country_codes[h["country code"] as keyof typeof country_codes],
|
||||
description: `${h.division} | ${
|
||||
country_codes[h["country code"] as keyof typeof country_codes]
|
||||
}`,
|
||||
value: h,
|
||||
icon: "city",
|
||||
}));
|
||||
@@ -208,7 +211,12 @@
|
||||
></DoubleSlider>
|
||||
<div class="flex justify-between">
|
||||
<span>{formatDistance(filter.distanceMin)}</span>
|
||||
<span>{formatDistance(filter.distanceMax)}{filter.distanceMax == filter.distanceLimit ? '+' : ''}</span>
|
||||
<span
|
||||
>{formatDistance(filter.distanceMax)}{filter.distanceMax ==
|
||||
filter.distanceLimit
|
||||
? "+"
|
||||
: ""}</span
|
||||
>
|
||||
</div>
|
||||
<hr class="my-4 border-separator" />
|
||||
<p class="text-sm font-medium pb-4">{$_("elevation-gain")}</p>
|
||||
@@ -221,7 +229,13 @@
|
||||
></DoubleSlider>
|
||||
<div class="flex justify-between">
|
||||
<span>{formatElevation(filter.elevationGainMin)}</span>
|
||||
<span>{formatElevation(filter.elevationGainMax)}{filter.elevationGainMax == filter.elevationGainLimit ? '+' : ''}</span>
|
||||
<span
|
||||
>{formatElevation(
|
||||
filter.elevationGainMax,
|
||||
)}{filter.elevationGainMax == filter.elevationGainLimit
|
||||
? "+"
|
||||
: ""}</span
|
||||
>
|
||||
</div>
|
||||
<hr class="my-4 border-separator" />
|
||||
<p class="text-sm font-medium pb-4">{$_("completed")}</p>
|
||||
|
||||
@@ -349,7 +349,7 @@ export async function trails_delete(trail: Trail) {
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchGPX(trail: Trail, f: (url: RequestInfo | URL, config?: RequestInit) => Promise<Response> = fetch) {
|
||||
export async function fetchGPX(trail: Trail, f: (url: RequestInfo | URL, config?: RequestInit) => Promise<Response> = fetch) {
|
||||
if (!trail.gpx) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -331,4 +331,9 @@
|
||||
text-align: center;
|
||||
color: #000;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.leaflet-popup-content {
|
||||
width: max-content !important;
|
||||
max-width: 100%;
|
||||
}
|
||||
Reference in New Issue
Block a user