fixed some warnings
This commit is contained in:
@@ -265,7 +265,7 @@
|
|||||||
</button>
|
</button>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
<div class="flex-1" />
|
<div class="flex-1"></div>
|
||||||
|
|
||||||
<div class="flex items-center gap-3 text-xs text-zinc-500">
|
<div class="flex items-center gap-3 text-xs text-zinc-500">
|
||||||
{#if hasDistance && chartType === 'line'}
|
{#if hasDistance && chartType === 'line'}
|
||||||
@@ -298,7 +298,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div bind:this={chartEl} class="w-full overflow-hidden" />
|
<div bind:this={chartEl} class="w-full overflow-hidden"></div>
|
||||||
|
|
||||||
<!-- Histogram controls (range + bins) -->
|
<!-- Histogram controls (range + bins) -->
|
||||||
{#if chartType === 'histogram'}
|
{#if chartType === 'histogram'}
|
||||||
@@ -309,12 +309,12 @@
|
|||||||
<span class="w-8 text-right shrink-0">{Math.round(trimMin)}</span>
|
<span class="w-8 text-right shrink-0">{Math.round(trimMin)}</span>
|
||||||
<div class="relative flex-1" style="height:20px">
|
<div class="relative flex-1" style="height:20px">
|
||||||
<!-- Background track -->
|
<!-- Background track -->
|
||||||
<div class="absolute left-0 right-0 top-1/2 -translate-y-1/2 h-1 bg-zinc-700 rounded-full pointer-events-none" />
|
<div class="absolute left-0 right-0 top-1/2 -translate-y-1/2 h-1 bg-zinc-700 rounded-full pointer-events-none"></div>
|
||||||
<!-- Active range fill -->
|
<!-- Active range fill -->
|
||||||
<div
|
<div
|
||||||
class="absolute top-1/2 -translate-y-1/2 h-1 bg-zinc-400 rounded-full pointer-events-none"
|
class="absolute top-1/2 -translate-y-1/2 h-1 bg-zinc-400 rounded-full pointer-events-none"
|
||||||
style="left:{leftPct}%; right:{rightPct}%"
|
style="left:{leftPct}%; right:{rightPct}%"
|
||||||
/>
|
></div>
|
||||||
<!-- Min handle -->
|
<!-- Min handle -->
|
||||||
<input
|
<input
|
||||||
type="range"
|
type="range"
|
||||||
|
|||||||
@@ -108,12 +108,18 @@
|
|||||||
>‹</button>
|
>‹</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="contents"
|
||||||
|
on:click|stopPropagation
|
||||||
|
aria-label="Image {lightboxIndex + 1} of {galleryImages.length}"
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
src={imageBase + galleryImages[lightboxIndex]}
|
src={imageBase + galleryImages[lightboxIndex]}
|
||||||
alt={galleryImages[lightboxIndex]}
|
alt={galleryImages[lightboxIndex]}
|
||||||
class="max-h-[90vh] max-w-[90vw] rounded-lg shadow-2xl object-contain"
|
class="max-h-[90vh] max-w-[90vw] rounded-lg shadow-2xl object-contain"
|
||||||
on:click|stopPropagation
|
|
||||||
/>
|
/>
|
||||||
|
</button>
|
||||||
|
|
||||||
<!-- Next -->
|
<!-- Next -->
|
||||||
{#if galleryImages.length > 1}
|
{#if galleryImages.length > 1}
|
||||||
@@ -241,7 +247,7 @@
|
|||||||
<ActivityCharts timeseries={detail.timeseries} bind:hoveredIdx {athlete} />
|
<ActivityCharts timeseries={detail.timeseries} bind:hoveredIdx {athlete} />
|
||||||
</div>
|
</div>
|
||||||
{:else if !detail}
|
{:else if !detail}
|
||||||
<div class="bg-zinc-900 rounded-xl border border-zinc-800 p-4 h-32 animate-pulse" />
|
<div class="bg-zinc-900 rounded-xl border border-zinc-800 p-4 h-32 animate-pulse"></div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- Laps -->
|
<!-- Laps -->
|
||||||
|
|||||||
@@ -121,4 +121,4 @@
|
|||||||
onDestroy(() => map?.remove());
|
onDestroy(() => map?.remove());
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={mapEl} class="w-full h-full" />
|
<div bind:this={mapEl} class="w-full h-full"></div>
|
||||||
|
|||||||
@@ -120,7 +120,7 @@
|
|||||||
class="fixed inset-0 bg-black/60 z-40 backdrop-blur-sm"
|
class="fixed inset-0 bg-black/60 z-40 backdrop-blur-sm"
|
||||||
on:click={() => dispatch('saved', { title, description })}
|
on:click={() => dispatch('saved', { title, description })}
|
||||||
role="presentation"
|
role="presentation"
|
||||||
/>
|
></div>
|
||||||
|
|
||||||
<!-- Drawer -->
|
<!-- Drawer -->
|
||||||
<aside class="fixed top-0 right-0 h-full w-full max-w-md bg-zinc-950 border-l border-zinc-800 z-50 flex flex-col shadow-2xl">
|
<aside class="fixed top-0 right-0 h-full w-full max-w-md bg-zinc-950 border-l border-zinc-800 z-50 flex flex-col shadow-2xl">
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
{#if loading}
|
{#if loading}
|
||||||
<div class="space-y-3 animate-pulse">
|
<div class="space-y-3 animate-pulse">
|
||||||
{#each Array(4) as _}
|
{#each Array(4) as _}
|
||||||
<div class="h-9 rounded bg-zinc-800" />
|
<div class="h-9 rounded bg-zinc-800"></div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{:else if loadError}
|
{:else if loadError}
|
||||||
@@ -191,21 +191,21 @@
|
|||||||
rows={6}
|
rows={6}
|
||||||
placeholder="Write about this activity…"
|
placeholder="Write about this activity…"
|
||||||
class="w-full px-3 py-2 bg-zinc-900 border border-zinc-700 rounded-lg text-sm text-white placeholder-zinc-600 outline-none focus:border-blue-500 transition-colors resize-y"
|
class="w-full px-3 py-2 bg-zinc-900 border border-zinc-700 rounded-lg text-sm text-white placeholder-zinc-600 outline-none focus:border-blue-500 transition-colors resize-y"
|
||||||
/>
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Images -->
|
<!-- Images -->
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<p class="text-xs text-zinc-500 mb-2">Images</p>
|
<p class="text-xs text-zinc-500 mb-2">Images</p>
|
||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<button
|
||||||
<div
|
type="button"
|
||||||
class="border border-dashed border-zinc-700 rounded-lg px-4 py-3 text-center text-xs text-zinc-500 cursor-pointer hover:border-zinc-500 hover:text-zinc-300 transition-colors"
|
class="w-full border border-dashed border-zinc-700 rounded-lg px-4 py-3 text-center text-xs text-zinc-500 cursor-pointer hover:border-zinc-500 hover:text-zinc-300 transition-colors"
|
||||||
on:click={() => fileInput.click()}
|
on:click={() => fileInput.click()}
|
||||||
on:dragover|preventDefault
|
on:dragover|preventDefault
|
||||||
on:drop|preventDefault={e => e.dataTransfer?.files && uploadImages(e.dataTransfer.files)}
|
on:drop|preventDefault={e => e.dataTransfer?.files && uploadImages(e.dataTransfer.files)}
|
||||||
>
|
>
|
||||||
{uploading ? 'Uploading…' : 'Drop images or click to upload'}
|
{uploading ? 'Uploading…' : 'Drop images or click to upload'}
|
||||||
</div>
|
</button>
|
||||||
<input bind:this={fileInput} type="file" accept="image/*" multiple class="hidden"
|
<input bind:this={fileInput} type="file" accept="image/*" multiple class="hidden"
|
||||||
on:change={e => e.currentTarget.files && uploadImages(e.currentTarget.files)} />
|
on:change={e => e.currentTarget.files && uploadImages(e.currentTarget.files)} />
|
||||||
{#if images.length}
|
{#if images.length}
|
||||||
|
|||||||
Reference in New Issue
Block a user