Files
mnote/design/11-wolai/pages/page-options.md
T
lix-2026 cdff672aa5 feat: align local-first workspace direction
Document the VSCode-like local-first product shape, demote Convex to a control-plane role, and retire stale architecture drafts.

Add local workspace migration/export references plus smoke coverage for no-Convex managed workspace startup, local markdown title/body/options persistence, asset upload behavior, and Convex fixture export.

Verification: git diff --cached --check; node scripts/check-local-first-convex-guard.js --staged; node scripts/task444-convex-workspace-export-local-fixture-smoke.js; node scripts/task166-local-first-managed-workspace-no-convex-smoke.js; node scripts/task167-local-markdown-title-body-options-no-convex-smoke.js
2026-05-19 08:11:58 +08:00

89 lines
3.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 页面选项
> 来源:https://www.wolai.com/wolai/... (页面选项)
>
> 实现状态:**大部分已接通** — 15 个页面选项中 10 个已接通,5 个 UI 可见待接线
## 页面级设置
| 选项 | 说明 | 默认 |
|------|------|------|
| **自适应宽度** | 页面宽度调整为最大可用宽度 | 关闭(固定 760px) |
| **小字体** | 正文字体从 16px → 14px,标题等比缩小 | 关闭 |
| **标题目录** | 页面右侧显示 H1-H4 + 子页面层级目录,`Ctrl+Shift+L` 切换 | 关闭 |
| **标题自动编号** | 标题前显示层级编号 | 关闭 |
| **编辑保护** | 锁定页面不可编辑,上锁图标,`Ctrl+Shift+C` 切换 | 关闭 |
### 标题目录
- 层级:主标题(H1) → 大标题(H2) → 中标题(H3) → 小标题(H4) → 子页面
- 宽度自适应:宽窗口=较宽目录,窄窗口=较窄目录,极窄=圆点竖线目录
- 可通过 `···` 菜单折叠/展开层级
### 自定义页面
| 选项 | 值 |
|------|-----|
| 字体 | 默认 / 宋体 / 楷体 |
| 布局 | 紧凑 / 默认 / 宽容 |
| 显示块引用数字 | 被引用的块右侧显示引用计数 |
| 折叠引用页面列表 | 页面下方反向引用列表默认折叠 |
| 隐藏子页面 | 子页面块不再显示 |
| 页面"嵌入到"默认位置 | 指定嵌入目标块的默认位置 |
### 全局选项(仅对自己生效)
| 选项 | 说明 |
|------|------|
| 显示块结构 | 所有块显示灰色虚线框,`Ctrl+Shift+U` 切换 |
| 拼写检查 | 英文拼写错误显示红色虚线(默认关闭) |
| Good Night 模式 | 暗色主题,`Ctrl+Alt+G` 切换 |
| 跟随系统 | 自动切换亮/暗主题 |
## 页面操作菜单
| 操作 | 说明 |
|------|------|
| 撤回 | `Ctrl+Z` 撤销上一步 |
| 删除页面 | 进入垃圾桶 |
| 移动到... | 移动到指定页面下成为子页面,或移动到其他工作空间 |
| 嵌入到... | 嵌入为页面引用 |
| 添加为公共模板 | 仅多人空间 |
| 复制页面链接 | 带/不带标题 |
| 行内页面引用 | 复制行内引用链接 |
| 嵌入页面引用 | 复制嵌入引用链接 |
| 导出页面 | 多种格式 |
| 页面历史 | 浏览/恢复历史版本(付费空间) |
| 字数统计 | 总字数、块数、分类统计 |
| 待办列表统计 | 完成进度 |
---
## mnote 实现状态
> **从 `pageOptionIsSupported` 和 `pageOptionHint` 函数判断(`layout.rs:427-447`**
### ✅ 已接通(UI 完全实现)
| 功能 | key | hint |
|------|-----|------|
| 自适应宽度 | `wideLayout` | 主内容列宽度立即变化(760px↔980px|
| 小字体 | `smallText` | 正文排版更紧凑 |
| 标题自动编号 | `showHeadingNumbers` | 标题前显示顺序编号 |
| 布局密度 | `layoutDensity` | 段落与列表间距会变化 |
| 页面字体 | `pageFont` | 当前页面字体会切换 |
| 暗色模式 | CSS | `ssr/styles.rs` 暗色样式定义 |
| 删除页面(进垃圾桶) | `tree.resource.archive` | `resource_trash.rs` |
| 移动到... | `tree` 命令 | `routes/tree.rs` |
| 字数统计 + 待办统计 | `computeLivePageStats()` | 实时计算 wordCount/blockCount/todoTotal |
### 🔌 已注册但待接线(UI 选项可见,功能未完全接通)
| 功能 | key | hint |
|------|-----|------|
| 标题目录(TOC | `showToc` | "当前 Rust 壳还没有正式目录面板" |
| 编辑保护 | `protectEditing` | "当前主编辑器只显示降级说明" |
| 折叠反向引用 | `collapseBacklinks` | "当前 Rust 壳未挂回链面板" |
| 隐藏子页面 | `hideChildPages` | "当前页面壳还没有子页面块显隐" |
| 显示块引用数字 | `showBlockRefCount` | "当前页面壳未显示块引用计数" |
> 全部 page options 的 UI 开关面板实现在 `layout.rs:3760-3775`,每个 option 渲染为 toggle switchsupported 的显示蓝色开关,unsupported 的显示灰色开关+提示。`page_aggregate/builder.rs` 提供 page_options 的读写链。