From 5aecc2ab91515a667c57bc50d51ed10681e68129 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 28 Nov 2020 08:04:49 -0800 Subject: [PATCH] Add error message --- .eslintcache | 2 +- package-lock.json | 41 +++++++++++++++++++++++++---------------- package.json | 9 ++++++++- public/index.html | 13 ++++++++++++- src/LoginPage.js | 46 ++++++++++++++++++++++++++++++++++++++++------ src/css/login.css | 10 ++++++++++ src/index.js | 13 +++++++++---- 7 files changed, 105 insertions(+), 29 deletions(-) diff --git a/.eslintcache b/.eslintcache index 2b3ac985..d41a66fe 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/pveiga/repos/wisemapping-react/src/Footer.js":"1","/Users/pveiga/repos/wisemapping-react/src/Header.js":"2","/Users/pveiga/repos/wisemapping-react/src/index.js":"3","/Users/pveiga/repos/wisemapping-react/src/LoginPage.js":"4"},{"size":1747,"mtime":1606529689598,"results":"5","hashOfConfig":"6"},{"size":1557,"mtime":1606529996629,"results":"7","hashOfConfig":"6"},{"size":554,"mtime":1606522800588,"results":"8","hashOfConfig":"6"},{"size":3146,"mtime":1606530371412,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xegajf",{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"18"},"/Users/pveiga/repos/wisemapping-react/src/Footer.js",[],"/Users/pveiga/repos/wisemapping-react/src/Header.js",[],"/Users/pveiga/repos/wisemapping-react/src/index.js",[],"/Users/pveiga/repos/wisemapping-react/src/LoginPage.js",["19"],"import React from 'react';\nimport Header from './Header.js';\nimport Footer from './Footer.js';\nimport { createIntl, createIntlCache, FormattedMessage, IntlProvider } from 'react-intl'\n\nclass ConfigStatusMessage extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n enabled: props.enabled\n }\n }\n\n render() {\n return (\n
\n

\n here\n

\n
\n );\n }\n}\n\nclass LoginForm extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n email: '',\n password: '',\n staySignIn: false\n };\n\n }\n\n render() {\n return (\n
\n
\n

\n

\n\n
\n \n \n\n
\n \n \n
\n\n \n
\n \n
\n
\n );\n }\n}\n\n// Internationalize setup ....\nconst cache = createIntlCache()\n\n// @Todo: Review ...\nvar intl = null;\n\nclass LoginPage extends React.Component {\n constructor(props) {\n super(props);\n\n const messages = props.messages;\n const locale = props.locale;\n this.state = {\n locale: locale,\n message: messages\n };\n\n intl = createIntl(\n {\n locale: locale,\n defaultLocale: 'en'\n },\n messages,\n cache\n )\n }\n\n render() {\n return (\n \n
\n
\n \n {/* */}\n
\n
\n
\n );\n }\n}\nexport default LoginPage;\n\n",{"ruleId":"20","severity":1,"message":"21","line":6,"column":7,"nodeType":"22","messageId":"23","endLine":6,"endColumn":26},"no-unused-vars","'ConfigStatusMessage' is defined but never used.","Identifier","unusedVar"] \ No newline at end of file +[{"/Users/pveiga/repos/wisemapping-react/src/Footer.js":"1","/Users/pveiga/repos/wisemapping-react/src/Header.js":"2","/Users/pveiga/repos/wisemapping-react/src/index.js":"3","/Users/pveiga/repos/wisemapping-react/src/LoginPage.js":"4"},{"size":1747,"mtime":1606529689598,"results":"5","hashOfConfig":"6"},{"size":1557,"mtime":1606529996629,"results":"7","hashOfConfig":"6"},{"size":702,"mtime":1606578931580,"results":"8","hashOfConfig":"6"},{"size":4158,"mtime":1606534865391,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xegajf",{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"14","messages":"15","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"16","messages":"17","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"18"},"/Users/pveiga/repos/wisemapping-react/src/Footer.js",[],"/Users/pveiga/repos/wisemapping-react/src/Header.js",[],"/Users/pveiga/repos/wisemapping-react/src/index.js",["19"],"/Users/pveiga/repos/wisemapping-react/src/LoginPage.js",["20","21"],"import React from 'react';\nimport Header from './Header.js';\nimport Footer from './Footer.js';\nimport { createIntl, createIntlCache, FormattedMessage, IntlProvider } from 'react-intl'\n\nclass ConfigStatusMessage extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n enabled: props.enabled\n }\n }\n\n render() {\n return (\n
\n

