From 4fc9a12b950b3be3d09aae980cb1faec09a08134 Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Mon, 12 Apr 2021 18:17:04 +0200 Subject: [PATCH 1/6] HotFix style WorkAdventure --- front/dist/resources/html/gameMenuIcon.html | 2 +- front/dist/resources/style/style.css | 39 +++++++++++---------- front/src/Phaser/Menu/MenuScene.ts | 6 +++- front/src/Phaser/Menu/ReportMenu.ts | 2 +- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/front/dist/resources/html/gameMenuIcon.html b/front/dist/resources/html/gameMenuIcon.html index 0df8ff80..946cb60a 100644 --- a/front/dist/resources/html/gameMenuIcon.html +++ b/front/dist/resources/html/gameMenuIcon.html @@ -8,7 +8,7 @@ } #menuIcon button img{ width: 14px; - padding-top: 3px; + padding-top: 0; cursor: url('/resources/logos/cursor_pointer.png'), pointer; } #menuIcon section { diff --git a/front/dist/resources/style/style.css b/front/dist/resources/style/style.css index ba5b6c07..010da692 100644 --- a/front/dist/resources/style/style.css +++ b/front/dist/resources/style/style.css @@ -44,13 +44,13 @@ body .message-info.warning{ .video-container i{ position: absolute; width: 100px; - height: 65px; + height: 100px; left: calc(50% - 50px); top: calc(50% - 50px); background-color: black; border-radius: 50%; text-align: center; - padding-top: 35px; + padding-top: 32px; font-size: 28px; color: white; } @@ -58,8 +58,8 @@ body .message-info.warning{ .video-container img{ position: absolute; display: none; - width: 25px; - height: 25px; + width: 40px; + height: 40px; left: 5px; bottom: 5px; padding: 10px; @@ -108,10 +108,12 @@ body .message-info.warning{ margin: 0; padding: 0; cursor: url('/resources/logos/cursor_pointer.png'), pointer; + width: 25px; + height: 25px; } .video-container button.report span{ position: absolute; - bottom: 8px; + bottom: 6px; left: 36px; color: white; font-size: 16px; @@ -211,8 +213,8 @@ video#myCamVideo{ .connecting-spinner { /*display: inline-block;*/ position: absolute; - left: calc(50% - 68px); - top: calc(50% - 68px); + left: calc(50% - 62px); + top: calc(50% - 62px); width: 130px; @@ -850,10 +852,10 @@ div.modal-report-user{ .modal-report-user img{ position: absolute; - height: 50px; - width: 50px; + height: 24px; + width: 24px; z-index: 999; - left: calc(50% - 25px); + left: calc(50% - 12px); top: 10px; } @@ -1017,7 +1019,7 @@ div.modal-report-user{ background-color: #2d2d2dba; right: 34px; margin: 0px; - padding: 6px 0px; + padding: 2px 0px; border-radius: 15px; border: none; color: white; @@ -1073,18 +1075,18 @@ div.modal-report-user{ .discussion .send-message{ position: absolute; bottom: 45px; - width: 220px; + width: 200px; height: 26px; margin-bottom: 10px; } .discussion .send-message input{ position: absolute; - width: calc(100% - 10px); - height: 20px; + width: calc(100% - 20px); + height: 30px; background-color: #171717; color: white; - border-radius: 15px; + border-radius: 10px; border: none; padding: 6px; } @@ -1117,10 +1119,11 @@ div.action p.action-body{ padding: 10px; background-color: #2d2d2dba; color: #fff; - font-size: 12px; + font-size: 14px; + font-weight: 500; text-align: center; - max-width: 150px; - margin-left: calc(50% - 75px); + max-width: 250px; + margin-left: calc(50% - 125px); border-radius: 15px; } .popUpElement{ diff --git a/front/src/Phaser/Menu/MenuScene.ts b/front/src/Phaser/Menu/MenuScene.ts index 58e7f0a6..8899c62f 100644 --- a/front/src/Phaser/Menu/MenuScene.ts +++ b/front/src/Phaser/Menu/MenuScene.ts @@ -104,7 +104,11 @@ export class MenuScene extends Phaser.Scene { } public revealMenuIcon(): void { - (this.menuButton.getChildByID('menuIcon') as HTMLElement).hidden = false + try { + (this.menuButton.getChildByID('menuIcon') as HTMLElement).hidden = false; + } catch (err) { + console.error(err); + } } openSideMenu() { diff --git a/front/src/Phaser/Menu/ReportMenu.ts b/front/src/Phaser/Menu/ReportMenu.ts index d7d0658b..c5d59f38 100644 --- a/front/src/Phaser/Menu/ReportMenu.ts +++ b/front/src/Phaser/Menu/ReportMenu.ts @@ -72,8 +72,8 @@ export class ReportMenu extends Phaser.GameObjects.DOMElement { } public close(): void { + gameManager.getCurrentGameScene(this.scene).userInputManager.restoreControls(); this.opened = false; - gameManager.getCurrentGameScene(this.scene).userInputManager.initKeyBoardEvent(); const mainEl = this.getChildByID('gameReport') as HTMLElement; this.scene.tweens.add({ targets: this, From 6a08ca656f84d042b118e275593329f71554af0c Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Mon, 12 Apr 2021 18:26:36 +0200 Subject: [PATCH 2/6] Add TODO --- front/src/Phaser/Menu/MenuScene.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/front/src/Phaser/Menu/MenuScene.ts b/front/src/Phaser/Menu/MenuScene.ts index 8899c62f..6d09f247 100644 --- a/front/src/Phaser/Menu/MenuScene.ts +++ b/front/src/Phaser/Menu/MenuScene.ts @@ -104,6 +104,7 @@ export class MenuScene extends Phaser.Scene { } public revealMenuIcon(): void { + //TODO fix me: add try catch because at the same time, 'this.menuButton' variable doesn't exist and there is error on 'getChildByID' function try { (this.menuButton.getChildByID('menuIcon') as HTMLElement).hidden = false; } catch (err) { From 1693819b6acfd4d4becaca1904585f3c58713ac1 Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Mon, 12 Apr 2021 20:23:00 +0200 Subject: [PATCH 3/6] HotFix Share Form height --- front/dist/resources/html/gameShare.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/dist/resources/html/gameShare.html b/front/dist/resources/html/gameShare.html index 85f63b80..60c2ee0f 100644 --- a/front/dist/resources/html/gameShare.html +++ b/front/dist/resources/html/gameShare.html @@ -5,7 +5,7 @@ border-radius: 6px; margin: 20px auto 0; width: 298px; - height: 150px; + height: 160px; } #gameShare h1 { background-image: linear-gradient(top, #f1f3f3, #d4dae0); From 270cdb5c8209e786f293caa23b754a9eba37757f Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Mon, 12 Apr 2021 20:44:29 +0200 Subject: [PATCH 4/6] Button "CREATE MAP" must redirect user on production server --- front/src/Phaser/Menu/MenuScene.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/front/src/Phaser/Menu/MenuScene.ts b/front/src/Phaser/Menu/MenuScene.ts index 6d09f247..9093c618 100644 --- a/front/src/Phaser/Menu/MenuScene.ts +++ b/front/src/Phaser/Menu/MenuScene.ts @@ -319,7 +319,9 @@ export class MenuScene extends Phaser.Scene { } private gotToCreateMapPage() { - const sparkHost = 'https://'+window.location.host.replace('play.', '')+'/choose-map.html'; + //const sparkHost = 'https://'+window.location.host.replace('play.', '')+'/choose-map.html'; + //TODO fix me: this button can to send us on WorkAdventure BO. + const sparkHost = 'https://workadventu.re/choose-map.html'; window.open(sparkHost, '_blank'); } From 4119f69879166ba152f6daab39459bf953aa7d3b Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Tue, 13 Apr 2021 12:30:15 +0200 Subject: [PATCH 5/6] HotFix - Key up m when user write message - Size game share --- front/dist/resources/html/gameShare.html | 2 +- front/src/Phaser/Game/GameScene.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/front/dist/resources/html/gameShare.html b/front/dist/resources/html/gameShare.html index 85f63b80..60c2ee0f 100644 --- a/front/dist/resources/html/gameShare.html +++ b/front/dist/resources/html/gameShare.html @@ -5,7 +5,7 @@ border-radius: 6px; margin: 20px auto 0; width: 298px; - height: 150px; + height: 160px; } #gameShare h1 { background-image: linear-gradient(top, #f1f3f3, #d4dae0); diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 6c4c6e3e..29d9cd5b 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -440,9 +440,10 @@ export class GameScene extends ResizableScene implements CenterListener { this.openChatIcon = new OpenChatIcon(this, 2, this.game.renderer.height - 2) // FIXME: change this to use the UserInputManager class for input - this.input.keyboard.on('keyup-M', () => { + // FIXME: Comment this feature because when user write M key in report input, the layout change. + /*this.input.keyboard.on('keyup-M', () => { this.switchLayoutMode(); - }); + });*/ this.reposition(); From 1a4f178728093754ef57ab4d5debf633b3bd7322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 14 Apr 2021 15:57:57 +0200 Subject: [PATCH 6/6] Update front/src/Phaser/Menu/MenuScene.ts --- front/src/Phaser/Menu/MenuScene.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/Phaser/Menu/MenuScene.ts b/front/src/Phaser/Menu/MenuScene.ts index 9093c618..830f8e48 100644 --- a/front/src/Phaser/Menu/MenuScene.ts +++ b/front/src/Phaser/Menu/MenuScene.ts @@ -321,7 +321,7 @@ export class MenuScene extends Phaser.Scene { private gotToCreateMapPage() { //const sparkHost = 'https://'+window.location.host.replace('play.', '')+'/choose-map.html'; //TODO fix me: this button can to send us on WorkAdventure BO. - const sparkHost = 'https://workadventu.re/choose-map.html'; + const sparkHost = 'https://workadventu.re/getting-started'; window.open(sparkHost, '_blank'); }