bugfix ssl module
This commit is contained in:
@@ -41,7 +41,7 @@ twig:
|
||||
debug: "%kernel.debug%"
|
||||
strict_variables: "%kernel.debug%"
|
||||
globals:
|
||||
version: "0.37.18 (beta7)"
|
||||
version: "0.42.21 (beta8)"
|
||||
facebook_api: "%facebook.api%"
|
||||
facebook_scope: "%facebook.scope%"
|
||||
facebook_api_version: "%facebook.version%"
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/JQuery-Snowfall/1.7.4/snowfall.jquery.min.js"
|
||||
type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(document).snowfall({deviceorientation: true, round: true, minSize: 5, maxSize: 8});
|
||||
|
||||
@@ -10,7 +10,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class GameController extends Controller
|
||||
{
|
||||
public function indexAction()
|
||||
public function indexAction(Request $request)
|
||||
{
|
||||
// $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(
|
||||
'env' => $this->container->getParameter('kernel.environment'),
|
||||
'ssl' => $request->isSecure() ? 'true' : 'false',
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ let mineUserList = document.getElementById('mine-user-list');
|
||||
|
||||
ReactDOM.render(
|
||||
<MineUserList env={mineUserList.dataset.env}
|
||||
ssl={mineUserList.dataset.ssl}
|
||||
webPlayerName={mineUserList.dataset.webPlayerName}/>,
|
||||
mineUserList
|
||||
);
|
||||
|
||||
@@ -9,6 +9,7 @@ class MineUserList extends React.Component {
|
||||
|
||||
this.state = {
|
||||
env: props.env,
|
||||
ssl: props.ssl,
|
||||
webPlayerName: props.webPlayerName,
|
||||
services: services,
|
||||
session: null,
|
||||
@@ -86,7 +87,11 @@ class MineUserList extends React.Component {
|
||||
}
|
||||
|
||||
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 ?
|
||||
<img src={"http://graph.facebook.com/" + id + "/picture?type=square&width=130&height=130"}
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
|
||||
<div id="mine-user-list"
|
||||
data-env="{{ env }}"
|
||||
data-ssl="{{ ssl }}"
|
||||
data-web-player-name="{{ app.user.username is defined ? app.user.username : '' }}">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -7,11 +7,10 @@
|
||||
cookie: true,
|
||||
status: true,
|
||||
version: '{{ facebook_api_version }}',
|
||||
|
||||
});
|
||||
|
||||
/** trigger jQuery when Facebook SKD loads */
|
||||
$(document).trigger('fb-load');
|
||||
// $(document).trigger('fb-load');
|
||||
// $(document).bind('fb-load', function () {
|
||||
// TODO
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user