merge
This commit is contained in:
parent
e9e96c9e30
commit
73a2cec4df
4
front/dist/resources/html/gameMenu.html
vendored
4
front/dist/resources/html/gameMenu.html
vendored
@ -49,8 +49,8 @@
|
|||||||
<button id="toggleFullscreen" class="nes-btn">Toggle fullscreen</button>
|
<button id="toggleFullscreen" class="nes-btn">Toggle fullscreen</button>
|
||||||
</section>
|
</section>
|
||||||
<!-- TODO activate authentication -->
|
<!-- TODO activate authentication -->
|
||||||
<section hidden>
|
<section>
|
||||||
<button id="oidcLogin">Oauth Login</button>
|
<button id="oidcLogin" class="nes-btn">we.bstly Login</button>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<button id="enableNotification" class="nes-btn">Enable notifications</button>
|
<button id="enableNotification" class="nes-btn">Enable notifications</button>
|
||||||
|
@ -92,5 +92,5 @@
|
|||||||
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import 'https://cdn.quilljs.com/1.3.7/quill.snow.css';
|
/* @import 'https://cdn.quilljs.com/1.3.7/quill.snow.css'; */
|
||||||
</style>
|
</style>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="layout-manager-list">
|
<div class="layout-manager-list">
|
||||||
{#each $layoutManagerActionStore as action}
|
{#each $layoutManagerActionStore as action}
|
||||||
<div class="nes-container is-rounded {action.type}" on:click={() => onClick(action.callback)}>
|
<div class="nes-container is-dark {action.type}" on:click={() => onClick(action.callback)}>
|
||||||
<p>{action.message}</p>
|
<p>{action.message}</p>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
@ -35,14 +35,10 @@
|
|||||||
animation-timing-function: ease-in-out;
|
animation-timing-function: ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.nes-container.is-rounded {
|
div.nes-container {
|
||||||
padding: 8px 4px;
|
padding: 8px 4px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
font-family: Lato;
|
|
||||||
color: whitesmoke;
|
|
||||||
background-color: rgb(0,0,0,0.5);
|
|
||||||
|
|
||||||
&.warning {
|
&.warning {
|
||||||
background-color: #ff9800eb;
|
background-color: #ff9800eb;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
@ -33,7 +33,19 @@ class ConnectionManager {
|
|||||||
localUserStore.setAuthToken(null);
|
localUserStore.setAuthToken(null);
|
||||||
const state = localUserStore.generateState();
|
const state = localUserStore.generateState();
|
||||||
const nonce = localUserStore.generateNonce();
|
const nonce = localUserStore.generateNonce();
|
||||||
window.location.assign(`http://${PUSHER_URL}/login-screen?state=${state}&nonce=${nonce}`);
|
|
||||||
|
let loginUrl = `${PUSHER_URL}/login-screen?state=${state}&nonce=${nonce}`
|
||||||
|
|
||||||
|
if (loginUrl.startsWith("/")) {
|
||||||
|
loginUrl = window.location.protocol +
|
||||||
|
"//" +
|
||||||
|
window.location.host +
|
||||||
|
loginUrl;
|
||||||
|
} else {
|
||||||
|
loginUrl = `http://` + loginUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.location.assign(loginUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public logout() {
|
public logout() {
|
||||||
|
@ -1122,20 +1122,26 @@ export class GameScene extends DirtyScene {
|
|||||||
this.iframeSubscriptionList.push(iframeListener.unregisterIFrameStream.subscribe(() => {
|
this.iframeSubscriptionList.push(iframeListener.unregisterIFrameStream.subscribe(() => {
|
||||||
const allProps = this.gameMap.getCurrentProperties();
|
const allProps = this.gameMap.getCurrentProperties();
|
||||||
if(allProps.get("openWebsite") == null) {
|
if(allProps.get("openWebsite") == null) {
|
||||||
layoutManager.removeActionButton('openWebsite', this.userInputManager);
|
layoutManagerActionStore.removeAction("openWebsite");
|
||||||
} else {
|
} else {
|
||||||
const openWebsiteFunction = () => {
|
const openWebsiteFunction = () => {
|
||||||
coWebsiteManager.loadCoWebsite(allProps.get("openWebsite") as string, this.MapUrlFile, allProps.get('openWebsiteAllowApi') as boolean | undefined, allProps.get('openWebsitePolicy') as string | undefined);
|
coWebsiteManager.loadCoWebsite(allProps.get("openWebsite") as string, this.MapUrlFile, allProps.get('openWebsiteAllowApi') as boolean | undefined, allProps.get('openWebsitePolicy') as string | undefined);
|
||||||
layoutManager.removeActionButton('openWebsite', this.userInputManager);
|
layoutManagerActionStore.removeAction("openWebsite");
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let message = allProps.get(WEBSITE_MESSAGE_PROPERTIES);
|
let message = allProps.get(WEBSITE_MESSAGE_PROPERTIES);
|
||||||
if(message === undefined) {
|
if(message === undefined) {
|
||||||
message = 'Press SPACE or touch here to open web site';
|
message = 'Press SPACE or touch here to open web site';
|
||||||
}
|
}
|
||||||
layoutManager.addActionButton('openWebsite', message.toString(), () => {
|
|
||||||
openWebsiteFunction();
|
layoutManagerActionStore.addAction({
|
||||||
}, this.userInputManager);
|
uuid: "openWebsite",
|
||||||
|
type: "message",
|
||||||
|
message: message,
|
||||||
|
callback: () => openWebsiteFunction(),
|
||||||
|
userInputManager: this.userInputManager,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -1886,7 +1892,7 @@ export class GameScene extends DirtyScene {
|
|||||||
const allProps = this.gameMap.getCurrentProperties();
|
const allProps = this.gameMap.getCurrentProperties();
|
||||||
|
|
||||||
if(allProps.get("jitsiRoom") === undefined) {
|
if(allProps.get("jitsiRoom") === undefined) {
|
||||||
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
layoutManagerActionStore.removeAction("jitsi");
|
||||||
} else {
|
} else {
|
||||||
const openJitsiRoomFunction = () => {
|
const openJitsiRoomFunction = () => {
|
||||||
const roomName = jitsiFactory.getRoomName(allProps.get("jitsiRoom") as string, this.instance);
|
const roomName = jitsiFactory.getRoomName(allProps.get("jitsiRoom") as string, this.instance);
|
||||||
@ -1898,16 +1904,20 @@ export class GameScene extends DirtyScene {
|
|||||||
} else {
|
} else {
|
||||||
this.startJitsi(roomName, undefined);
|
this.startJitsi(roomName, undefined);
|
||||||
}
|
}
|
||||||
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
layoutManagerActionStore.removeAction("jitsi");
|
||||||
}
|
}
|
||||||
|
|
||||||
let message = allProps.get(JITSI_MESSAGE_PROPERTIES);
|
let message = allProps.get(JITSI_MESSAGE_PROPERTIES);
|
||||||
if(message === undefined) {
|
if(message === undefined) {
|
||||||
message = 'Press SPACE or touch here to enter Jitsi Meet room';
|
message = 'Press SPACE or touch here to enter Jitsi Meet room';
|
||||||
}
|
}
|
||||||
layoutManager.addActionButton('jitsiRoom', message.toString(), () => {
|
layoutManagerActionStore.addAction({
|
||||||
openJitsiRoomFunction();
|
uuid: "jitsi",
|
||||||
}, this.userInputManager);
|
type: "message",
|
||||||
|
message: message,
|
||||||
|
callback: () => openJitsiRoomFunction(),
|
||||||
|
userInputManager: this.userInputManager,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user