Private
Public Access
1
0

bugfix ssl module

This commit is contained in:
2017-01-29 18:04:58 +01:00
parent 4a94855be9
commit 94ebe9a428
7 changed files with 13 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ twig:
debug: "%kernel.debug%" debug: "%kernel.debug%"
strict_variables: "%kernel.debug%" strict_variables: "%kernel.debug%"
globals: globals:
version: "0.37.18 (beta7)" version: "0.42.21 (beta8)"
facebook_api: "%facebook.api%" facebook_api: "%facebook.api%"
facebook_scope: "%facebook.scope%" facebook_scope: "%facebook.scope%"
facebook_api_version: "%facebook.version%" facebook_api_version: "%facebook.version%"

View File

@@ -35,6 +35,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/JQuery-Snowfall/1.7.4/snowfall.jquery.min.js" <script src="https://cdnjs.cloudflare.com/ajax/libs/JQuery-Snowfall/1.7.4/snowfall.jquery.min.js"
type="text/javascript"></script> type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
$(document).snowfall({deviceorientation: true, round: true, minSize: 5, maxSize: 8}); $(document).snowfall({deviceorientation: true, round: true, minSize: 5, maxSize: 8});

View File

@@ -10,7 +10,7 @@ use Symfony\Component\HttpFoundation\Request;
class GameController extends Controller class GameController extends Controller
{ {
public function indexAction() public function indexAction(Request $request)
{ {
// $apiClient = new ApiClient('xoxp-107639806167-107029084564-115427085733-cccaa4f96c89c87ce680c7f22acfd001'); // $apiClient = new ApiClient('xoxp-107639806167-107029084564-115427085733-cccaa4f96c89c87ce680c7f22acfd001');
// //
@@ -35,6 +35,7 @@ class GameController extends Controller
return $this->render('MineSeekerBundle:Game:index.html.twig', array( return $this->render('MineSeekerBundle:Game:index.html.twig', array(
'env' => $this->container->getParameter('kernel.environment'), 'env' => $this->container->getParameter('kernel.environment'),
'ssl' => $request->isSecure() ? 'true' : 'false',
)); ));
} }

View File

@@ -6,6 +6,7 @@ let mineUserList = document.getElementById('mine-user-list');
ReactDOM.render( ReactDOM.render(
<MineUserList env={mineUserList.dataset.env} <MineUserList env={mineUserList.dataset.env}
ssl={mineUserList.dataset.ssl}
webPlayerName={mineUserList.dataset.webPlayerName}/>, webPlayerName={mineUserList.dataset.webPlayerName}/>,
mineUserList mineUserList
); );

View File

@@ -9,6 +9,7 @@ class MineUserList extends React.Component {
this.state = { this.state = {
env: props.env, env: props.env,
ssl: props.ssl,
webPlayerName: props.webPlayerName, webPlayerName: props.webPlayerName,
services: services, services: services,
session: null, session: null,
@@ -86,7 +87,11 @@ class MineUserList extends React.Component {
} }
getProfilePicture(id) { getProfilePicture(id) {
let avatarNbr = Math.floor(Math.random() * 5) + 1; let avatarNbr = 5;
if (id !== null) {
avatarNbr = id.substr(-1) > 5 ? 5 : id.substr(-1);
}
return id !== null ? return id !== null ?
<img src={"http://graph.facebook.com/" + id + "/picture?type=square&width=130&height=130"} <img src={"http://graph.facebook.com/" + id + "/picture?type=square&width=130&height=130"}

View File

@@ -67,6 +67,7 @@
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %} {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
<div id="mine-user-list" <div id="mine-user-list"
data-env="{{ env }}" data-env="{{ env }}"
data-ssl="{{ ssl }}"
data-web-player-name="{{ app.user.username is defined ? app.user.username : '' }}"> data-web-player-name="{{ app.user.username is defined ? app.user.username : '' }}">
</div> </div>
{% endif %} {% endif %}

View File

@@ -7,11 +7,10 @@
cookie: true, cookie: true,
status: true, status: true,
version: '{{ facebook_api_version }}', version: '{{ facebook_api_version }}',
}); });
/** trigger jQuery when Facebook SKD loads */ /** trigger jQuery when Facebook SKD loads */
$(document).trigger('fb-load'); // $(document).trigger('fb-load');
// $(document).bind('fb-load', function () { // $(document).bind('fb-load', function () {
// TODO // TODO
// }); // });