File size: 1,722 Bytes
6710512
55b1a24
5435413
6710512
 
 
 
 
9c2938b
4164789
 
9c2938b
4164789
 
 
6710512
 
9c2938b
6710512
 
 
9c2938b
5435413
 
 
 
9c2938b
5435413
 
 
55b1a24
6710512
 
9c2938b
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
61
62
63
64
65
66
67
68
69
70
71
72
73
<script lang="ts">
  import PicletGenerator from '../PicletGenerator/PicletGenerator.svelte';
  import AutoTrainerScanner from '../AutoTrainerScanner/AutoTrainerScanner.svelte';
  import type { GradioClient } from '$lib/types';
  
  interface Props {
    fluxClient: GradioClient | null;
    joyCaptionClient: GradioClient | null;
    commandClient: GradioClient | null;
    
    // Unused clients (kept for future use)
    // hunyuanClient: GradioClient | null;
    // zephyrClient: GradioClient | null;
    // qwenClient: GradioClient | null;
    // dotsClient: GradioClient | null;
  }
  
  let { fluxClient, joyCaptionClient, commandClient }: Props = $props();
</script>

<div class="scanner-page">
  {#if fluxClient && joyCaptionClient && commandClient}
    <!-- Auto Trainer Scanner -->
    <AutoTrainerScanner 
      {joyCaptionClient}
      {fluxClient}
      {commandClient}
    />
    
    <!-- Manual Piclet Generator -->
    <PicletGenerator 
      {fluxClient}
      {joyCaptionClient}
      {commandClient}
    />
  {: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>