edit functionality + separation betw upload & edit
This commit is contained in:
@@ -11,24 +11,14 @@
|
||||
<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>
|
||||
|
||||
<!-- 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>
|
||||
<!-- Formular zum Hochladen -->
|
||||
<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>
|
||||
|
||||
<!-- Statusanzeige -->
|
||||
<div *ngIf="processingStatus && !canvasVisible" class="mt-4">
|
||||
<div *ngIf="processingStatus" class="mt-4">
|
||||
<p class="text-sm text-gray-700">{{ processingStatus }}</p>
|
||||
</div>
|
||||
|
||||
@@ -42,4 +32,3 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user