Merge pull request #396 from thecodingmachine/website-typos-changes

Website typos changes
This commit is contained in:
David Négrier 2020-11-06 17:34:20 +01:00 committed by GitHub
commit b2a6b3c242
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 102 additions and 69 deletions

View file

@ -137,7 +137,7 @@ jobs:
check_for_duplicate_msg: true check_for_duplicate_msg: true
- name: Run Cypress tests - name: Run Cypress tests
uses: cypress-io/github-action@v1 uses: cypress-io/github-action@v2
if: ${{ env.GITHUB_REF_SLUG != 'master' }} if: ${{ env.GITHUB_REF_SLUG != 'master' }}
env: env:
CYPRESS_BASE_URL: https://play.${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com CYPRESS_BASE_URL: https://play.${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com
@ -148,7 +148,7 @@ jobs:
working-directory: e2e working-directory: e2e
- name: Run Cypress tests in prod - name: Run Cypress tests in prod
uses: cypress-io/github-action@v1 uses: cypress-io/github-action@v2
if: ${{ env.GITHUB_REF_SLUG == 'master' }} if: ${{ env.GITHUB_REF_SLUG == 'master' }}
env: env:
CYPRESS_BASE_URL: https://play.workadventu.re CYPRESS_BASE_URL: https://play.workadventu.re

View file

