diff --git a/Vagrantfile.template b/Vagrantfile.template
index 738e24b7..14d30525 100644
--- a/Vagrantfile.template
+++ b/Vagrantfile.template
@@ -2,7 +2,7 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Box / OS
-VAGRANT_BOX = 'bento/ubuntu-19.10'
+VAGRANT_BOX = 'bento/ubuntu-20.04'
# VM User — 'vagrant' by default
VM_USER = 'vagrant'
@@ -58,7 +58,7 @@ Vagrant.configure(2) do |config|
apt-get update -y
apt-get install -y git
apt-get install -y apt-transport-https
- apt-get install -y build-essential
+ apt-get install -y ca-certificates
apt-get install -y curl
apt-get install -y gnupg-agent
apt-get install -y software-properties-common
@@ -66,8 +66,8 @@ Vagrant.configure(2) do |config|
apt-key fingerprint 0EBFCD88
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
- $(lsb_release -cs) \
- stable"
+ $(lsb_release -cs) \
+ stable"
apt-get update -y
apt-get install -y docker-ce docker-ce-cli containerd.io
curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
diff --git a/front/dist/resources/html/gameMenu.html b/front/dist/resources/html/gameMenu.html
index bc764d28..fd78098b 100644
--- a/front/dist/resources/html/gameMenu.html
+++ b/front/dist/resources/html/gameMenu.html
@@ -1,9 +1,16 @@
-
\ No newline at end of file
diff --git a/front/dist/resources/html/gameQualityMenu.html b/front/dist/resources/html/gameQualityMenu.html
index 48162eed..0335db80 100644
--- a/front/dist/resources/html/gameQualityMenu.html
+++ b/front/dist/resources/html/gameQualityMenu.html
@@ -1,4 +1,11 @@
diff --git a/front/dist/resources/objects/webrtc-out.mp3 b/front/dist/resources/objects/webrtc-out.mp3
index 53c45686..dcf02928 100644
Binary files a/front/dist/resources/objects/webrtc-out.mp3 and b/front/dist/resources/objects/webrtc-out.mp3 differ
diff --git a/front/dist/resources/style/style.css b/front/dist/resources/style/style.css
index 04bfd194..b7f0bfe7 100644
--- a/front/dist/resources/style/style.css
+++ b/front/dist/resources/style/style.css
@@ -1,9 +1,9 @@
*{
font-family: 'Open Sans', sans-serif;
- cursor: url('../logos/cursor_normal.png'), auto;
+ cursor: url('/resources/logos/cursor_normal.png'), auto;
}
* a, button, select{
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
}
body{
overflow: hidden;
@@ -112,7 +112,7 @@ video#myCamVideo{
}
/*btn animation*/
.btn-cam-action div{
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
position: absolute;
border: solid 0px black;
width: 44px;
@@ -299,7 +299,7 @@ body {
right: -100px;
background: none;
border: none;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
animation: right .2s ease;
}
#cowebsite .close-btn img{
@@ -389,7 +389,7 @@ body {
margin: 2%;
flex-basis: 96%;
transition: margin-left 0.2s, margin-right 0.2s, margin-bottom 0.2s, margin-top 0.2s, flex-basis 0.2s;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
/*flex-shrink: 2;*/
}
@@ -406,7 +406,7 @@ body {
.sidebar > div {
margin: 2%;
transition: margin-left 0.2s, margin-right 0.2s, margin-bottom 0.2s, margin-top 0.2s, max-height 0.2s, max-width 0.2s;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
border-radius: 15px 15px 15px 15px;
}
@@ -437,7 +437,7 @@ body {
margin: 1%;
max-height: 96%;
transition: margin-left 0.2s, margin-right 0.2s, margin-bottom 0.2s, margin-top 0.2s;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
}
.chat-mode > div:hover {
@@ -473,7 +473,8 @@ body {
min-height: 200px;
max-height: 80%;
top: -80%;
- left: 10%;
+ /*left: 10%;*/
+ left: 250px;
background: #333333;
z-index: 200;
transition: all 0.1s ease-out;
@@ -530,7 +531,7 @@ body {
margin-top: 6px;
width: 30px;
height: 30px;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
padding: 0 5px;
transition: all .5s ease;
transform: rotateY(0);
@@ -554,7 +555,7 @@ body {
.main-console div.console:hover,
.message-container div.clear:hover {
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
top: calc(100% + 5px);
transform: scale(1.2) translateY(3px);
}
@@ -587,7 +588,7 @@ body {
transition: all .2s ease;
}
.main-console .btn-action .btn:hover{
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
background-color: #ffda01;
color: black;
border: 1px solid black;
@@ -602,7 +603,7 @@ body {
.main-console .menu span {
margin: 20px;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
}
.main-console .menu span.active {
@@ -636,12 +637,14 @@ body {
}
.main-console section div.upload label img{
height: 150px;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
}
.main-console section div.upload label img{
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
}
+
+
/*audio html when audio message playing*/
.main-container .audio-playing {
position: absolute;
@@ -729,7 +732,7 @@ div.modal-report-user{
right: 0;
left: auto;
top: 0;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
width: 15px;
height: 15px;
margin: 10px;
@@ -748,7 +751,7 @@ div.modal-report-user{
transition: all .2s ease;
}
.modal-report-user button:hover{
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
background-color: #ffda01;
color: black;
border: 1px solid black;
@@ -791,7 +794,7 @@ div.modal-report-user{
}
.discussion .active-btn{
display: none;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
height: 50px;
width: 50px;
background-color: #2d2d2dba;
@@ -820,7 +823,7 @@ div.modal-report-user{
right: 10px;
background: none;
border: none;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
}
.discussion .close-btn img{
height: 15px;
@@ -845,7 +848,7 @@ div.modal-report-user{
background-color: #ffffff69;
padding: 5px;
border-radius: 15px;
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
}
.discussion .participants .participant:hover{
@@ -878,7 +881,7 @@ div.modal-report-user{
}
.discussion .participants .participant button.report-btn{
- cursor: url('../logos/cursor_pointer.png'), pointer;
+ cursor: url('/resources/logos/cursor_pointer.png'), pointer;
position: absolute;
background-color: #2d2d2dba;
right: 34px;
diff --git a/front/dist/static/images/menu.svg b/front/dist/static/images/menu.svg
new file mode 100644
index 00000000..e066e483
--- /dev/null
+++ b/front/dist/static/images/menu.svg
@@ -0,0 +1,11 @@
+
+
+
diff --git a/front/src/Administration/ConsoleGlobalMessageManager.ts b/front/src/Administration/ConsoleGlobalMessageManager.ts
index d437f7c0..5391b6a0 100644
--- a/front/src/Administration/ConsoleGlobalMessageManager.ts
+++ b/front/src/Administration/ConsoleGlobalMessageManager.ts
@@ -21,11 +21,11 @@ export class ConsoleGlobalMessageManager {
private readonly divMainConsole: HTMLDivElement;
private readonly divMessageConsole: HTMLDivElement;
- private readonly divSettingConsole: HTMLDivElement;
+ //private readonly divSettingConsole: HTMLDivElement;
private readonly buttonMainConsole: HTMLDivElement;
private readonly buttonSendMainConsole: HTMLImageElement;
- private readonly buttonAdminMainConsole: HTMLImageElement;
- private readonly buttonSettingsMainConsole: HTMLImageElement;
+ //private readonly buttonAdminMainConsole: HTMLImageElement;
+ //private readonly buttonSettingsMainConsole: HTMLImageElement;
private activeConsole: boolean = false;
private activeMessage: boolean = false;
private activeSetting: boolean = false;
@@ -40,11 +40,12 @@ export class ConsoleGlobalMessageManager {
this.divMainConsole.className = CLASS_CONSOLE_MESSAGE;
this.divMessageConsole = document.createElement('div');
this.divMessageConsole.className = 'message';
- this.divSettingConsole = document.createElement('div');
- this.divSettingConsole.className = 'setting';
+ //this.divSettingConsole = document.createElement('div');
+ //this.divSettingConsole.className = 'setting';
this.buttonSendMainConsole = document.createElement('img');
- this.buttonSettingsMainConsole = document.createElement('img');
- this.buttonAdminMainConsole = document.createElement('img');
+ this.buttonSendMainConsole.id = 'btn-send-message';
+ //this.buttonSettingsMainConsole = document.createElement('img');
+ //this.buttonAdminMainConsole = document.createElement('img');
this.userInputManager = userInputManager;
this.initialise();
@@ -103,33 +104,33 @@ export class ConsoleGlobalMessageManager {
}
});
- this.buttonAdminMainConsole.src = 'resources/logos/setting-yellow.svg';
+ /*this.buttonAdminMainConsole.src = 'resources/logos/setting-yellow.svg';
this.buttonAdminMainConsole.addEventListener('click', () => {
window.open(ADMIN_URL, '_blank');
- });
+ });*/
- this.buttonSettingsMainConsole.src = 'resources/logos/monitor-yellow.svg';
+ /*this.buttonSettingsMainConsole.src = 'resources/logos/monitor-yellow.svg';
this.buttonSettingsMainConsole.addEventListener('click', () => {
if(this.activeSetting){
this.disabledSettingConsole();
}else{
this.activeSettingConsole();
}
- });
+ });*/
this.divMessageConsole.appendChild(typeConsole);
- if(this.isAdmin) {
+ /*if(this.isAdmin) {
this.buttonMainConsole.appendChild(this.buttonSendMainConsole);
- this.buttonMainConsole.appendChild(this.buttonAdminMainConsole);
- this.createTextMessagePart();
- this.createUploadAudioPart();
- }
- this.buttonMainConsole.appendChild(this.buttonSettingsMainConsole);
+ //this.buttonMainConsole.appendChild(this.buttonAdminMainConsole);
+ }*/
+ this.createTextMessagePart();
+ this.createUploadAudioPart();
+ //this.buttonMainConsole.appendChild(this.buttonSettingsMainConsole);
this.divMainConsole.appendChild(this.buttonMainConsole);
this.divMainConsole.appendChild(this.divMessageConsole);
- this.divMainConsole.appendChild(this.divSettingConsole);
+ //this.divMainConsole.appendChild(this.divSettingConsole);
const mainSectionDiv = HtmlUtils.getElementByIdOrFail('main-container');
mainSectionDiv.appendChild(this.divMainConsole);
@@ -343,40 +344,50 @@ export class ConsoleGlobalMessageManager {
}
activeMessageConsole(){
- this.activeMessage = true;
- if(this.activeSetting){
- this.disabledSettingConsole();
+ if(!this.isAdmin){
+ throw "User is not admin";
}
+ if(this.activeMessage){
+ this.disabledMessageConsole();
+ return;
+ }
+ this.activeMessage = true;
this.active();
this.divMessageConsole.classList.add('active');
this.buttonMainConsole.hidden = false;
this.buttonSendMainConsole.classList.add('active');
+ //if button not
+ try{
+ HtmlUtils.getElementByIdOrFail('btn-send-message');
+ }catch (e) {
+ this.buttonMainConsole.appendChild(this.buttonSendMainConsole);
+ }
}
disabledMessageConsole(){
this.activeMessage = false;
this.disabled();
- this.buttonMainConsole.hidden = false;
+ this.buttonMainConsole.hidden = true;
this.divMessageConsole.classList.remove('active');
this.buttonSendMainConsole.classList.remove('active');
}
- activeSettingConsole(){
+ /*activeSettingConsole(){
this.activeSetting = true;
if(this.activeMessage){
- this.disabledMessageConsole();
+ this.disabledSettingConsole();
}
this.active();
this.divSettingConsole.classList.add('active');
- this.buttonSettingsMainConsole.classList.add('active');
+ //this.buttonSettingsMainConsole.classList.add('active');
}
disabledSettingConsole(){
this.activeSetting = false;
this.disabled();
this.divSettingConsole.classList.remove('active');
- this.buttonSettingsMainConsole.classList.remove('active');
- }
+ //this.buttonSettingsMainConsole.classList.remove('active');
+ }*/
private getSectionId(id: string) : string {
return `section-${id}`;
diff --git a/front/src/Phaser/Menu/MenuScene.ts b/front/src/Phaser/Menu/MenuScene.ts
index 502ae880..5ac2ca78 100644
--- a/front/src/Phaser/Menu/MenuScene.ts
+++ b/front/src/Phaser/Menu/MenuScene.ts
@@ -53,6 +53,9 @@ export class MenuScene extends Phaser.Scene {
this.menuButton.on('click', () => {
this.sideMenuOpened ? this.closeSideMenu() : this.openSideMenu();
});
+
+ this.menuElement.addListener('click');
+ this.menuElement.on('click', this.onMenuClick.bind(this));
}
private revealMenusAfterInit(menuElement: Phaser.GameObjects.DOMElement, rootDomId: string) {
@@ -70,13 +73,11 @@ export class MenuScene extends Phaser.Scene {
openSideMenu() {
if (this.sideMenuOpened) return;
this.sideMenuOpened = true;
- this.menuButton.getChildByID('openMenuButton').innerHTML = 'Close'
+ this.menuButton.getChildByID('openMenuButton').innerHTML = 'X';
if (gameManager.getCurrentGameScene(this).connection.isAdmin()) {
const adminSection = this.menuElement.getChildByID('adminConsoleSection') as HTMLElement;
adminSection.hidden = false;
}
- this.menuElement.addListener('click');
- this.menuElement.on('click', this.onMenuClick.bind(this));
this.tweens.add({
targets: this.menuElement,
x: openedSideMenuX,
@@ -89,14 +90,14 @@ export class MenuScene extends Phaser.Scene {
if (!this.sideMenuOpened) return;
this.sideMenuOpened = false;
this.closeGameQualityMenu()
- this.menuButton.getChildByID('openMenuButton').innerHTML = 'Menu'
+ this.menuButton.getChildByID('openMenuButton').innerHTML = ``;
+ gameManager.getCurrentGameScene(this).ConsoleGlobalMessageManager.disabledMessageConsole();
this.tweens.add({
targets: this.menuElement,
x: closedSideMenuX,
duration: 500,
ease: 'Power3'
});
- this.menuElement.removeListener('click');
}