Merge pull request #703 from thecodingmachine/socialNetworkLink
Social network link anonymous connexion
This commit is contained in:
commit
adb535d1b6
12
front/dist/resources/html/gameMenu.html
vendored
12
front/dist/resources/html/gameMenu.html
vendored
@ -15,6 +15,14 @@
|
|||||||
#gameMenu section {
|
#gameMenu section {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
section#socialLinks{
|
||||||
|
position: absolute;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
section#socialLinks img{
|
||||||
|
width: 32px;
|
||||||
|
cursor: url('/resources/logos/cursor_pointer.png'), pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="gameMenu" hidden>
|
<div id="gameMenu" hidden>
|
||||||
@ -38,5 +46,9 @@
|
|||||||
<section id="adminConsoleSection" hidden>
|
<section id="adminConsoleSection" hidden>
|
||||||
<button id="adminConsoleButton">Admin console</button>
|
<button id="adminConsoleButton">Admin console</button>
|
||||||
</section>
|
</section>
|
||||||
|
<section id="socialLinks" hidden>
|
||||||
|
<a class="not-button" href="https://www.facebook.com/workadventurebytcm" target="_blank"><img class="not-button" src="/resources/objects/facebook-icon.png"/></a>
|
||||||
|
<a class="not-button" href="https://twitter.com/Workadventure_" target="_blank"><img class="not-button" src="/resources/objects/twitter-icon.png"/></a>
|
||||||
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
BIN
front/dist/resources/objects/facebook-icon.png
vendored
Normal file
BIN
front/dist/resources/objects/facebook-icon.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
front/dist/resources/objects/twitter-icon.png
vendored
Normal file
BIN
front/dist/resources/objects/twitter-icon.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
@ -4,6 +4,8 @@ import {gameManager} from "../Game/GameManager";
|
|||||||
import {localUserStore} from "../../Connexion/LocalUserStore";
|
import {localUserStore} from "../../Connexion/LocalUserStore";
|
||||||
import {mediaManager, ReportCallback, ShowReportCallBack} from "../../WebRtc/MediaManager";
|
import {mediaManager, ReportCallback, ShowReportCallBack} from "../../WebRtc/MediaManager";
|
||||||
import {coWebsiteManager} from "../../WebRtc/CoWebsiteManager";
|
import {coWebsiteManager} from "../../WebRtc/CoWebsiteManager";
|
||||||
|
import {GameConnexionTypes} from "../../Url/UrlManager";
|
||||||
|
import {connectionManager} from "../../Connexion/ConnectionManager";
|
||||||
|
|
||||||
export const MenuSceneName = 'MenuScene';
|
export const MenuSceneName = 'MenuScene';
|
||||||
const gameMenuKey = 'gameMenu';
|
const gameMenuKey = 'gameMenu';
|
||||||
@ -115,6 +117,11 @@ export class MenuScene extends Phaser.Scene {
|
|||||||
const adminSection = this.menuElement.getChildByID('adminConsoleSection') as HTMLElement;
|
const adminSection = this.menuElement.getChildByID('adminConsoleSection') as HTMLElement;
|
||||||
adminSection.hidden = false;
|
adminSection.hidden = false;
|
||||||
}
|
}
|
||||||
|
//TODO bind with future metadata of card
|
||||||
|
//if (connectionManager.getConnexionType === GameConnexionTypes.anonymous){
|
||||||
|
const adminSection = this.menuElement.getChildByID('socialLinks') as HTMLElement;
|
||||||
|
adminSection.hidden = false;
|
||||||
|
//}
|
||||||
this.tweens.add({
|
this.tweens.add({
|
||||||
targets: this.menuElement,
|
targets: this.menuElement,
|
||||||
x: openedSideMenuX,
|
x: openedSideMenuX,
|
||||||
@ -304,6 +311,9 @@ export class MenuScene extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onMenuClick(event:MouseEvent) {
|
private onMenuClick(event:MouseEvent) {
|
||||||
|
if((event?.target as HTMLInputElement).classList.contains('not-button')){
|
||||||
|
return;
|
||||||
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
switch ((event?.target as HTMLInputElement).id) {
|
switch ((event?.target as HTMLInputElement).id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user