From e9f572894c9658c7887aeb6e799de87af91f5e1a Mon Sep 17 00:00:00 2001 From: alaa-yasin Date: Thu, 26 Sep 2019 12:26:19 +0300 Subject: [PATCH] adding the files in order to save them Relates #38 --- client/package-lock.json | 102 ++++++++++++++++++++ client/package.json | 1 + client/src/components/Utils/Login/index.js | 66 +++++++++---- client/src/components/Utils/Login/style.css | 49 +++++----- 4 files changed, 177 insertions(+), 41 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 9e4b2cb..6d793b0 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -5773,6 +5773,11 @@ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" }, + "gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==" + }, "gzip-size": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", @@ -5921,6 +5926,19 @@ "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==" }, + "history": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "requires": { + "@babel/runtime": "^7.1.2", + "loose-envify": "^1.2.0", + "resolve-pathname": "^3.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^1.0.1" + } + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -5931,6 +5949,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "hoist-non-react-statics": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", + "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==", + "requires": { + "react-is": "^16.7.0" + } + }, "hosted-git-info": { "version": "2.8.4", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.4.tgz", @@ -8198,6 +8224,16 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=" }, + "mini-create-react-context": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz", + "integrity": "sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw==", + "requires": { + "@babel/runtime": "^7.4.0", + "gud": "^1.0.0", + "tiny-warning": "^1.0.2" + } + }, "mini-css-extract-plugin": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.0.tgz", @@ -10377,6 +10413,52 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.9.0.tgz", "integrity": "sha1-IcqVYTmarQ/xp3AcAWg+jKmB7cs=" }, + "react-router": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.1.0.tgz", + "integrity": "sha512-n9HXxaL/6yRlig9XPfGyagI8+bUNdqcu7FUAx0/Z+Us22Z8iHsbkyJ21Inebn9HOxI5Nxlfc8GNabkNSeXfhqw==", + "requires": { + "@babel/runtime": "^7.1.2", + "history": "^4.9.0", + "hoist-non-react-statics": "^3.1.0", + "loose-envify": "^1.3.1", + "mini-create-react-context": "^0.3.0", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.2", + "react-is": "^16.6.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "requires": { + "isarray": "0.0.1" + } + } + } + }, + "react-router-dom": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.1.0.tgz", + "integrity": "sha512-OkxKbMKjO7IkYqnoaZNX19MnwgjhxwZE871cPUTq0YU2wpIw7QwGxSnSoNRMOa7wO1TwvJJMFpgiEB4C/gVhTw==", + "requires": { + "@babel/runtime": "^7.1.2", + "history": "^4.9.0", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-router": "5.1.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + } + }, "react-scripts": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.1.2.tgz", @@ -10854,6 +10936,11 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" }, + "resolve-pathname": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -12135,6 +12222,16 @@ "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=" }, + "tiny-invariant": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.0.6.tgz", + "integrity": "sha512-FOyLWWVjG+aC0UqG76V53yAWdXfH8bO6FNmyZOuUrzDzK8DI3/JRY25UD7+g49JWM1LXwymsKERB+DzI0dTEQA==" + }, + "tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -12546,6 +12643,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "value-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", diff --git a/client/package.json b/client/package.json index c83929f..f2ca7fa 100644 --- a/client/package.json +++ b/client/package.json @@ -7,6 +7,7 @@ "prop-types": "^15.7.2", "react": "^16.9.0", "react-dom": "^16.9.0", + "react-router-dom": "^5.1.0", "react-scripts": "^3.1.2" }, "devDependencies": { diff --git a/client/src/components/Utils/Login/index.js b/client/src/components/Utils/Login/index.js index 02abea1..8dedaf5 100644 --- a/client/src/components/Utils/Login/index.js +++ b/client/src/components/Utils/Login/index.js @@ -4,21 +4,51 @@ import background from '../../../assets/images/login.background.png'; import waiter from '../../../assets/images/waiter.png'; import './style.css'; -export default () => { - return ( -
- backgroundImage - waiterImage -

HOTMEAL

-

Table number

-
-

Secret number

-
-
- ); -}; +export default class Login extends React.Component { + state = { + tableNumber: 1, + secretNumber: 23, + }; + + setTableNumber = event => { + this.setState({ tableNumber: event.target.value }); + }; + + setSecretNumber = event => { + this.setState({ secretNumber: event.target.value }); + }; + + render() { + const { tableNumber, secretNumber } = this.state; + return ( +
+ backgroundImage + waiterImage +

HOTMEAL

+
Table name
+ +
Secret number
+ +
+ ); + } +} diff --git a/client/src/components/Utils/Login/style.css b/client/src/components/Utils/Login/style.css index 2081fe6..a24ec1d 100644 --- a/client/src/components/Utils/Login/style.css +++ b/client/src/components/Utils/Login/style.css @@ -1,12 +1,12 @@ -.background-image { +.login__background--image { position: relative; width: 100%; - height: 810px; + height: 812px; top: 0; left: 0; } -.waiter-image { +.login__waiter-image { position: absolute; width: 75px; height: 64px; @@ -15,7 +15,7 @@ box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.3); } -.title { +.login__title { position: absolute; width: 169px; height: 44px; @@ -30,12 +30,12 @@ color: #FFFFFF; } -.table-number { +.login__table-number { position: absolute; width: 112px; height: 20px; - left: 53px; - top: 340px; + left: 50px; + top: 322px; font-family: Roboto; font-style: normal; font-weight: 300; @@ -46,20 +46,32 @@ text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); } -.first-line { +.login__first-input { position: absolute; - width: 239px; + width: 170px; height: 0px; - left: 60px; + left: 58px; top: 370px; - border: 1px solid #FF9636; + border: none; + border-bottom: 1px solid #FF9636; +} + +.login__second-input { + position: absolute; + width: 170px; + height: 0px; + left: 58px; + top: 465px; + border: none; + border-bottom: 1px solid #FF9636; } -.secret-number { + +.login__secret-number { position: absolute; width: 115px; height: 19px; left: 53px; - top: 435px; + top: 417px; font-family: Roboto; font-style: normal; font-weight: 300; @@ -70,16 +82,7 @@ text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); } -.second-line { - position: absolute; - width: 239px; - height: 0px; - left: 60px; - top: 465px; - border: 1px solid #FF9636; -} - -.login-button { +.login__button { position: absolute; width: 262px; height: 47px;