diff --git a/.env.template b/.env.template index 2e1472ab..09cb763f 100644 --- a/.env.template +++ b/.env.template @@ -19,9 +19,13 @@ ACME_EMAIL= MAX_PER_GROUP=4 MAX_USERNAME_LENGTH=8 -OIDC_CLIENT_ID= -OIDC_CLIENT_SECRET= -OIDC_CLIENT_ISSUER= +OPID_CLIENT_ID= +OPID_CLIENT_SECRET= +OPID_CLIENT_ISSUER= +OPID_CLIENT_REDIRECT_URL= +OPID_LOGIN_SCREEN_PROVIDER=http://pusher.workadventure.localhost/login-screen +OPID_PROFILE_SCREEN_PROVIDER= +DISABLE_ANONYMOUS= # 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= diff --git a/contrib/docker/docker-compose.single-domain.prod.yaml b/contrib/docker/docker-compose.single-domain.prod.yaml index 490309b8..c820d92e 100644 --- a/contrib/docker/docker-compose.single-domain.prod.yaml +++ b/contrib/docker/docker-compose.single-domain.prod.yaml @@ -51,9 +51,9 @@ services: JITSI_URL: ${JITSI_URL} JITSI_ISS: ${JITSI_ISS} FRONT_URL : ${FRONT_URL} - OIDC_CLIENT_ID: ${OIDC_CLIENT_ID} - OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET} - OIDC_CLIENT_ISSUER: ${OIDC_CLIENT_ISSUER} + OPID_CLIENT_ID: ${OPID_CLIENT_ID} + OPID_CLIENT_SECRET: ${OPID_CLIENT_SECRET} + OPID_CLIENT_ISSUER: ${OPID_CLIENT_ISSUER} labels: - "traefik.http.middlewares.strip-pusher-prefix.stripprefix.prefixes=/pusher" - "traefik.http.routers.pusher.rule=PathPrefix(`/pusher`)" diff --git a/deeployer.libsonnet b/deeployer.libsonnet index d3320bc0..c4b34e38 100644 --- a/deeployer.libsonnet +++ b/deeployer.libsonnet @@ -62,6 +62,7 @@ } + (if adminUrl != null then { "ADMIN_API_URL": adminUrl, "ADMIN_API_TOKEN": env.ADMIN_API_TOKEN, + "ADMIN_SOCKETS_TOKEN": env.ADMIN_SOCKETS_TOKEN, } else {}) }, "front": { diff --git a/docker-compose.single-domain.yaml b/docker-compose.single-domain.yaml index d2cbf5b0..cd38a0f9 100644 --- a/docker-compose.single-domain.yaml +++ b/docker-compose.single-domain.yaml @@ -40,6 +40,7 @@ services: TURN_USER: "" TURN_PASSWORD: "" START_ROOM_URL: "$START_ROOM_URL" + DISABLE_ANONYMOUS: "$DISABLE_ANONYMOUS" command: yarn run start volumes: - ./front:/usr/src/app @@ -67,9 +68,12 @@ services: JITSI_URL: $JITSI_URL JITSI_ISS: $JITSI_ISS FRONT_URL: http://localhost - OIDC_CLIENT_ID: $OIDC_CLIENT_ID - OIDC_CLIENT_SECRET: $OIDC_CLIENT_SECRET - OIDC_CLIENT_ISSUER: $OIDC_CLIENT_ISSUER + OPID_CLIENT_ID: $OPID_CLIENT_ID + OPID_CLIENT_SECRET: $OPID_CLIENT_SECRET + OPID_CLIENT_ISSUER: $OPID_CLIENT_ISSUER + OPID_CLIENT_REDIRECT_URL: $OPID_CLIENT_REDIRECT_URL + OPID_PROFILE_SCREEN_PROVIDER: $OPID_PROFILE_SCREEN_PROVIDER + DISABLE_ANONYMOUS: $DISABLE_ANONYMOUS volumes: - ./pusher:/usr/src/app labels: diff --git a/docker-compose.yaml b/docker-compose.yaml index 23302041..0e22fa91 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -43,6 +43,8 @@ services: START_ROOM_URL: "$START_ROOM_URL" MAX_PER_GROUP: "$MAX_PER_GROUP" MAX_USERNAME_LENGTH: "$MAX_USERNAME_LENGTH" + DISABLE_ANONYMOUS: "$DISABLE_ANONYMOUS" + OPID_LOGIN_SCREEN_PROVIDER: "$OPID_LOGIN_SCREEN_PROVIDER" command: yarn run start volumes: - ./front:/usr/src/app @@ -68,9 +70,12 @@ services: JITSI_URL: $JITSI_URL JITSI_ISS: $JITSI_ISS FRONT_URL: http://play.workadventure.localhost - OIDC_CLIENT_ID: $OIDC_CLIENT_ID - OIDC_CLIENT_SECRET: $OIDC_CLIENT_SECRET - OIDC_CLIENT_ISSUER: $OIDC_CLIENT_ISSUER + OPID_CLIENT_ID: $OPID_CLIENT_ID + OPID_CLIENT_SECRET: $OPID_CLIENT_SECRET + OPID_CLIENT_ISSUER: $OPID_CLIENT_ISSUER + OPID_CLIENT_REDIRECT_URL: $OPID_CLIENT_REDIRECT_URL + OPID_PROFILE_SCREEN_PROVIDER: $OPID_PROFILE_SCREEN_PROVIDER + DISABLE_ANONYMOUS: $DISABLE_ANONYMOUS volumes: - ./pusher:/usr/src/app labels: diff --git a/docs/maps/api-controls.md b/docs/maps/api-controls.md index dcb0f17b..c2b47262 100644 --- a/docs/maps/api-controls.md +++ b/docs/maps/api-controls.md @@ -15,7 +15,7 @@ When controls are disabled, the user cannot move anymore using keyboard input. T Example: ```javascript -WA.room.onEnterZone('myZone', () => { +WA.room.onEnterLayer('myZone').subscribe(() => { WA.controls.disablePlayerControls(); WA.ui.openPopup("popupRectangle", 'This is an imporant message!', [{ label: "Got it!", @@ -25,5 +25,5 @@ WA.room.onEnterZone('myZone', () => { popup.close(); } }]); -}); +}) ``` diff --git a/docs/maps/api-ui.md b/docs/maps/api-ui.md index dc701500..8583c061 100644 --- a/docs/maps/api-ui.md +++ b/docs/maps/api-ui.md @@ -49,7 +49,7 @@ Example: let helloWorldPopup; // Open the popup when we enter a given zone -helloWorldPopup = WA.room.onEnterZone('myZone', () => { +helloWorldPopup = WA.room.onEnterLayer("myZone").subscribe(() => { WA.ui.openPopup("popupRectangle", 'Hello world!', [{ label: "Close", className: "primary", @@ -57,13 +57,13 @@ helloWorldPopup = WA.room.onEnterZone('myZone', () => { // Close the popup when the "Close" button is pressed. popup.close(); } - }); -}]); + }]); +}); // Close the popup when we leave the zone. -WA.room.onLeaveZone('myZone', () => { +WA.room.onLeaveLayer("myZone").subscribe(() => { helloWorldPopup.close(); -}); +}) ``` ### Add custom menu diff --git a/front/src/Api/IframeListener.ts b/front/src/Api/IframeListener.ts index a5314f3c..8a3482fb 100644 --- a/front/src/Api/IframeListener.ts +++ b/front/src/Api/IframeListener.ts @@ -273,7 +273,7 @@ class IframeListener { registerScript(scriptUrl: string): Promise { return new Promise((resolve, reject) => { - console.log("Loading map related script at ", scriptUrl); + console.info("Loading map related script at ", scriptUrl); if (!process.env.NODE_ENV || process.env.NODE_ENV === "development") { // Using external iframe mode ( diff --git a/front/src/Components/CameraControls.svelte b/front/src/Components/CameraControls.svelte index 4d52d54e..9a1ba583 100644 --- a/front/src/Components/CameraControls.svelte +++ b/front/src/Components/CameraControls.svelte @@ -1,6 +1,6 @@ - +
@@ -73,4 +73,4 @@ .emote-menu { pointer-events: all; } - \ No newline at end of file + diff --git a/front/src/Components/Menu/ContactSubMenu.svelte b/front/src/Components/Menu/ContactSubMenu.svelte index 61ecc56e..3cf1f5fb 100644 --- a/front/src/Components/Menu/ContactSubMenu.svelte +++ b/front/src/Components/Menu/ContactSubMenu.svelte @@ -1,10 +1,60 @@ - +
+
+
+

