Skip to content
Snippets Groups Projects
Commit 3c26a4fc authored by Antoine Gaudron-Desjardins's avatar Antoine Gaudron-Desjardins
Browse files

Merge branch 'front-adjustments' into 'main'

Front adjustments

See merge request !56
parents fef8845f 8f19ac94
No related branches found
No related tags found
1 merge request!56Front adjustments
Pipeline #44543 passed
restaurants = [
{
"restaurant": "local",
"a_factor": 30,
"b_factor": 120,
"cameras":
[
{
"IP": "10.148.38.3",
"user": "viarezocam",
"password": "superponey",
"stream": "stream1",
"mask_points":
[
[
[70, 370],
[420, 720],
[1280, 720],
[1280, 250],
[930, 215],
[450, 550],
[130, 350]
]
],
"checkouts":
[
{
"x1": 380,
"x2": 435,
"y1": 740,
"y2": 780
},
{
"x1": 300,
"x2": 350,
"y1": 830,
"y2": 880
}
]
}
]
}
]
...@@ -138,7 +138,11 @@ export default function Messages({ place, infos, lastMessage, admin }) { ...@@ -138,7 +138,11 @@ export default function Messages({ place, infos, lastMessage, admin }) {
let new_message = JSON.parse(lastMessage.data); let new_message = JSON.parse(lastMessage.data);
if (new_message.type == "news" && infos) { if (new_message.type == "news" && infos) {
setMessages((old_messages) => [new_message.comment, ...old_messages]); setMessages((old_messages) => [new_message.comment, ...old_messages]);
} else if (!infos && new_message.type == "comment" && new_message.comment.username != user) { } else if (
!infos &&
new_message.type == "comment" &&
new_message.comment.username != user.name
) {
setMessages((old_messages) => [...old_messages, new_message.comment]); setMessages((old_messages) => [...old_messages, new_message.comment]);
} }
} }
...@@ -208,6 +212,12 @@ export default function Messages({ place, infos, lastMessage, admin }) { ...@@ -208,6 +212,12 @@ export default function Messages({ place, infos, lastMessage, admin }) {
value={newComment} value={newComment}
onChange={(ev) => updateValue(ev.target.value)} onChange={(ev) => updateValue(ev.target.value)}
placeholder="Ajouter un commentaire" placeholder="Ajouter un commentaire"
onKeyDown={(ev) => {
if (ev.key === "Enter" && ev.shiftKey == false) {
ev.preventDefault();
Submit(ev);
}
}}
/> />
<button className="comment-input-button" onClick={Submit}> <button className="comment-input-button" onClick={Submit}>
<BiSend /> <BiSend />
......
...@@ -78,17 +78,18 @@ ...@@ -78,17 +78,18 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: rgb(17, 2, 145); background-color: #4E5FC4;
color: white; color: white;
height: 2.4rem; height: 2.4rem;
width: 2.4rem; width: 2.4rem;
border-radius: 0.5rem; border-radius: 0.5rem;
padding: 0.2rem; padding: 0.2rem;
font-size: 1.5rem; font-size: 1.5rem;
transition: 0.3s;
} }
.comment-input-button:hover { .comment-input-button:hover {
background-color: rgb(18, 0, 177); background-color: #182F8C;
} }
.no-comments { .no-comments {
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
#header-home-link { #header-home-link {
text-decoration: none; text-decoration: none;
color: inherit; color: inherit;
transition: 0.3s;
}
#header-home-link:hover {
color: #C2D1F9;
} }
#header-restaurant-status { #header-restaurant-status {
...@@ -27,10 +32,12 @@ ...@@ -27,10 +32,12 @@
#header-button { #header-button {
height: 2rem; height: 2rem;
width: 2rem; width: 2rem;
transition: 0.3s;
} }
#header-button:hover { #header-button:hover {
cursor: pointer; cursor: pointer;
color: #C2D1F9;
} }
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
......
...@@ -36,10 +36,15 @@ ...@@ -36,10 +36,15 @@
font-weight: bold; font-weight: bold;
text-decoration: none; text-decoration: none;
white-space: nowrap; white-space: nowrap;
transition: 0.3s;
}
.home-link-item + span {
transition: 0.3s;
} }
.home-link-item:hover { .home-link-item:hover {
color: inherit; color: #C2D1F9;
} }
.home-link-item:hover + span { .home-link-item:hover + span {
......
body, html { body, html {
color: white; color: white;
text-align: center; text-align: center;
/* background: linear-gradient(to right, #B06AB3, #4568DC); */ background-color: #6359CE;
background-color: rgb(93, 114, 154); background-image: linear-gradient(to bottom, #6359CE, #6E83F9);
background-image: -moz-linear-gradient(to bottom, #6359CE, #6E83F9);
background-image: -webkit-linear-gradient(to bottom, #6359CE, #6E83F9)g;
} }
.app{ .app{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment