Merge branch 'FTUEPopup' of github.com:ClementVieilly75/workadventure into iframe_api
# Conflicts: # front/dist/.gitignore # front/src/Phaser/Game/GameScene.ts
This commit is contained in:
commit
ed2ce68f37
@ -4,7 +4,7 @@
|
|||||||
local tag = namespace,
|
local tag = namespace,
|
||||||
local url = if namespace == "master" then "workadventu.re" else namespace+".workadventure.test.thecodingmachine.com",
|
local url = if namespace == "master" then "workadventu.re" else namespace+".workadventure.test.thecodingmachine.com",
|
||||||
// develop branch does not use admin because of issue with SSL certificate of admin as of now.
|
// develop branch does not use admin because of issue with SSL certificate of admin as of now.
|
||||||
local adminUrl = if namespace == "master" /*|| namespace == "develop"*/ || std.startsWith(namespace, "admin") then "https://"+url else null,
|
local adminUrl = if namespace == "master" || namespace == "develop" || std.startsWith(namespace, "admin") then "https://"+url else null,
|
||||||
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
|
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"containers": {
|
"containers": {
|
||||||
@ -23,9 +23,12 @@
|
|||||||
"JITSI_URL": env.JITSI_URL,
|
"JITSI_URL": env.JITSI_URL,
|
||||||
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
||||||
"TURN_STATIC_AUTH_SECRET": env.TURN_STATIC_AUTH_SECRET,
|
"TURN_STATIC_AUTH_SECRET": env.TURN_STATIC_AUTH_SECRET,
|
||||||
} + if adminUrl != null then {
|
} + (if adminUrl != null then {
|
||||||
"ADMIN_API_URL": adminUrl,
|
"ADMIN_API_URL": adminUrl,
|
||||||
} else {}
|
} else {}) + if namespace != "master" then {
|
||||||
|
// Absolutely ugly WorkAround to circumvent broken certificates on the K8S test cluster. Don't do this in production kids!
|
||||||
|
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"back2": {
|
"back2": {
|
||||||
"image": "thecodingmachine/workadventure-back:"+tag,
|
"image": "thecodingmachine/workadventure-back:"+tag,
|
||||||
@ -42,9 +45,12 @@
|
|||||||
"JITSI_URL": env.JITSI_URL,
|
"JITSI_URL": env.JITSI_URL,
|
||||||
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
||||||
"TURN_STATIC_AUTH_SECRET": env.TURN_STATIC_AUTH_SECRET,
|
"TURN_STATIC_AUTH_SECRET": env.TURN_STATIC_AUTH_SECRET,
|
||||||
} + if adminUrl != null then {
|
} + (if adminUrl != null then {
|
||||||
"ADMIN_API_URL": adminUrl,
|
"ADMIN_API_URL": adminUrl,
|
||||||
} else {}
|
} else {}) + if namespace != "master" then {
|
||||||
|
// Absolutely ugly WorkAround to circumvent broken certificates on the K8S test cluster. Don't do this in production kids!
|
||||||
|
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"pusher": {
|
"pusher": {
|
||||||
"replicas": 2,
|
"replicas": 2,
|
||||||
@ -61,9 +67,12 @@
|
|||||||
"JITSI_URL": env.JITSI_URL,
|
"JITSI_URL": env.JITSI_URL,
|
||||||
"API_URL": "back1:50051,back2:50051",
|
"API_URL": "back1:50051,back2:50051",
|
||||||
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
||||||
} + if adminUrl != null then {
|
} + (if adminUrl != null then {
|
||||||
"ADMIN_API_URL": adminUrl,
|
"ADMIN_API_URL": adminUrl,
|
||||||
} else {}
|
} else {}) + if namespace != "master" then {
|
||||||
|
// Absolutely ugly WorkAround to circumvent broken certificates on the K8S test cluster. Don't do this in production kids!
|
||||||
|
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"front": {
|
"front": {
|
||||||
"image": "thecodingmachine/workadventure-front:"+tag,
|
"image": "thecodingmachine/workadventure-front:"+tag,
|
||||||
|
@ -43,7 +43,7 @@ services:
|
|||||||
- ./front:/usr/src/app
|
- ./front:/usr/src/app
|
||||||
labels:
|
labels:
|
||||||
- "traefik.http.routers.front.rule=Host(`play.workadventure.localhost`)"
|
- "traefik.http.routers.front.rule=Host(`play.workadventure.localhost`)"
|
||||||
- "traefik.http.routers.front.entryPoints=web,traefik"
|
- "traefik.http.routers.front.entryPoints=web"
|
||||||
- "traefik.http.services.front.loadbalancer.server.port=8080"
|
- "traefik.http.services.front.loadbalancer.server.port=8080"
|
||||||
- "traefik.http.routers.front-ssl.rule=Host(`play.workadventure.localhost`)"
|
- "traefik.http.routers.front-ssl.rule=Host(`play.workadventure.localhost`)"
|
||||||
- "traefik.http.routers.front-ssl.entryPoints=websecure"
|
- "traefik.http.routers.front-ssl.entryPoints=websecure"
|
||||||
|
1
front/dist/.gitignore
vendored
1
front/dist/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
index.html
|
index.html
|
||||||
|
index.tmpl.html.tmp
|
||||||
/js/
|
/js/
|
||||||
|
4
front/dist/index.tmpl.html
vendored
4
front/dist/index.tmpl.html
vendored
@ -29,7 +29,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<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" />
|
||||||
<link rel="stylesheet" href="/resources/style/style.css">
|
<link rel="stylesheet" href="/resources/style/style.css">
|
||||||
|
|
||||||
|
|
||||||
<title>WorkAdventure</title>
|
<title>WorkAdventure</title>
|
||||||
</head>
|
</head>
|
||||||
<body id="body" style="margin: 0; background-color: #000">
|
<body id="body" style="margin: 0; background-color: #000">
|
||||||
|
25
front/dist/resources/style/style.css
vendored
25
front/dist/resources/style/style.css
vendored
@ -1175,6 +1175,31 @@ div.action p.action-body{
|
|||||||
margin-left: calc(50% - 75px);
|
margin-left: calc(50% - 75px);
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
}
|
}
|
||||||
|
.popUpElement{
|
||||||
|
animation-duration: 1s;
|
||||||
|
animation-delay: 3s;
|
||||||
|
animation-name: slidein;
|
||||||
|
}
|
||||||
|
.popUpElement p {
|
||||||
|
font-family: 'Press Start 2P';
|
||||||
|
text-align: left;
|
||||||
|
font-size: 10px;
|
||||||
|
background-color: #727678;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.popUpElement div {
|
||||||
|
width: 300px;
|
||||||
|
height: 120px;
|
||||||
|
background-color: #727678;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popUpElement button {
|
||||||
|
font-family: 'Press Start 2P';
|
||||||
|
position: center;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@keyframes mymove {
|
@keyframes mymove {
|
||||||
0% {bottom: 40px;}
|
0% {bottom: 40px;}
|
||||||
50% {bottom: 30px;}
|
50% {bottom: 30px;}
|
||||||
|
@ -73,6 +73,8 @@ import {addLoader} from "../Components/Loader";
|
|||||||
import {ErrorSceneName} from "../Reconnecting/ErrorScene";
|
import {ErrorSceneName} from "../Reconnecting/ErrorScene";
|
||||||
import {localUserStore} from "../../Connexion/LocalUserStore";
|
import {localUserStore} from "../../Connexion/LocalUserStore";
|
||||||
import {iframeListener} from "../../Api/IframeListener";
|
import {iframeListener} from "../../Api/IframeListener";
|
||||||
|
import DOMElement = Phaser.GameObjects.DOMElement;
|
||||||
|
import Tween = Phaser.Tweens.Tween;
|
||||||
|
|
||||||
export interface GameSceneInitInterface {
|
export interface GameSceneInitInterface {
|
||||||
initPosition: PointInterface|null,
|
initPosition: PointInterface|null,
|
||||||
@ -164,6 +166,7 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
private playerName!: string;
|
private playerName!: string;
|
||||||
private characterLayers!: string[];
|
private characterLayers!: string[];
|
||||||
|
|
||||||
|
private popUpElement : DOMElement| undefined;
|
||||||
constructor(private room: Room, MapUrlFile: string, customKey?: string|undefined) {
|
constructor(private room: Room, MapUrlFile: string, customKey?: string|undefined) {
|
||||||
super({
|
super({
|
||||||
key: customKey ?? room.id
|
key: customKey ?? room.id
|
||||||
@ -652,6 +655,33 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
this.gameMap.onPropertyChange('exitSceneUrl', (newValue, oldValue) => {
|
this.gameMap.onPropertyChange('exitSceneUrl', (newValue, oldValue) => {
|
||||||
if (newValue) this.onMapExit(newValue as string);
|
if (newValue) this.onMapExit(newValue as string);
|
||||||
});
|
});
|
||||||
|
this.gameMap.onPropertyChange('inGameConsoleMessage', (newValue, oldValue, allProps) => {
|
||||||
|
if (newValue !== undefined) {
|
||||||
|
this.popUpElement?.destroy();
|
||||||
|
this.popUpElement = this.add.dom(2100, 150).createFromHTML(newValue as string);
|
||||||
|
this.popUpElement.scale = 0;
|
||||||
|
this.tweens.add({
|
||||||
|
targets : this.popUpElement ,
|
||||||
|
scale : 1,
|
||||||
|
ease : "EaseOut",
|
||||||
|
duration : 400,
|
||||||
|
});
|
||||||
|
|
||||||
|
this.popUpElement.setClassName("popUpElement");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.tweens.add({
|
||||||
|
targets : this.popUpElement ,
|
||||||
|
scale : 0,
|
||||||
|
ease : "EaseOut",
|
||||||
|
duration : 400,
|
||||||
|
onComplete : () => {
|
||||||
|
this.popUpElement?.destroy();
|
||||||
|
this.popUpElement = undefined;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
this.gameMap.onPropertyChange('exitUrl', (newValue, oldValue) => {
|
this.gameMap.onPropertyChange('exitUrl', (newValue, oldValue) => {
|
||||||
if (newValue) this.onMapExit(newValue as string);
|
if (newValue) this.onMapExit(newValue as string);
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
set -x
|
set -x
|
||||||
set -o nounset errexit
|
set -o nounset errexit
|
||||||
template_file_index=dist/index.tmpl.html
|
template_file_index=dist/index.tmpl.html
|
||||||
generated_file_index=dist/index.html
|
generated_file_index=dist/index.tmpl.html.tmp
|
||||||
tmp_trackcodefile=/tmp/trackcode
|
tmp_trackcodefile=/tmp/trackcode
|
||||||
|
|
||||||
# To inject tracking code, you have two choices:
|
# To inject tracking code, you have two choices:
|
||||||
|
@ -46,7 +46,7 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
new HtmlWebpackPlugin(
|
new HtmlWebpackPlugin(
|
||||||
{
|
{
|
||||||
template: './dist/index.tmpl.html',
|
template: './dist/index.tmpl.html.tmp',
|
||||||
minify: {
|
minify: {
|
||||||
collapseWhitespace: true,
|
collapseWhitespace: true,
|
||||||
keepClosingSlash: true,
|
keepClosingSlash: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user