\n here\n

\n
\n );\n }\n}\n\nclass LoginError extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n errorCode: props.errorCode\n }\n }\n\n render() {\n const errorCode = this.state.errorCode;\n let result;\n if (errorCode) {\n if (errorCode == 3) {\n result = (\n
\n \n
)\n } else {\n result = (\n
\n \n
)\n }\n }\n return ({result});\n }\n}\n\nclass LoginForm extends React.Component {\n constructor(props) {\n super(props);\n\n const errorCode = props.errorCode\n this.state = {\n email: '',\n password: '',\n staySignIn: false,\n errorCode: errorCode\n };\n }\n\n render() {\n return (\n
\n
\n

\n

\n\n \n\n
\n \n \n\n
\n \n \n
\n \n
\n \n
\n
\n );\n }\n}\n\n// Internationalize setup ....\nconst cache = createIntlCache()\n\n// @Todo: Review ...\nvar intl = null;\n\nclass LoginPage extends React.Component {\n constructor(props) {\n super(props);\n\n const messages = props.messages;\n const locale = props.locale;\n const errorCode = props.errorCode\n\n this.state = {\n locale: locale,\n message: messages,\n errorCode: errorCode\n };\n\n intl = createIntl(\n {\n locale: locale,\n defaultLocale: 'en'\n },\n messages,\n cache\n )\n }\n\n render() {\n return (\n \n
\n
\n \n {/* */}\n
\n
\n
\n );\n }\n}\nexport default LoginPage;\n\n",{"ruleId":"22","severity":1,"message":"23","line":22,"column":18,"nodeType":"24","messageId":"25","endLine":22,"endColumn":22},{"ruleId":"26","severity":1,"message":"27","line":6,"column":7,"nodeType":"28","messageId":"29","endLine":6,"endColumn":26},{"ruleId":"30","severity":1,"message":"31","line":37,"column":21,"nodeType":"32","messageId":"25","endLine":37,"endColumn":23},"no-eval","eval can be harmful.","CallExpression","unexpected","no-unused-vars","'ConfigStatusMessage' is defined but never used.","Identifier","unusedVar","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression"] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2c0856e5..14c17c9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "wisemapping-reactp", "version": "0.1.0", "dependencies": { "@testing-library/jest-dom": "^5.11.6", @@ -4741,7 +4740,8 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [{ + "funding": [ + { "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -4978,7 +4978,8 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [{ + "funding": [ + { "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -6848,10 +6849,12 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz", "integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA==", - "funding": [{ - "type": "github", - "url": "https://github.com/sponsors/fb55" - }] + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] }, "node_modules/domain-browser": { "version": "1.2.0", @@ -8677,10 +8680,12 @@ "version": "1.13.0", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==", - "funding": [{ - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - }], + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], "engines": { "node": ">=4.0" } @@ -9336,7 +9341,8 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [{ + "funding": [ + { "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -9798,7 +9804,8 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [{ + "funding": [ + { "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -17076,7 +17083,8 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", - "funding": [{ + "funding": [ + { "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -18429,7 +18437,8 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [{ + "funding": [ + { "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -38702,4 +38711,4 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 0f7cfd7a..2bef9eff 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,13 @@ "extract": "formatjs extract", "compile": "formatjs compile" }, + "author": { + "name": "Paulo Veiga", + "email": "pveiga@wisemapping.com" + }, + "contributors": [ + "Ezequiel Bergamaschi" + ], "eslintConfig": { "extends": [ "react-app", @@ -39,8 +46,8 @@ ] }, "homepage": "http://localhost:8080/react/login/", + "license": "https://wisemapping.atlassian.net/wiki/spaces/WS/pages/524357/WiseMapping+Public+License+Version+1.0+WPL", "devDependencies": { "@formatjs/cli": "^2.13.14" } - } \ No newline at end of file diff --git a/public/index.html b/public/index.html index 0273e50b..e7da157e 100644 --- a/public/index.html +++ b/public/index.html @@ -1,3 +1,13 @@ + + + + @@ -6,8 +16,9 @@ - + +