@ -22,7 +22,7 @@ import {adminApi, CharacterTexture, FetchMemberDataByUuidResponse} from "../Serv
import {SocketManager, socketManager} from "../Services/SocketManager"; import {SocketManager, socketManager} from "../Services/SocketManager";
import {emitInBatch, resetPing} from "../Services/IoSocketHelpers"; import {emitInBatch, resetPing} from "../Services/IoSocketHelpers";
import {clientEventsEmitter} from "../Services/ClientEventsEmitter"; import {clientEventsEmitter} from "../Services/ClientEventsEmitter";
import {ADMIN_API_TOKEN} from "../Enum/EnvironmentVariable"; import {ADMIN_API_TOKEN, ADMIN_API_URL} from "../Enum/EnvironmentVariable";
export class IoSocketController { export class IoSocketController {
private nextUserId: number = 1; private nextUserId: number = 1;
@ -166,18 +166,21 @@ export class IoSocketController {
if(room.isFull){ if(room.isFull){
throw new Error('Room is full'); throw new Error('Room is full');
} }
try { if (ADMIN_API_URL) {
const userData = await adminApi.fetchMemberDataByUuid(userUuid); try {
//console.log('USERDATA', userData) const userData = await adminApi.fetchMemberDataByUuid(userUuid);
memberTags = userData.tags; //console.log('USERDATA', userData)
memberTextures = userData.textures; memberTags = userData.tags;
if (!room.anonymous && room.policyType === GameRoomPolicyTypes.USE_TAGS_POLICY && !room.canAccess(memberTags)) { memberTextures = userData.textures;
throw new Error('No correct tags') if (!room.anonymous && room.policyType === GameRoomPolicyTypes.USE_TAGS_POLICY && !room.canAccess(memberTags)) {
throw new Error('No correct tags')
}
//console.log('access granted for user '+userUuid+' and room '+roomId);
} catch (e) {
console.log('access not granted for user '+userUuid+' and room '+roomId);
console.error(e);
throw new Error('Client cannot acces this ressource.')
} }
//console.log('access granted for user '+userUuid+' and room '+roomId);
} catch (e) {
console.log('access not granted for user '+userUuid+' and room '+roomId);
throw new Error('Client cannot acces this ressource.')
} }
// Generate characterLayers objects from characterLayers string[] // Generate characterLayers objects from characterLayers string[]
@ -238,22 +241,24 @@ export class IoSocketController {
socketManager.handleJoinRoom(client); socketManager.handleJoinRoom(client);
resetPing(client); resetPing(client);
//get data information and shwo messages //get data information and show messages
adminApi.fetchMemberDataByUuid(client.userUuid).then((res: FetchMemberDataByUuidResponse) => { if (ADMIN_API_URL) {
if (!res.messages) { adminApi.fetchMemberDataByUuid(client.userUuid).then((res: FetchMemberDataByUuidResponse) => {
return; if (!res.messages) {
} return;
res.messages.forEach((c: unknown) => { }
const messageToSend = c as { type: string, message: string }; res.messages.forEach((c: unknown) => {
socketManager.emitSendUserMessage({ const messageToSend = c as { type: string, message: string };
userUuid: client.userUuid, socketManager.emitSendUserMessage({
type: messageToSend.type, userUuid: client.userUuid,
message: messageToSend.message type: messageToSend.type,
}) message: messageToSend.message
})
});
}).catch((err) => {
console.error('fetchMemberDataByUuid => err', err);
}); });
}).catch((err) => { }
console.error('fetchMemberDataByUuid => err', err);
});
}, },
message: (ws, arrayBuffer, isBinary): void => { message: (ws, arrayBuffer, isBinary): void => {
const client = ws as ExSocketInterface; const client = ws as ExSocketInterface;

View file

@ -3,7 +3,7 @@ const URL_ROOM_STARTED = "/Floor0/floor0.json";
const MINIMUM_DISTANCE = process.env.MINIMUM_DISTANCE ? Number(process.env.MINIMUM_DISTANCE) : 64; const MINIMUM_DISTANCE = process.env.MINIMUM_DISTANCE ? Number(process.env.MINIMUM_DISTANCE) : 64;
const GROUP_RADIUS = process.env.GROUP_RADIUS ? Number(process.env.GROUP_RADIUS) : 48; const GROUP_RADIUS = process.env.GROUP_RADIUS ? Number(process.env.GROUP_RADIUS) : 48;
const ALLOW_ARTILLERY = process.env.ALLOW_ARTILLERY ? process.env.ALLOW_ARTILLERY == 'true' : false; const ALLOW_ARTILLERY = process.env.ALLOW_ARTILLERY ? process.env.ALLOW_ARTILLERY == 'true' : false;
const ADMIN_API_URL = process.env.ADMIN_API_URL || 'http://admin'; const ADMIN_API_URL = process.env.ADMIN_API_URL || '';
const ADMIN_API_TOKEN = process.env.ADMIN_API_TOKEN || 'myapitoken'; const ADMIN_API_TOKEN = process.env.ADMIN_API_TOKEN || 'myapitoken';
const MAX_USERS_PER_ROOM = parseInt(process.env.MAX_USERS_PER_ROOM || '') || 600; const MAX_USERS_PER_ROOM = parseInt(process.env.MAX_USERS_PER_ROOM || '') || 600;
const CPU_OVERHEAT_THRESHOLD = Number(process.env.CPU_OVERHEAT_THRESHOLD) || 80; const CPU_OVERHEAT_THRESHOLD = Number(process.env.CPU_OVERHEAT_THRESHOLD) || 80;

View file

@ -1,11 +1,11 @@
import {ALLOW_ARTILLERY, SECRET_KEY} from "../Enum/EnvironmentVariable"; import {ADMIN_API_URL, ALLOW_ARTILLERY, SECRET_KEY} from "../Enum/EnvironmentVariable";
import {uuid} from "uuidv4"; import {uuid} from "uuidv4";
import Jwt from "jsonwebtoken"; import Jwt from "jsonwebtoken";
import {TokenInterface} from "../Controller/AuthenticateController"; import {TokenInterface} from "../Controller/AuthenticateController";
import {adminApi, AdminApiData} from "../Services/AdminApi"; import {adminApi, AdminApiData} from "../Services/AdminApi";
class JWTTokenManager { class JWTTokenManager {
public createJWTToken(userUuid: string) { public createJWTToken(userUuid: string) {
return Jwt.sign({userUuid: userUuid}, SECRET_KEY, {expiresIn: '200d'}); //todo: add a mechanic to refresh or recreate token return Jwt.sign({userUuid: userUuid}, SECRET_KEY, {expiresIn: '200d'}); //todo: add a mechanic to refresh or recreate token
} }
@ -48,17 +48,21 @@ class JWTTokenManager {
return; return;
} }
//verify user in admin if (ADMIN_API_URL) {
adminApi.fetchCheckUserByToken(tokenInterface.userUuid).then(() => { //verify user in admin
resolve(tokenInterface.userUuid); adminApi.fetchCheckUserByToken(tokenInterface.userUuid).then(() => {
}).catch((err) => {
//anonymous user
if(err.response && err.response.status && err.response.status === 404){
resolve(tokenInterface.userUuid); resolve(tokenInterface.userUuid);
return; }).catch((err) => {
} //anonymous user
reject(new Error('Authentication error, invalid token structure. ' + err)); if(err.response && err.response.status && err.response.status === 404){
}); resolve(tokenInterface.userUuid);
return;
}
reject(err);
});
} else {
resolve(tokenInterface.userUuid);
}
}); });
}); });
} }
@ -66,7 +70,7 @@ class JWTTokenManager {
private isValidToken(token: object): token is TokenInterface { private isValidToken(token: object): token is TokenInterface {
return !(typeof((token as TokenInterface).userUuid) !== 'string'); return !(typeof((token as TokenInterface).userUuid) !== 'string');
} }
} }
export const jwtTokenManager = new JWTTokenManager(); export const jwtTokenManager = new JWTTokenManager();

