Merge branch 'develop' into feature-voice-chat-indicator

This commit is contained in:
Hanusiak Piotr 2022-02-16 14:37:01 +01:00
commit dea5784c9b
20 changed files with 64 additions and 23 deletions

View File

@ -935,9 +935,9 @@ flatted@^3.1.0:
integrity sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw== integrity sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==
follow-redirects@^1.14.0: follow-redirects@^1.14.0:
version "1.14.7" version "1.14.8"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc"
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==
fs-minipass@^2.0.0: fs-minipass@^2.0.0:
version "2.1.0" version "2.1.0"

View File

@ -141,6 +141,12 @@ return [
'markdown' => 'maps.api-controls', 'markdown' => 'maps.api-controls',
'editUrl' => 'https://github.com/thecodingmachine/workadventure/edit/develop/docs/maps/api-controls.md', 'editUrl' => 'https://github.com/thecodingmachine/workadventure/edit/develop/docs/maps/api-controls.md',
], ],
[
'title' => 'Camera',
'url' => '/map-building/api-camera.md',
'markdown' => 'maps.api-camera',
'editUrl' => 'https://github.com/thecodingmachine/workadventure/edit/develop/docs/maps/api-camera.md',
],
[ [
'title' => 'Deprecated', 'title' => 'Deprecated',
'url' => '/map-building/api-deprecated.md', 'url' => '/map-building/api-deprecated.md',

View File

@ -29,7 +29,6 @@
<script src="/env-config.js"></script> <script src="/env-config.js"></script>
<base href="/"> <base href="/">
<link href="https://unpkg.com/nes.css@2.3.0/css/nes.min.css" rel="stylesheet" />
<title>WorkAdventure</title> <title>WorkAdventure</title>
</head> </head>

View File

@ -42,6 +42,7 @@
"webpack-dev-server": "^3.11.2" "webpack-dev-server": "^3.11.2"
}, },
"dependencies": { "dependencies": {
"@16bits/nes.css": "^2.3.2",
"@fontsource/press-start-2p": "^4.3.0", "@fontsource/press-start-2p": "^4.3.0",
"@joeattardi/emoji-button": "^4.6.2", "@joeattardi/emoji-button": "^4.6.2",
"@types/simple-peer": "^9.11.1", "@types/simple-peer": "^9.11.1",

View File

@ -76,7 +76,3 @@
<section class="section-input-send-text"> <section class="section-input-send-text">
<div class="input-send-text" bind:this={QUILL_EDITOR} /> <div class="input-send-text" bind:this={QUILL_EDITOR} />
</section> </section>
<style lang="scss">
@import "https://cdn.quilljs.com/1.3.7/quill.snow.css";
</style>

View File

@ -7,6 +7,7 @@ import type { PlayerAnimationDirections } from "../Player/Animation";
import type { Unsubscriber } from "svelte/store"; import type { Unsubscriber } from "svelte/store";
import type { ActivatableInterface } from "../Game/ActivatableInterface"; import type { ActivatableInterface } from "../Game/ActivatableInterface";
import type CancelablePromise from "cancelable-promise"; import type CancelablePromise from "cancelable-promise";
import LL from "../../i18n/i18n-svelte";
/** /**
* Class representing the sprite of a remote player (a player that plays on another computer) * Class representing the sprite of a remote player (a player that plays on another computer)
@ -107,7 +108,7 @@ export class RemotePlayer extends Character implements ActivatableInterface {
private registerDefaultActionsMenuActions(): void { private registerDefaultActionsMenuActions(): void {
if (this.visitCardUrl) { if (this.visitCardUrl) {
this.registeredActions.push({ this.registeredActions.push({
actionName: "Visiting Card", actionName: LL.woka.menu.businessCard(),
callback: () => { callback: () => {
requestVisitCardsStore.set(this.visitCardUrl); requestVisitCardsStore.set(this.visitCardUrl);
actionsMenuStore.clear(); actionsMenuStore.clear();

View File

@ -1438,7 +1438,7 @@ ${escapedMessage}
phaserLayer.setCollisionByProperty({ collides: true }, visible); phaserLayer.setCollisionByProperty({ collides: true }, visible);
} else { } else {
const phaserLayers = this.gameMap.findPhaserLayers(layerName + "/"); const phaserLayers = this.gameMap.findPhaserLayers(layerName + "/");
if (phaserLayers === []) { if (phaserLayers.length === 0) {
console.warn( console.warn(
'Could not find layer with name that contains "' + 'Could not find layer with name that contains "' +
layerName + layerName +

View File

@ -12,6 +12,7 @@ import menu from "./menu";
import report from "./report"; import report from "./report";
import warning from "./warning"; import warning from "./warning";
import woka from "./woka"; import woka from "./woka";
import trigger from "./trigger";
const de_DE: Translation = { const de_DE: Translation = {
...(en_US as Translation), ...(en_US as Translation),
@ -29,6 +30,7 @@ const de_DE: Translation = {
report, report,
warning, warning,
emoji, emoji,
trigger,
}; };
export default de_DE; export default de_DE;

View File

@ -70,7 +70,7 @@ const menu: NonNullable<Translation["menu"]> = {
description: "Link zu diesem Raum teilen!", description: "Link zu diesem Raum teilen!",
copy: "Kopieren", copy: "Kopieren",
share: "Teilen", share: "Teilen",
walk_automatically_to_position: "Walk automatically to my position", walk_automatically_to_position: "Automatisch zu meiner Position gehen",
}, },
globalMessage: { globalMessage: {
text: "Text", text: "Text",

View File

@ -0,0 +1,9 @@
import type { Translation } from "../i18n-types";
const trigger: NonNullable<Translation["trigger"]> = {
cowebsite: "Drücke LEERTASTE oder tippe hier um die Webseite zu öffnen",
newTab: "Drücke LEERTASTE oder tippe hier um die Webseite in einem neuen Tab zu öffnen",
jitsiRoom: "Drücke LEERTASTE oder tippe hier um dem Jitsi Meet Raum beizutreten",
};
export default trigger;

View File

@ -15,6 +15,9 @@ const woka: NonNullable<Translation["woka"]> = {
continue: "Auswählen", continue: "Auswählen",
customize: "Bearbeite dein WOKA", customize: "Bearbeite dein WOKA",
}, },
menu: {
businessCard: "Visitenkarte",
},
}; };
export default woka; export default woka;

View File

@ -15,6 +15,9 @@ const woka: BaseTranslation = {
continue: "Continue", continue: "Continue",
customize: "Customize your WOKA", customize: "Customize your WOKA",
}, },
menu: {
businessCard: "Business Card",
},
}; };
export default woka; export default woka;

View File

@ -15,6 +15,9 @@ const woka: NonNullable<Translation["woka"]> = {
continue: "Continuer", continue: "Continuer",
customize: "Personnalisez votre WOKA", customize: "Personnalisez votre WOKA",
}, },
menu: {
businessCard: "Carte de visite",
},
}; };
export default woka; export default woka;

View File

@ -1,4 +1,8 @@
//TextGlobalMessage //TextGlobalMessage
// TODO: load on demand with TextGlobalMessage component
@import "quill/dist/quill.snow.css";
section.section-input-send-text { section.section-input-send-text {
--height-toolbar: 20%; --height-toolbar: 20%;
height: 100%; height: 100%;

View File

@ -1,4 +1,5 @@
@import "~@fontsource/press-start-2p/index.css"; @import "~@fontsource/press-start-2p/index.css";
@import "~@16bits/nes.css/css/nes.min.css";
*{ *{
font-family: PixelFont-7,monospace; font-family: PixelFont-7,monospace;

View File

@ -2,6 +2,11 @@
# yarn lockfile v1 # yarn lockfile v1
"@16bits/nes.css@^2.3.2":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@16bits/nes.css/-/nes.css-2.3.2.tgz#e69db834119b33ae8d3cb044f106a07a17cadd6f"
integrity sha512-nEM5PIth+Bab5JSOa4uUR+PMNUsNTYxA55oVlG3gXI/4LoYtWS767Uv9Pu/KCbHXVvnIjt4ZXt13kZw3083qTw==
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3":
version "7.12.13" version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658"
@ -2795,9 +2800,9 @@ focus-trap@^5.1.0:
xtend "^4.0.1" xtend "^4.0.1"
follow-redirects@^1.0.0, follow-redirects@^1.14.0: follow-redirects@^1.0.0, follow-redirects@^1.14.0:
version "1.14.7" version "1.14.8"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc"
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==
for-in@^1.0.2: for-in@^1.0.2:
version "1.0.2" version "1.0.2"

View File

@ -79,6 +79,7 @@ export class AuthenticateController extends BaseController {
if (!code && !nonce) { if (!code && !nonce) {
res.writeStatus("200"); res.writeStatus("200");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-Type", "application/json");
return res.end(JSON.stringify({ ...resUserData, authToken: token })); return res.end(JSON.stringify({ ...resUserData, authToken: token }));
} }
console.error("Token cannot to be check on OpenId provider"); console.error("Token cannot to be check on OpenId provider");
@ -91,6 +92,7 @@ export class AuthenticateController extends BaseController {
const resCheckTokenAuth = await openIDClient.checkTokenAuth(authTokenData.accessToken); const resCheckTokenAuth = await openIDClient.checkTokenAuth(authTokenData.accessToken);
res.writeStatus("200"); res.writeStatus("200");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-Type", "application/json");
return res.end(JSON.stringify({ ...resCheckTokenAuth, ...resUserData, authToken: token })); return res.end(JSON.stringify({ ...resCheckTokenAuth, ...resUserData, authToken: token }));
} catch (err) { } catch (err) {
console.info("User was not connected", err); console.info("User was not connected", err);
@ -121,6 +123,7 @@ export class AuthenticateController extends BaseController {
res.writeStatus("200"); res.writeStatus("200");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-Type", "application/json");
return res.end(JSON.stringify({ ...data, authToken })); return res.end(JSON.stringify({ ...data, authToken }));
} catch (e) { } catch (e) {
console.error("openIDCallback => ERROR", e); console.error("openIDCallback => ERROR", e);
@ -183,6 +186,7 @@ export class AuthenticateController extends BaseController {
const authToken = jwtTokenManager.createAuthToken(email || userUuid); const authToken = jwtTokenManager.createAuthToken(email || userUuid);
res.writeStatus("200 OK"); res.writeStatus("200 OK");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-Type", "application/json");
res.end( res.end(
JSON.stringify({ JSON.stringify({
authToken, authToken,
@ -222,6 +226,7 @@ export class AuthenticateController extends BaseController {
const authToken = jwtTokenManager.createAuthToken(userUuid); const authToken = jwtTokenManager.createAuthToken(userUuid);
res.writeStatus("200 OK"); res.writeStatus("200 OK");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-Type", "application/json");
res.end( res.end(
JSON.stringify({ JSON.stringify({
authToken, authToken,

View File

@ -47,6 +47,7 @@ export class MapController extends BaseController {
if (!match) { if (!match) {
res.writeStatus("404 Not Found"); res.writeStatus("404 Not Found");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-Type", "application/json");
res.end(JSON.stringify({})); res.end(JSON.stringify({}));
return; return;
} }
@ -55,6 +56,7 @@ export class MapController extends BaseController {
res.writeStatus("200 OK"); res.writeStatus("200 OK");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-Type", "application/json");
res.end( res.end(
JSON.stringify({ JSON.stringify({
mapUrl, mapUrl,
@ -106,6 +108,7 @@ export class MapController extends BaseController {
res.writeStatus("200 OK"); res.writeStatus("200 OK");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-Type", "application/json");
res.end(JSON.stringify(mapDetails)); res.end(JSON.stringify(mapDetails));
} catch (e) { } catch (e) {
this.errorToResponse(e, res); this.errorToResponse(e, res);

View File

@ -950,9 +950,9 @@ flatted@^2.0.0:
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
follow-redirects@^1.14.0: follow-redirects@^1.14.0:
version "1.14.7" version "1.14.8"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc"
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==
fs-minipass@^2.0.0: fs-minipass@^2.0.0:
version "2.1.0" version "2.1.0"

View File

@ -3182,9 +3182,9 @@
} }
}, },
"node_modules/follow-redirects": { "node_modules/follow-redirects": {
"version": "1.14.7", "version": "1.14.8",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz",
"integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==",
"funding": [ "funding": [
{ {
"type": "individual", "type": "individual",
@ -8177,9 +8177,9 @@
} }
}, },
"follow-redirects": { "follow-redirects": {
"version": "1.14.7", "version": "1.14.8",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz",
"integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==" "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA=="
}, },
"fp-ts": { "fp-ts": {
"version": "2.11.8", "version": "2.11.8",