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>
|
||||
</section>
|
||||
<!-- TODO activate authentication -->
|
||||
<section hidden>
|
||||
<button id="oidcLogin">Oauth Login</button>
|
||||
<section>
|
||||
<button id="oidcLogin" class="nes-btn">we.bstly Login</button>
|
||||
</section>
|
||||
<section>
|
||||
<button id="enableNotification" class="nes-btn">Enable notifications</button>
|
||||
|
@ -92,5 +92,5 @@
|
||||
|
||||
|
||||
<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>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<div class="layout-manager-list">
|
||||
{#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>
|
||||
</div>
|
||||
{/each}
|
||||
@ -35,14 +35,10 @@
|
||||
animation-timing-function: ease-in-out;
|
||||
}
|
||||
|
||||
div.nes-container.is-rounded {
|
||||
div.nes-container {
|
||||
padding: 8px 4px;
|
||||
text-align: center;
|
||||
|
||||
font-family: Lato;
|
||||
color: whitesmoke;
|
||||
background-color: rgb(0,0,0,0.5);
|
||||
|
||||
&.warning {
|
||||
background-color: #ff9800eb;
|
||||
color: #000;
|
||||
|
@ -33,7 +33,19 @@ class ConnectionManager {
|
||||
localUserStore.setAuthToken(null);
|
||||
const state = localUserStore.generateState();
|
||||
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() {
|
||||
|
@ -1122,20 +1122,26 @@ export class GameScene extends DirtyScene {
|
||||
this.iframeSubscriptionList.push(iframeListener.unregisterIFrameStream.subscribe(() => {
|
||||
const allProps = this.gameMap.getCurrentProperties();
|
||||
if(allProps.get("openWebsite") == null) {
|
||||
layoutManager.removeActionButton('openWebsite', this.userInputManager);
|
||||
layoutManagerActionStore.removeAction("openWebsite");
|
||||
} else {
|
||||
const openWebsiteFunction = () => {
|
||||
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);
|
||||
if(message === undefined) {
|
||||
message = 'Press SPACE or touch here to open web site';
|
||||
}
|
||||
layoutManager.addActionButton('openWebsite', message.toString(), () => {
|
||||
openWebsiteFunction();
|
||||
}, this.userInputManager);
|
||||
|
||||
layoutManagerActionStore.addAction({
|
||||
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();
|
||||
|
||||
if(allProps.get("jitsiRoom") === undefined) {
|
||||
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
||||
layoutManagerActionStore.removeAction("jitsi");
|
||||
} else {
|
||||
const openJitsiRoomFunction = () => {
|
||||
const roomName = jitsiFactory.getRoomName(allProps.get("jitsiRoom") as string, this.instance);
|
||||
@ -1898,16 +1904,20 @@ export class GameScene extends DirtyScene {
|
||||
} else {
|
||||
this.startJitsi(roomName, undefined);
|
||||
}
|
||||
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
||||
layoutManagerActionStore.removeAction("jitsi");
|
||||
}
|
||||
|
||||
let message = allProps.get(JITSI_MESSAGE_PROPERTIES);
|
||||
if(message === undefined) {
|
||||
message = 'Press SPACE or touch here to enter Jitsi Meet room';
|
||||
}
|
||||
layoutManager.addActionButton('jitsiRoom', message.toString(), () => {
|
||||
openJitsiRoomFunction();
|
||||
}, this.userInputManager);
|
||||
layoutManagerActionStore.addAction({
|
||||
uuid: "jitsi",
|
||||
type: "message",
|
||||
message: message,
|
||||
callback: () => openJitsiRoomFunction(),
|
||||
userInputManager: this.userInputManager,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user