From aefb28d895b63dd572057729ea201b7966213d52 Mon Sep 17 00:00:00 2001 From: Valdo Romao Date: Tue, 25 Jan 2022 19:43:27 +0000 Subject: [PATCH] Fixed some typos :) --- front/src/Api/IframeListener.ts | 1 - front/src/Api/ScriptUtils.ts | 1 - front/src/WebRtc/CoWebsiteManager.ts | 4 ++-- maps/tests/ChangeLayerApi/script.js | 4 ++-- maps/tests/CoWebsite/script.js | 26 +++++++++++++------------- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/front/src/Api/IframeListener.ts b/front/src/Api/IframeListener.ts index 27486d5d..65ab1303 100644 --- a/front/src/Api/IframeListener.ts +++ b/front/src/Api/IframeListener.ts @@ -8,7 +8,6 @@ import type { ButtonClickedEvent } from "./Events/ButtonClickedEvent"; import { ClosePopupEvent, isClosePopupEvent } from "./Events/ClosePopupEvent"; import { scriptUtils } from "./ScriptUtils"; import { isGoToPageEvent } from "./Events/GoToPageEvent"; -import { isCloseCoWebsite, CloseCoWebsiteEvent } from "./Events/CloseCoWebsiteEvent"; import { IframeErrorAnswerEvent, IframeQueryMap, diff --git a/front/src/Api/ScriptUtils.ts b/front/src/Api/ScriptUtils.ts index 10a80c92..f0a0625a 100644 --- a/front/src/Api/ScriptUtils.ts +++ b/front/src/Api/ScriptUtils.ts @@ -1,4 +1,3 @@ -import { coWebsiteManager, CoWebsite } from "../WebRtc/CoWebsiteManager"; import { playersStore } from "../Stores/PlayersStore"; import { chatMessagesStore } from "../Stores/ChatStore"; import type { ChatEvent } from "./Events/ChatEvent"; diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index 48cc9680..92629dd6 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -512,7 +512,7 @@ class CoWebsiteManager { if (this.coWebsites.length < 1) { this.loadMain(); } else if (this.coWebsites.length === 5) { - throw new Error("Too many we"); + throw new Error("Too many websites"); } Promise.resolve(callback(this.cowebsiteBufferDom)) @@ -580,7 +580,7 @@ class CoWebsiteManager { return reject(); }); }) - .catch((e) => console.error("Error loadCoWebsite >=> ", e)); + .catch((e) => console.error("Error loadCoWebsite => ", e)); }); } diff --git a/maps/tests/ChangeLayerApi/script.js b/maps/tests/ChangeLayerApi/script.js index 32f038ba..4fae2b3a 100644 --- a/maps/tests/ChangeLayerApi/script.js +++ b/maps/tests/ChangeLayerApi/script.js @@ -1,7 +1,7 @@ WA.room.onEnterLayer('myLayer').subscribe(() => { - WA.chat.sendChatMessage("Hello!", 'Wooka'); + WA.chat.sendChatMessage("Hello!", 'Woka'); }); WA.room.onLeaveLayer('myLayer').subscribe(() => { - WA.chat.sendChatMessage("Goodbye!", 'Wooka'); + WA.chat.sendChatMessage("Goodbye!", 'Woka'); }); \ No newline at end of file diff --git a/maps/tests/CoWebsite/script.js b/maps/tests/CoWebsite/script.js index b45c0ffc..5563768f 100644 --- a/maps/tests/CoWebsite/script.js +++ b/maps/tests/CoWebsite/script.js @@ -12,12 +12,12 @@ WA.onInit().then(() => { }); }); -function wookaSendMessage(message) { - WA.chat.sendChatMessage(message, 'Wooka'); +function wokaSendMessage(message) { + WA.chat.sendChatMessage(message, 'Woka'); } function unknownCommand() { - wookaSendMessage('Unknown command'); + wokaSendMessage('Unknown command'); } function executeCommand(command, args) { @@ -32,7 +32,7 @@ function executeCommand(command, args) { function coWebsiteCommand(args) { if (args.length < 1) { - wookaSendMessage('Too few arguments'); + wokaSendMessage('Too few arguments'); return; } @@ -52,27 +52,27 @@ function coWebsiteCommand(args) { async function openCoWebsite(args) { if (args.length < 1) { - wookaSendMessage('Too few arguments'); + wokaSendMessage('Too few arguments'); return; } try { const url = new URL(args[0]); } catch (exception) { - wookaSendMessage('Parameter is not a valid URL !'); + wokaSendMessage('Parameter is not a valid URL !'); return; } await WA.nav.openCoWebSite(args[0]).then(() => { - wookaSendMessage('Co-website has been opened !'); + wokaSendMessage('Co-website has been opened !'); }).catch((error) => { - wookaSendMessage(`Something wrong happen during co-website opening: ${error.message}`); + wokaSendMessage(`Something wrong happen during co-website opening: ${error.message}`); }); } async function closeCoWebsite(args) { if (args.length < 1) { - wookaSendMessage('Too few arguments'); + wokaSendMessage('Too few arguments'); return; } @@ -83,7 +83,7 @@ async function closeCoWebsite(args) { coWebsites.forEach(coWebsite => { coWebsite.close(); }); - wookaSendMessage('All co-websites has been closed !'); + wokaSendMessage('All co-websites has been closed !'); return; } @@ -96,13 +96,13 @@ async function closeCoWebsite(args) { coWebsites.find((coWebsite) => coWebsite.position === position); if (!coWebsite) { - wookaSendMessage('Unknown co-website'); + wokaSendMessage('Unknown co-website'); return; } await coWebsite.close().then(() => { - wookaSendMessage('This co-websites has been closed !'); + wokaSendMessage('This co-websites has been closed !'); }).catch((error) => { - wookaSendMessage(`Something wrong happen during co-website closing: ${error.message}`); + wokaSendMessage(`Something wrong happen during co-website closing: ${error.message}`); }); }