From 8e1e2596e51281521f2f02f1c78ee25d4c01bdbd Mon Sep 17 00:00:00 2001 From: kevin Date: Thu, 5 Nov 2020 23:17:58 +0100 Subject: [PATCH 1/6] changing typos on Home Page --- website/dist/index.html | 41 ++++++++++++++++++------------------ website/src/sass/styles.scss | 2 +- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/website/dist/index.html b/website/dist/index.html index 08805709..1e06204a 100644 --- a/website/dist/index.html +++ b/website/dist/index.html @@ -33,12 +33,12 @@ - + - + @@ -46,7 +46,7 @@ - + @@ -97,17 +97,17 @@

Your workplace
but better

-

You are impatient to discover this new world? Click on "Play online" and meet new people or share this adventure with your colleagues and friends by clicking on "Private mode"

+

You are impatient to discover this new world? Click on "Work online" and meet new people or share this adventure with your colleagues and friends by clicking on "Work in private"

@@ -165,10 +165,10 @@

You can also create a private room with your friends or your team !

-

To try, press button private mode

+

To try, press button work in private

- START IN PRIVATE MODE + START WORKING IN PRIVATE

Don’t forget to activate your mic and camera, let’s play @@ -287,23 +287,23 @@

-

How to play

+

HOW IT WORKS

-

Choose your map

+

CHOOSE YOUR WORKSPACE

-

Select your character

+

SELECT YOUR WOKA

-

Let's go explore and talk !

+

LET'S GO TO YOUR OFFICE

@@ -313,13 +313,14 @@
-

Future features

-

We have already thought of new features:

-

Share files with others

-

Lock group conversations

+

CURRENT FEATURES

+ +

Instant interaction with up to 4 people

Share screen with others

-

Interact with objects

-

And you, what would you want?

+

Organize a workshop and meeting with up to 60 people

+

Design your own digital space

+

... and infinite possibilities

+

You need more? Do not hesitate to tell us!

