diff --git a/src/assets/locales/en/translation.json b/src/assets/locales/en/translation.json index 4b4222e8..e9c47713 100644 --- a/src/assets/locales/en/translation.json +++ b/src/assets/locales/en/translation.json @@ -59,7 +59,9 @@ "nats-error-auth-body": "We was not able to verify your auth information. May be you are using an expired token?", "user-logged-out": "You logged out", "media-server-disconnected-reconnecting": "Media server disconnected, reconnecting...", - "media-server-disconnected": "Media server disconnected." + "media-server-disconnected": "Media server disconnected.", + "preloaded-whiteboard-file-processing": "Preloaded whiteboard file in progress", + "preloaded-whiteboard-file-processing-error": "Preloaded whiteboard file processing ended with error" }, "room-metadata": { "session-recording": "This session is being recording", diff --git a/src/helpers/nats/HandleRoomData.ts b/src/helpers/nats/HandleRoomData.ts index 757700c9..64bdc3ce 100644 --- a/src/helpers/nats/HandleRoomData.ts +++ b/src/helpers/nats/HandleRoomData.ts @@ -22,6 +22,7 @@ export default class HandleRoomData { private _room: ICurrentRoom; private welcomeMessage: string | undefined = undefined; private checkedPreloadedWhiteboardFile = false; + private toastId: any = undefined; constructor() { this._room = { @@ -154,13 +155,27 @@ export default class HandleRoomData { const whiteboard = this._room.metadata?.roomFeatures?.whiteboardFeatures; if (!whiteboard?.preloadFile || whiteboard.preloadFile === '') { // we don't have a preload file + // or may be processing was not successful this.checkedPreloadedWhiteboardFile = true; + if (this.toastId) { + toast.dismiss(this.toastId); + this.toastId = undefined; + } return; } if (!whiteboard.fileName || whiteboard.fileName === '') { // we have preload file, but that wasn't ready // we'll wait until the new update arrives + if (!this.toastId) { + this.toastId = toast.loading( + i18n.t('notifications.preloaded-whiteboard-file-processing'), + { + type: 'info', + closeButton: true, + }, + ); + } return; } @@ -193,5 +208,10 @@ export default class HandleRoomData { handleToAddWhiteboardUploadedOfficeNewFile(f); } this.checkedPreloadedWhiteboardFile = true; + + if (this.toastId) { + toast.dismiss(this.toastId); + this.toastId = undefined; + } }; }