View file

@ -3,6 +3,7 @@
local namespace = env.GITHUB_REF_SLUG, local namespace = env.GITHUB_REF_SLUG,
local tag = namespace, local tag = namespace,
local url = if namespace == "master" then "workadventu.re" else namespace+".workadventure.test.thecodingmachine.com", local url = if namespace == "master" then "workadventu.re" else namespace+".workadventure.test.thecodingmachine.com",
local adminUrl = if namespace == "master" || namespace == "develop" || std.startsWith(namespace, "admin") then "https://admin."+url else null,
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json", "$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
"version": "1.0", "version": "1.0",
"containers": { "containers": {
@ -16,11 +17,12 @@
"env": { "env": {
"SECRET_KEY": "tempSecretKeyNeedsToChange", "SECRET_KEY": "tempSecretKeyNeedsToChange",
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN, "ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
"ADMIN_API_URL": "https://admin."+url,
"JITSI_ISS": env.JITSI_ISS, "JITSI_ISS": env.JITSI_ISS,
"JITSI_URL": env.JITSI_URL, "JITSI_URL": env.JITSI_URL,
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY, "SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
} } + if adminUrl != null then {
"ADMIN_API_URL": adminUrl,
} else {}
}, },
"front": { "front": {
"image": "thecodingmachine/workadventure-front:"+tag, "image": "thecodingmachine/workadventure-front:"+tag,

View file

@ -36,6 +36,15 @@
</head> </head>
<body class="choose-map"> <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"> <div class="container-fluid container-lg section pt-5">
<h1 class="text-center pixel-title">CHOOSE YOUR MAP&nbsp;!</h1> <h1 class="text-center pixel-title">CHOOSE YOUR MAP&nbsp;!</h1>
<div class="row"> <div class="row">

View file

@ -36,6 +36,15 @@
</head> </head>
<body class="create-map"> <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"> <div class="container-fluid container-lg section pt-5">
<h1 class="text-center pixel-title">CREATE YOUR MAP&nbsp;!</h1> <h1 class="text-center pixel-title">CREATE YOUR MAP&nbsp;!</h1>
<div class="row"> <div class="row">
@ -44,7 +53,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
< class="col"> <div class="col">
<h2 id="tools-you-will-need" class="pixel-title">Tools you will need</h2> <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> <p>In order to build your own map for WorkAdventure, you need:</p>
<ul> <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 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 http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="title" content="Workadventure" /> <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 --> <!-- Open Graph / Facebook -->
<meta property="og:url" content="https://workadventu.re/" /> <meta property="og:url" content="https://workadventu.re/" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:title" content="Workadventure" /> <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" content="https://workadventu.re/static/images/meta-tags-image.jpg" />
<meta property="og:image:type" content="image/jpeg" /> <meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:alt" content="workadventure" /> <meta property="og:image:alt" content="workadventure" />
@ -46,7 +46,7 @@
<meta name="twitter:site" content="@coding_machine"> <meta name="twitter:site" content="@coding_machine">
<meta name="twitter:url" content="https://workadventu.re/" /> <meta name="twitter:url" content="https://workadventu.re/" />
<meta name="twitter:title" content="Workadventure" /> <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" /> <meta name="twitter:image" content="https://workadventu.re/static/images/meta-tags-image.jpg" />
<link rel="stylesheet" href="main.css"> <link rel="stylesheet" href="main.css">
<script src="bundle.js"></script> <script src="bundle.js"></script>
@ -97,17 +97,17 @@
</div> </div>
<div class="title title-main text-center"> <div class="title title-main text-center">
<h1>Your workplace<br/>but better</h1> <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>
<div class="row buttons-row justify-content-md-center pt-5"> <div class="row buttons-row justify-content-md-center pt-5">
<div class="col col-lg-3"> <div class="col col-lg-3">
<a class="custom-link start" href="/choose-map.html" title="PRIVATE MODE"> <a class="custom-link start" href="/choose-map.html" title="WORK IN PRIVATE">
PRIVATE MODE WORK IN PRIVATE
</a> </a>
</div> </div>
<div class="col col-lg-3"> <div class="col col-lg-3">
<a class="custom-link play" target="_BLANK" onclick="startGame()" title="PLAY ONLINE"> <a class="custom-link play" target="_BLANK" onclick="startGame()" title="WORK ONLINE">
PLAY ONLINE WORK ONLINE
</a> </a>
</div> </div>
</div> </div>
@ -165,10 +165,10 @@
<div class="bubble bubble-4 b-revert" style="height: 254px;"> <div class="bubble bubble-4 b-revert" style="height: 254px;">
<div> <div>
<p>You can also create a private room with your friends or your team ! </p> <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"> <p class="bubble-action"><a href="/choose-map.html">
<img src="static/images/playicon.png" /> <img src="static/images/playicon.png" />
START IN PRIVATE MODE START WORKING IN PRIVATE
</a></p> </a></p>
<p> <p>
Dont forget to activate your mic and camera, lets play Dont forget to activate your mic and camera, lets play
@ -287,23 +287,23 @@
<div class="container-fluid container-lg"> <div class="container-fluid container-lg">
<div class="row justify-content-md-center"> <div class="row justify-content-md-center">
<div class="col-12 col-md-12 text-center"> <div class="col-12 col-md-12 text-center">
<h3>How to play</h3> <h3>HOW IT WORKS</h3>
</div> </div>
<div class="col-12 col-md-4 text-center my-3 my-md-0"> <div class="col-12 col-md-4 text-center my-3 my-md-0">
<div class="image-item"> <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 class="step-image"><img src="static/images/maps/office.png"></div>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 text-center my-3 my-md-0"> <div class="col-12 col-md-4 text-center my-3 my-md-0">
<div class="image-item"> <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 class="step-image"><img src="static/images/choose_character.png"></div>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 text-center my-3 my-md-0"> <div class="col-12 col-md-4 text-center my-3 my-md-0">
<div class="image-item"> <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 class="step-image"><img src="static/images/interact.png"></div>
</div> </div>
</div> </div>
@ -313,13 +313,14 @@
<div class="section bg-white"> <div class="section bg-white">
<div class="container-fluid container-lg"> <div class="container-fluid container-lg">
<div class="col-12 credits"> <div class="col-12 credits">
<h2>Future features</h2> <h2>CURRENT FEATURES</h2>
<h3>We have already thought of new features:</h3> <!-- <h3>We have already thought of new features:</h3>-->
<p>Share files with others</p> <p>Instant interaction with up to 4 people</p>
<p>Lock group conversations</p>
<p>Share screen with others</p> <p>Share screen with others</p>
<p>Interact with objects</p> <p>Organize a workshop and meeting with up to 60 people</p>
<h3>And you, what would you want?</h3> <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="row justify-content-md-center pt-5" style="margin-top: 65px;">
<div class="col col-lg-3"> <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"> <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; left: 0;
right: 0; right: 0;
bottom: 7px; bottom: 7px;
padding: 1.125rem; padding: 1.125rem 0.5rem;
text-align: center; text-align: center;
z-index: 2; z-index: 2;
transition: all .1s cubic-bezier(0.000, -0.600, 1.000, 1.650); /* custom */ transition: all .1s cubic-bezier(0.000, -0.600, 1.000, 1.650); /* custom */
@ -431,7 +431,7 @@ img{
margin: 0; margin: 0;
min-height: 6rem; min-height: 6rem;
font-family: 'Karmatic Arcade'; font-family: 'Karmatic Arcade';
font-size: 22px; font-size: 24px;
margin-bottom: 1.25rem; margin-bottom: 1.25rem;
} }
} }
@ -503,6 +503,9 @@ img{
.pixel-title{ .pixel-title{
font-family: "Karmatic Arcade" !important; font-family: "Karmatic Arcade" !important;
} }
.pixel-text{
font-family: "VCR OSD Mono" !important;
}
h3 { h3 {
font-weight: 800; font-weight: 800;