feat: support markdown in memos
ci / gitleaks (push) Successful in 16s
ci / docker (push) Successful in 4m16s

This commit is contained in:
2026-09-15 14:39:44 +08:00
parent 9e1847329b
commit fa11e5f432
4 changed files with 101 additions and 3 deletions
+11
View File
@@ -35,6 +35,17 @@ describe('memo shell integration', () => {
expect(app).toContain('<div class="field-label"><span>任务备注</span>')
})
it('adds a compact, reusable Markdown editor and preview to memo details', () => {
expect(editor).toContain("import { applyMarkdownFormat, renderMarkdown")
expect(editor).toContain('aria-label="备忘录 Markdown 格式"')
expect(editor).toContain('aria-label="备忘录 Markdown 预览"')
expect(editor).toContain('@keydown="handleMemoBodyShortcut"')
expect(editor).toContain('v-if="!memoPreview && !memo.deleted_at"')
expect(css).toContain('.memo-markdown-field{display:grid;gap:7px')
expect(css).toContain('.memo-markdown-editor .markdown-toolbar{')
expect(css).toContain('.memo-markdown-preview{min-height:250px')
})
it('tracks editor state in the shell, reserves desktop space, hides the FAB, and marks mobile background regions inert', () => {
expect(app).toContain('const memoDetailOpen = ref(false)')
expect(app).toContain("'memo-detail-open': activeView==='memos' && memoDetailOpen")