merge dev, apply partey changes
This commit is contained in:
parent
fb561ed19b
commit
64a3731bfb
4
front/dist/index.tmpl.html
vendored
4
front/dist/index.tmpl.html
vendored
@ -29,10 +29,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
|
|
||||||
<link href="https://unpkg.com/nes.css@2.3.0/css/nes.min.css" rel="stylesheet" />
|
|
||||||
|
|
||||||
<title>WorkAdventure</title>
|
<title>Partey</title>
|
||||||
</head>
|
</head>
|
||||||
<body id="body" style="margin: 0; background-color: #000">
|
<body id="body" style="margin: 0; background-color: #000">
|
||||||
<div class="main-container" id="main-container">
|
<div class="main-container" id="main-container">
|
||||||
|
8
front/dist/resources/html/gameMenu.html
vendored
8
front/dist/resources/html/gameMenu.html
vendored
@ -24,9 +24,6 @@
|
|||||||
<section>
|
<section>
|
||||||
<button id="shareButton">Share url</button>
|
<button id="shareButton">Share url</button>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
|
||||||
<button id="changeNameButton">Edit name</button>
|
|
||||||
</section>
|
|
||||||
<section>
|
<section>
|
||||||
<button id="changeSkinButton">Edit skin</button>
|
<button id="changeSkinButton">Edit skin</button>
|
||||||
</section>
|
</section>
|
||||||
@ -39,15 +36,10 @@
|
|||||||
<section>
|
<section>
|
||||||
<button id="toggleFullscreen">Toggle fullscreen</button>
|
<button id="toggleFullscreen">Toggle fullscreen</button>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
|
||||||
<button id="sparkButton">Create map</button>
|
|
||||||
</section>
|
|
||||||
<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>
|
<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>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,7 +15,7 @@ export function isUserNameValid(value: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function areCharacterLayersValid(value: string[]): boolean {
|
export function areCharacterLayersValid(value: string[]): boolean {
|
||||||
if (!value.length) return false;
|
if (!value || !value.length) return false;
|
||||||
for (let i = 0; i < value.length; i++) {
|
for (let i = 0; i < value.length; i++) {
|
||||||
if (/^\w+$/.exec(value[i]) === null) {
|
if (/^\w+$/.exec(value[i]) === null) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -7,6 +7,7 @@ import {LoginSceneName} from "../Login/LoginScene";
|
|||||||
import {SelectCharacterSceneName} from "../Login/SelectCharacterScene";
|
import {SelectCharacterSceneName} from "../Login/SelectCharacterScene";
|
||||||
import {EnableCameraSceneName} from "../Login/EnableCameraScene";
|
import {EnableCameraSceneName} from "../Login/EnableCameraScene";
|
||||||
import {localUserStore} from "../../Connexion/LocalUserStore";
|
import {localUserStore} from "../../Connexion/LocalUserStore";
|
||||||
|
import Axios from "axios";
|
||||||
|
|
||||||
export interface HasMovedEvent {
|
export interface HasMovedEvent {
|
||||||
direction: string;
|
direction: string;
|
||||||
@ -35,6 +36,11 @@ export class GameManager {
|
|||||||
this.startRoom = await connectionManager.initGameConnexion();
|
this.startRoom = await connectionManager.initGameConnexion();
|
||||||
await this.loadMap(this.startRoom, scenePlugin);
|
await this.loadMap(this.startRoom, scenePlugin);
|
||||||
|
|
||||||
|
if(!this.playerName) {
|
||||||
|
const res = await Axios.get("/");
|
||||||
|
this.playerName = res.headers['bstlyusername'];
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.playerName) {
|
if (!this.playerName) {
|
||||||
return LoginSceneName;
|
return LoginSceneName;
|
||||||
} else if (!this.characterLayers || !this.characterLayers.length) {
|
} else if (!this.characterLayers || !this.characterLayers.length) {
|
||||||
|
@ -12,7 +12,7 @@ module.exports = {
|
|||||||
devServer: {
|
devServer: {
|
||||||
contentBase: './dist',
|
contentBase: './dist',
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
sockPort: 80,
|
sockPort: 443,
|
||||||
disableHostCheck: true,
|
disableHostCheck: true,
|
||||||
historyApiFallback: {
|
historyApiFallback: {
|
||||||
rewrites: [
|
rewrites: [
|
||||||
|
Loading…
Reference in New Issue
Block a user