diff --git a/back/yarn.lock b/back/yarn.lock index 04c6929b..31bd1a09 100644 --- a/back/yarn.lock +++ b/back/yarn.lock @@ -935,9 +935,9 @@ flatted@^3.1.0: integrity sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw== follow-redirects@^1.14.0: - version "1.14.7" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" - integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== + version "1.14.8" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" + integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== fs-minipass@^2.0.0: version "2.1.0" diff --git a/docs/maps/menu.php b/docs/maps/menu.php index b8d0e638..c8afc2c0 100644 --- a/docs/maps/menu.php +++ b/docs/maps/menu.php @@ -141,6 +141,12 @@ return [ 'markdown' => 'maps.api-controls', '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', 'url' => '/map-building/api-deprecated.md', diff --git a/front/dist/index.ejs b/front/dist/index.ejs index 45b78695..be0e9137 100644 --- a/front/dist/index.ejs +++ b/front/dist/index.ejs @@ -32,7 +32,6 @@ - Kraut.World diff --git a/front/package.json b/front/package.json index 39c6f255..79563c09 100644 --- a/front/package.json +++ b/front/package.json @@ -42,6 +42,7 @@ "webpack-dev-server": "^3.11.2" }, "dependencies": { + "@16bits/nes.css": "^2.3.2", "@fontsource/press-start-2p": "^4.3.0", "@joeattardi/emoji-button": "^4.6.2", "@types/simple-peer": "^9.11.1", diff --git a/front/src/Components/Menu/TextGlobalMessage.svelte b/front/src/Components/Menu/TextGlobalMessage.svelte index ec3e7039..6b42e42e 100644 --- a/front/src/Components/Menu/TextGlobalMessage.svelte +++ b/front/src/Components/Menu/TextGlobalMessage.svelte @@ -76,7 +76,3 @@
- - diff --git a/front/src/Phaser/Entity/RemotePlayer.ts b/front/src/Phaser/Entity/RemotePlayer.ts index 7af6da2e..a2ca63ea 100644 --- a/front/src/Phaser/Entity/RemotePlayer.ts +++ b/front/src/Phaser/Entity/RemotePlayer.ts @@ -7,6 +7,7 @@ import type { PlayerAnimationDirections } from "../Player/Animation"; import type { Unsubscriber } from "svelte/store"; import type { ActivatableInterface } from "../Game/ActivatableInterface"; 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) @@ -107,7 +108,7 @@ export class RemotePlayer extends Character implements ActivatableInterface { private registerDefaultActionsMenuActions(): void { if (this.visitCardUrl) { this.registeredActions.push({ - actionName: "Visiting Card", + actionName: LL.woka.menu.businessCard(), callback: () => { requestVisitCardsStore.set(this.visitCardUrl); actionsMenuStore.clear(); diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 7c9a05b2..53a2c75b 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -1409,7 +1409,7 @@ ${escapedMessage} phaserLayer.setCollisionByProperty({ collides: true }, visible); } else { const phaserLayers = this.gameMap.findPhaserLayers(layerName + "/"); - if (phaserLayers === []) { + if (phaserLayers.length === 0) { console.warn( 'Could not find layer with name that contains "' + layerName + diff --git a/front/src/i18n/de-DE/index.ts b/front/src/i18n/de-DE/index.ts index 40b63558..a72ecc1f 100644 --- a/front/src/i18n/de-DE/index.ts +++ b/front/src/i18n/de-DE/index.ts @@ -12,6 +12,7 @@ import menu from "./menu"; import report from "./report"; import warning from "./warning"; import woka from "./woka"; +import trigger from "./trigger"; const de_DE: Translation = { ...(en_US as Translation), @@ -29,6 +30,7 @@ const de_DE: Translation = { report, warning, emoji, + trigger, }; export default de_DE; diff --git a/front/src/i18n/de-DE/menu.ts b/front/src/i18n/de-DE/menu.ts index 5e695d95..c1b7bc18 100644 --- a/front/src/i18n/de-DE/menu.ts +++ b/front/src/i18n/de-DE/menu.ts @@ -70,7 +70,7 @@ const menu: NonNullable = { description: "Link zu diesem Raum teilen!", copy: "Kopieren", share: "Teilen", - walk_automatically_to_position: "Walk automatically to my position", + walk_automatically_to_position: "Automatisch zu meiner Position gehen", }, globalMessage: { text: "Text", diff --git a/front/src/i18n/de-DE/trigger.ts b/front/src/i18n/de-DE/trigger.ts new file mode 100644 index 00000000..9239c0fc --- /dev/null +++ b/front/src/i18n/de-DE/trigger.ts @@ -0,0 +1,9 @@ +import type { Translation } from "../i18n-types"; + +const trigger: NonNullable = { + 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; diff --git a/front/src/i18n/de-DE/woka.ts b/front/src/i18n/de-DE/woka.ts index 640cd756..98046f3b 100644 --- a/front/src/i18n/de-DE/woka.ts +++ b/front/src/i18n/de-DE/woka.ts @@ -15,6 +15,9 @@ const woka: NonNullable = { continue: "Auswählen", customize: "Bearbeite dein WOKA", }, + menu: { + businessCard: "Visitenkarte", + }, }; export default woka; diff --git a/front/src/i18n/en-US/woka.ts b/front/src/i18n/en-US/woka.ts index 6c1e02ad..ac4aaa64 100644 --- a/front/src/i18n/en-US/woka.ts +++ b/front/src/i18n/en-US/woka.ts @@ -15,6 +15,9 @@ const woka: BaseTranslation = { continue: "Continue", customize: "Customize your WOKA", }, + menu: { + businessCard: "Business Card", + }, }; export default woka; diff --git a/front/src/i18n/fr-FR/woka.ts b/front/src/i18n/fr-FR/woka.ts index 36ef463b..3225a8a2 100644 --- a/front/src/i18n/fr-FR/woka.ts +++ b/front/src/i18n/fr-FR/woka.ts @@ -15,6 +15,9 @@ const woka: NonNullable = { continue: "Continuer", customize: "Personnalisez votre WOKA", }, + menu: { + businessCard: "Carte de visite", + }, }; export default woka; diff --git a/front/style/TextGlobalMessageSvelte-Style.scss b/front/style/TextGlobalMessageSvelte-Style.scss index 4baa8c8a..94baa67a 100644 --- a/front/style/TextGlobalMessageSvelte-Style.scss +++ b/front/style/TextGlobalMessageSvelte-Style.scss @@ -1,4 +1,8 @@ //TextGlobalMessage + +// TODO: load on demand with TextGlobalMessage component +@import "quill/dist/quill.snow.css"; + section.section-input-send-text { --height-toolbar: 20%; height: 100%; diff --git a/front/style/fonts.scss b/front/style/fonts.scss index a49d3967..7a13ab49 100644 --- a/front/style/fonts.scss +++ b/front/style/fonts.scss @@ -1,4 +1,5 @@ @import "~@fontsource/press-start-2p/index.css"; +@import "~@16bits/nes.css/css/nes.min.css"; *{ font-family: PixelFont-7,monospace; diff --git a/front/yarn.lock b/front/yarn.lock index 3572e44b..465f1400 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -2,6 +2,11 @@ # 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": version "7.12.13" 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" follow-redirects@^1.0.0, follow-redirects@^1.14.0: - version "1.14.7" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" - integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== + version "1.14.8" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" + integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== for-in@^1.0.2: version "1.0.2" diff --git a/pusher/src/Controller/AuthenticateController.ts b/pusher/src/Controller/AuthenticateController.ts index fff76c40..89d3adf3 100644 --- a/pusher/src/Controller/AuthenticateController.ts +++ b/pusher/src/Controller/AuthenticateController.ts @@ -79,7 +79,7 @@ export class AuthenticateController extends BaseController { if (!code && !nonce) { res.writeStatus("200"); this.addCorsHeaders(res); - res.writeHeader('Content-Type', 'application/json'); + res.writeHeader("Content-Type", "application/json"); return res.end(JSON.stringify({ ...resUserData, authToken: token })); } console.error("Token cannot to be check on OpenId provider"); @@ -92,7 +92,7 @@ export class AuthenticateController extends BaseController { const resCheckTokenAuth = await openIDClient.checkTokenAuth(authTokenData.accessToken); res.writeStatus("200"); this.addCorsHeaders(res); - res.writeHeader('Content-Type', 'application/json'); + res.writeHeader("Content-Type", "application/json"); return res.end(JSON.stringify({ ...resCheckTokenAuth, ...resUserData, authToken: token })); } catch (err) { console.info("User was not connected", err); @@ -123,7 +123,7 @@ export class AuthenticateController extends BaseController { res.writeStatus("200"); this.addCorsHeaders(res); - res.writeHeader('Content-Type', 'application/json'); + res.writeHeader("Content-Type", "application/json"); return res.end(JSON.stringify({ ...data, authToken })); } catch (e) { console.error("openIDCallback => ERROR", e); @@ -186,7 +186,7 @@ export class AuthenticateController extends BaseController { const authToken = jwtTokenManager.createAuthToken(email || userUuid); res.writeStatus("200 OK"); this.addCorsHeaders(res); - res.writeHeader('Content-Type', 'application/json'); + res.writeHeader("Content-Type", "application/json"); res.end( JSON.stringify({ authToken, @@ -226,7 +226,7 @@ export class AuthenticateController extends BaseController { const authToken = jwtTokenManager.createAuthToken(userUuid); res.writeStatus("200 OK"); this.addCorsHeaders(res); - res.writeHeader('Content-Type', 'application/json'); + res.writeHeader("Content-Type", "application/json"); res.end( JSON.stringify({ authToken, diff --git a/pusher/src/Controller/MapController.ts b/pusher/src/Controller/MapController.ts index 9dd2aaf8..eae205f9 100644 --- a/pusher/src/Controller/MapController.ts +++ b/pusher/src/Controller/MapController.ts @@ -47,7 +47,7 @@ export class MapController extends BaseController { if (!match) { res.writeStatus("404 Not Found"); this.addCorsHeaders(res); - res.writeHeader('Content-Type', 'application/json'); + res.writeHeader("Content-Type", "application/json"); res.end(JSON.stringify({})); return; } @@ -56,7 +56,7 @@ export class MapController extends BaseController { res.writeStatus("200 OK"); this.addCorsHeaders(res); - res.writeHeader('Content-Type', 'application/json'); + res.writeHeader("Content-Type", "application/json"); res.end( JSON.stringify({ mapUrl, @@ -108,7 +108,7 @@ export class MapController extends BaseController { res.writeStatus("200 OK"); this.addCorsHeaders(res); - res.writeHeader('Content-Type', 'application/json'); + res.writeHeader("Content-Type", "application/json"); res.end(JSON.stringify(mapDetails)); } catch (e) { this.errorToResponse(e, res); diff --git a/pusher/yarn.lock b/pusher/yarn.lock index 1321a9c3..8992a72c 100644 --- a/pusher/yarn.lock +++ b/pusher/yarn.lock @@ -950,9 +950,9 @@ flatted@^2.0.0: integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== follow-redirects@^1.14.0: - version "1.14.7" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" - integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== + version "1.14.8" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" + integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== fs-minipass@^2.0.0: version "2.1.0" diff --git a/tests/package-lock.json b/tests/package-lock.json index 2a9888da..0547c2a3 100644 --- a/tests/package-lock.json +++ b/tests/package-lock.json @@ -3182,9 +3182,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "funding": [ { "type": "individual", @@ -8177,9 +8177,9 @@ } }, "follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==" + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" }, "fp-ts": { "version": "2.11.8",