Extend network stack: session/auth, WebSocket, cookie/multipart primitives
Add the network-extension wave to lib/net and the web ABI plugin:
- lib/net cookie_parse / multipart_parse host primitives (EN/ZH)
- plugins/web session store + /admin login gate + WebSocket client/server
- ext/web author surface (EN/ZH) for session, auth, ws
- form update flow and page-level validation echo tests
- fix string escapes: \xHH, \u{...}, unknown escapes kept verbatim
- map Chinese component slots (导航/侧栏/页脚) so sidebar renders
- resolve relative static/db paths against the entry script dir (entry_dir)
- new tutorial chapter 14, EN/ZH example sites, and gold tests
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7dfa161422
commit
7645dd4c1f
47 files changed
+3380
-75
No files matched your search
@@ -253,19 +253,19 @@ pub fn as_compose(table: &Value) -> Value {
|
||||
fn infer_slot(src: &str) -> String {
|
||||
let base = src.rsplit('.').next().unwrap_or(src);
|
||||
match base {
|
||||
"nav" | "links" => "nav".into(),
|
||||
"side" | "sidebar" => "sidebar".into(),
|
||||
"foot" | "footer" => "footer".into(),
|
||||
"nav" | "links" | "导航" => "nav".into(),
|
||||
"side" | "sidebar" | "侧栏" => "sidebar".into(),
|
||||
"foot" | "footer" | "页脚" => "footer".into(),
|
||||
other => other.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn normalize_slot(name: &str) -> String {
|
||||
match name {
|
||||
"nav" | "links" => "nav".into(),
|
||||
"side" | "sidebar" => "sidebar".into(),
|
||||
"foot" | "footer" => "footer".into(),
|
||||
"main" | "index" | "" => "main".into(),
|
||||
"nav" | "links" | "导航" => "nav".into(),
|
||||
"side" | "sidebar" | "侧栏" => "sidebar".into(),
|
||||
"foot" | "footer" | "页脚" => "footer".into(),
|
||||
"main" | "index" | "" | "主体" => "main".into(),
|
||||
other => other.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user