Compare commits

..

No commits in common. "ecc98924e3903ab399c07482ce226a57c165f325" and "78e3f0ff0ccae4c281aee5e6096258349bedb605" have entirely different histories.

2 changed files with 1 additions and 11 deletions

View File

@ -155,7 +155,7 @@ function getFileUrl(file: File) {
<img v-if="state.cover_image && typeof state.cover_image === 'string'" :src="$storage(state.cover_image)" alt="Cover" class="size-1/3 content-center rounded-lg">
<ClientOnly>
<img v-if="state.cover_image && isFile(state.cover_image)" :src="getFileUrl(state.cover_image)" alt="Cover" class="size-1/3 content-center rounded-lg">
</ClientOnly>
</ClientOnly>>
<UFormGroup label="Cover" name="cover_image">
<UInput type="file" @change="handleCoverImageInput" />
</UFormGroup>

View File

@ -91,13 +91,6 @@ async function onSubmit() {
},
})
}
function isFile(value: any): value is File {
return value instanceof File
}
function getFileUrl(file: File) {
return URL.createObjectURL(file)
}
</script>
<template>
@ -130,9 +123,6 @@ function getFileUrl(file: File) {
<UFormGroup label="Beschreibung" name="description">
<UTextarea v-model="state.description" />
</UFormGroup>
<ClientOnly>
<img v-if="state.cover_image && isFile(state.cover_image)" :src="getFileUrl(state.cover_image)" alt="Cover" class="size-1/3 content-center rounded-lg">
</ClientOnly>
<UFormGroup label="Cover" name="cover_image">
<UInput type="file" @change="handleCoverImageInput" />
</UFormGroup>