收口 Rust Web 入口与 AI 写入链
- 将 3000 主入口继续收口到 mnote-web,补齐 /favicon.ico、/api/auth、session alias、AI run 等 Rust Web 路由边界。 - 更新登录页与 Convex Auth 代理,支持测试账号快速登录写入真实 Convex Auth cookie。 - 推进页面设置、Wolai 对齐、Phase 7 AI kernel/CLI-first 设计文档与相关 smoke 脚本。 - 更新 leptos-tiptap 生成资产、mnote-cli/bridge-runtime、前端依赖和 dev/prod 启动脚本。
This commit is contained in:
@@ -583,7 +583,6 @@ struct DocumentSaveCommandPayload {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct DocumentOptionsCommandPayload {
|
||||
document_id: String,
|
||||
workspace_id: Option<String>,
|
||||
options: DocumentOptionsPatchPayload,
|
||||
}
|
||||
|
||||
@@ -7993,6 +7992,46 @@ fn execute_command(
|
||||
_ => "documents.options.update",
|
||||
};
|
||||
let options = payload.options;
|
||||
let mut options_json = serde_json::Map::new();
|
||||
if let Some(value) = options.wide_layout {
|
||||
options_json.insert("wideLayout".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.small_text {
|
||||
options_json.insert("smallText".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.show_heading_numbers {
|
||||
options_json.insert("showHeadingNumbers".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.show_toc {
|
||||
options_json.insert("showToc".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.show_structure {
|
||||
options_json.insert("showStructure".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.protect_editing {
|
||||
options_json.insert("protectEditing".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.show_word_count {
|
||||
options_json.insert("showWordCount".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.collapse_backlinks {
|
||||
options_json.insert("collapseBacklinks".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.page_font.clone() {
|
||||
options_json.insert("pageFont".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.layout_density.clone() {
|
||||
options_json.insert("layoutDensity".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.hide_child_pages {
|
||||
options_json.insert("hideChildPages".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.show_block_ref_count {
|
||||
options_json.insert("showBlockRefCount".into(), json!(value));
|
||||
}
|
||||
if let Some(value) = options.embed_default_block_id.clone() {
|
||||
options_json.insert("embedDefaultBlockId".into(), json!(value));
|
||||
}
|
||||
let command = CommandEnvelope {
|
||||
name: command_name.into(),
|
||||
command_id: command_wire.command_id.clone(),
|
||||
@@ -8034,22 +8073,7 @@ fn execute_command(
|
||||
payload_json: request.payload_json,
|
||||
args_json: json!({
|
||||
"id": payload.document_id,
|
||||
"workspaceId": payload.workspace_id,
|
||||
"options": {
|
||||
"wideLayout": options.wide_layout,
|
||||
"smallText": options.small_text,
|
||||
"showHeadingNumbers": options.show_heading_numbers,
|
||||
"showToc": options.show_toc,
|
||||
"showStructure": options.show_structure,
|
||||
"protectEditing": options.protect_editing,
|
||||
"showWordCount": options.show_word_count,
|
||||
"collapseBacklinks": options.collapse_backlinks,
|
||||
"pageFont": options.page_font,
|
||||
"layoutDensity": options.layout_density,
|
||||
"hideChildPages": options.hide_child_pages,
|
||||
"showBlockRefCount": options.show_block_ref_count,
|
||||
"embedDefaultBlockId": options.embed_default_block_id,
|
||||
},
|
||||
"options": Value::Object(options_json),
|
||||
}),
|
||||
}))
|
||||
}
|
||||
@@ -13395,21 +13419,9 @@ mod tests {
|
||||
plan.args_json,
|
||||
json!({
|
||||
"id": "doc_1",
|
||||
"workspaceId": "ws_1",
|
||||
"options": {
|
||||
"wideLayout": Value::Null,
|
||||
"smallText": Value::Null,
|
||||
"showHeadingNumbers": Value::Null,
|
||||
"showToc": true,
|
||||
"showStructure": Value::Null,
|
||||
"protectEditing": Value::Null,
|
||||
"showWordCount": Value::Null,
|
||||
"collapseBacklinks": Value::Null,
|
||||
"pageFont": Value::Null,
|
||||
"layoutDensity": "compact",
|
||||
"hideChildPages": Value::Null,
|
||||
"showBlockRefCount": Value::Null,
|
||||
"embedDefaultBlockId": Value::Null,
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user