dynamically load gallery

This commit is contained in:
Henry Jameson 2026-06-04 18:27:09 +03:00
commit 3aca1ce6c0
7 changed files with 24 additions and 15 deletions

View file

@ -1,9 +1,9 @@
import { mapState as mapPiniaState } from 'pinia'
import { mapGetters, mapState } from 'vuex'
import { defineAsyncComponent } from 'vue'
import StatusBody from 'src/components/status_body/status_body.vue'
import Attachment from '../attachment/attachment.vue'
import Gallery from '../gallery/gallery.vue'
import LinkPreview from '../link-preview/link-preview.vue'
import Poll from '../poll/poll.vue'
@ -132,7 +132,9 @@ const StatusContent = {
components: {
Attachment,
Poll,
Gallery,
Gallery: defineAsyncComponent(
() => import( 'src/components/gallery/gallery.vue')
),
LinkPreview,
StatusBody,
},

View file

@ -34,7 +34,7 @@
/>
</div>
<gallery
<Gallery
v-if="status.attachments.length !== 0"
class="attachments media-body"
:compact="compact"