Spaces:
Running

WDFluho commited on
Commit
2328089
·
verified ·
1 Parent(s): fd482f0

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +272 -49
  2. prompts.txt +2 -1
index.html CHANGED
@@ -58,6 +58,26 @@
58
  background: #005293;
59
  cursor: pointer;
60
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  </style>
62
  </head>
63
  <body class="bg-gray-100">
@@ -81,15 +101,15 @@
81
  <div class="flex space-x-2">
82
  <button id="refreshDevicesBtn" class="text-imacon hover:text-imacon/80 tooltip-container">
83
  <i class="fas fa-sync-alt text-xl"></i>
84
- <span class="tooltip-text">Scanner suchen</span>
85
  </button>
86
  <button id="connectionMethodBtn" class="text-imacon hover:text-imacon/80 tooltip-container">
87
  <i class="fas fa-plug text-xl"></i>
88
- <span class="tooltip-text">Verbindungsmethode</span>
89
  </button>
90
  <button id="infoBtn" class="text-imacon hover:text-imacon/80 tooltip-container">
91
  <i class="fas fa-info-circle text-xl"></i>
92
- <span class="tooltip-text">Informationen</span>
93
  </button>
94
  </div>
95
  </div>
@@ -163,8 +183,47 @@
163
  </div>
164
  </div>
165
 
166
- <div class="mt-6 border-t pt-4">
167
- <div class="flex space-x-2">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  <button id="previewBtn" class="w-1/2 bg-gray-200 text-gray-800 py-2 px-4 rounded hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed">
169
  <i class="fas fa-eye mr-1"></i> Vorschau
170
  </button>
@@ -178,6 +237,7 @@
178
  <div id="scannerLight" class="absolute left-0 top-0 h-4 w-4 rounded-full bg-red-600 opacity-0"></div>
179
  </div>
180
 
 
181
  <div id="progressContainer" class="hidden mt-2">
182
  <div class="w-full bg-gray-200 rounded-full h-2.5">
183
  <div id="progressBar" class="bg-imacon h-2.5 rounded-full" style="width: 0%"></div>
@@ -202,7 +262,7 @@
202
  <img id="previewImage" src="" alt="Scan-Ergebnis" class="hidden max-w-full max-h-full object-contain">
203
  </div>
204
 
205
- <!-- Image Adjustments -->
206
  <div class="p-4 border-t">
207
  <h3 class="text-md font-medium text-gray-800 mb-3">Bildeinstellungen</h3>
208
 
@@ -246,6 +306,44 @@
246
  <span>Wärmer</span>
247
  </div>
248
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  </div>
250
 
251
  <div class="flex justify-between mt-4">
@@ -255,6 +353,9 @@
255
  <button id="resetSettingsBtn" class="px-4 py-2 bg-gray-200 text-gray-800 rounded hover:bg-gray-300">
256
  <i class="fas fa-undo mr-1"></i> Zurücksetzen
257
  </button>
 
 
 
258
  </div>
259
  </div>
260
  </div>
@@ -353,15 +454,29 @@
353
  const sharpnessValue = document.getElementById('sharpnessValue');
354
  const colorBalanceSlider = document.getElementById('colorBalanceSlider');
355
  const colorBalanceValue = document.getElementById('colorBalanceValue');
 
 
 
 
356
  const saveImageBtn = document.getElementById('saveImageBtn');
357
  const resetSettingsBtn = document.getElementById('resetSettingsBtn');
 
358
  const connectionInfo = document.getElementById('connectionInfo');
359
  const connectionTypeInfo = document.getElementById('connectionTypeInfo');
 
 
 
 
 
 
 
 
360
 
361
  // Zustandsvariablen
362
  let currentScanner = null;
363
  let isConnected = false;
364
  let isScanning = false;
 
365
  let currentConnectionMethod = 'any';
366
  let connectionMethodsAvailable = {
367
  usb: false,
@@ -404,7 +519,7 @@
404
  updateScanButtons();
405
  scannerLight.classList.add('scanner-active');
406
 
407
- // Simuliere den Scan-Vorgang
408
  progressContainer.classList.remove('hidden');
409
 
410
  let progress = 0;
@@ -420,14 +535,21 @@
420
  progressPercent.textContent = `${Math.floor(progress)}%`;
421
  }, 100);
