diff --git a/back/server.ts b/back/server.ts index 4ed443b8..1e474ec9 100644 --- a/back/server.ts +++ b/back/server.ts @@ -1,15 +1,15 @@ // lib/server.ts import App from "./src/App"; import grpc from "grpc"; -import {roomManager} from "./src/RoomManager"; -import {IRoomManagerServer, RoomManagerService} from "./src/Messages/generated/messages_grpc_pb"; -import {HTTP_PORT, GRPC_PORT} from "./src/Enum/EnvironmentVariable"; +import { roomManager } from "./src/RoomManager"; +import { IRoomManagerServer, RoomManagerService } from "./src/Messages/generated/messages_grpc_pb"; +import { HTTP_PORT, GRPC_PORT } from "./src/Enum/EnvironmentVariable"; -App.listen(HTTP_PORT, () => console.log(`WorkAdventure HTTP API starting on port %d!`, HTTP_PORT)) +App.listen(HTTP_PORT, () => console.log(`WorkAdventure HTTP API starting on port %d!`, HTTP_PORT)); const server = new grpc.Server(); server.addService(RoomManagerService, roomManager); server.bind(`0.0.0.0:${GRPC_PORT}`, grpc.ServerCredentials.createInsecure()); server.start(); -console.log('WorkAdventure HTTP/2 API starting on port %d!', GRPC_PORT); +console.log("WorkAdventure HTTP/2 API starting on port %d!", GRPC_PORT); diff --git a/front/src/Components/App.svelte b/front/src/Components/App.svelte index e9db2b77..a1277ed2 100644 --- a/front/src/Components/App.svelte +++ b/front/src/Components/App.svelte @@ -23,6 +23,9 @@ import { chatVisibilityStore } from "../Stores/ChatStore"; import { helpCameraSettingsVisibleStore } from "../Stores/HelpCameraSettingsStore"; import HelpCameraSettingsPopup from "./HelpCameraSettings/HelpCameraSettingsPopup.svelte"; + import { showLimitRoomModalStore, showShareLinkMapModalStore } from "../Stores/ModalStore"; + import LimitRoomModal from "./Modal/LimitRoomModal.svelte"; + import ShareLinkMapModal from "./Modal/ShareLinkMapModal.svelte"; import AudioPlaying from "./UI/AudioPlaying.svelte"; import { soundPlayingStore } from "../Stores/SoundPlayingStore"; import ErrorDialog from "./UI/ErrorDialog.svelte"; @@ -136,6 +139,16 @@ {/if} + {#if $showLimitRoomModalStore} +
+ +
+ {/if} + {#if $showShareLinkMapModalStore} +
+ +
+ {/if} {#if $requestVisitCardsStore} {/if} diff --git a/front/src/Components/Menu/GuestSubMenu.svelte b/front/src/Components/Menu/GuestSubMenu.svelte index 0ae25b75..408dcbce 100644 --- a/front/src/Components/Menu/GuestSubMenu.svelte +++ b/front/src/Components/Menu/GuestSubMenu.svelte @@ -21,12 +21,12 @@
-

Share the link of the room !

+

Share the link of the room!

diff --git a/front/src/Components/Menu/MenuIcon.svelte b/front/src/Components/Menu/MenuIcon.svelte index bb5a2df2..9d3f72dd 100644 --- a/front/src/Components/Menu/MenuIcon.svelte +++ b/front/src/Components/Menu/MenuIcon.svelte @@ -1,9 +1,14 @@
- open menu - open menu + {#if $limitMapStore} + open menu + open menu + {:else} + open menu + open menu + {/if}
diff --git a/front/src/Components/Modal/ShareLinkMapModal.svelte b/front/src/Components/Modal/ShareLinkMapModal.svelte new file mode 100644 index 00000000..42ac1294 --- /dev/null +++ b/front/src/Components/Modal/ShareLinkMapModal.svelte @@ -0,0 +1,90 @@ + + + + + diff --git a/front/src/Components/ReportMenu/ReportMenu.svelte b/front/src/Components/ReportMenu/ReportMenu.svelte index 8479a5b0..92601774 100644 --- a/front/src/Components/ReportMenu/ReportMenu.svelte +++ b/front/src/Components/ReportMenu/ReportMenu.svelte @@ -6,12 +6,11 @@ import type { Unsubscriber } from "svelte/store"; import { playersStore } from "../../Stores/PlayersStore"; import { connectionManager } from "../../Connexion/ConnectionManager"; - import { GameConnexionTypes } from "../../Url/UrlManager"; import { get } from "svelte/store"; let blockActive = true; let reportActive = !blockActive; - let anonymous: boolean = false; + let disableReport: boolean = false; let userUUID: string | undefined = playersStore.getPlayerById(get(showReportScreenStore).userId)?.userUuid; let userName = "No name"; let unsubscriber: Unsubscriber; @@ -26,7 +25,7 @@ } } }); - anonymous = connectionManager.getConnexionType === GameConnexionTypes.anonymous; + disableReport = !connectionManager.currentRoom?.canReport ?? true; }); onDestroy(() => { @@ -65,7 +64,7 @@
-
+