feat(app): panel zoom — full-grid render + header toggle
Wire Cmd::SetZoom through Tauri bridge (set_zoom command), add zoomed field to WorkspaceView, short-circuit LayoutEngine to render only the zoomed panel full-grid, and toggle Maximize2/Minimize2 in panel header. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -299,6 +299,17 @@ pub async fn focus(state: BridgeState<'_>, surface_id: String) -> Result<Value,
|
||||
data_of(state.request(Cmd::Focus { surface_id: SurfaceId(surface_id) }).await.map_err(|e| e.to_string())?)
|
||||
}
|
||||
|
||||
// ---- SP4 zoom command ----
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn set_zoom(state: BridgeState<'_>, workspace_id: String, surface_id: Option<String>) -> Result<Value, String> {
|
||||
let cmd = Cmd::SetZoom {
|
||||
workspace_id: spacesh_proto::WorkspaceId(workspace_id),
|
||||
surface_id: surface_id.map(spacesh_proto::SurfaceId),
|
||||
};
|
||||
data_of(state.request(cmd).await.map_err(|e| e.to_string())?)
|
||||
}
|
||||
|
||||
// ---- M3 event log commands ----
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
@@ -49,6 +49,7 @@ pub fn run() {
|
||||
bridge::set_group,
|
||||
bridge::delete_group,
|
||||
bridge::focus,
|
||||
bridge::set_zoom,
|
||||
bridge::event_log,
|
||||
bridge::mark_read,
|
||||
bridge::health,
|
||||
|
||||
Reference in New Issue
Block a user