Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/frontend/src/lib/components/FileViewerOverlay.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { Button } from '$lib/components/ui/button';
import { Spinner } from '$lib/components/ui/spinner';
import { Download, Link, Check, ArrowLeft, Copy } from '@lucide/svelte';
import { fade } from 'svelte/transition';
import CodeViewer from '$lib/components/CodeViewer.svelte';
Expand Down Expand Up @@ -340,7 +341,10 @@
{#if isHeic}
{#if heicConverting && !heicConvertedUrl}
<div class="flex h-full items-center justify-center text-xs text-white/60">
Converting HEIC to PNG...
<div class="flex items-center gap-2">
<Spinner class="size-4" />
<span>Converting HEIC to PNG...</span>
</div>
</div>
{:else if heicConvertedUrl}
<div class="flex h-full items-center justify-center">
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/lib/components/ui/spinner/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as Spinner } from './spinner.svelte';
26 changes: 26 additions & 0 deletions src/frontend/src/lib/components/ui/spinner/spinner.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script lang="ts">
import { cn } from '$lib/utils.js';
import Loader2Icon from '@lucide/svelte/icons/loader-2';
import type { SVGAttributes } from 'svelte/elements';

let {
class: className,
role = 'status',
// we add name, color, and stroke for compatibility with different icon libraries props
name,
color,
stroke,
'aria-label': ariaLabel = 'Loading',
...restProps
}: SVGAttributes<SVGSVGElement> = $props();
</script>

<Loader2Icon
{role}
name={name === null ? undefined : name}
color={color === null ? undefined : color}
stroke={stroke === null ? undefined : stroke}
aria-label={ariaLabel}
class={cn('size-4 animate-spin', className)}
{...restProps}
/>
Loading