Update package-lock.json and package.json to include 'globals' dependency and improve code formatting in various components for better readability.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 54s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 54s
This commit is contained in:
@@ -2,22 +2,28 @@
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-2">
|
||||
{{ label }}
|
||||
<span v-if="!required" class="text-gray-500 text-xs">(optional)</span>
|
||||
<span
|
||||
v-if="!required"
|
||||
class="text-gray-500 text-xs"
|
||||
>(optional)</span>
|
||||
</label>
|
||||
|
||||
<div v-if="imageFilename" class="mb-2">
|
||||
<div
|
||||
v-if="imageFilename"
|
||||
class="mb-2"
|
||||
>
|
||||
<div class="relative inline-block">
|
||||
<img
|
||||
:src="`/api/personen/${imageFilename}?width=100&height=100`"
|
||||
:alt="label"
|
||||
class="w-24 h-24 object-cover rounded-lg border-2 border-gray-300"
|
||||
/>
|
||||
>
|
||||
<button
|
||||
v-if="!uploading"
|
||||
@click="removeImage"
|
||||
class="absolute -top-2 -right-2 bg-red-600 text-white rounded-full p-1 hover:bg-red-700 transition-colors"
|
||||
type="button"
|
||||
title="Bild entfernen"
|
||||
@click="removeImage"
|
||||
>
|
||||
<X :size="14" />
|
||||
</button>
|
||||
@@ -40,13 +46,22 @@
|
||||
class="hidden"
|
||||
:disabled="uploading"
|
||||
@change="handleFileSelect"
|
||||
/>
|
||||
>
|
||||
<div class="text-center">
|
||||
<div v-if="uploading" class="flex items-center justify-center gap-2 text-gray-600">
|
||||
<Loader2 :size="16" class="animate-spin" />
|
||||
<div
|
||||
v-if="uploading"
|
||||
class="flex items-center justify-center gap-2 text-gray-600"
|
||||
>
|
||||
<Loader2
|
||||
:size="16"
|
||||
class="animate-spin"
|
||||
/>
|
||||
<span>Wird hochgeladen...</span>
|
||||
</div>
|
||||
<div v-else class="text-sm text-gray-600">
|
||||
<div
|
||||
v-else
|
||||
class="text-sm text-gray-600"
|
||||
>
|
||||
<span v-if="!imageFilename">📷 Bild auswählen oder hier ablegen</span>
|
||||
<span v-else>🔄 Bild ändern</span>
|
||||
</div>
|
||||
@@ -54,7 +69,12 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<p v-if="error" class="mt-1 text-sm text-red-600">{{ error }}</p>
|
||||
<p
|
||||
v-if="error"
|
||||
class="mt-1 text-sm text-red-600"
|
||||
>
|
||||
{{ error }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user