summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-27 17:11:52 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-09-27 17:11:52 +0200
commit43b5da82f16f1197df8ab68029132c2ba17a09d5 (patch)
tree6f22965c560083af4b9a24e1c4f0f34e400a893f
parent15ea7780bf8e3173271c605915085d57ae785a8b (diff)
Fix images preview on mobile
-rw-r--r--components/FilePreview.vue4
-rw-r--r--pages/models/_id/index.vue2
2 files changed, 3 insertions, 3 deletions
diff --git a/components/FilePreview.vue b/components/FilePreview.vue
index 5b1c385..3892857 100644
--- a/components/FilePreview.vue
+++ b/components/FilePreview.vue
@@ -1,6 +1,6 @@
<template lang="pug">
- .file-preview.h-full.overflow-hidden
- img.h-full.block.mx-auto(
+ .file-preview.h-full.overflow-hidden.grid.items-center
+ img.block.mx-auto(
v-if="isImage(path)"
:src="baseAPI + '' + path"
)
diff --git a/pages/models/_id/index.vue b/pages/models/_id/index.vue
index 2f90025..d242161 100644
--- a/pages/models/_id/index.vue
+++ b/pages/models/_id/index.vue
@@ -114,7 +114,7 @@
.images.shadow-sm.rounded-lg.bg-white.p-4.w-full(v-if="model.uploads")
.block.gap-4.h-full(class="md:flex")
.w-full(class="md:w-4/5")
- .image.bg-gray-900.border-2.rounded-xl.w-full.h-full.overflow-hidden(v-if="model.uploads && model.uploads[selectedUpload]")
+ .image.bg-gray-900.border-2.rounded-xl.w-full.h-64.overflow-hidden(class="sm:h-full" v-if="model.uploads && model.uploads[selectedUpload]")
file-preview(:path="model.uploads[selectedUpload].filepath" bg="#111827" controls="1")
.w-full.mt-8.h-auto(class="md:w-1/5 md:mt-0" v-if="model")
.grid.grid-cols-3.gap-4.h-full.overflow-y-auto.grid-mini(class="md:grid-cols-2")