Merge branch 'develop' into action-button

This commit is contained in:
Gregoire Parant 2020-11-10 13:06:47 +01:00
commit 76014e3dc1
8 changed files with 63 additions and 27 deletions

View file

@ -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 {

View file

@ -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[],

View file

@ -47,4 +47,13 @@ export function emitError(Client: ExSocketInterface, message: string): void {
Client.send(serverToClientMessage.serializeBinary().buffer, true);
}
console.warn(message);
}
}
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);
}

View file

@ -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<void> {

View file

@ -36,6 +36,15 @@
</head>
<body class="choose-map">
<div class="container">
<div class="row">
<div class="col">
<a href="/" class="d-block mt-3 pixel-text">
&lt;&lt; BACK TO HOMEPAGE
</a>
</div>
</div>
</div>
<div class="container-fluid container-lg section pt-5">
<h1 class="text-center pixel-title">CHOOSE YOUR MAP&nbsp;!</h1>
<div class="row">

View file

@ -36,6 +36,15 @@
</head>
<body class="create-map">
<div class="container">
<div class="row">
<div class="col">
<a href="/" class="d-block mt-3 pixel-text">
&lt;&lt; BACK TO HOMEPAGE
</a>
</div>
</div>
</div>
<div class="container-fluid container-lg section pt-5">
<h1 class="text-center pixel-title">CREATE YOUR MAP&nbsp;!</h1>
<div class="row">
@ -44,7 +53,7 @@
</div>
</div>
<div class="row">
< class="col">
<div class="col">
<h2 id="tools-you-will-need" class="pixel-title">Tools you will need</h2>
<p>In order to build your own map for WorkAdventure, you need:</p>
<ul>

View file

@ -33,12 +33,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="title" content="Workadventure" />
<meta name="description" content="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'" />
<meta name="description" content="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'" />
<!-- Open Graph / Facebook -->
<meta property="og:url" content="https://workadventu.re/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Workadventure" />
<meta property="og:description" content="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'" />
<meta property="og:description" content="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'" />
<meta property="og:image" content="https://workadventu.re/static/images/meta-tags-image.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:alt" content="workadventure" />
@ -46,7 +46,7 @@
<meta name="twitter:site" content="@coding_machine">
<meta name="twitter:url" content="https://workadventu.re/" />
<meta name="twitter:title" content="Workadventure" />
<meta name="twitter:description" content="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'" />
<meta name="twitter:description" content="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'" />
<meta name="twitter:image" content="https://workadventu.re/static/images/meta-tags-image.jpg" />
<link rel="stylesheet" href="main.css">
<script src="bundle.js"></script>
@ -97,17 +97,17 @@
</div>
<div class="title title-main text-center">
<h1>Your workplace<br/>but better</h1>
<h3>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"</h3>
<h3>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"</h3>
</div>
<div class="row buttons-row justify-content-md-center pt-5">
<div class="col col-lg-3">
<a class="custom-link start" href="/choose-map.html" title="PRIVATE MODE">
PRIVATE MODE
<a class="custom-link start" href="/choose-map.html" title="WORK IN PRIVATE">
WORK IN PRIVATE
</a>
</div>
<div class="col col-lg-3">
<a class="custom-link play" target="_BLANK" onclick="startGame()" title="PLAY ONLINE">
PLAY ONLINE
<a class="custom-link play" target="_BLANK" onclick="startGame()" title="WORK ONLINE">
WORK ONLINE
</a>
</div>
</div>
@ -165,10 +165,10 @@
<div class="bubble bubble-4 b-revert" style="height: 254px;">
<div>
<p>You can also create a private room with your friends or your team ! </p>
<p class="bubble-legend">To try, press button private mode</p>
<p class="bubble-legend">To try, press button work in private</p>
<p class="bubble-action"><a href="/choose-map.html">
<img src="static/images/playicon.png" />
START IN PRIVATE MODE
START WORKING IN PRIVATE
</a></p>
<p>
Dont forget to activate your mic and camera, lets play
@ -287,23 +287,23 @@
<div class="container-fluid container-lg">
<div class="row justify-content-md-center">
<div class="col-12 col-md-12 text-center">
<h3>How to play</h3>
<h3>HOW IT WORKS</h3>
</div>
<div class="col-12 col-md-4 text-center my-3 my-md-0">
<div class="image-item">
<h2>Choose your map</h2>
<h2>CHOOSE YOUR WORKSPACE</h2>
<div class="step-image"><img src="static/images/maps/office.png"></div>
</div>
</div>
<div class="col-12 col-md-4 text-center my-3 my-md-0">
<div class="image-item">
<h2>Select your character</h2>
<h2>SELECT YOUR WOKA</h2>
<div class="step-image"><img src="static/images/choose_character.png"></div>
</div>
</div>
<div class="col-12 col-md-4 text-center my-3 my-md-0">
<div class="image-item">
<h2>Let's go explore and talk&nbsp;!</h2>
<h2>LET'S GO TO YOUR OFFICE</h2>
<div class="step-image"><img src="static/images/interact.png"></div>
</div>
</div>
@ -313,13 +313,14 @@
<div class="section bg-white">
<div class="container-fluid container-lg">
<div class="col-12 credits">
<h2>Future features</h2>
<h3>We have already thought of new features:</h3>
<p>Share files with others</p>
<p>Lock group conversations</p>
<h2>CURRENT FEATURES</h2>
<!-- <h3>We have already thought of new features:</h3>-->
<p>Instant interaction with up to 4 people</p>
<p>Share screen with others</p>
<p>Interact with objects</p>
<h3>And you, what would you want?</h3>
<p>Organize a workshop and meeting with up to 60 people</p>
<p>Design your own digital space</p>
<p>... and infinite possibilities</p>
<h3>You need more? Do not hesitate to tell us!</h3>
<div class="row justify-content-md-center pt-5" style="margin-top: 65px;">
<div class="col col-lg-3">
<a class="custom-link contribute" target="_BLANK" href="https://docs.google.com/forms/d/e/1FAIpQLSdxvajEyqsn4X0ai0SoDAcdsa_JQPIfiP2Tp9PDzkfZA54v9Q/viewform" title="FEEDBACK">

View file

@ -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 */
@ -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;