feat(web): add Vue workspace with file tree, tabs, autosave and live sync
- Login and first-run setup screens - File tree with inline create/rename, context menu, drag-and-drop move and trash with undo; all operations update the UI first and roll back on failure - Tabs keep a CodeMirror state each; edits autosave after 500 ms with If-Match revisions, unsent edits persist in IndexedDB, and conflicts or remote deletions surface as banners with explicit choices - WebSocket events sync external edits, moves and deletions into open tabs; reconnects trigger a full resync - Pasted or dropped images show instantly and upload to note.assets/ - Responsive layout with a swipe-in sidebar drawer on phones - Switch to TypeScript 6: vue-tsc does not support TypeScript 7 yet
This commit is contained in:
1 parent
c4d2bd4636
commit
02d904056c
28 files changed
+2231
-398
No files matched your search
+4
-9
@@ -1,11 +1,6 @@
|
||||
// M0 原型入口:只挂载编辑器,M1 替换为 Vue 外壳
|
||||
import { createEditor } from './editor'
|
||||
import sample from './demo/sample.md?raw'
|
||||
import { createApp } from 'vue'
|
||||
import App from './app/App.vue'
|
||||
import './themes/base.css'
|
||||
import './app/app.css'
|
||||
|
||||
// ?repeat=N 将示例重复 N 次,用于大文档性能测试
|
||||
const repeat = Number(new URLSearchParams(location.search).get('repeat') ?? 1)
|
||||
const doc = Array.from({ length: Math.max(1, repeat) }, () => sample).join('\n')
|
||||
|
||||
const view = createEditor({ parent: document.getElementById('app')!, doc })
|
||||
;(window as unknown as { rawmarkView: typeof view }).rawmarkView = view
|
||||
createApp(App).mount('#app')
|
||||
Reference in new issue
Block a user