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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
<script>
|
| 136 |
// Scanner-Simulation mit erweiterter Anschluss-Unterstützung
|
| 137 |
const scanBtn = document.getElementById('scanBtn');
|
| 138 |
const previewBtn = document.getElementById('previewBtn');
|
|
|
|
|
|
|
|
|
|
| 139 |
const scannerLight = document.getElementById('scannerLight');
|
| 140 |
const previewImage = document.getElementById('previewImage');
|
| 141 |
const placeholderText = document.getElementById('placeholderText');
|
|
@@ -144,13 +336,32 @@
|
|
| 144 |
const progressPercent = document.getElementById('progressPercent');
|
| 145 |
const statusMessage = document.getElementById('statusMessage');
|
| 146 |
const scanInfo = document.getElementById('scanInfo');
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
const connectionMethodBtn = document.getElementById('connectionMethodBtn');
|
| 148 |
const connectionMethodModal = document.getElementById('connectionMethodModal');
|
| 149 |
const closeConnectionModalBtn = document.getElementById('closeConnectionModalBtn');
|
| 150 |
const saveConnectionPrefBtn = document.getElementById('saveConnectionPrefBtn');
|
| 151 |
const connectionPriority = document.getElementById('connectionPriority');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
// Zustandsvariablen
|
|
|
|
|
|
|
|
|
|
| 154 |
let currentConnectionMethod = 'any';
|
| 155 |
let connectionMethodsAvailable = {
|
| 156 |
usb: false,
|
|
@@ -158,7 +369,17 @@
|
|
| 158 |
thunderbolt: false
|
| 159 |
};
|
| 160 |
|
| 161 |
-
// Event Listener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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
// Erweiterte Geräteerkennung mit Firewire/Thunderbolt
|
| 180 |
async function discoverScanners() {
|
| 181 |
statusMessage.textContent = `Suche nach Scannern (${getConnectionMethodName(currentConnectionMethod)})...`;
|
|
@@ -352,8 +729,19 @@
|
|
| 352 |
}
|
| 353 |
|
| 354 |
async function getUSBDevices() {
|
| 355 |
-
//
|
| 356 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
}
|
| 358 |
|
| 359 |
// Interface-spezifische Statusanzeige
|
|
@@ -416,10 +804,20 @@
|
|
| 416 |
updateConnectionStatus(connectionType);
|
| 417 |
updateScannerDetails(currentScanner);
|
| 418 |
|
| 419 |
-
//
|
| 420 |
scanBtn.disabled = false;
|
| 421 |
previewBtn.disabled = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 422 |
|
|
|
|
|
|
|
| 423 |
} catch (error) {
|
| 424 |
console.error("Connection error:", error);
|
| 425 |
statusMessage.textContent = `Verbindung fehlgeschlagen über ${getConnectionMethodName(connectionType)}`;
|
|
@@ -427,6 +825,28 @@
|
|
| 427 |
}
|
| 428 |
}
|
| 429 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 430 |
function updateScannerDetails(scanner) {
|
| 431 |
scannerModel.textContent = scanner.model;
|
| 432 |
scannerVendor.textContent = scanner.vendor;
|
|
@@ -491,8 +911,6 @@
|
|
| 491 |
});
|
| 492 |
});
|
| 493 |
});
|
| 494 |
-
|
| 495 |
-
// ... rest of the existing code remains the same ...
|
| 496 |
</script>
|
| 497 |
</div>
|
| 498 |
<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>
|
|
|
|
| 130 |
</div>
|
| 131 |
</div>
|
| 132 |
|
| 133 |
+
<!-- Main Content -->
|
| 134 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
| 135 |
+
<!-- Scanner Control Panel -->
|
| 136 |
+
<div class="lg:col-span-1 bg-white rounded-lg shadow p-6">
|
| 137 |
+
<h2 class="text-lg font-semibold text-gray-800 mb-4">Scanner-Steuerung</h2>
|
| 138 |
+
|
| 139 |
+
<div class="space-y-4">
|
| 140 |
+
<div>
|
| 141 |
+
<label for="scannerSelect" class="block text-sm font-medium text-gray-700 mb-1">Verfügbare Scanner</label>
|
| 142 |
+
<select id="scannerSelect" class="w-full p-2 border rounded focus:ring-2 focus:ring-imacon/50 focus:border-imacon">
|
| 143 |
+
<option value="">Scanner auswählen...</option>
|
| 144 |
+
</select>
|
| 145 |
+
</div>
|
| 146 |
+
|
| 147 |
+
<button id="connectBtn" class="w-full bg-imacon text-white py-2 px-4 rounded hover:bg-imacon/90 disabled:opacity-50 disabled:cursor-not-allowed">
|
| 148 |
+
Verbinden
|
| 149 |
+
</button>
|
| 150 |
+
|
| 151 |
+
<div id="scannerDetails" class="hidden mt-4 border-t pt-4 space-y-2 text-sm">
|
| 152 |
+
<div class="flex justify-between">
|
| 153 |
+
<span class="text-gray-600">Modell:</span>
|
| 154 |
+
<span id="scannerModel" class="font-medium">-</span>
|
| 155 |
+
</div>
|
| 156 |
+
<div class="flex justify-between">
|
| 157 |
+
<span class="text-gray-600">Hersteller:</span>
|
| 158 |
+
<span id="scannerVendor" class="font-medium">-</span>
|
| 159 |
+
</div>
|
| 160 |
+
<div class="flex justify-between">
|
| 161 |
+
<span class="text-gray-600">Typ:</span>
|
| 162 |
+
<span id="scannerType" class="font-medium">-</span>
|
| 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>
|
| 171 |
+
<button id="scanBtn" class="w-1/2 bg-imacon text-white py-2 px-4 rounded hover:bg-imacon/90 disabled:opacity-50 disabled:cursor-not-allowed">
|
| 172 |
+
<i class="fas fa-scan mr-1"></i> Scannen
|
| 173 |
+
</button>
|
| 174 |
+
</div>
|
| 175 |
+
</div>
|
| 176 |
+
|
| 177 |
+
<div class="relative mt-2 h-4">
|
| 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>
|
| 184 |
+
</div>
|
| 185 |
+
<div id="progressPercent" class="text-right text-xs mt-1 text-gray-600">0%</div>
|
| 186 |
+
</div>
|
| 187 |
+
|
| 188 |
+
<div id="statusMessage" class="text-sm text-gray-600 mt-2 italic">Bitte Scanner auswählen und verbinden</div>
|
| 189 |
+
</div>
|
| 190 |
+
</div>
|
| 191 |
+
|
| 192 |
+
<!-- Image Preview -->
|
| 193 |
+
<div class="lg:col-span-2 bg-white rounded-lg shadow overflow-hidden">
|
| 194 |
+
<div class="p-4 border-b">
|
| 195 |
+
<h2 class="text-lg font-semibold text-gray-800">Vorschau & Ergebnisse</h2>
|
| 196 |
+
</div>
|
| 197 |
+
<div id="previewContainer" class="preview-container h-96 flex items-center justify-center">
|
| 198 |
+
<div id="placeholderText" class="text-center p-6 text-gray-500">
|
| 199 |
+
<i class="fas fa-image text-4xl mb-2 opacity-50"></i>
|
| 200 |
+
<p class="text-sm">Kein Bild verfügbar.<br>Klicken Sie auf "Vorschau" oder "Scannen".</p>
|
| 201 |
+
</div>
|
| 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 |
+
|
| 209 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 210 |
+
<div>
|
| 211 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Helligkeit</label>
|
| 212 |
+
<input type="range" min="0" max="200" value="100" class="slider" id="brightnessSlider">
|
| 213 |
+
<div class="flex justify-between text-xs text-gray-500 mt-1">
|
| 214 |
+
<span>-</span>
|
| 215 |
+
<span id="brightnessValue">100</span>
|
| 216 |
+
<span>+</span>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
|
| 220 |
+
<div>
|
| 221 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Kontrast</label>
|
| 222 |
+
<input type="range" min="0" max="200" value="100" class="slider" id="contrastSlider">
|
| 223 |
+
<div class="flex justify-between text-xs text-gray-500 mt-1">
|
| 224 |
+
<span>-</span>
|
| 225 |
+
<span id="contrastValue">100</span>
|
| 226 |
+
<span>+</span>
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
+
|
| 230 |
+
<div>
|
| 231 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Schärfe</label>
|
| 232 |
+
<input type="range" min="0" max="100" value="50" class="slider" id="sharpnessSlider">
|
| 233 |
+
<div class="flex justify-between text-xs text-gray-500 mt-1">
|
| 234 |
+
<span>0</span>
|
| 235 |
+
<span id="sharpnessValue">50</span>
|
| 236 |
+
<span>100</span>
|
| 237 |
+
</div>
|
| 238 |
+
</div>
|
| 239 |
+
|
| 240 |
+
<div>
|
| 241 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Farbbalance</label>
|
| 242 |
+
<input type="range" min="-20" max="20" value="0" class="slider" id="colorBalanceSlider">
|
| 243 |
+
<div class="flex justify-between text-xs text-gray-500 mt-1">
|
| 244 |
+
<span>Kälter</span>
|
| 245 |
+
<span id="colorBalanceValue">0</span>
|
| 246 |
+
<span>Wärmer</span>
|
| 247 |
+
</div>
|
| 248 |
+
</div>
|
| 249 |
+
</div>
|
| 250 |
+
|
| 251 |
+
<div class="flex justify-between mt-4">
|
| 252 |
+
<button id="saveImageBtn" class="px-4 py-2 bg-gray-200 text-gray-800 rounded hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed">
|
| 253 |
+
<i class="fas fa-save mr-1"></i> Speichern
|
| 254 |
+
</button>
|
| 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>
|
| 261 |
+
|
| 262 |
+
<!-- Scan Information -->
|
| 263 |
+
<div class="lg:col-span-3 bg-white rounded-lg shadow p-6">
|
| 264 |
+
<h2 class="text-lg font-semibold text-gray-800 mb-2">Scan-Informationen</h2>
|
| 265 |
+
<div id="scanInfo" class="text-sm text-gray-600">
|
| 266 |
+
<p class="mb-2">Kein aktueller Scan verfügbar. Verbinden Sie sich mit einem Scanner und führen Sie einen Scan durch, um Informationen zu erhalten.</p>
|
| 267 |
+
<p id="connectionInfo" class="hidden text-xs bg-imaconlight p-2 rounded border border-imacon/30">
|
| 268 |
+
<i class="fas fa-info-circle text-imacon mr-1"></i> <span id="connectionTypeInfo"></span>
|
| 269 |
+
</p>
|
| 270 |
+
</div>
|
| 271 |
+
|
| 272 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mt-4">
|
| 273 |
+
<div class="bg-gray-50 p-3 rounded border border-gray-200">
|
| 274 |
+
<h3 class="text-sm font-medium text-gray-700 mb-1 flex items-center">
|
| 275 |
+
<i class="fas fa-bolt text-thunderbolt mr-1"></i> Thunderbolt-Hilfe
|
| 276 |
+
</h3>
|
| 277 |
+
<ul class="text-xs text-gray-600 space-y-1">
|
| 278 |
+
<li class="flex items-start">
|
| 279 |
+
<i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
|
| 280 |
+
<span>Installieren Sie die neuesten Thunderbolt-Treiber</span>
|
| 281 |
+
</li>
|
| 282 |
+
<li class="flex items-start">
|
| 283 |
+
<i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
|
| 284 |
+
<span>System muss Thunderbolt-Geräte unterstützen</span>
|
| 285 |
+
</li>
|
| 286 |
+
</ul>
|
| 287 |
+
</div>
|
| 288 |
+
|
| 289 |
+
<div class="bg-gray-50 p-3 rounded border border-gray-200">
|
| 290 |
+
<h3 class="text-sm font-medium text-gray-700 mb-1 flex items-center">
|
| 291 |
+
<i class="fas fa-fire-flame-curved text-firewire mr-1"></i> Firewire-Hilfe
|
| 292 |
+
</h3>
|
| 293 |
+
<ul class="text-xs text-gray-600 space-y-1">
|
| 294 |
+
<li class="flex items-start">
|
| 295 |
+
<i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
|
| 296 |
+
<span>1394-Treiber müssen installiert sein</span>
|
| 297 |
+
</li>
|
| 298 |
+
<li class="flex items-start">
|
| 299 |
+
<i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
|
| 300 |
+
<span>Verwenden Sie ein Firewire-400 oder -800-Kabel</span>
|
| 301 |
+
</li>
|
| 302 |
+
</ul>
|
| 303 |
+
</div>
|
| 304 |
+
|
| 305 |
+
<div class="bg-gray-50 p-3 rounded border border-gray-200">
|
| 306 |
+
<h3 class="text-sm font-medium text-gray-700 mb-1 flex items-center">
|
| 307 |
+
<i class="fas fa-usb text-imacon mr-1"></i> Allgemeine Hilfe
|
| 308 |
+
</h3>
|
| 309 |
+
<ul class="text-xs text-gray-600 space-y-1">
|
| 310 |
+
<li class="flex items-start">
|
| 311 |
+
<i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
|
| 312 |
+
<span>Stellen Sie sicher, dass der Scanner eingeschaltet ist</span>
|
| 313 |
+
</li>
|
| 314 |
+
<li class="flex items-start">
|
| 315 |
+
<i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
|
| 316 |
+
<span>Klicken Sie auf "Scanner suchen", falls Probleme auftreten</span>
|
| 317 |
+
</li>
|
| 318 |
+
</ul>
|
| 319 |
+
</div>
|
| 320 |
+
</div>
|
| 321 |
+
</div>
|
| 322 |
+
</div>
|
| 323 |
+
|
| 324 |
<script>
|
| 325 |
// Scanner-Simulation mit erweiterter Anschluss-Unterstützung
|
| 326 |
const scanBtn = document.getElementById('scanBtn');
|
| 327 |
const previewBtn = document.getElementById('previewBtn');
|
| 328 |
+
const connectBtn = document.getElementById('connectBtn');
|
| 329 |
+
const refreshDevicesBtn = document.getElementById('refreshDevicesBtn');
|
| 330 |
+
const scannerSelect = document.getElementById('scannerSelect');
|
| 331 |
const scannerLight = document.getElementById('scannerLight');
|
| 332 |
const previewImage = document.getElementById('previewImage');
|
| 333 |
const placeholderText = document.getElementById('placeholderText');
|
|
|
|
| 336 |
const progressPercent = document.getElementById('progressPercent');
|
| 337 |
const statusMessage = document.getElementById('statusMessage');
|
| 338 |
const scanInfo = document.getElementById('scanInfo');
|
| 339 |
+
const scannerModel = document.getElementById('scannerModel');
|
| 340 |
+
const scannerVendor = document.getElementById('scannerVendor');
|
| 341 |
+
const scannerType = document.getElementById('scannerType');
|
| 342 |
+
const scannerDetails = document.getElementById('scannerDetails');
|
| 343 |
const connectionMethodBtn = document.getElementById('connectionMethodBtn');
|
| 344 |
const connectionMethodModal = document.getElementById('connectionMethodModal');
|
| 345 |
const closeConnectionModalBtn = document.getElementById('closeConnectionModalBtn');
|
| 346 |
const saveConnectionPrefBtn = document.getElementById('saveConnectionPrefBtn');
|
| 347 |
const connectionPriority = document.getElementById('connectionPriority');
|
| 348 |
+
const brightnessSlider = document.getElementById('brightnessSlider');
|
| 349 |
+
const brightnessValue = document.getElementById('brightnessValue');
|
| 350 |
+
const contrastSlider = document.getElementById('contrastSlider');
|
| 351 |
+
const contrastValue = document.getElementById('contrastValue');
|
| 352 |
+
const sharpnessSlider = document.getElementById('sharpnessSlider');
|
| 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,
|
|
|
|
| 369 |
thunderbolt: false
|
| 370 |
};
|
| 371 |
|
| 372 |
+
// Event Listener
|
| 373 |
+
connectBtn.addEventListener('click', () => {
|
| 374 |
+
if (scannerSelect.value) {
|
| 375 |
+
connectToScanner(scannerSelect.value);
|
| 376 |
+
}
|
| 377 |
+
});
|
| 378 |
+
|
| 379 |
+
refreshDevicesBtn.addEventListener('click', () => {
|
| 380 |
+
discoverScanners();
|
| 381 |
+
});
|
| 382 |
+
|
| 383 |
connectionMethodBtn.addEventListener('click', () => {
|
| 384 |
connectionMethodModal.classList.remove('hidden');
|
| 385 |
});
|
|
|
|
| 397 |
discoverScanners();
|
| 398 |
});
|
| 399 |
|
| 400 |
+
scanBtn.addEventListener('click', async () => {
|
| 401 |
+
if (!isConnected) return;
|
| 402 |
+
|
| 403 |
+
isScanning = true;
|
| 404 |
+
updateScanButtons();
|
| 405 |
+
scannerLight.classList.add('scanner-active');
|
| 406 |
+
|
| 407 |
+
// Simuliere den Scan-Vorgang
|
| 408 |
+
progressContainer.classList.remove('hidden');
|
| 409 |
+
|
| 410 |
+
let progress = 0;
|
| 411 |
+
const interval = setInterval(() => {
|
| 412 |
+
progress += Math.random() * 5;
|
| 413 |
+
if (progress >= 100) {
|
| 414 |
+
progress = 100;
|
| 415 |
+
clearInterval(interval);
|
| 416 |
+
completeScan();
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
progressBar.style.width = `${progress}%`;
|
| 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(() => {
|
| 434 |
+
placeSampleImage();
|
| 435 |
+
scannerLight.classList.remove('scanner-active');
|
| 436 |
+
statusMessage.textContent = "Vorschau erfolgreich erstellt";
|
| 437 |
+
}, 800);
|
| 438 |
+
});
|
| 439 |
+
|
| 440 |
+
brightnessSlider.addEventListener('input', () => {
|
| 441 |
+
brightnessValue.textContent = brightnessSlider.value;
|
| 442 |
+
applyImageAdjustments();
|
| 443 |
+
});
|
| 444 |
+
|
| 445 |
+
contrastSlider.addEventListener('input', () => {
|
| 446 |
+
contrastValue.textContent = contrastSlider.value;
|
| 447 |
+
applyImageAdjustments();
|
| 448 |
+
});
|
| 449 |
+
|
| 450 |
+
sharpnessSlider.addEventListener('input', () => {
|
| 451 |
+
sharpnessValue.textContent = sharpnessSlider.value;
|
| 452 |
+
applyImageAdjustments();
|
| 453 |
+
});
|
| 454 |
+
|
| 455 |
+
colorBalanceSlider.addEventListener('input', () => {
|
| 456 |
+
colorBalanceValue.textContent = colorBalanceSlider.value;
|
| 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 |
+
});
|
| 473 |
+
|
| 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;
|
| 487 |
+
scannerLight.classList.remove('scanner-active');
|
| 488 |
+
updateScanButtons();
|
| 489 |
+
|
| 490 |
+
// Setze das Beispielbild
|
| 491 |
+
placeSampleImage();
|
| 492 |
+
|
| 493 |
+
// Update Scan-Informationen
|
| 494 |
+
updateScanInfo();
|
| 495 |
+
|
| 496 |
+
statusMessage.textContent = "Scanvorgang abgeschlossen";
|
| 497 |
+
}
|
| 498 |
+
|
| 499 |
+
function placeSampleImage() {
|
| 500 |
+
// Setze ein Beispielbild (in der echten App würden wir das gescannte Bild verwenden)
|
| 501 |
+
previewImage.src = "https://imagine.gsfc.nasa.gov/sci_instruments/images/example_astro_scan.jpg";
|
| 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() {
|
| 521 |
+
scanBtn.disabled = !isConnected || isScanning;
|
| 522 |
+
previewBtn.disabled = !isConnected || isScanning;
|
| 523 |
+
}
|
| 524 |
+
|
| 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>
|
| 534 |
+
`;
|
| 535 |
+
|
| 536 |
+
// Verbindungsinfo
|
| 537 |
+
if (currentScanner) {
|
| 538 |
+
connectionInfo.classList.remove('hidden');
|
| 539 |
+
let connectionText = '';
|
| 540 |
+
|
| 541 |
+
switch(currentScanner.connection) {
|
| 542 |
+
case 'thunderbolt':
|
| 543 |
+
connectionText = 'Verbindung via Thunderbolt (höchste Geschwindigkeit)';
|
| 544 |
+
break;
|
| 545 |
+
case 'firewire':
|
| 546 |
+
connectionText = 'Verbindung via Firewire (mittlere Geschwindigkeit)';
|
| 547 |
+
break;
|
| 548 |
+
default:
|
| 549 |
+
connectionText = 'Verbindung via USB (Standard-Geschwindigkeit)';
|
| 550 |
+
}
|
| 551 |
+
|
| 552 |
+
connectionTypeInfo.textContent = connectionText;
|
| 553 |
+
}
|
| 554 |
+
}
|
| 555 |
+
|
| 556 |
// Erweiterte Geräteerkennung mit Firewire/Thunderbolt
|
| 557 |
async function discoverScanners() {
|
| 558 |
statusMessage.textContent = `Suche nach Scannern (${getConnectionMethodName(currentConnectionMethod)})...`;
|
|
|
|
| 729 |
}
|
| 730 |
|
| 731 |
async function getUSBDevices() {
|
| 732 |
+
// Simuliere USB-Geräte
|
| 733 |
+
return new Promise(resolve => {
|
| 734 |
+
setTimeout(() => {
|
| 735 |
+
resolve([
|
| 736 |
+
{
|
| 737 |
+
name: 'imacon:usb:001',
|
| 738 |
+
model: 'Flextight X5',
|
| 739 |
+
vendor: 'Imacon',
|
| 740 |
+
type: 'Filmscanner'
|
| 741 |
+
}
|
| 742 |
+
]);
|
| 743 |
+
}, 300);
|
| 744 |
+
});
|
| 745 |
}
|
| 746 |
|
| 747 |
// Interface-spezifische Statusanzeige
|
|
|
|
| 804 |
updateConnectionStatus(connectionType);
|
| 805 |
updateScannerDetails(currentScanner);
|
| 806 |
|
| 807 |
+
// Aktiviere die Scan-Buttons
|
| 808 |
scanBtn.disabled = false;
|
| 809 |
previewBtn.disabled = false;
|
| 810 |
+
connectBtn.textContent = "Trennen";
|
| 811 |
+
connectBtn.classList.remove('bg-imacon');
|
| 812 |
+
connectBtn.classList.add('bg-red-500', 'hover:bg-red-600');
|
| 813 |
+
|
| 814 |
+
// Neue Event Listener für das Trennen
|
| 815 |
+
connectBtn.onclick = () => {
|
| 816 |
+
disconnectScanner();
|
| 817 |
+
};
|
| 818 |
|
| 819 |
+
statusMessage.textContent = `Erfolgreich verbunden via ${getConnectionMethodName(connectionType)}`;
|
| 820 |
+
updateScanInfo();
|
| 821 |
} catch (error) {
|
| 822 |
console.error("Connection error:", error);
|
| 823 |
statusMessage.textContent = `Verbindung fehlgeschlagen über ${getConnectionMethodName(connectionType)}`;
|
|
|
|
| 825 |
}
|
| 826 |
}
|
| 827 |
|
| 828 |
+
function disconnectScanner() {
|
| 829 |
+
isConnected = false;
|
| 830 |
+
currentScanner = null;
|
| 831 |
+
updateConnectionStatus('disconnected');
|
| 832 |
+
|
| 833 |
+
// Deaktiviere die Scan-Buttons
|
| 834 |
+
scanBtn.disabled = true;
|
| 835 |
+
previewBtn.disabled = true;
|
| 836 |
+
connectBtn.textContent = "Verbinden";
|
| 837 |
+
connectBtn.classList.remove('bg-red-500', 'hover:bg-red-600');
|
| 838 |
+
connectBtn.classList.add('bg-imacon');
|
| 839 |
+
|
| 840 |
+
// Zurück zum ursprünglichen Event Listener
|
| 841 |
+
connectBtn.onclick = () => {
|
| 842 |
+
if (scannerSelect.value) {
|
| 843 |
+
connectToScanner(scannerSelect.value);
|
| 844 |
+
}
|
| 845 |
+
};
|
| 846 |
+
|
| 847 |
+
statusMessage.textContent = "Verbindung getrennt";
|
| 848 |
+
}
|
| 849 |
+
|
| 850 |
function updateScannerDetails(scanner) {
|
| 851 |
scannerModel.textContent = scanner.model;
|
| 852 |
scannerVendor.textContent = scanner.vendor;
|
|
|
|
| 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>
|
prompts.txt
CHANGED
|
@@ -2,4 +2,5 @@ erstelle ein Webinterface zur Ansteuerung eines Imacon Flextight X5 Scanners
|
|
| 2 |
debugge die Seite, sie soll lokal mit einem per USB angeschlossenen Scanner funktionieren
|
| 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
|
|
|
|
|
|
| 2 |
debugge die Seite, sie soll lokal mit einem per USB angeschlossenen Scanner funktionieren
|
| 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
|