Getting started

+

+ WorkAdventure allows you to create an online space to communicate spontaneously with others. + And it all starts with creating your own space. Choose from a large selection of prefabricated maps by our team. +

+ +
+ +
+

Create your map

+

You can also create your own custom map by following the step of the documentation.

+ +
+ + +
+
diff --git a/front/src/Components/Menu/GuestSubMenu.svelte b/front/src/Components/Menu/GuestSubMenu.svelte new file mode 100644 index 00000000..13a7981a --- /dev/null +++ b/front/src/Components/Menu/GuestSubMenu.svelte @@ -0,0 +1,75 @@ + + +
+
+ +
+

Share the link of the room !

+ + +
+
+
+ + \ No newline at end of file diff --git a/front/src/Components/Menu/Menu.svelte b/front/src/Components/Menu/Menu.svelte index a0ea993c..1d8a2e95 100644 --- a/front/src/Components/Menu/Menu.svelte +++ b/front/src/Components/Menu/Menu.svelte @@ -3,11 +3,11 @@ import SettingsSubMenu from "./SettingsSubMenu.svelte"; import ProfileSubMenu from "./ProfileSubMenu.svelte"; import WorldsSubMenu from "./WorldsSubMenu.svelte"; - import CreateMapSubMenu from "./CreateMapSubMenu.svelte"; import AboutRoomSubMenu from "./AboutRoomSubMenu.svelte"; import GlobalMessageSubMenu from "./GlobalMessagesSubMenu.svelte"; import ContactSubMenu from "./ContactSubMenu.svelte"; import CustomSubMenu from "./CustomSubMenu.svelte" + import GuestSubMenu from "./GuestSubMenu.svelte"; import { checkSubMenuToShow, customMenuIframe, @@ -20,21 +20,21 @@ import type {Unsubscriber} from "svelte/store"; import {sendMenuClickedEvent} from "../../Api/iframe/Ui/MenuItem"; - let activeSubMenu: string = SubMenusInterface.settings; - let activeComponent: typeof SettingsSubMenu | typeof CustomSubMenu = SettingsSubMenu; + let activeSubMenu: string = SubMenusInterface.profile; + let activeComponent: typeof ProfileSubMenu | typeof CustomSubMenu = ProfileSubMenu; let props: { url: string, allowApi: boolean }; let unsubscriberSubMenuStore: Unsubscriber; onMount(() => { unsubscriberSubMenuStore = subMenusStore.subscribe(() => { if(!get(subMenusStore).includes(activeSubMenu)) { - switchMenu(SubMenusInterface.settings); + switchMenu(SubMenusInterface.profile); } }) checkSubMenuToShow(); - switchMenu(SubMenusInterface.settings); + switchMenu(SubMenusInterface.profile); }) onDestroy(() => { @@ -56,8 +56,8 @@ case SubMenusInterface.worlds: activeComponent = WorldsSubMenu; break; - case SubMenusInterface.createMap: - activeComponent = CreateMapSubMenu; + case SubMenusInterface.invite: + activeComponent = GuestSubMenu; break; case SubMenusInterface.aboutRoom: activeComponent = AboutRoomSubMenu; diff --git a/front/src/Components/Menu/MenuIcon.svelte b/front/src/Components/Menu/MenuIcon.svelte index 066ac11a..f7878651 100644 --- a/front/src/Components/Menu/MenuIcon.svelte +++ b/front/src/Components/Menu/MenuIcon.svelte @@ -30,7 +30,6 @@ z-index: 90; position: relative; margin: 25px; - img { pointer-events: auto; width: 24px; @@ -38,8 +37,7 @@ margin: 3px } } - - .menuIcon img:hover { + .menuIcon img:hover{ transform: scale(1.2); } @@ -53,4 +51,4 @@ } } } - \ No newline at end of file + diff --git a/front/src/Components/Menu/ProfileSubMenu.svelte b/front/src/Components/Menu/ProfileSubMenu.svelte index c7b03c62..69115bee 100644 --- a/front/src/Components/Menu/ProfileSubMenu.svelte +++ b/front/src/Components/Menu/ProfileSubMenu.svelte @@ -1,104 +1,168 @@
-
- - -
-
- -
- {#if $userIsConnected} -
- {#if PROFILE_URL != undefined} - + + +
+ {#if $userIsConnected} +
+ {#if PROFILE_URL != undefined} + + {/if} +
+
+ +
+ {:else} +
+ Sign in +
{/if} -
-
- -
- {:else} -
- Sign in -
- {/if} +
\ No newline at end of file diff --git a/front/src/Components/MyCamera.svelte b/front/src/Components/MyCamera.svelte index 1527673f..755353de 100644 --- a/front/src/Components/MyCamera.svelte +++ b/front/src/Components/MyCamera.svelte @@ -1,11 +1,11 @@