From 5d746d4ee5fca16392ef8b61d0277bc16af540b4 Mon Sep 17 00:00:00 2001 From: ShittyKopper Date: Wed, 27 Dec 2023 13:19:29 +0300 Subject: [PATCH] fix: hide photoswipe alt text when its empty --- packages/frontend/src/components/MkMediaList.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/frontend/src/components/MkMediaList.vue b/packages/frontend/src/components/MkMediaList.vue index ff227b0ef9..8f73018734 100644 --- a/packages/frontend/src/components/MkMediaList.vue +++ b/packages/frontend/src/components/MkMediaList.vue @@ -172,6 +172,12 @@ onMounted(() => { el.appendChild(textBox); pwsp.on('change', (a) => { + if (pwsp.currSlide?.data.comment) { + textBox.style.display = ''; + } else { + textBox.style.display = 'none'; + } + textBox.textContent = pwsp.currSlide.data.comment; }); },