mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 11:51:36 +02:00
Add openRoom to Navigation
This commit is contained in:
parent
214f3e20a8
commit
74acfb84aa
@ -14,6 +14,22 @@ import { JSX } from "react";
|
||||
*/
|
||||
export type LocationRenderFunction = () => JSX.Element;
|
||||
|
||||
/**
|
||||
* The options available for changing the open behaviour.
|
||||
* @public
|
||||
*/
|
||||
export interface OpenRoomOptions {
|
||||
/**
|
||||
* The list of servers to join via.
|
||||
*/
|
||||
viaServers?: string[];
|
||||
|
||||
/**
|
||||
* Whether to automatically join the room if we are not already in it.
|
||||
*/
|
||||
autoJoin?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* API methods to navigate the application.
|
||||
* @public
|
||||
@ -33,4 +49,11 @@ export interface NavigationApi {
|
||||
* @alpha
|
||||
*/
|
||||
registerLocationRenderer(path: string, renderer: LocationRenderFunction): void;
|
||||
|
||||
/**
|
||||
* Open a room in element-web.
|
||||
* @param roomIdOrAlias - id/alias of the room to open
|
||||
* @param opts - Options to control the open action, see {@link OpenRoomOptions}
|
||||
*/
|
||||
openRoom(roomIdOrAlias: string, opts?: OpenRoomOptions): void;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user