components/dashboard/top-menu
The wish dashboard's menu bar and the overlays it owns: the draggable top menu (apps, files, clipboard, sharing, settings, monitoring, second-screen placement, keyboard assistance), the gaming control bar, the ellipsis menu, the mobile soft keys, and the draggable System Monitoring panel.
Reads the serverSettings and trackpadModeUpdate messages the core posts
on window and posts sidebarVisibilityChanged, touchinput:trackpad,
touchinput:touch and setSynth back; held modifier keys are delivered as
synthetic KeyboardEvents on window, which the core's input handler consumes
like real ones. A secondary display opens as a new window on the
#display2-<direction> fragment, placed with the Window Management API
where the browser offers it.
Functions
TopMenu()
function TopMenu(__namedParameters): Element;Defined in: components/dashboard/top-menu.tsx:110
The menu bar, its panels and the overlays around it. Server settings are seeded from the cached broadcast because the menu mounts after the core connects; the server's UI customization decides which entries render.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | TopMenuProps |
Returns
Element
handleMouseDown()
function handleMouseDown(e): void;Defined in: components/dashboard/top-menu.tsx:232
Starts dragging the menu bar.
Parameters
| Parameter | Type |
|---|---|
e | MouseEvent |
Returns
void
handleSystemMonitoringMouseDown()
function handleSystemMonitoringMouseDown(e): void;Defined in: components/dashboard/top-menu.tsx:277
Starts dragging the System Monitoring panel.
Parameters
| Parameter | Type |
|---|---|
e | MouseEvent |
Returns
void
handlePanelToggle()
function handlePanelToggle(panelName): void;Defined in: components/dashboard/top-menu.tsx:364
Opens or closes a panel. Apps is a modal, monitoring is an overlay that closes the active panel, and the remaining panels are mutually exclusive.
Parameters
| Parameter | Type |
|---|---|
panelName | string |
Returns
void
launchWindow()
function launchWindow(direction, screen?): void;Defined in: components/dashboard/top-menu.tsx:400
Opens the secondary display in a new window, sized to screen when the
Window Management API supplied one.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
direction | string | undefined | Side of the primary the new display attaches to. |
screen | any | null | A ScreenDetailed to place the window on, or null. |
Returns
void
handleAddScreenClick()
function handleAddScreenClick(): Promise<void>;Defined in: components/dashboard/top-menu.tsx:415
Adds a secondary display. With the Window Management API, a single adjacent screen is used directly and several show placement arrows; without it, or on denial, the display opens to the right.
Returns
Promise<void>
sendKeyEvent()
function sendKeyEvent(
type,
key,
code,
modifierState
): void;Defined in: components/dashboard/top-menu.tsx:505
Dispatches a synthetic KeyboardEvent on window for the core's input handler.
Parameters
| Parameter | Type |
|---|---|
type | string |
key | string |
code | string |
modifierState | any |
Returns
void
handleHoldKeyClick()
function handleHoldKeyClick(key, code): void;Defined in: components/dashboard/top-menu.tsx:522
Toggles a held modifier soft key; the core's synthetic-key mode is raised while any modifier is held.
Parameters
| Parameter | Type |
|---|---|
key | string |
code | string |
Returns
void
handleOnceKeyClick()
function handleOnceKeyClick(key, code): void;Defined in: components/dashboard/top-menu.tsx:545
Presses a soft key once, with the held modifiers applied.
Parameters
| Parameter | Type |
|---|---|
key | string |
code | string |
Returns
void
renderPanel()
function renderPanel(): Element;Defined in: components/dashboard/top-menu.tsx:554
The panel body for the active panel.
Returns
Element