슬래시 메뉴 상태 초기화 정리
This commit is contained in:
@@ -168,6 +168,16 @@ const liveSlashVisible = computed(() => liveSlashSourceLine.value !== null)
|
|||||||
const liveSlashSuppressedLineList = computed(() => [...liveSlashSuppressedLines.value])
|
const liveSlashSuppressedLineList = computed(() => [...liveSlashSuppressedLines.value])
|
||||||
|
|
||||||
const visibleLiveSlashCommands = computed(() => filterSlashCommands(liveSlashQuery.value))
|
const visibleLiveSlashCommands = computed(() => filterSlashCommands(liveSlashQuery.value))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 슬래시 메뉴 입력 상태를 초기화한다.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
const clearLiveSlashState = () => {
|
||||||
|
liveSlashSourceLine.value = null
|
||||||
|
liveSlashQuery.value = ''
|
||||||
|
liveSlashHighlightedIndex.value = 0
|
||||||
|
}
|
||||||
/** 되돌리기 히스토리 최대 보관 개수 */
|
/** 되돌리기 히스토리 최대 보관 개수 */
|
||||||
const EDITOR_UNDO_LIMIT = 100
|
const EDITOR_UNDO_LIMIT = 100
|
||||||
/** @type {import('vue').Ref<Array<string|{ value: string, selectionStart: number, selectionEnd: number }>>} 본문 되돌리기 스택 */
|
/** @type {import('vue').Ref<Array<string|{ value: string, selectionStart: number, selectionEnd: number }>>} 본문 되돌리기 스택 */
|
||||||
@@ -1039,9 +1049,7 @@ const syncWriteSlashState = () => {
|
|||||||
|
|
||||||
if (liveSlashSuppressedLines.value.has(line)) {
|
if (liveSlashSuppressedLines.value.has(line)) {
|
||||||
if (liveSlashSourceLine.value !== null) {
|
if (liveSlashSourceLine.value !== null) {
|
||||||
liveSlashSourceLine.value = null
|
clearLiveSlashState()
|
||||||
liveSlashQuery.value = ''
|
|
||||||
liveSlashHighlightedIndex.value = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -2532,9 +2540,7 @@ const onLiveSlashUpdate = (payload) => {
|
|||||||
|
|
||||||
if (liveSlashSuppressedLines.value.has(payload.sourceLine)) {
|
if (liveSlashSuppressedLines.value.has(payload.sourceLine)) {
|
||||||
if (liveSlashSourceLine.value !== null) {
|
if (liveSlashSourceLine.value !== null) {
|
||||||
liveSlashSourceLine.value = null
|
clearLiveSlashState()
|
||||||
liveSlashQuery.value = ''
|
|
||||||
liveSlashHighlightedIndex.value = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -2594,9 +2600,7 @@ const onLiveSlashEnd = (payload) => {
|
|||||||
liveSlashSuppressedLines.value = next
|
liveSlashSuppressedLines.value = next
|
||||||
}
|
}
|
||||||
|
|
||||||
liveSlashSourceLine.value = null
|
clearLiveSlashState()
|
||||||
liveSlashQuery.value = ''
|
|
||||||
liveSlashHighlightedIndex.value = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2610,9 +2614,7 @@ const cancelLiveSlashCommand = () => {
|
|||||||
liveSlashSuppressedLines.value = new Set([...liveSlashSuppressedLines.value, line])
|
liveSlashSuppressedLines.value = new Set([...liveSlashSuppressedLines.value, line])
|
||||||
}
|
}
|
||||||
|
|
||||||
liveSlashSourceLine.value = null
|
clearLiveSlashState()
|
||||||
liveSlashQuery.value = ''
|
|
||||||
liveSlashHighlightedIndex.value = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2678,9 +2680,7 @@ const applyLiveSlashCommand = (command) => {
|
|||||||
nextSuppressed.delete(line)
|
nextSuppressed.delete(line)
|
||||||
liveSlashSuppressedLines.value = nextSuppressed
|
liveSlashSuppressedLines.value = nextSuppressed
|
||||||
replaceLineRange(line, line, replacementLines, false)
|
replaceLineRange(line, line, replacementLines, false)
|
||||||
liveSlashSourceLine.value = null
|
clearLiveSlashState()
|
||||||
liveSlashQuery.value = ''
|
|
||||||
liveSlashHighlightedIndex.value = 0
|
|
||||||
|
|
||||||
if (activeMode.value === 'write') {
|
if (activeMode.value === 'write') {
|
||||||
focusTextareaAfterSlashCommand(line, replacementLines)
|
focusTextareaAfterSlashCommand(line, replacementLines)
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
# 업데이트 이력
|
# 업데이트 이력
|
||||||
|
|
||||||
|
## v1.11.86
|
||||||
|
|
||||||
|
- 관리자 Markdown 에디터의 슬래시 메뉴 상태 초기화 로직을 `clearLiveSlashState`로 통합.
|
||||||
|
- 소스·라이브 슬래시 입력 종료 경로의 상태 정리 방식을 일관되게 정리.
|
||||||
|
|
||||||
## v1.11.85
|
## v1.11.85
|
||||||
|
|
||||||
- 관리자 Markdown 에디터의 슬래시 메뉴 선택 항목 스크롤 계산을 `markdown-slash-menu-scroll` helper로 분리.
|
- 관리자 Markdown 에디터의 슬래시 메뉴 선택 항목 스크롤 계산을 `markdown-slash-menu-scroll` helper로 분리.
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "sori.studio",
|
"name": "sori.studio",
|
||||||
"version": "1.11.85",
|
"version": "1.11.86",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sori.studio",
|
"name": "sori.studio",
|
||||||
"version": "1.11.85",
|
"version": "1.11.86",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxtjs/tailwindcss": "^6.14.0",
|
"@nuxtjs/tailwindcss": "^6.14.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sori.studio",
|
"name": "sori.studio",
|
||||||
"version": "1.11.85",
|
"version": "1.11.86",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"imports": {
|
"imports": {
|
||||||
|
|||||||
Reference in New Issue
Block a user