diff --git a/backend/cameras.py b/backend/cameras.py deleted file mode 100644 index 276a8d2c6b9370c7cbe4b25af81474ee915be18c..0000000000000000000000000000000000000000 --- a/backend/cameras.py +++ /dev/null @@ -1,43 +0,0 @@ -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 - } - ] - } - ] - } -] diff --git a/frontend/src/components/Comments.js b/frontend/src/components/Comments.js index 09f7589a40b0f4479746c9b9bbcc503598248c7e..346886d56b486b7b2781845cc60016d63da4f5a9 100644 --- a/frontend/src/components/Comments.js +++ b/frontend/src/components/Comments.js @@ -138,14 +138,18 @@ export default function Messages({ place, infos, lastMessage, admin }) { let new_message = JSON.parse(lastMessage.data); if (new_message.type == "news" && infos) { 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]); } } }, [lastMessage]); return ( - <div className={`comments-side-bar ${admin ? "comments-full-size" : ""}`}> + <div className={`comments-side-bar${admin ? "comments-full-size" : ""}`}> {!admin && ( <div className="comments-title"> {infos ? ( @@ -208,6 +212,12 @@ export default function Messages({ place, infos, lastMessage, admin }) { value={newComment} onChange={(ev) => updateValue(ev.target.value)} placeholder="Ajouter un commentaire" + onKeyDown={(ev) => { + if (ev.key === "Enter" && ev.shiftKey == false) { + ev.preventDefault(); + Submit(ev); + } + }} /> <button className="comment-input-button" onClick={Submit}> <BiSend /> diff --git a/frontend/src/styles/Comments.css b/frontend/src/styles/Comments.css index 492205d4012b862c51bb121517d6088918bfcd35..1d1cb615da9f5d9f8fe2554e09a90cbcd2deada1 100644 --- a/frontend/src/styles/Comments.css +++ b/frontend/src/styles/Comments.css @@ -78,17 +78,18 @@ display: flex; justify-content: center; align-items: center; - background-color: rgb(17, 2, 145); + background-color: #4E5FC4; color: white; height: 2.4rem; width: 2.4rem; border-radius: 0.5rem; padding: 0.2rem; font-size: 1.5rem; + transition: 0.3s; } .comment-input-button:hover { - background-color: rgb(18, 0, 177); + background-color: #182F8C; } .no-comments { diff --git a/frontend/src/styles/Header.css b/frontend/src/styles/Header.css index f37a45cee5114a5d4048c0f1cc9b62fb98c79aea..768b727a10b6312a2d80df546ffd002f2eb50505 100644 --- a/frontend/src/styles/Header.css +++ b/frontend/src/styles/Header.css @@ -10,6 +10,11 @@ #header-home-link { text-decoration: none; color: inherit; + transition: 0.3s; +} + +#header-home-link:hover { + color: #C2D1F9; } #header-restaurant-status { @@ -27,10 +32,12 @@ #header-button { height: 2rem; width: 2rem; + transition: 0.3s; } #header-button:hover { cursor: pointer; + color: #C2D1F9; } @media only screen and (max-width: 600px) { diff --git a/frontend/src/styles/Home.css b/frontend/src/styles/Home.css index 64a2e898f050d5e792ba6290b510120c2c6c5db7..2a326d11cf0a9a89c9a7d7fcb8cfc4fbffdc7512 100644 --- a/frontend/src/styles/Home.css +++ b/frontend/src/styles/Home.css @@ -36,10 +36,15 @@ font-weight: bold; text-decoration: none; white-space: nowrap; + transition: 0.3s; +} + +.home-link-item + span { + transition: 0.3s; } .home-link-item:hover { - color: inherit; + color: #C2D1F9; } .home-link-item:hover + span { diff --git a/frontend/src/styles/index.css b/frontend/src/styles/index.css index d0179d38efcccd52b867cfe1abe6dfd6b42af37a..ac45b179b8f06c1de6d39f0460c4b55073be07e3 100644 --- a/frontend/src/styles/index.css +++ b/frontend/src/styles/index.css @@ -1,8 +1,10 @@ body, html { color: white; text-align: center; - /* background: linear-gradient(to right, #B06AB3, #4568DC); */ - background-color: rgb(93, 114, 154); + background-color: #6359CE; + 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{