File size: 1,328 Bytes
6710512 55b1a24 6710512 24561f7 782c122 6710512 782c122 6710512 782c122 55b1a24 6710512 24561f7 782c122 6710512 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
<script lang="ts">
import PicletGenerator from '../PicletGenerator/PicletGenerator.svelte';
import type { GradioClient } from '$lib/types';
interface Props {
fluxClient: GradioClient | null;
joyCaptionClient: GradioClient | null;
zephyrClient: GradioClient | null;
qwenClient: GradioClient | null;
}
let { fluxClient, joyCaptionClient, zephyrClient, qwenClient }: Props = $props();
</script>
<div class="scanner-page">
{#if fluxClient && joyCaptionClient && zephyrClient && qwenClient}
<PicletGenerator
{fluxClient}
{joyCaptionClient}
{zephyrClient}
{qwenClient}
/>
{:else}
<div class="loading-state">
<div class="spinner"></div>
<p>Initializing scanner...</p>
</div>
{/if}
</div>
<style>
.scanner-page {
height: 100%;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.loading-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: #666;
}
.spinner {
width: 40px;
height: 40px;
border: 3px solid #f3f3f3;
border-top: 3px solid #007bff;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 1rem;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
</style> |