Show images in diary at clicking icon

This commit is contained in:
Torsten Schulz
2024-10-21 18:48:20 +02:00
parent 0232202f8d
commit 0a1a2ee087

View File

@@ -172,6 +172,7 @@
</div>
</div>
</div>
<img v-if="showImage" class="img" :src="imageUrl" @click="closeImage()" />
</template>
<script>
@@ -766,6 +767,7 @@ export default {
responseType: 'blob',
});
this.imageUrl = URL.createObjectURL(response.data);
this.showImage = true;
} catch (error) {
console.error("Failed to load member image:", error);
this.imageUrl = null;
@@ -1023,8 +1025,18 @@ input[type="number"] {
flex: 1;
}
.img-icon {
cursor: pointer;
}
img {
max-width: 100%;
max-width: 75%;
max-height: 75%;
position: absolute;
left: 12.5%;
top: 12.5%;
box-shadow: 3px 3px 2px;
border: 3px double #aaa;
}
.memberImage {