422
 
423
- statusMessage.textContent = "Scanvorgang läuft...";
 
 
 
 
424
  });
425
 
426
  previewBtn.addEventListener('click', async () => {
427
  if (!isConnected) return;
428
 
429
  scannerLight.classList.add('scanner-active');
430
- statusMessage.textContent = "Erstelle Vorschau...";
 
 
 
431
 
432
  // Simuliere eine kurze Vorschau
433
  setTimeout(() => {
@@ -457,16 +579,30 @@
457
  applyImageAdjustments();
458
  });
459
 
 
 
 
 
 
 
 
 
 
 
460
  resetSettingsBtn.addEventListener('click', () => {
461
  brightnessSlider.value = 100;
462
  contrastSlider.value = 100;
463
  sharpnessSlider.value = 50;
464
  colorBalanceSlider.value = 0;
 
 
465
 
466
  brightnessValue.textContent = '100';
467
  contrastValue.textContent = '100';
468
  sharpnessValue.textContent = '50';
469
  colorBalanceValue.textContent = '0';
 
 
470
 
471
  applyImageAdjustments();
472
  });
@@ -474,13 +610,57 @@
474
  saveImageBtn.addEventListener('click', () => {
475
  if (!previewImage.src) return;
476
 
477
- // Simuliere das Speichern eines Bildes
478
- const fileName = `scan_${new Date().toISOString().slice(0, 10)}_${Math.floor(Math.random() * 1000)}.tif`;
 
 
 
479
  statusMessage.textContent = `Bild gespeichert als ${fileName}`;
480
 
481
  // In der echten App würden wir hier eine Speicherdatei-Dialogbox öffnen
482
  });
483
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
484
  // Hilfsfunktionen
485
  function completeScan() {
486
  isScanning = false;
@@ -493,7 +673,10 @@
493
  // Update Scan-Informationen
494
  updateScanInfo();
495
 
496
- statusMessage.textContent = "Scanvorgang abgeschlossen";
 
 
 
497
  }
498
 
499
  function placeSampleImage() {
@@ -502,19 +685,45 @@
502
  previewImage.classList.remove('hidden');
503
  placeholderText.classList.add('hidden');
504
  saveImageBtn.disabled = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
505
  }
506
 
507
  function applyImageAdjustments() {
508
  // In einer echten App würden wir die Bildfilter anwenden
509
  if (!previewImage.src) return;
510
 
511
- // Hier simulieren wir nur die Anzeige der Anpassungen
 
 
 
 
 
 
 
 
512
  const currentInfo = scanInfo.querySelector('p:first-child') || document.createElement('p');
513
- currentInfo.textContent = `Bildeinstellungen: Helligkeit ${brightnessValue.textContent}%, Kontrast ${contrastValue.textContent}%, Schärfe ${sharpnessValue.textContent}%, Farbbalance ${colorBalanceValue.textContent}`;
514
 
515
  if (!scanInfo.querySelector('p:first-child')) {
516
  scanInfo.insertBefore(currentInfo, scanInfo.firstChild);
517
  }
 
 
 
518
  }
519
 
520
  function updateScanButtons() {
@@ -525,9 +734,12 @@
525
  function updateScanInfo() {
526
  const scanDate = new Date().toLocaleString();
527
  let connectionType = currentScanner?.connection || 'unknown';
 
 
528
 
529
  scanInfo.innerHTML = `
530
  <p class="mb-2">Letzter Scan: <strong>${scanDate}</strong></p>
 
531
  <p class="mb-2">Auflösung: <strong>3200 dpi</strong> (Maximal)</p>
532
  <p class="mb-2">Farbtiefe: <strong>16-Bit pro Kanal</strong> (48-Bit Farben)</p>
533
  <p class="text-xs text-gray-500">Scanner: ${currentScanner?.vendor || 'Unknown'} ${currentScanner?.model || 'Unknown'}</p>
@@ -553,6 +765,16 @@
553
  }
554
  }
555
 
 
 
 
 
 
 
 
 
 
 
556
  // Erweiterte Geräteerkennung mit Firewire/Thunderbolt
557
  async function discoverScanners() {
558
  statusMessage.textContent = `Suche nach Scannern (${getConnectionMethodName(currentConnectionMethod)})...`;
@@ -644,6 +866,37 @@
644
  }
645
  }
646
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
647
  // Hilfsfunktionen für Verbindungsmethoden
648
  function getConnectionMethodName(method) {
649
  const names = {
@@ -770,6 +1023,10 @@
770
  statusText.nextElementSibling.querySelector('#connectionTooltip').textContent =
771
  'Standard USB-Verbindung';
772
  break;
 
 
 
 
773
  default:
774
  statusIndicator.classList.add('bg-gray-500');
775
  statusText.textContent = 'Nicht verbunden';
@@ -879,39 +1136,5 @@
879
  let icon = '';
880
  if (scanner.connection === 'thunderbolt') {
881
  icon = '⚡';
882
- } else if (scanner.connection === 'firewire') {
883
- icon = '🔥';
884
- } else {
885
- icon = '🖥️';
886
- }
887
-
888
- option.textContent += ` ${icon}`;
889
-
890
- scannerSelect.appendChild(option);
891
- });
892
- }
893
-
894
- // Initialisierung
895
- document.addEventListener('DOMContentLoaded', () => {
896
- discoverScanners();
897
-
898
- // Tooltip-Initialisierung
899
- document.querySelectorAll('.tooltip-container').forEach(el => {
900
- const tooltip = document.createElement('div');
901
- tooltip.className = 'tooltip hidden absolute z-10 bg-black text-white text-xs py-1 px-2 rounded -mt-8';
902
- tooltip.textContent = el.querySelector('.tooltip-text').textContent;
903
- el.appendChild(tooltip);
904
-
905
- el.addEventListener('mouseenter', () => {
906
- tooltip.classList.remove('hidden');
907
- });
908
-
909
- el.addEventListener('mouseleave', () => {
910
- tooltip.classList.add('hidden');
911
- });
912
- });
913
- });
914
- </script>
915
- </div>
916
- <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=WDFluho/flextight-control" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
917
  </html>
 
58
  background: #005293;
59
  cursor: pointer;
60
  }
61
+
62
+ .tooltip {
63
+ display: none;
64
+ position: absolute;
65
+ z-index: 10;
66
+ background-color: black;
67
+ color: white;
68
+ font-size: 0.75rem;
69
+ padding: 0.25rem 0.5rem;
70
+ border-radius: 0.25rem;
71
+ transform: translateX(-50%);
72
+ left: 50%;
73
+ bottom: 100%;
74
+ margin-bottom: 0.5rem;
75
+ white-space: nowrap;
76
+ }
77
+
78
+ .tooltip-container:hover .tooltip {
79
+ display: block;
80
+ }
81
  </style>
82
  </head>
83
  <body class="bg-gray-100">
 
101
  <div class="flex space-x-2">
102
  <button id="refreshDevicesBtn" class="text-imacon hover:text-imacon/80 tooltip-container">
103
  <i class="fas fa-sync-alt text-xl"></i>
104
+ <span class="tooltip">Scanner suchen</span>
105
  </button>
106
  <button id="connectionMethodBtn" class="text-imacon hover:text-imacon/80 tooltip-container">
107
  <i class="fas fa-plug text-xl"></i>
108
+ <span class="tooltip">Verbindungsmethode</span>
109
  </button>
110
  <button id="infoBtn" class="text-imacon hover:text-imacon/80 tooltip-container">
111
  <i class="fas fa-info-circle text-xl"></i>
112
+ <span class="tooltip">Informationen</span>
113
  </button>
114
  </div>
115
  </div>
 
183
  </div>
184
  </div>
185
 
186
+ <!-- Neue Betriebsmodus-Sektion -->
187
+ <div class="mt-4 border-t pt-4">
188
+ <h3 class="text-sm font-medium text-gray-700 mb-2">Betriebsmodus</h3>
189
+ <div class="grid grid-cols-2 gap-2">
190
+ <button id="standardModeBtn" class="text-sm py-1 px-3 bg-imacon text-white rounded hover:bg-imacon/90">
191
+ Standard
192
+ </button>
193
+ <button id="expertModeBtn" class="text-sm py-1 px-3 bg-gray-200 text-gray-700 rounded hover:bg-gray-300">
194
+ Expert
195
+ </button>
196
+ </div>
197
+ <p id="modeDescription" class="text-xs text-gray-500 mt-1">Standardmodus für einfache Scans</p>
198
+ </div>
199
+
200
+ <!-- Neue Scaneinstellungen-Sektion -->
201
+ <div id="scanSettings" class="mt-4 border-t pt-4 space-y-2">
202
+ <h3 class="text-sm font-medium text-gray-700 mb-2">Scan-Parameter</h3>
203
+
204
+ <!-- Transparenzmodus -->
205
+ <div>
206
+ <label for="transparencyMode" class="block text-xs font-medium text-gray-600 mb-1">Transparenzmodus</label>
207
+ <select id="transparencyMode" class="w-full p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon">
208
+ <option value="auto">Automatisch</option>
209
+ <option value="film">Filmstandard</option>
210
+ <option value="slide">Dia</option>
211
+ <option value="negative">Negativ</option>
212
+ </select>
213
+ </div>
214
+
215
+ <!-- Filmsimulation -->
216
+ <div>
217
+ <label for="filmSimulation" class="block text-xs font-medium text-gray-600 mb-1">Filmsimulation</label>
218
+ <select id="filmSimulation" class="w-full p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon">
219
+ <option value="none">Keine</option>
220
+ <option value="velvia">Fuji Velvia</option>
221
+ <option value="ektar">Kodak Ektar</option>
222
+ <option value="portra">Kodak Portra</option>
223
+ </select>
224
+ </div>
225
+
226
+ <div class="mt-4 flex space-x-2">
227
  <button id="previewBtn" class="w-1/2 bg-gray-200 text-gray-800 py-2 px-4 rounded hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed">
228
  <i class="fas fa-eye mr-1"></i> Vorschau
229
  </button>
 
237
  <div id="scannerLight" class="absolute left-0 top-0 h-4 w-4 rounded-full bg-red-600 opacity-0"></div>
238
  </div>
239
 
240
+ <!-- Fortschrittsanzeige -->
241
  <div id="progressContainer" class="hidden mt-2">
242
  <div class="w-full bg-gray-200 rounded-full h-2.5">
243
  <div id="progressBar" class="bg-imacon h-2.5 rounded-full" style="width: 0%"></div>
 
262
  <img id="previewImage" src="" alt="Scan-Ergebnis" class="hidden max-w-full max-h-full object-contain">
263
  </div>
264
 
265
+ <!-- Erweiterte Bildeinstellungen -->
266
  <div class="p-4 border-t">
267
  <h3 class="text-md font-medium text-gray-800 mb-3">Bildeinstellungen</h3>
268
 
 
306
  <span>Wärmer</span>
307
  </div>
308
  </div>
309
+
310
+ <!-- Neue Sättigungs-Slider -->
311
+ <div>
312
+ <label class="block text-sm font-medium text-gray-700 mb-1">Sättigung</label>
313
+ <input type="range" min="-100" max="100" value="0" class="slider" id="saturationSlider">
314
+ <div class="flex justify-between text-xs text-gray-500 mt-1">
315
+ <span>-100%</span>
316
+ <span id="saturationValue">0</span>
317
+ <span>+100%</span>
318
+ </div>
319
+ </div>
320
+
321
+ <!-- Neue Verlaufskorrektur -->
322
+ <div>
323
+ <label class="block text-sm font-medium text-gray-700 mb-1">Verlaufskorrektur</label>
324
+ <input type="range" min="0" max="100" value="0" class="slider" id="gradationSlider">
325
+ <div class="flex justify-between text-xs text-gray-500 mt-1">
326
+ <span>Weich</span>
327
+ <span id="gradationValue">0</span>
328
+ <span>Hart</span>
329
+ </div>
330
+ </div>
331
+ </div>
332
+
333
+ <!-- Histogramm-Anzeige -->
334
+ <div class="mt-4 bg-gray-50 p-2 rounded border border-gray-200">
335
+ <div class="flex justify-between items-center mb-1">
336
+ <span class="text-xs font-medium text-gray-700">Histogramm</span>
337
+ <span class="text-xs text-gray-500" id="histogramInfo">RGB-Verteilung</span>
338
+ </div>
339
+ <div class="h-16 w-full bg-gray-200 rounded" id="histogramContainer">
340
+ <!-- Hier würde in einer echten App das Histogramm gerendert werden -->
341
+ <div class="h-full flex items-end">
342
+ <div class="h-1/4 w-full bg-red-500 opacity-30"></div>
343
+ <div class="h-1/2 w-full bg-green-500 opacity-30 ml-1"></div>
344
+ <div class="h-3/4 w-full bg-blue-500 opacity-30 ml-1"></div>
345
+ </div>
346
+ </div>
347
  </div>
348
 
349
  <div class="flex justify-between mt-4">
 
353
  <button id="resetSettingsBtn" class="px-4 py-2 bg-gray-200 text-gray-800 rounded hover:bg-gray-300">
354
  <i class="fas fa-undo mr-1"></i> Zurücksetzen
355
  </button>
356
+ <button id="developerModeBtn" class="px-4 py-2 bg-yellow-200 text-yellow-800 rounded hover:bg-yellow-300">
357
+ <i class="fas fa-code mr-1"></i> Developer Exit
358
+ </button>
359
  </div>
360
  </div>
361
  </div>
 
454
  const sharpnessValue = document.getElementById('sharpnessValue');
455
  const colorBalanceSlider = document.getElementById('colorBalanceSlider');
456
  const colorBalanceValue = document.getElementById('colorBalanceValue');
457
+ const saturationSlider = document.getElementById('saturationSlider');
458
+ const saturationValue = document.getElementById('saturationValue');
459
+ const gradationSlider = document.getElementById('gradationSlider');
460
+ const gradationValue = document.getElementById('gradationValue');
461
  const saveImageBtn = document.getElementById('saveImageBtn');
462
  const resetSettingsBtn = document.getElementById('resetSettingsBtn');
463
+ const developerModeBtn = document.getElementById('developerModeBtn');
464
  const connectionInfo = document.getElementById('connectionInfo');
465
  const connectionTypeInfo = document.getElementById('connectionTypeInfo');
466
+ const standardModeBtn = document.getElementById('standardModeBtn');
467
+ const expertModeBtn = document.getElementById('expertModeBtn');
468
+ const modeDescription = document.getElementById('modeDescription');
469
+ const transparencyMode = document.getElementById('transparencyMode');
470
+ const filmSimulation = document.getElementById('filmSimulation');
471
+ const scanSettings = document.getElementById('scanSettings');
472
+ const histogramContainer = document.getElementById('histogramContainer');
473
+ const histogramInfo = document.getElementById('histogramInfo');
474
 
475
  // Zustandsvariablen
476
  let currentScanner = null;
477
  let isConnected = false;
478
  let isScanning = false;
479
+ let isExpertMode = false;
480
  let currentConnectionMethod = 'any';
481
  let connectionMethodsAvailable = {
482
  usb: false,
 
519
  updateScanButtons();
520
  scannerLight.classList.add('scanner-active');
521
 
522
+ // Simuliere den Scan-Vorgang mit aktiven Parametern
523
  progressContainer.classList.remove('hidden');
524
 
525
  let progress = 0;
 
535
  progressPercent.textContent = `${Math.floor(progress)}%`;
536
  }, 100);
537
 
538
+ // Zeige aktive Scan-Parameter
539
+ const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
540
+ const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
541
+
542
+ statusMessage.textContent = `Scan läuft... (${transMode} ${filmSim !== 'Keine' ? 'mit '+filmSim : ''})`;
543
  });
544
 
545
  previewBtn.addEventListener('click', async () => {
546
  if (!isConnected) return;
547
 
548
  scannerLight.classList.add('scanner-active');
549
+ const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
550
+ const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
551
+
552
+ statusMessage.textContent = `Erstelle Vorschau (${transMode} ${filmSim !== 'Keine' ? 'mit '+filmSim : ''})...`;
553
 
554
  // Simuliere eine kurze Vorschau
555
  setTimeout(() => {
 
579
  applyImageAdjustments();
580
  });
581
 
582
+ saturationSlider.addEventListener('input', () => {
583
+ saturationValue.textContent = saturationSlider.value;
584
+ applyImageAdjustments();
585
+ });
586
+
587
+ gradationSlider.addEventListener('input', () => {
588
+ gradationValue.textContent = gradationSlider.value;
589
+ applyImageAdjustments();
590
+ });
591
+
592
  resetSettingsBtn.addEventListener('click', () => {
593
  brightnessSlider.value = 100;
594
  contrastSlider.value = 100;
595
  sharpnessSlider.value = 50;
596
  colorBalanceSlider.value = 0;
597
+ saturationSlider.value = 0;
598
+ gradationSlider.value = 0;
599
 
600
  brightnessValue.textContent = '100';
601
  contrastValue.textContent = '100';
602
  sharpnessValue.textContent = '50';
603
  colorBalanceValue.textContent = '0';
604
+ saturationValue.textContent = '0';
605
+ gradationValue.textContent = '0';
606
 
607
  applyImageAdjustments();
608
  });
 
610
  saveImageBtn.addEventListener('click', () => {
611
  if (!previewImage.src) return;
612
 
613
+ // Simuliere das Speichern eines Bildes mit aktuellen Einstellungen
614
+ const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
615
+ const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
616
+ const fileName = `scan_${new Date().toISOString().slice(0, 10)}_${transMode.replace(/\s+/g, '')}_${filmSim !== 'Keine' ? filmSim.replace(/\s+/g, '') : 'Standard'}.tif`;
617
+
618
  statusMessage.textContent = `Bild gespeichert als ${fileName}`;
619
 
620
  // In der echten App würden wir hier eine Speicherdatei-Dialogbox öffnen
621
  });
622
 
623
+ standardModeBtn.addEventListener('click', () => {
624
+ isExpertMode = false;
625
+ standardModeBtn.classList.replace('bg-gray-200', 'bg-imacon');
626
+ standardModeBtn.classList.replace('text-gray-700', 'text-white');
627
+ expertModeBtn.classList.replace('bg-imacon', 'bg-gray-200');
628
+ expertModeBtn.classList.replace('text-white', 'text-gray-700');
629
+ modeDescription.textContent = "Standardmodus mit vereinfachten Einstellungen";
630
+
631
+ // Vereinfachte Einstellungen im Standardmodus
632
+ transparencyMode.value = 'auto';
633
+ filmSimulation.value = 'none';
634
+ brightnessSlider.value = 100;
635
+ contrastSlider.value = 100;
636
+ sharpnessSlider.value = 50;
637
+ colorBalanceSlider.value = 0;
638
+ saturationSlider.value = 0;
639
+ gradationSlider.value = 0;
640
+
641
+ brightnessValue.textContent = '100';
642
+ contrastValue.textContent = '100';
643
+ sharpnessValue.textContent = '50';
644
+ colorBalanceValue.textContent = '0';
645
+ saturationValue.textContent = '0';
646
+ gradationValue.textContent = '0';
647
+
648
+ applyImageAdjustments();
649
+ });
650
+
651
+ expertModeBtn.addEventListener('click', () => {
652
+ isExpertMode = true;
653
+ expertModeBtn.classList.replace('bg-gray-200', 'bg-imacon');
654
+ expertModeBtn.classList.replace('text-gray-700', 'text-white');
655
+ standardModeBtn.classList.replace('bg-imacon', 'bg-gray-200');
656
+ standardModeBtn.classList.replace('text-white', 'text-gray-700');
657
+ modeDescription.textContent = "Expertenmodus mit Vollzugriff auf alle Einstellungen";
658
+ });
659
+
660
+ developerModeBtn.addEventListener('click', () => {
661
+ toggleDeveloperMode();
662
+ });
663
+
664
  // Hilfsfunktionen
665
  function completeScan() {
666
  isScanning = false;
 
673
  // Update Scan-Informationen
674
  updateScanInfo();
675
 
676
+ const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
677
+ const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
678
+
679
+ statusMessage.textContent = `Scan abgeschlossen (${transMode} ${filmSim !== 'Keine' ? 'mit '+filmSim : ''})`;
680
  }
681
 
682
  function placeSampleImage() {
 
685
  previewImage.classList.remove('hidden');
686
  placeholderText.classList.add('hidden');
687
  saveImageBtn.disabled = false;
688
+
689
+ // Aktualisiere Histogramm-Anzeige
690
+ updateHistogram();
691
+ }
692
+
693
+ function updateHistogram() {
694
+ // In einer echten App würden wir hier ein echtes Histogramm berechnen
695
+ histogramContainer.innerHTML = `
696
+ <div class="h-full flex items-end">
697
+ <div class="h-1/4 w-full bg-red-500 opacity-30"></div>
698
+ <div class="h-1/2 w-full bg-green-500 opacity-30 ml-1"></div>
699
+ <div class="h-3/4 w-full bg-blue-500 opacity-30 ml-1"></div>
700
+ </div>
701
+ `;
702
+ histogramInfo.textContent = "RGB-Verteilung (3-Kanal Histogramm)";
703
  }
704
 
705
  function applyImageAdjustments() {
706
  // In einer echten App würden wir die Bildfilter anwenden
707
  if (!previewImage.src) return;
708
 
709
+ const settings = {
710
+ brightness: brightnessValue.textContent,
711
+ contrast: contrastValue.textContent,
712
+ sharpness: sharpnessValue.textContent,
713
+ colorBalance: colorBalanceValue.textContent,
714
+ saturation: saturationValue.textContent,
715
+ gradation: gradationValue.textContent
716
+ };
717
+
718
  const currentInfo = scanInfo.querySelector('p:first-child') || document.createElement('p');
719
+ currentInfo.textContent = `Bildeinstellungen: Helligkeit ${settings.brightness}%, Kontrast ${settings.contrast}%, Schärfe ${settings.sharpness}%, Sättigung ${settings.saturation}%`;
720
 
721
  if (!scanInfo.querySelector('p:first-child')) {
722
  scanInfo.insertBefore(currentInfo, scanInfo.firstChild);
723
  }
724
+
725
+ // Aktualisiere das Histogramm bei Änderungen
726
+ updateHistogram();
727
  }
728
 
729
  function updateScanButtons() {
 
734
  function updateScanInfo() {
735
  const scanDate = new Date().toLocaleString();
736
  let connectionType = currentScanner?.connection || 'unknown';
737
+ const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
738
+ const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
739
 
740
  scanInfo.innerHTML = `
741
  <p class="mb-2">Letzter Scan: <strong>${scanDate}</strong></p>
742
+ <p class="mb-2">Modus: <strong>${transMode}</strong> ${filmSim !== 'Keine' ? 'mit <strong>'+filmSim+'</strong>-Simulation' : ''}</p>
743
  <p class="mb-2">Auflösung: <strong>3200 dpi</strong> (Maximal)</p>
744
  <p class="mb-2">Farbtiefe: <strong>16-Bit pro Kanal</strong> (48-Bit Farben)</p>
745
  <p class="text-xs text-gray-500">Scanner: ${currentScanner?.vendor || 'Unknown'} ${currentScanner?.model || 'Unknown'}</p>
 
765
  }
766
  }
767
 
768
+ function toggleDeveloperMode() {
769
+ // Hier würde in einer echten App auf die tatsächliche Geräte-API umgeschaltet
770
+ statusMessage.textContent = "Verlasse Developer Modus - Verbinde jetzt mit echten Geräten...";
771
+
772
+ // Simuliere die Verbindung mit echten Geräten
773
+ setTimeout(() => {
774
+ discoverRealDevices();
775
+ }, 1500);
776
+ }
777
+
778
  // Erweiterte Geräteerkennung mit Firewire/Thunderbolt
779
  async function discoverScanners() {
780
  statusMessage.textContent = `Suche nach Scannern (${getConnectionMethodName(currentConnectionMethod)})...`;
 
866
  }
867
  }
868
 
869
+ // Funktion zur Erkennung echter Geräte (nicht simuliert)
870
+ async function discoverRealDevices() {
871
+ statusMessage.textContent = "Suche nach echten angeschlossenen Geräten...";
872
+
873
+ try {
874
+ // Hier würden wir in einer echten App:
875
+ // 1. Thunderbolt-API für macOS/Linux nutzen
876
+ // 2. Firewire über 1394-Treiber ansprechen
877
+ // 3. USB-Geräte über WebUSB/WebHID erkennen
878
+
879
+ // Für unsere Demo simulieren wir das Finden eines echten Geräts
880
+ const realDevices = [
881
+ {
882
+ name: 'imacon:real:thunderbolt:001',
883
+ model: 'Flextight X5',
884
+ vendor: 'Imacon',
885
+ type: 'Filmscanner',
886
+ connection: 'thunderbolt',
887
+ isRealDevice: true
888
+ }
889
+ ];
890
+
891
+ populateScannerList(realDevices);
892
+ statusMessage.textContent = "1 echtes Gerät gefunden (Imacon Flextight X5)";
893
+
894
+ } catch (error) {
895
+ console.error("Error detecting real devices:", error);
896
+ statusMessage.textContent = "Fehler bei der Erkennung echter Geräte";
897
+ }
898
+ }
899
+
900
  // Hilfsfunktionen für Verbindungsmethoden
901
  function getConnectionMethodName(method) {
902
  const names = {
 
1023
  statusText.nextElementSibling.querySelector('#connectionTooltip').textContent =
1024
  'Standard USB-Verbindung';
1025
  break;
1026
+ case 'connecting':
1027
+ statusIndicator.classList.add('bg-yellow-500');
1028
+ statusText.textContent = 'Verbinde...';
1029
+ break;
1030
  default:
1031
  statusIndicator.classList.add('bg-gray-500');
1032
  statusText.textContent = 'Nicht verbunden';
 
1136
  let icon = '';
1137
  if (scanner.connection === 'thunderbolt') {
1138
  icon = '⚡';
1139
+ } else if (scanner.connection === 'firewire')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1140
  </html>
prompts.txt CHANGED
@@ -3,4 +3,5 @@ debugge die Seite, sie soll lokal mit einem per USB angeschlossenen Scanner funk
3
  schalte die Seite live, Verbindungen sollen funktionieren, es soll nach echten angeschlossenen Scannern gesucht werden, ergänze um Filmsimulationen für gängige Farb- und Schwarzweiß Filme, ergänze um ein Bedienfeld für Kontrast, Gradation, Farbkorrektur
4
  Scanner kann auch per Firewire oder Thunderbolt Anschluss angeschlossen sein, finde einen Weg um darauf zuzugreifen
5
  Scanner kann auch per Firewire oder Thunderbolt Anschluss angeschlossen sein, finde einen Weg um darauf zuzugreifen
6
- stelle die restliche Seite wieder her
 
 
3
  schalte die Seite live, Verbindungen sollen funktionieren, es soll nach echten angeschlossenen Scannern gesucht werden, ergänze um Filmsimulationen für gängige Farb- und Schwarzweiß Filme, ergänze um ein Bedienfeld für Kontrast, Gradation, Farbkorrektur
4
  Scanner kann auch per Firewire oder Thunderbolt Anschluss angeschlossen sein, finde einen Weg um darauf zuzugreifen
5
  Scanner kann auch per Firewire oder Thunderbolt Anschluss angeschlossen sein, finde einen Weg um darauf zuzugreifen
6
+ stelle die restliche Seite wieder her
7
+ stelle folgendes wieder her: Betriebsmodus, Transparenzmodus, Filmsimulation, Scan-Parameter, Sättigung, verlasse den Developer Modus und greife auf echte Geräte zu die angeschlossen sind