add created, updated field to db && improve graph design
This commit is contained in:
@@ -41,7 +41,7 @@ twig:
|
||||
debug: "%kernel.debug%"
|
||||
strict_variables: "%kernel.debug%"
|
||||
globals:
|
||||
version: "0.34.18 (beta6)"
|
||||
version: "0.36.18 (beta6)"
|
||||
facebook_api: "%facebook.api%"
|
||||
facebook_scope: "%facebook.scope%"
|
||||
facebook_api_version: "%facebook.version%"
|
||||
|
||||
@@ -153,9 +153,23 @@ header section h3.or {
|
||||
}
|
||||
|
||||
header section #id_welcome {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 115px;
|
||||
}
|
||||
|
||||
header section #id_welcome > div {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
header section #id_welcome img {
|
||||
width: 100px;
|
||||
border: 5px solid #414040;
|
||||
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
header section .buttons,
|
||||
header section form {
|
||||
z-index: 2;
|
||||
@@ -307,6 +321,12 @@ footer nav ul li a:hover {
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1100px) {
|
||||
header section #id_welcome {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
header section .form-input,
|
||||
header section .form-check {
|
||||
margin-left: auto;
|
||||
@@ -325,9 +345,17 @@ footer nav ul li a:hover {
|
||||
header section div.buttons > a.slack-login {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
main div.txt {
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 550px) {
|
||||
header section #id_welcome {
|
||||
display: block;
|
||||
}
|
||||
|
||||
header section {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
@@ -187,4 +187,28 @@ class Gamer
|
||||
{
|
||||
return $this->userAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set connTimestamp
|
||||
*
|
||||
* @param \DateTime $connTimestamp
|
||||
*
|
||||
* @return Gamer
|
||||
*/
|
||||
public function setConnTimestamp($connTimestamp)
|
||||
{
|
||||
$this->connTimestamp = $connTimestamp;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get connTimestamp
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getConnTimestamp()
|
||||
{
|
||||
return $this->connTimestamp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,20 @@ class PlayedGame
|
||||
*/
|
||||
private $resign;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="updated", type="datetime", nullable=true)
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Step
|
||||
*
|
||||
@@ -429,4 +443,52 @@ class PlayedGame
|
||||
{
|
||||
return $this->resign;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param \DateTime $created
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param \DateTime $updated
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,20 @@ class PlayedGame
|
||||
*/
|
||||
private $resign;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="updated", type="datetime", nullable=true)
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Step
|
||||
*
|
||||
|
||||
@@ -49,6 +49,13 @@ class Step
|
||||
*/
|
||||
private $playedGame;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
||||
*/
|
||||
private $created;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
@@ -155,4 +162,28 @@ class Step
|
||||
{
|
||||
return $this->wBomb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param \DateTime $created
|
||||
*
|
||||
* @return Step
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,13 @@ class Step
|
||||
*/
|
||||
private $playedGame;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
||||
*/
|
||||
private $created;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
|
||||
@@ -46,7 +46,7 @@ header section > img {
|
||||
position: absolute;
|
||||
width: 1300px;
|
||||
height: 1300px;
|
||||
right: -10%;
|
||||
right: -20%;
|
||||
top: -10%;
|
||||
|
||||
z-index: 1;
|
||||
@@ -149,7 +149,6 @@ header section div.buttons > a.small:hover {
|
||||
}
|
||||
|
||||
header section div.buttons > a {
|
||||
padding: 25px 5px;
|
||||
margin: 0 auto 20px auto;
|
||||
}
|
||||
|
||||
@@ -167,10 +166,10 @@ header section div.buttons > a.small:hover {
|
||||
}
|
||||
|
||||
@media screen and (max-width: 500px) {
|
||||
header {
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
/*header {*/
|
||||
/*min-height: 100%;*/
|
||||
/*height: auto;*/
|
||||
/*}*/
|
||||
|
||||
header section {
|
||||
width: auto;
|
||||
@@ -182,5 +181,6 @@ header section div.buttons > a.small:hover {
|
||||
|
||||
header section div.buttons > a {
|
||||
display: block;
|
||||
padding: 25px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:title" content="MineSeeker"/>
|
||||
<meta property="og:description" content="A multiplayer minesweeper game"/>
|
||||
<meta property="og:image" content="{{ app.request.getSchemeAndHttpHost() }}{{ asset('bundles/mineseeker/images/mine-1600x627.png') }}"/>
|
||||
<meta property="og:image"
|
||||
content="{{ app.request.getSchemeAndHttpHost() }}{{ asset('bundles/mineseeker/images/mine-1600x627.png') }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
@@ -19,15 +20,25 @@
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div id="id_welcome">
|
||||
<div id="id_welcome"{% if app.user.facebookId is defined and app.user.facebookId is not null %} style="margin-bottom:50px"{% endif %}>
|
||||
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
|
||||
<h2>
|
||||
Hello, {{ app.user.realName is not null ? app.user.realName : app.user.username }}!
|
||||
</h2>
|
||||
<h1>Let's play!! :D</h1>
|
||||
{% if app.user.facebookId is not null %}
|
||||
<div>
|
||||
<img src="http://graph.facebook.com/{{ app.user.facebookId }}/picture?type=square&width=100&height=100"
|
||||
alt="Facebook profile" border="0"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<h2{% if app.user.facebookId is defined and app.user.facebookId is not null %} style="margin-top:0"{% endif %}>
|
||||
Hello, {{ app.user.realName is not null ? app.user.realName : app.user.username }}!
|
||||
</h2>
|
||||
<h1>Let's play!! :D</h1>
|
||||
</div>
|
||||
{% else %}
|
||||
<h2>A minesweeper game rethought...</h2>
|
||||
<h1>...and you can play w/o register!!</h1>
|
||||
<div>
|
||||
<h2>A minesweeper game rethought...</h2>
|
||||
<h1>...and you can play w/o register!!</h1>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="buttons">
|
||||
@@ -54,11 +65,13 @@
|
||||
<div class="txt">
|
||||
<div class="technologies">
|
||||
<h1>Used technologies</h1>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/websocket.png') }}" alt="Used Websocket" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/websocket.png') }}" alt="Used Websocket"
|
||||
border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/react.png') }}" alt="Used React.js" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/symfony.png') }}" alt="Used Symfony" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/jquery.png') }}" alt="Used jQuery" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/lets-encrypt.png') }}" alt="Used Let's Encrypt" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/lets-encrypt.png') }}" alt="Used Let's Encrypt"
|
||||
border="0"/>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -150,6 +150,8 @@ class MineseekerRpc implements RpcInterface
|
||||
/** Save PlayedGame */
|
||||
$playedGame->setGameAssoc($data[1]);
|
||||
$playedGame->setGrid($grid);
|
||||
$playedGame->setCreated(new \DateTime());
|
||||
$playedGame->setUpdated(new \DateTime());
|
||||
$this->em->persist($playedGame);
|
||||
|
||||
$this->em->flush();
|
||||
|
||||
@@ -167,12 +167,14 @@ class MineseekerTopic implements TopicInterface
|
||||
$step->setCol($event['coords'][1]);
|
||||
$step->setWBomb($event['bomb']);
|
||||
$step->setPlayedGame($playedGame);
|
||||
$step->setCreated(new \DateTime());
|
||||
$this->em->persist($step);
|
||||
|
||||
$playedGame->setBluePoints($event['bluePoints']);
|
||||
$playedGame->setRedPoints($event['redPoints']);
|
||||
$playedGame->setBlueExplodedBomb($event['blueExplodedBomb'] ? true : null);
|
||||
$playedGame->setRedExplodedBomb($event['redExplodedBomb'] ? true : null);
|
||||
$playedGame->setUpdated(new \DateTime());
|
||||
$this->em->persist($playedGame);
|
||||
|
||||
$this->em->flush();
|
||||
|
||||
Reference in New Issue
Block a user