mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-13 12:17:24 +00:00
4548f69de8
Provide the minimal components required to support an Outlook add-in: user authentication, JWT retrieval, and API calls to generate meeting links. This implementation is an early alpha: developer experience is limited, documentation is incomplete, and the solution is not white-labeled. It's too early to consider these parts ready to ship into production. As a result, it is currently only available within the DINUM frontend image.
44 lines
990 B
JavaScript
44 lines
990 B
JavaScript
const { URLS } = require("./urls");
|
|
|
|
const DIALOG_SIGNALS = {
|
|
ready: "ready",
|
|
done: "done",
|
|
};
|
|
|
|
const DIALOG_HEIGHT = 60;
|
|
const DIALOG_WIDTH = 50;
|
|
|
|
function openTransitDialog(transitToken, { onCancel, onError }) {
|
|
Office.context.ui.displayDialogAsync(
|
|
URLS.transitDialog,
|
|
{ height: DIALOG_HEIGHT, width: DIALOG_WIDTH, displayInIframe: false },
|
|
(asyncResult) => {
|
|
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
|
|
onError?.(asyncResult.error);
|
|
return;
|
|
}
|
|
|
|
const dialog = asyncResult.value;
|
|
|
|
dialog.addEventHandler(Office.EventType.DialogMessageReceived, (arg) => {
|
|
if (arg.message === DIALOG_SIGNALS.ready) {
|
|
dialog.messageChild(transitToken);
|
|
return;
|
|
}
|
|
if (arg.message === DIALOG_SIGNALS.done) {
|
|
return;
|
|
}
|
|
onCancel?.();
|
|
dialog.close();
|
|
});
|
|
|
|
return dialog;
|
|
}
|
|
);
|
|
}
|
|
|
|
module.exports = {
|
|
openTransitDialog,
|
|
DIALOG_SIGNALS,
|
|
};
|