Skip to content

Commit 95b0b27

Browse files
author
Maxime Chéramy
committed
fix: import angular and ngStorage instead of using the one embed with player.js
1 parent c124640 commit 95b0b27

File tree

2 files changed

+13
-29
lines changed

2 files changed

+13
-29
lines changed

runner/src/main/resources/view/test.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
/* Entire page */
22

3+
html, body {
4+
height: 100%
5+
}
6+
37
body {
48
color: white;
59
font-family: 'Open Sans', Lato, sans-serif;

runner/src/main/resources/view/test.html

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6-
<script type="text/javascript" src="lib/player.js"></script>
6+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
7+
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.8/angular.js" integrity="sha256-47AQCzX6dqzjicKe4PabaBJtLnWffl34LU9WJUulNog=" crossorigin="anonymous"></script>
8+
<script src="https://cdnjs.cloudflare.com/ajax/libs/ngStorage/0.3.11/ngStorage.min.js" integrity="sha256-0YzDSJS0qH+wpvug+Im1cMB9CX919NMtHj0d2VVHPp4=" crossorigin="anonymous"></script>
79
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,300i,400,600,700,800,900" rel="stylesheet" type="text/css">
810
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,900' rel='stylesheet' type='text/css'>
911
<link href="http://fonts.googleapis.com/css?family=Inconsolata:400,700" rel="stylesheet" type="text/css">
@@ -42,18 +44,7 @@
4244

4345
<div ng-show="showViewReplayPopup" class="report-popup-wrapper">
4446
<div class="viewer-popup">
45-
<cg-player
46-
ng-if="replayDrawer"
47-
on-player-ready="playerLoaded($playerApi)"
48-
drawer="replayDrawer"
49-
show-console="false"
50-
show-rankings="false"
51-
show-small-rankings="false"
52-
async-rendering="true"
53-
shareable="false"
54-
show-replay-prompt="false"
55-
game-params="gameParams">
56-
</cg-player>
47+
<div class="cg-player-sandbox-replay"></div>
5748
<div id="console" class="outputs-demo">
5849
<div class="output-log" ng-repeat="(key,value) in errors" ng-if="errors">
5950
<span class="collapsed-bubble" ng-if="value.quantity > 1">
@@ -160,18 +151,7 @@
160151
<div class="left-wrapper left-bloc">
161152
<div class="viewer-container">
162153
<div class="viewer-wrapper">
163-
<cg-player
164-
ng-if="drawer"
165-
on-player-ready="playerLoaded($playerApi)"
166-
drawer="drawer"
167-
show-console="false"
168-
show-rankings="false"
169-
show-small-rankings="false"
170-
async-rendering="true"
171-
shareable="false"
172-
show-replay-prompt="false"
173-
game-params="gameParams">
174-
</cg-player>
154+
<div class="cg-player-sandbox"></div>
175155
</div>
176156
</div>
177157

@@ -251,21 +231,21 @@
251231
<div id="output-players" class="players-outputs-frame" ng-class="{'less-or-equal-than-two-players': lessOrEqualThanTwoPlayers()}">
252232
<div ng-repeat="(index, agent) in agents" class="players-outputs-player" >
253233

254-
<div class="players-outputs-player-header" ng-style="{'border-color': agent.color}">
255-
<svg class="players-outputs-player-header-image" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.031 16" ng-style="{'fill': agent.color}">
234+
<div class="players-outputs-player-header" ng-style="{'border-color': playerColors[agent.index]}">
235+
<svg class="players-outputs-player-header-image" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.031 16" ng-style="{'fill': playerColors[agent.index]}">
256236
<path id="User_16" d="M903.019,44H889a1,1,0,0,1-1-1c0-2.708,2.514-4.882,5.541-5.673a5,5,0,1,1,4.919,0c2.955,0.769,5.436,2.848,5.535,5.454A1,1,0,0,1,903.019,44ZM896,30a3,3,0,1,0,3,3A3,3,0,0,0,896,30Zm0,9c-2.461,0-5.349,1.214-5.862,3h11.723C901.348,40.213,898.46,39,896,39Z" transform="translate(-888 -28)"/>
257237
</svg>
258238
<div class="players-outputs-player-header-title" >{{agent.name}}</div>
259239
</div>
260240
<div class="console-output-frame">
261241
<div class="console-output-wrapper">
262242
<div class="console-output-stdout">
263-
<div class="players-outputs-player-console-title" ng-style="{color: agent.color}">Standard Output</div>
243+
<div class="players-outputs-player-console-title" ng-style="{color: playerColors[agent.index]}">Standard Output</div>
264244
<pre class="console-outputs" ng-bind="agent.stdout"></pre>
265245
</div>
266246
<hr class="outputs-seperator">
267247
<div class="console-output-stderr">
268-
<div class="players-outputs-player-console-title" ng-style="{'color': agent.color}">Standard Error</div>
248+
<div class="players-outputs-player-console-title" ng-style="{'color': playerColors[agent.index]}">Standard Error</div>
269249
<pre class="console-outputs" ng-bind="agent.stderr"></pre>
270250
</div>
271251
</div>

0 commit comments

Comments
 (0)