diff --git a/front/src/Components/WarningContainer/WarningContainer.svelte b/front/src/Components/WarningContainer/WarningContainer.svelte
index dd61d8fc..2f832fbd 100644
--- a/front/src/Components/WarningContainer/WarningContainer.svelte
+++ b/front/src/Components/WarningContainer/WarningContainer.svelte
@@ -1,9 +1,10 @@
+ Your are une test mode. This map will be opened during 2 days. You can register your domain here! +
{:else}This world is close to its limit!
{/if} diff --git a/front/src/Connexion/ConnectionManager.ts b/front/src/Connexion/ConnectionManager.ts index 05d84367..aae3f386 100644 --- a/front/src/Connexion/ConnectionManager.ts +++ b/front/src/Connexion/ConnectionManager.ts @@ -8,9 +8,10 @@ import { CharacterTexture, LocalUser } from "./LocalUser"; import { Room } from "./Room"; import { _ServiceWorker } from "../Network/ServiceWorker"; import { loginSceneVisibleIframeStore } from "../Stores/LoginSceneStore"; -import { userIsConnected } from "../Stores/MenuStore"; +import { userIsConnected, warningContainerStore } from "../Stores/MenuStore"; import { analyticsClient } from "../Administration/AnalyticsClient"; import { axiosWithRetry } from "./AxiosUtils"; +import { limitMap } from "../Stores/GameStore"; class ConnectionManager { private localUser!: LocalUser; @@ -148,6 +149,7 @@ class ConnectionManager { } else if ( connexionType === GameConnexionTypes.organization || connexionType === GameConnexionTypes.anonymous || + connexionType === GameConnexionTypes.limit || connexionType === GameConnexionTypes.empty ) { this.authToken = localUserStore.getAuthToken(); @@ -228,6 +230,12 @@ class ConnectionManager { analyticsClient.identifyUser(this.localUser.uuid, this.localUser.email); } + //if limit room active test headband + if (connexionType === GameConnexionTypes.limit) { + warningContainerStore.activateWarningContainer(); + limitMap.set(true); + } + this.serviceWorker = new _ServiceWorker(); return Promise.resolve(this._currentRoom); } diff --git a/front/src/Connexion/Room.ts b/front/src/Connexion/Room.ts index 044d8d67..3e36f84c 100644 --- a/front/src/Connexion/Room.ts +++ b/front/src/Connexion/Room.ts @@ -32,7 +32,7 @@ export class Room { if (this.id.startsWith("/")) { this.id = this.id.substr(1); } - if (this.id.startsWith("_/")) { + if (this.id.startsWith("_/") || this.id.startsWith("*/")) { this.isPublic = true; } else if (this.id.startsWith("@/")) { this.isPublic = false; @@ -138,7 +138,7 @@ export class Room { } if (this.isPublic) { - const match = /_\/([^/]+)\/.+/.exec(this.id); + const match = /[_*]\/([^/]+)\/.+/.exec(this.id); if (!match) throw new Error('Could not extract instance from "' + this.id + '"'); this.instance = match[1]; return this.instance; diff --git a/front/src/Stores/GameStore.ts b/front/src/Stores/GameStore.ts index eada6d26..1ad975ee 100644 --- a/front/src/Stores/GameStore.ts +++ b/front/src/Stores/GameStore.ts @@ -5,3 +5,5 @@ export const userMovingStore = writable(false); export const requestVisitCardsStore = writable