fixes icon picker
This commit is contained in:
@@ -28,10 +28,11 @@
|
||||
await tick();
|
||||
const dropdownMenu = document.querySelector(".menu");
|
||||
if (dropdownMenu) {
|
||||
let dropdownHTML = dropdownMenu.innerHTML;
|
||||
|
||||
for (const li of dropdownMenu.children) {
|
||||
for (let i = 0; i < dropdownMenu.children.length; i++) {
|
||||
const li = dropdownMenu.children[i];
|
||||
const textNode = li.getElementsByTagName("p")[0];
|
||||
textNode.innerHTML = items[i].text;
|
||||
|
||||
const text = textNode.innerText.replace(
|
||||
new RegExp(value, "gi"),
|
||||
(match) => `<strong>${match}</strong>`,
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
{/if}
|
||||
<div class="flex items-center gap-2">
|
||||
{#if icon.length > 0}
|
||||
<i class="fa fa-{icon}"></i>
|
||||
<div class="w-6">
|
||||
<i class="fa fa-{icon}"></i>
|
||||
</div>
|
||||
{/if}
|
||||
<input
|
||||
{name}
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
? getFileURL(trail, trail.photos[trail.thumbnail])
|
||||
: "/imgs/default_thumbnail.webp";
|
||||
route.bindPopup(
|
||||
`<a href="/trail/view/${trail.id}" data-sveltekit-preload-data="false">
|
||||
`<a href="/trail/view/${trail.id}" data-sveltekit-preload-data="off">
|
||||
<li class="flex items-center gap-4 cursor-pointer text-black max-w-80">
|
||||
<div class="shrink-0"><img class="h-14 w-14 object-cover rounded-xl" src="${thumbnail}" alt="">
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@ export async function trails_index(perPage: number = 21, random: boolean = false
|
||||
|
||||
export async function trails_search_filter(filter: TrailFilter, page: number = 1, f: (url: RequestInfo | URL, config?: RequestInit) => Promise<Response> = fetch) {
|
||||
let filterText: string = buildFilterText(filter, true);
|
||||
|
||||
|
||||
let r = await f("/api/v1/search/trails", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ q: filter.q, options: { filter: filterText, sort: [`${filter.sort}:${filter.sortOrder == "+" ? "asc" : "desc"}`], hitsPerPage: 21, page: page } }),
|
||||
@@ -120,7 +120,9 @@ export async function trails_search_bounding_box(northEast: LatLng, southWest: L
|
||||
|
||||
const comparison = compareObjectArrays<Trail>(get(trails), response.items)
|
||||
|
||||
trails.set(response.items);
|
||||
if (comparison.added.length || comparison.deleted.length || comparison.updated.length) {
|
||||
trails.set(response.items);
|
||||
}
|
||||
|
||||
return comparison;
|
||||
} else {
|
||||
|
||||
@@ -362,6 +362,7 @@ export const GpxGroup = L.GpxGroup = L.Class.extend({
|
||||
}
|
||||
await elevation._initHotLine(route, this._hotline)
|
||||
|
||||
|
||||
this._map.flyToBounds(route.getBounds(), { duration: 0.25, easeLinearity: 0.25, noMoveStart: true });
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user