aboutsummaryrefslogtreecommitdiff
path: root/src/components/gallery/gallery.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/gallery/gallery.vue')
-rw-r--r--src/components/gallery/gallery.vue10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/gallery/gallery.vue b/src/components/gallery/gallery.vue
index 18b94d58..f9cad8a9 100644
--- a/src/components/gallery/gallery.vue
+++ b/src/components/gallery/gallery.vue
@@ -6,8 +6,8 @@
>
<div class="gallery-rows">
<div
- v-for="(row, index) in rows"
- :key="index"
+ v-for="(row, rowIndex) in rows"
+ :key="rowIndex"
class="gallery-row"
:style="rowStyle(row)"
:class="{ '-audio': row.audio, '-minimal': row.minimal, '-grid': grid }"
@@ -16,8 +16,8 @@
class="gallery-row-inner"
:class="{ '-grid': grid }"
>
- <attachment
- v-for="attachment in row.items"
+ <Attachment
+ v-for="(attachment, attachmentIndex) in row.items"
:key="attachment.id"
class="gallery-item"
:nsfw="nsfw"
@@ -26,6 +26,8 @@
:size="size"
:editable="editable"
:remove="removeAttachment"
+ :shiftUp="!(attachmentIndex === 0 && rowIndex === 0) && shiftUpAttachment"
+ :shiftDn="!(attachmentIndex === row.items.length - 1 && rowIndex === rows.length - 1) && shiftDnAttachment"
:edit="editAttachment"
:description="descriptions && descriptions[attachment.id]"
:hide-description="size === 'small' || tooManyAttachments && hidingLong"