The tray's right-click menu is drawn by the app: one tree from tray.rs (stable submenu keys), one frameless always-on-top menu-N window per panel rendered by tray-menu.html with the design system, placed inside the monitor's work area. A pure panel book keeps transient and pinned panels apart; pinned panels (pin button, Ctrl+click, middle click) are draggable, step aside from each other and are saved in state.json (menuPins) and restored at start. tray_update pushes the tree to the open panels, which update in place; closed panels are destroyed. The native menu, rendered from the same tree, stays as the fallback and on Linux. Only menu-* windows get the menu_* commands (menu.json). In-app context menus get the same behaviour through a pure menu stack (ui/menu-stack.ts): pin a menu, tear off a submenu, pinned panels survive the next menu, are draggable and re-read their entries from live sources so data changes update them in place. Also drops a stray diff3 marker line from CHANGELOG.md.
61 lines
1.8 KiB
Rust
61 lines
1.8 KiB
Rust
/// Every app command the webview can call. build.rs turns each into an `allow-<name>` permission (underscores become
|
|
/// dashes); capabilities/main.json grants them to the `main` window only; tests/security.rs checks both lists match.
|
|
pub const COMMANDS: &[&str] = &[
|
|
"app_info",
|
|
"sidecar_status",
|
|
"sidecar_call",
|
|
"cache_get",
|
|
"cache_clear",
|
|
"job_cancel",
|
|
"write_with_confirm",
|
|
"projects_list",
|
|
"project_add",
|
|
"project_init",
|
|
"project_remove",
|
|
"project_set_accounts",
|
|
"accounts_list",
|
|
"account_add_play",
|
|
"account_add_apple",
|
|
"account_remove",
|
|
"portfolio_status",
|
|
"open_external",
|
|
"tools_info",
|
|
"tools_install",
|
|
"tools_uninstall",
|
|
"workspace_get",
|
|
"studio_save",
|
|
"studio_remove",
|
|
"studio_logo",
|
|
"account_update",
|
|
"account_set_play_developer",
|
|
"account_check",
|
|
"store_apps_refresh",
|
|
"store_apps_cached",
|
|
"overrides_set",
|
|
"settings_set",
|
|
"cache_info",
|
|
"data_reveal",
|
|
"notify",
|
|
"tray_update",
|
|
"card_snapshot",
|
|
"app_reset",
|
|
"update_check",
|
|
"update_install",
|
|
"project_import_fastlane",
|
|
"export_save",
|
|
"price_sheet_pick",
|
|
"image_pick",
|
|
"project_reveal",
|
|
"project_locate",
|
|
"state_reset",
|
|
"log_webview",
|
|
"ai_fix_info",
|
|
"ai_fix_run",
|
|
"ai_fix_undo",
|
|
];
|
|
|
|
/// The tray card window's commands (capabilities/card.json grants them to the `card` window only).
|
|
pub const CARD_COMMANDS: &[&str] = &["card_get", "card_action"];
|
|
|
|
/// The tray menu panels' commands (capabilities/menu.json grants them to the `menu-*` windows only).
|
|
pub const MENU_COMMANDS: &[&str] = &["menu_state", "menu_ready", "menu_open_sub", "menu_pin_sub", "menu_close_subs", "menu_close", "menu_dismiss", "menu_pin", "menu_select"];
|