From d10e2dbca7a7a7ed4e7584508ecb50512937ae45 Mon Sep 17 00:00:00 2001 From: GRL Date: Mon, 9 Aug 2021 16:56:28 +0200 Subject: [PATCH] Migration of report menu in svelte --- front/src/Components/App.svelte | 7 ++ .../Components/ReportMenu/BlockSubMenu.svelte | 42 +++++++ .../Components/ReportMenu/ReportMenu.svelte | 112 ++++++++++++++++++ .../ReportMenu/ReportSubMenu.svelte | 44 +++++++ front/src/Phaser/Menu/MenuScene.ts | 2 +- front/style/style.scss | 1 - 6 files changed, 206 insertions(+), 2 deletions(-) create mode 100644 front/src/Components/ReportMenu/BlockSubMenu.svelte create mode 100644 front/src/Components/ReportMenu/ReportMenu.svelte create mode 100644 front/src/Components/ReportMenu/ReportSubMenu.svelte diff --git a/front/src/Components/App.svelte b/front/src/Components/App.svelte index d65f699e..1b71b01f 100644 --- a/front/src/Components/App.svelte +++ b/front/src/Components/App.svelte @@ -37,6 +37,8 @@ import LayoutManager from "./LayoutManager/LayoutManager.svelte"; import {audioManagerVisibilityStore} from "../Stores/AudioManagerStore"; import AudioManager from "./AudioManager/AudioManager.svelte" + import { showReportScreenStore } from "../Stores/ShowReportScreenStore"; + import ReportMenu from "./ReportMenu/ReportMenu.svelte"; export let game: Game; @@ -93,6 +95,11 @@ {/if} + {#if $showReportScreenStore} +
+ +
+ {/if} {#if $gameOverlayVisibilityStore}
diff --git a/front/src/Components/ReportMenu/BlockSubMenu.svelte b/front/src/Components/ReportMenu/BlockSubMenu.svelte new file mode 100644 index 00000000..18957774 --- /dev/null +++ b/front/src/Components/ReportMenu/BlockSubMenu.svelte @@ -0,0 +1,42 @@ + + +
+

Block

+

Block any communication from and to this user. This can be reverted.

+ +
+ + + \ No newline at end of file diff --git a/front/src/Components/ReportMenu/ReportMenu.svelte b/front/src/Components/ReportMenu/ReportMenu.svelte new file mode 100644 index 00000000..394ca54e --- /dev/null +++ b/front/src/Components/ReportMenu/ReportMenu.svelte @@ -0,0 +1,112 @@ + + +
+
+

Moderate {userName}

+
+ +
+
+
+
+ +
+
+ +
+
+
+ {#if blockActive} + + {:else if reportActive} + + {:else } +

ERROR : There is no action selected.

+ {/if} +
+
+ + \ No newline at end of file diff --git a/front/src/Components/ReportMenu/ReportSubMenu.svelte b/front/src/Components/ReportMenu/ReportSubMenu.svelte new file mode 100644 index 00000000..e9b63ea4 --- /dev/null +++ b/front/src/Components/ReportMenu/ReportSubMenu.svelte @@ -0,0 +1,44 @@ + + +
+

Report

+

Send a report message to the administrators of this room. They may later ban this user.

+
+
+ + +
+
+ +
+
+
+ + \ No newline at end of file diff --git a/front/src/Phaser/Menu/MenuScene.ts b/front/src/Phaser/Menu/MenuScene.ts index 8270dada..2cd05b2e 100644 --- a/front/src/Phaser/Menu/MenuScene.ts +++ b/front/src/Phaser/Menu/MenuScene.ts @@ -127,7 +127,7 @@ export class MenuScene extends Phaser.Scene { if (uuid === undefined) { throw new Error("Could not find UUID for user with ID " + user.userId); } - this.gameReportElement.open(uuid, user.userName); + //this.gameReportElement.open(uuid, user.userName); } }); diff --git a/front/style/style.scss b/front/style/style.scss index 1ed115d2..7ed87e24 100644 --- a/front/style/style.scss +++ b/front/style/style.scss @@ -1,5 +1,4 @@ *{ - font-family: Lato; cursor: url('./images/cursor_normal.png'), auto; } * a, button, select{