Korrekturen
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!-- src/app/upload-image-modal.component.html -->
|
||||
<div #uploadImageModal id="uploadImageModal" tabindex="-1" aria-hidden="true" class="fixed top-0 left-0 right-0 z-50 hidden w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-modal md:h-full">
|
||||
<div class="relative w-full h-full max-w-2xl md:h-auto">
|
||||
<div class="relative md:h-auto">
|
||||
<div class="relative bg-white rounded-lg shadow">
|
||||
<button type="button" class="absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center" (click)="closeModal()">
|
||||
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
@@ -8,32 +8,38 @@
|
||||
</svg>
|
||||
<span class="sr-only">Schließen</span>
|
||||
</button>
|
||||
<div class="p-6">
|
||||
<div class="p-6 relative">
|
||||
<h3 class="mb-4 text-xl font-medium text-gray-900">Bild zu Deck hinzufügen</h3>
|
||||
|
||||
<!-- Formular sichtbar, solange formVisible true ist -->
|
||||
<div *ngIf="formVisible">
|
||||
<div class="mb-4">
|
||||
<label for="imageFile" class="block text-sm font-medium text-gray-700">Bild hochladen</label>
|
||||
<input type="file" id="imageFile" (change)="onFileChange($event)" accept="image/*" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2" />
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="imageFile" class="block text-sm font-medium text-gray-700">Bild hochladen</label>
|
||||
<input type="file" id="imageFile" (change)="onFileChange($event)" accept="image/*" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Canvas sichtbar, sobald upload erfolgreich ist -->
|
||||
<div *ngIf="canvasVisible">
|
||||
<canvas #canvas class="border border-gray-300 rounded"></canvas>
|
||||
<!-- Canvas und Save Button sichtbar, sobald canvasVisible true ist -->
|
||||
<div *ngIf="canvasVisible" class="mt-4">
|
||||
<canvas #canvas class="border border-gray-300 rounded w-full h-auto"></canvas>
|
||||
<button (click)="save()" class="mt-4 bg-green-500 text-white py-2 px-4 rounded hover:bg-green-600">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Statusanzeige -->
|
||||
<div *ngIf="processingStatus" class="mt-4">
|
||||
<div *ngIf="processingStatus && !canvasVisible" class="mt-4">
|
||||
<p class="text-sm text-gray-700">{{ processingStatus }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Ladeanzeige -->
|
||||
<div *ngIf="loading" class="mt-4">
|
||||
<p class="text-sm text-gray-700">Verarbeitung läuft...</p>
|
||||
<!-- Ladeanzeige als Overlay -->
|
||||
<div *ngIf="loading" class="absolute inset-0 bg-gray-800 bg-opacity-50 flex items-center justify-center z-10">
|
||||
<div class="bg-white p-4 rounded shadow">
|
||||
<p class="text-sm text-gray-700">Verarbeitung läuft...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user