feat: add page surfaces and collapsible sidebar

This commit is contained in:
2026-11-10 16:18:47 +08:00
parent e0eff7755f
commit 82f9256a84
35 changed files with 1480 additions and 1751 deletions
+14 -1
View File
@@ -336,6 +336,8 @@ impl Worker {
"click"
| "focus"
| "scroll"
| "page-pan"
| "page-zoom"
| "tab-activate"
| "tab-close"
| "tab-detach"
@@ -422,7 +424,10 @@ impl Worker {
|| frame.session != input.session
|| (input.kind != "window-close" && frame.layout_version != input.layout_version)
|| frame.fault.is_some()
|| if input.kind == "window-close" || input.kind.starts_with("developer-open:") {
|| if input.kind == "window-close"
|| input.kind.starts_with("developer-open:")
|| matches!(input.kind.as_str(), "page-pan" | "page-zoom")
{
input.mount != 0
} else if matches!(
input.kind.as_str(),
@@ -447,6 +452,14 @@ impl Worker {
"event targets an obsolete or inactive frame",
));
}
if input.kind == "page-zoom" && frame.surface.mode != crate::page::Mode::Canvas
|| input.kind == "page-pan" && frame.surface.mode == crate::page::Mode::Window
{
return RequestProgress::Complete(error_response(
StatusCode(400),
"camera input is unavailable in this Page mode",
));
}
Some(input)
} else {
None