미디어 필터와 이미지 액션 정리

This commit is contained in:
2026-06-17 10:28:53 +09:00
parent 11f8402cb6
commit 54d32af617
9 changed files with 68 additions and 93 deletions

View File

@@ -79,7 +79,6 @@ const emit = defineEmits([
'insert-after-line',
'delete-line',
'merge-with-previous-line',
'edit-image',
'line-focus',
'line-blur',
'slash-update',
@@ -2034,33 +2033,6 @@ const deletePreviewCardBlock = (block) => {
})
}
/**
* 라이브 이미지 설정 패널을 요청한다.
* @param {Object} block - 이미지 블록
* @returns {void}
*/
const editImageBlock = (block) => {
if (!props.interactive || typeof block.meta?.startLine !== 'number') {
return
}
emit('edit-image', block.meta.startLine)
}
/**
* 라이브 갤러리의 특정 이미지 설정 패널을 요청한다.
* @param {Object} block - 갤러리 블록
* @param {number} imageIndex - 이미지 인덱스
* @returns {void}
*/
const editGalleryImage = (block, imageIndex) => {
if (!props.interactive || typeof block.meta?.startLine !== 'number') {
return
}
emit('edit-image', block.meta.startLine + imageIndex + 1)
}
/**
* 라이브 갤러리에서 특정 이미지만 삭제한다.
* @param {Object} block - 갤러리 블록
@@ -3170,14 +3142,6 @@ onBeforeUnmount(() => {
@keydown="onPreviewCardKeydown($event, block)"
>
<div class="content-markdown-renderer__image-actions absolute right-2 top-2 z-10 flex gap-1.5 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100">
<button
class="content-markdown-renderer__image-edit content-markdown-renderer__preview-card-action rounded bg-[#15171a]/85 px-2.5 py-1 text-xs font-semibold text-white shadow transition-colors hover:bg-[#15171a] focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--site-accent)]"
type="button"
aria-label="이미지 편집"
@click.stop="editImageBlock(block)"
>
편집
</button>
<button
class="content-markdown-renderer__image-delete content-markdown-renderer__preview-card-action rounded bg-[#15171a]/85 px-2.5 py-1 text-xs font-semibold text-white shadow transition-colors hover:bg-red-600 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--site-accent)]"
type="button"
@@ -3377,14 +3341,6 @@ onBeforeUnmount(() => {
v-if="interactive"
class="content-markdown-renderer__gallery-item-actions absolute right-2 top-2 z-10 flex gap-1.5"
>
<button
class="content-markdown-renderer__gallery-image-edit content-markdown-renderer__preview-card-action rounded bg-[#15171a]/85 px-2.5 py-1 text-xs font-semibold text-white shadow transition-colors hover:bg-[#15171a] focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--site-accent)]"
type="button"
aria-label="갤러리 이미지 편집"
@click.stop="editGalleryImage(block, row.startIndex + rowImageIndex)"
>
편집
</button>
<button
class="content-markdown-renderer__gallery-image-delete content-markdown-renderer__preview-card-action rounded bg-[#15171a]/85 px-2.5 py-1 text-xs font-semibold text-white shadow transition-colors hover:bg-red-600 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--site-accent)]"
type="button"