This commit is contained in:
philipp lang 2024-04-14 00:24:40 +02:00
parent 46d28877d9
commit 35593ba37b
1 changed files with 6 additions and 6 deletions

View File

@ -5,19 +5,19 @@
<span v-show="required" class="text-red-800">&nbsp;*</span>
</span>
<div class="h-[35px] border-2 border-solid relative rounded-lg cursor-pointer flex-none border-gray-600 text-gray-300 bg-gray-700">
<div class="flex items-center justify-center h-full" v-if="inner === null">
<div v-if="inner === null" class="flex items-center justify-center h-full">
<div class="relative text-sm text-gray-300 leading-none">Klicken oder Datei hierhin ziehen zum hochladen</div>
<input class="hidden" ref="uploader" @change="upload($event.target.files)" type="file" :name="name" :id="id" :multiple="false" />
<input :id="id" class="hidden" type="file" :name="name" :multiple="false" @change="upload($event.target.files)" />
<div class="absolute w-full h-full top-0 left-0 cursor-pointer" @drop="onDropping" @dragenter="onDragEnter" @dragover="onDragOver" @dragleave="onDragLeave"></div>
</div>
<div class="flex justify-between items-center h-full space-x-2 px-2" v-else>
<div v-else class="flex justify-between items-center h-full space-x-2 px-2">
<img :src="inner.icon" class="w-6 h-6" />
<div v-text="inner.file_name" class="text-sm text-gray-300 leading-none grow"></div>
<a href="#" @click.prevent="onDelete" v-tooltip="`Löschen`" class="flex justify-center items-center w-6 h-6 rounded-full bg-red-200">
<div class="text-sm text-gray-300 leading-none grow" v-text="inner.file_name"></div>
<a v-tooltip="`Löschen`" href="#" class="flex justify-center items-center w-6 h-6 rounded-full bg-red-200" @click.prevent="onDelete">
<trash-icon class="text-red-800 w-3 h-3"></trash-icon>
</a>
<a :href="inner.original_url" v-tooltip="`Öffnen`" class="flex justify-center items-center w-6 h-6 rounded-full bg-primary-700" target="_BLANK">
<a v-tooltip="`Öffnen`" :href="inner.original_url" class="flex justify-center items-center w-6 h-6 rounded-full bg-primary-700" target="_BLANK">
<external-icon class="text-primary-200 w-3 h-3"></external-icon>
</a>
</div>