diff --git a/website/src/sass/styles.scss b/website/src/sass/styles.scss index c5095343..8a26df3e 100644 --- a/website/src/sass/styles.scss +++ b/website/src/sass/styles.scss @@ -148,7 +148,7 @@ header { left: 0; right: 0; bottom: 7px; - padding: 1.125rem; + padding: 1.125rem 0.5rem; text-align: center; z-index: 2; transition: all .1s cubic-bezier(0.000, -0.600, 1.000, 1.650); /* custom */ From 467cf3260f6c484f4117fbdd427951f39eeb963a Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 6 Nov 2020 06:57:56 +0100 Subject: [PATCH 2/6] change 'play private' to 'work in privtae', fix broken html, add homepage link in inner pages --- website/dist/choose-map.html | 9 +++++++++ website/dist/create-map.html | 11 ++++++++++- website/src/sass/styles.scss | 5 ++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/website/dist/choose-map.html b/website/dist/choose-map.html index a2366f1d..72877086 100644 --- a/website/dist/choose-map.html +++ b/website/dist/choose-map.html @@ -36,6 +36,15 @@ +

CHOOSE YOUR MAP !

diff --git a/website/dist/create-map.html b/website/dist/create-map.html index d34cea77..1369b92a 100644 --- a/website/dist/create-map.html +++ b/website/dist/create-map.html @@ -36,6 +36,15 @@ +

CREATE YOUR MAP !

@@ -44,7 +53,7 @@
- < class="col"> +

Tools you will need

In order to build your own map for WorkAdventure, you need:

    diff --git a/website/src/sass/styles.scss b/website/src/sass/styles.scss index 8a26df3e..7cc85608 100644 --- a/website/src/sass/styles.scss +++ b/website/src/sass/styles.scss @@ -431,7 +431,7 @@ img{ margin: 0; min-height: 6rem; font-family: 'Karmatic Arcade'; - font-size: 22px; + font-size: 24px; margin-bottom: 1.25rem; } } @@ -503,6 +503,9 @@ img{ .pixel-title{ font-family: "Karmatic Arcade" !important; } +.pixel-text{ + font-family: "VCR OSD Mono" !important; +} h3 { font-weight: 800; From d0f643cfa622c7aeafccaa66df4959fff765ac5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 6 Nov 2020 16:46:22 +0100 Subject: [PATCH 3/6] Update website/dist/choose-map.html --- website/dist/choose-map.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/dist/choose-map.html b/website/dist/choose-map.html index 72877086..5fb1d8f7 100644 --- a/website/dist/choose-map.html +++ b/website/dist/choose-map.html @@ -40,7 +40,7 @@ From 71e2c92f7bd008d3137a64eeed16da60485ef374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 6 Nov 2020 16:46:28 +0100 Subject: [PATCH 4/6] Update website/dist/create-map.html --- website/dist/create-map.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/dist/create-map.html b/website/dist/create-map.html index 1369b92a..0a398f45 100644 --- a/website/dist/create-map.html +++ b/website/dist/create-map.html @@ -40,7 +40,7 @@ From 760708948f4a7d16a61b1d1bc45e6c913048b526 Mon Sep 17 00:00:00 2001 From: kharhamel Date: Mon, 9 Nov 2020 11:16:54 +0100 Subject: [PATCH 5/6] FIX: close the coWebSite on network error --- front/src/WebRtc/CoWebsiteManager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index ab63e60a..46d03702 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -57,7 +57,7 @@ class CoWebsiteManager { setTimeout(() => { this.fire(); }, animationTime) - }); + }).catch(() => this.closeCoWebsite()); } /** @@ -70,7 +70,7 @@ class CoWebsiteManager { setTimeout(() => { this.fire(); }, animationTime) - }); + }).catch(() => this.closeCoWebsite()); } public closeCoWebsite(): Promise { From 85f2dabe6cbbcde787befa29ef25de780b598b5c Mon Sep 17 00:00:00 2001 From: kharhamel Date: Mon, 9 Nov 2020 12:12:52 +0100 Subject: [PATCH 6/6] FIX: the server now closes the socket after 30s of no pong --- back/src/Controller/IoSocketController.ts | 6 +++++- back/src/Model/Websocket/ExSocketInterface.ts | 1 + back/src/Services/IoSocketHelpers.ts | 11 ++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/back/src/Controller/IoSocketController.ts b/back/src/Controller/IoSocketController.ts index a27d91df..c71edd86 100644 --- a/back/src/Controller/IoSocketController.ts +++ b/back/src/Controller/IoSocketController.ts @@ -20,7 +20,7 @@ import {parse} from "query-string"; import {jwtTokenManager} from "../Services/JWTTokenManager"; import {adminApi, CharacterTexture, FetchMemberDataByUuidResponse} from "../Services/AdminApi"; import {SocketManager, socketManager} from "../Services/SocketManager"; -import {emitInBatch, resetPing} from "../Services/IoSocketHelpers"; +import {emitInBatch, pongMaxInterval, refresLogoutTimerOnPong, resetPing} from "../Services/IoSocketHelpers"; import {clientEventsEmitter} from "../Services/ClientEventsEmitter"; import {ADMIN_API_TOKEN, ADMIN_API_URL} from "../Enum/EnvironmentVariable"; @@ -240,6 +240,7 @@ export class IoSocketController { const client = this.initClient(ws); //todo: into the upgrade instead? socketManager.handleJoinRoom(client); resetPing(client); + refresLogoutTimerOnPong(ws as ExSocketInterface); //get data information and show messages if (ADMIN_API_URL) { @@ -292,6 +293,9 @@ export class IoSocketController { drain: (ws) => { console.log('WebSocket backpressure: ' + ws.getBufferedAmount()); }, + pong(ws) { + refresLogoutTimerOnPong(ws as ExSocketInterface); + }, close: (ws, code, message) => { const Client = (ws as ExSocketInterface); try { diff --git a/back/src/Model/Websocket/ExSocketInterface.ts b/back/src/Model/Websocket/ExSocketInterface.ts index 205032bc..e3d19138 100644 --- a/back/src/Model/Websocket/ExSocketInterface.ts +++ b/back/src/Model/Websocket/ExSocketInterface.ts @@ -26,6 +26,7 @@ export interface ExSocketInterface extends WebSocket, Identificable { batchedMessages: BatchMessage; batchTimeout: NodeJS.Timeout|null; pingTimeout: NodeJS.Timeout|null; + pongTimeout: NodeJS.Timeout|null; disconnecting: boolean, tags: string[], textures: CharacterTexture[], diff --git a/back/src/Services/IoSocketHelpers.ts b/back/src/Services/IoSocketHelpers.ts index 2166a53e..acaa0bb9 100644 --- a/back/src/Services/IoSocketHelpers.ts +++ b/back/src/Services/IoSocketHelpers.ts @@ -47,4 +47,13 @@ export function emitError(Client: ExSocketInterface, message: string): void { Client.send(serverToClientMessage.serializeBinary().buffer, true); } console.warn(message); -} \ No newline at end of file +} + +export const pongMaxInterval = 30000; // the maximum duration (in ms) between pongs before we shutdown the connexion. + +export function refresLogoutTimerOnPong(ws: ExSocketInterface): void { + if(ws.pongTimeout) clearTimeout(ws.pongTimeout); + ws.pongTimeout = setTimeout(() => { + ws.close(); + }, pongMaxInterval); +}