미디어 필터와 이미지 액션 정리
This commit is contained in:
@@ -2352,20 +2352,6 @@ const handlePreviewKeydownCapture = (event) => {
|
||||
onPreviewDeleteLine(lineIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
* 라이브 모드 이미지 설정 패널을 연다.
|
||||
* @param {number} lineIndex - 이미지 원본 줄 번호(0-based)
|
||||
* @returns {void}
|
||||
*/
|
||||
const onPreviewEditImage = (lineIndex) => {
|
||||
if (typeof lineIndex !== 'number' || lineIndex < 0) {
|
||||
return
|
||||
}
|
||||
|
||||
activeLogicalLineIndex.value = lineIndex
|
||||
ensureBlockPanelEngaged()
|
||||
}
|
||||
|
||||
/**
|
||||
* 라이브 모드에서 현재 줄을 이전 줄 끝에 병합한다.
|
||||
* @param {{ lineIndex: number, mergedLine: string }} payload - 병합 위치·결과 줄
|
||||
@@ -3653,7 +3639,6 @@ const handleKeydown = (event) => {
|
||||
@insert-after-line="onPreviewInsertAfterLine"
|
||||
@delete-line="onPreviewDeleteLine"
|
||||
@merge-with-previous-line="onPreviewMergeWithPreviousLine"
|
||||
@edit-image="onPreviewEditImage"
|
||||
@line-focus="handleLiveLineFocus"
|
||||
@line-blur="handleLiveLineBlur"
|
||||
@slash-update="onLiveSlashUpdate"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user