From 91da6e116eaa31a234906d421e535c1b4d01746e Mon Sep 17 00:00:00 2001 From: eezd Date: Sat, 17 Oct 2026 17:12:43 +0800 Subject: [PATCH] Add mobile format toolbar, image picker and move-to dialog - Markdown format commands shared by Ctrl+B/I/K and a toolbar above the soft keyboard on touch devices; bold and italic stack correctly - Fit the app to the visual viewport so the keyboard does not cover the caret or the toolbar - Insert images from the photo library or a file picker - Move notes and folders with a folder picker from the file tree menu or the command palette - Open the file tree menu with a long press on touch devices --- web/src/app/MobileToolbar.vue | 78 ++++++++++++++++++++ web/src/app/MoveDialog.vue | 91 +++++++++++++++++++++++ web/src/app/QuickSwitcher.vue | 14 +--- web/src/app/SettingsDialog.vue | 3 + web/src/app/TreeNode.vue | 37 +++++++++- web/src/app/Workspace.vue | 4 + web/src/app/app.css | 22 +++++- web/src/app/fuzzy.ts | 12 +++ web/src/app/viewport.ts | 19 +++++ web/src/app/workspace.ts | 31 +++++++- web/src/editor/format.test.ts | 71 ++++++++++++++++++ web/src/editor/format.ts | 129 +++++++++++++++++++++++++++++++++ web/src/editor/index.ts | 11 ++- web/src/editor/paste.ts | 111 +++++++++++++++------------- 14 files changed, 565 insertions(+), 68 deletions(-) create mode 100644 web/src/app/MobileToolbar.vue create mode 100644 web/src/app/MoveDialog.vue create mode 100644 web/src/app/viewport.ts create mode 100644 web/src/editor/format.test.ts create mode 100644 web/src/editor/format.ts diff --git a/web/src/app/MobileToolbar.vue b/web/src/app/MobileToolbar.vue new file mode 100644 index 0000000..8d1fe45 --- /dev/null +++ b/web/src/app/MobileToolbar.vue @@ -0,0 +1,78 @@ + + + diff --git a/web/src/app/MoveDialog.vue b/web/src/app/MoveDialog.vue new file mode 100644 index 0000000..bfb793c --- /dev/null +++ b/web/src/app/MoveDialog.vue @@ -0,0 +1,91 @@ + + + diff --git a/web/src/app/QuickSwitcher.vue b/web/src/app/QuickSwitcher.vue index da90c83..63cf23c 100644 --- a/web/src/app/QuickSwitcher.vue +++ b/web/src/app/QuickSwitcher.vue @@ -1,7 +1,7 @@