Skip to content

Commit

Permalink
add focusApp queryAllApps queryApp
Browse files Browse the repository at this point in the history
  • Loading branch information
aderan committed Aug 22, 2023
1 parent 1b1081f commit ee0b073
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/bridge/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,38 @@ export class RoomAsyncBridge {
}
}

focusApp = (appId: string) => {
if (window.manager) {
window.manager.focusApp(appId);
}
}

queryAllApps = (responseCallback: any) => {
if (window.manager) {
const apps = window.manager.apps;
if (apps) {
return responseCallback(JSON.stringify(window.manager.apps))
} else {
return responseCallback({});
}
}
}

queryApp = (appId: string, responseCallback: any) => {
if (window.manager) {
const apps = window.manager.apps;
if (!apps) {
return responseCallback(JSON.stringify({ __error: { message: "apps not existed" } }));
}
const app = apps[appId];
if (app) {
return responseCallback(JSON.stringify(app));
} else {
return responseCallback(JSON.stringify({ __error: { message: "app " + appId + " not existed" } }));
}
}
}

dispatchDocsEvent = (
event: "prevPage" | "nextPage" | "prevStep" | "nextStep" | "jumpToPage",
options: DocsEventOptions = {},
Expand Down

0 comments on commit ee0b073

Please sign in to comment.