diff --git a/.env.template b/.env.template index 34537b6b..715ebeec 100644 --- a/.env.template +++ b/.env.template @@ -5,7 +5,7 @@ JITSI_PRIVATE_MODE=false JITSI_ISS= SECRET_JITSI_KEY= ADMIN_API_TOKEN=123 -START_ROOM_URL=/_/global/maps.workadventure.localhost/Floor0/floor0.json +START_ROOM_URL=/_/global/maps.workadventure.localhost/starter/map.json # If your Turn server is configured to use the Turn REST API, you should put the shared auth secret here. # If you are using Coturn, this is the value of the "static-auth-secret" parameter in your coturn config file. # Keep empty if you are sharing hard coded / clear text credentials. @@ -22,3 +22,6 @@ MAX_USERNAME_LENGTH=8 OPID_CLIENT_ID= OPID_CLIENT_SECRET= OPID_CLIENT_ISSUER= + +# If you want to have a contact page in your menu, you MUST set CONTACT_URL to the URL of the page that you want +CONTACT_URL= \ No newline at end of file diff --git a/README-INTRO.jpg b/README-INTRO.jpg deleted file mode 100644 index 989b8e78..00000000 Binary files a/README-INTRO.jpg and /dev/null differ diff --git a/README-LOGO.svg b/README-LOGO.svg new file mode 100644 index 00000000..f66f0603 --- /dev/null +++ b/README-LOGO.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/README-MAP.png b/README-MAP.png new file mode 100644 index 00000000..a592d222 Binary files /dev/null and b/README-MAP.png differ diff --git a/README.md b/README.md index ba9e70ce..dd109ada 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,18 @@ ![](https://github.com/thecodingmachine/workadventure/workflows/Continuous%20Integration/badge.svg) [![Discord](https://img.shields.io/discord/821338762134290432?label=Discord)](https://discord.gg/YGtngdh9gt) -![WorkAdventure landscape image](README-INTRO.jpg) +![WorkAdventure logo](README-LOGO.svg) +![WorkAdventure office image](README-MAP.png) -Demo here : [https://workadventu.re/](https://workadventu.re/). +Live demo [here](https://play.workadventu.re/@/tcm/workadventure/wa-village). -# Work Adventure +# WorkAdventure -Work Adventure is a web-based collaborative workspace for small to medium teams (2-100 people) presented in the form of a +WorkAdventure is a web-based collaborative workspace presented in the form of a 16-bit video game. -In Work Adventure, you can move around your office and talk to your colleagues (using a video-chat feature that is -triggered when you move next to a colleague). +In WorkAdventure you can move around your office and talk to your colleagues (using a video-chat system, triggered when you approach someone). +See more features for your virtual office: https://workadventu.re/virtual-office ## Setting up a development environment @@ -20,6 +21,7 @@ Install Docker. Run: ``` +cp .env.template .env docker-compose up -d ``` diff --git a/back/package.json b/back/package.json index bb54d624..76039479 100644 --- a/back/package.json +++ b/back/package.json @@ -41,7 +41,7 @@ "homepage": "https://github.com/thecodingmachine/workadventure#readme", "dependencies": { "@workadventure/tiled-map-type-guard": "^1.0.2", - "axios": "^0.21.1", + "axios": "^0.21.2", "busboy": "^0.3.1", "circular-json": "^0.5.9", "debug": "^4.3.1", diff --git a/back/yarn.lock b/back/yarn.lock index 64dcb9ce..74218f8f 100644 --- a/back/yarn.lock +++ b/back/yarn.lock @@ -381,12 +381,12 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -axios@^0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== +axios@^0.21.2: + version "0.21.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.2.tgz#21297d5084b2aeeb422f5d38e7be4fbb82239017" + integrity sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg== dependencies: - follow-redirects "^1.10.0" + follow-redirects "^1.14.0" balanced-match@^1.0.0: version "1.0.0" @@ -1142,10 +1142,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -follow-redirects@^1.10.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" - integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== +follow-redirects@^1.14.0: + version "1.14.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379" + integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g== for-in@^1.0.2: version "1.0.2" diff --git a/deeployer.libsonnet b/deeployer.libsonnet index 75a4de8c..d3320bc0 100644 --- a/deeployer.libsonnet +++ b/deeployer.libsonnet @@ -4,7 +4,7 @@ local tag = namespace, local url = namespace+".test.workadventu.re", // develop branch does not use admin because of issue with SSL certificate of admin as of now. - local adminUrl = if namespace == "master" || namespace == "develop" || std.startsWith(namespace, "admin") then "https://"+url else null, + local adminUrl = if std.startsWith(namespace, "admin") then "https://"+url else null, "$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json", "version": "1.0", "containers": { @@ -17,7 +17,6 @@ "ports": [8080, 50051], "env": { "SECRET_KEY": "tempSecretKeyNeedsToChange", - "ADMIN_API_TOKEN": env.ADMIN_API_TOKEN, "JITSI_ISS": env.JITSI_ISS, "JITSI_URL": env.JITSI_URL, "SECRET_JITSI_KEY": env.SECRET_JITSI_KEY, @@ -25,6 +24,7 @@ "REDIS_HOST": "redis", } + (if adminUrl != null then { "ADMIN_API_URL": adminUrl, + "ADMIN_API_TOKEN": env.ADMIN_API_TOKEN, } else {}) }, "back2": { @@ -36,7 +36,6 @@ "ports": [8080, 50051], "env": { "SECRET_KEY": "tempSecretKeyNeedsToChange", - "ADMIN_API_TOKEN": env.ADMIN_API_TOKEN, "JITSI_ISS": env.JITSI_ISS, "JITSI_URL": env.JITSI_URL, "SECRET_JITSI_KEY": env.SECRET_JITSI_KEY, @@ -44,6 +43,7 @@ "REDIS_HOST": "redis", } + (if adminUrl != null then { "ADMIN_API_URL": adminUrl, + "ADMIN_API_TOKEN": env.ADMIN_API_TOKEN, } else {}) }, "pusher": { @@ -55,13 +55,13 @@ "ports": [8080], "env": { "SECRET_KEY": "tempSecretKeyNeedsToChange", - "ADMIN_API_TOKEN": env.ADMIN_API_TOKEN, "JITSI_ISS": env.JITSI_ISS, "JITSI_URL": env.JITSI_URL, "API_URL": "back1:50051,back2:50051", "SECRET_JITSI_KEY": env.SECRET_JITSI_KEY, } + (if adminUrl != null then { "ADMIN_API_URL": adminUrl, + "ADMIN_API_TOKEN": env.ADMIN_API_TOKEN, } else {}) }, "front": { @@ -81,8 +81,7 @@ "SECRET_JITSI_KEY": env.SECRET_JITSI_KEY, "TURN_SERVER": "turn:coturn.workadventu.re:443,turns:coturn.workadventu.re:443", "JITSI_PRIVATE_MODE": if env.SECRET_JITSI_KEY != '' then "true" else "false", - "START_ROOM_URL": "/_/global/maps-"+url+"/Floor0/floor0.json" - //"GA_TRACKING_ID": "UA-10196481-11" + "START_ROOM_URL": "/_/global/maps-"+url+"/starter/map.json" } }, "uploader": { diff --git a/front/package.json b/front/package.json index 38c0570f..8fd4f4c3 100644 --- a/front/package.json +++ b/front/package.json @@ -40,9 +40,10 @@ }, "dependencies": { "@fontsource/press-start-2p": "^4.3.0", + "@joeattardi/emoji-button": "^4.6.0", "@types/simple-peer": "^9.11.1", "@types/socket.io-client": "^1.4.32", - "axios": "^0.21.1", + "axios": "^0.21.2", "cross-env": "^7.0.3", "generic-type-guard": "^3.2.0", "google-protobuf": "^3.13.0", diff --git a/front/src/Administration/AnalyticsClient.ts b/front/src/Administration/AnalyticsClient.ts index f3cde793..f73a1981 100644 --- a/front/src/Administration/AnalyticsClient.ts +++ b/front/src/Administration/AnalyticsClient.ts @@ -1,13 +1,12 @@ -import {POSTHOG_API_KEY, POSTHOG_URL} from "../Enum/EnvironmentVariable"; +import { POSTHOG_API_KEY, POSTHOG_URL } from "../Enum/EnvironmentVariable"; class AnalyticsClient { - // eslint-disable-next-line @typescript-eslint/no-explicit-any private posthogPromise: Promise; constructor() { if (POSTHOG_API_KEY && POSTHOG_URL) { - this.posthogPromise = import('posthog-js').then(({default: posthog}) => { + this.posthogPromise = import("posthog-js").then(({ default: posthog }) => { posthog.init(POSTHOG_API_KEY, { api_host: POSTHOG_URL, disable_cookie: true }); return posthog; }); @@ -17,45 +16,59 @@ class AnalyticsClient { } identifyUser(uuid: string) { - this.posthogPromise.then(posthog => { - posthog.identify(uuid, { uuid, wa: true }); - }).catch(); + this.posthogPromise + .then((posthog) => { + posthog.identify(uuid, { uuid, wa: true }); + }) + .catch(); } loggedWithSso() { - this.posthogPromise.then(posthog => { - posthog.capture('wa-logged-sso'); - }).catch(); + this.posthogPromise + .then((posthog) => { + posthog.capture("wa-logged-sso"); + }) + .catch(); } loggedWithToken() { - this.posthogPromise.then(posthog => { - posthog.capture('wa-logged-token'); - }).catch(); + this.posthogPromise + .then((posthog) => { + posthog.capture("wa-logged-token"); + }) + .catch(); } enteredRoom(roomId: string) { - this.posthogPromise.then(posthog => { - posthog.capture('$pageView', {roomId}); - }).catch(); + this.posthogPromise + .then((posthog) => { + posthog.capture("$pageView", { roomId }); + }) + .catch(); } openedMenu() { - this.posthogPromise.then(posthog => { - posthog.capture('wa-opened-menu'); - }).catch(); + this.posthogPromise + .then((posthog) => { + posthog.capture("wa-opened-menu"); + }) + .catch(); } launchEmote(emote: string) { - this.posthogPromise.then(posthog => { - posthog.capture('wa-emote-launch', {emote}); - }).catch(); + this.posthogPromise + .then((posthog) => { + posthog.capture("wa-emote-launch", { emote }); + }) + .catch(); } enteredJitsi(roomName: string, roomId: string) { - this.posthogPromise.then(posthog => { - posthog.capture('wa-entered-jitsi', {roomName, roomId}); - }).catch(); + this.posthogPromise + .then((posthog) => { + posthog.capture("wa-entered-jitsi", { roomName, roomId }); + }) + .catch(); } } export const analyticsClient = new AnalyticsClient(); diff --git a/front/src/Components/App.svelte b/front/src/Components/App.svelte index 8b033e5f..ab8b6d3f 100644 --- a/front/src/Components/App.svelte +++ b/front/src/Components/App.svelte @@ -1,6 +1,7 @@ + + + +
+
+
+ + \ No newline at end of file diff --git a/front/src/Components/Menu/ContactSubMenu.svelte b/front/src/Components/Menu/ContactSubMenu.svelte index 6cca0609..61ecc56e 100644 --- a/front/src/Components/Menu/ContactSubMenu.svelte +++ b/front/src/Components/Menu/ContactSubMenu.svelte @@ -1,9 +1,8 @@ - +