From 3a5ed9dd696ba9e2ee821c6699813add2cf7f5f0 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 29 Nov 2020 09:19:42 -0800 Subject: [PATCH] Fix minor errors --- .eslintcache | 2 +- lang/en.json | 16 ++-- lang/es.json | 12 +-- src/Footer.js | 56 ++++------- src/LoginPage.js | 34 ++++--- src/compiled-lang/en.json | 190 +++++++++++++++++++++++--------------- src/compiled-lang/es.json | 190 +++++++++++++++++++++++--------------- 7 files changed, 282 insertions(+), 218 deletions(-) diff --git a/.eslintcache b/.eslintcache index 04449ac3..99c79fa5 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":2117,"mtime":1606670064431,"results":"5","hashOfConfig":"6"},{"size":1572,"mtime":1606670050593,"results":"7","hashOfConfig":"6"},{"size":777,"mtime":1606670265242,"results":"8","hashOfConfig":"6"},{"size":4012,"mtime":1606670278388,"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":null},"/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",["18"],{"ruleId":"19","severity":1,"message":"20","line":7,"column":7,"nodeType":"21","messageId":"22","endLine":7,"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":1864,"mtime":1606671502544,"results":"5","hashOfConfig":"6"},{"size":1572,"mtime":1606670050593,"results":"7","hashOfConfig":"6"},{"size":777,"mtime":1606670265242,"results":"8","hashOfConfig":"6"},{"size":4070,"mtime":1606672449720,"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":0,"fixableErrorCount":0,"fixableWarningCount":0},"/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",[]] \ No newline at end of file diff --git a/lang/en.json b/lang/en.json index 5398048a..f887fbd5 100644 --- a/lang/en.json +++ b/lang/en.json @@ -6,25 +6,25 @@ "defaultMessage": "Contact Us" }, "footer.donations": { - "defaultMessage": "PayPal footer.donations" + "defaultMessage": "PayPal Donations" }, "header.donthaveaccount": { "defaultMessage": "Don't have an account ?" }, "login.email": { - "defaultMessage": "login.email" + "defaultMessage": "Email" }, "footer.faq": { "defaultMessage": "F.A.Q." }, "footer.feedback": { - "defaultMessage": "footer.feedback" + "defaultMessage": "Feedback" }, "login.forgotpwd": { - "defaultMessage": "Forgot login.password ?" + "defaultMessage": "Forgot Password ?" }, "login.error": { - "defaultMessage": "The login.email address or login.password you entered is not valid." + "defaultMessage": "The email address or password you entered is not valid." }, "login.loginto": { "defaultMessage": "Log Into Your Account" @@ -37,7 +37,7 @@ "defaultMessage": "Open Source" }, "login.password": { - "defaultMessage": "login.password" + "defaultMessage": "Password" }, "login.remberme": { "defaultMessage": "Remember me" @@ -52,9 +52,9 @@ "defaultMessage": "Term And Conditions" }, "login.userinactive": { - "defaultMessage": "Sorry, your account has not been activated yet. You'll receive a notification login.email when it becomes active. Stay tuned!." + "defaultMessage": "Sorry, your account has not been activated yet. You'll receive a notification email when it becomes active. Stay tuned!." }, "login.welcome": { - "defaultMessage": "login.welcome" + "defaultMessage": "Welcome" } } \ No newline at end of file diff --git a/lang/es.json b/lang/es.json index 3ed77afc..396ccd18 100644 --- a/lang/es.json +++ b/lang/es.json @@ -12,19 +12,19 @@ "defaultMessage": "No tienes una cuenta ?" }, "login.email": { - "defaultMessage": "login.email" + "defaultMessage": "Email" }, "footer.faq": { - "defaultMessage": "F.A.Q." + "defaultMessage": "Preguntas Frecuentes" }, "footer.feedback": { - "defaultMessage": "footer.feedback" + "defaultMessage": "Feedback" }, "login.forgotpwd": { - "defaultMessage": "Olvidaste el login.password ?" + "defaultMessage": "Olvidaste la contraseña ?" }, "login.error": { - "defaultMessage": "El login.email or la contraseña no es valida." + "defaultMessage": "El email o la contraseña no es valida." }, "login.loginto": { "defaultMessage": "Ingresar a tu Cuenta" @@ -52,7 +52,7 @@ "defaultMessage": "Terminos y Condiciones" }, "login.userinactive": { - "defaultMessage": "Sorry, your account has not been activated yet. You'll receive a notification login.email when it becomes active. Stay tuned!." + "defaultMessage": "Sorry, your account has not been activated yet. You'll receive a notification email when it becomes active. Stay tuned!." }, "login.welcome": { "defaultMessage": "Bienvenido" diff --git a/src/Footer.js b/src/Footer.js index b4d5b8b8..81a42b2e 100644 --- a/src/Footer.js +++ b/src/Footer.js @@ -4,43 +4,25 @@ import { ReactComponent as Logo } from './images/logo-text.svg' class Footer extends React.Component { render() { - return ( < - footer class = "footer" > - < - Logo / > - < - div > - < - div > < a href = "termsofuse.html" > < FormattedMessage id = "footer.termsandconditions" - defaultMessage = "Term And Conditions" / > < /a> - < - div > < a href = "footer.faq.html" > < FormattedMessage id = "footer.faq" - defaultMessage = "F.A.Q." / > < /a> - < - div > < a href = "aboutus.html" > < FormattedMessage id = "footer.aboutus" - defaultMessage = "About Us" / > < /a> - < - /div> < - div > - < - div > < a href = "http://www.wisemapping.org/" > < FormattedMessage id = "footer.opensource" - defaultMessage = "Open Source" / > < /a> - < - div > < a href = "mailto:team@wisemapping.com" > < FormattedMessage id = "footer.contactus" - defaultMessage = "Contact Us" / > < /a> - < - div > < a href = "mailto:footer.feedback@wisemapping.com" > < FormattedMessage id = "footer.feedback" - defaultMessage = "footer.feedback" / > < /a> - < - /div> < - div > - < - div > < span id = "siteseal" > < script async type = "text/javascript" - src = "https://seal.godaddy.com/getSeal?sealID=iGLOz83ePtxZCiqwz4QuXb7OQWXTflEIPdOnuR2PzaUwSru3lYJNEj9VdqJ1" > < /script> < /div> < - div > < span class = "button-style2" > < a href = "https://www.paypal.com/webapps/shoppingcart?flowlogging_id=c7ac923b53025&mfid=1606520600355_c7ac923b53025#/checkout/openButton" > < FormattedMessage id = "footer.donations" - defaultMessage = "PayPal footer.donations" / > < /a> < /div> < / - div > < - /footer> + return ( + ) }; } diff --git a/src/LoginPage.js b/src/LoginPage.js index d37f6584..473fb0d6 100644 --- a/src/LoginPage.js +++ b/src/LoginPage.js @@ -1,5 +1,5 @@ import React from 'react'; -import {FormattedMessage, IntlProvider,injectIntl } from 'react-intl' +import { FormattedMessage, IntlProvider, injectIntl } from 'react-intl' import Header from './Header.js'; import Footer from './Footer.js'; @@ -13,13 +13,19 @@ class ConfigStatusMessage extends React.Component { } render() { - return ( -
+ let result; + + if (this.state.enabled===true) { + result = (

- here + here

-
- ); +
); + } else { + result = ; + } + + return result; } } @@ -28,7 +34,7 @@ class LoginError extends React.Component { super(props) // @Todo: This must be reviewed to be based on navigation state. // Login error example: http://localhost:8080/c/login?login.error=2 - const errorCode = new URLSearchParams(window.location.search).get('login.error'); + const errorCode = new URLSearchParams(window.location.search).get('login_error'); this.state = { errorCode: errorCode } @@ -69,14 +75,14 @@ class LoginForm extends React.Component { return (
-

+

- - + +
@@ -84,7 +90,7 @@ class LoginForm extends React.Component {
- +
); @@ -100,7 +106,7 @@ class LoginPage extends React.Component { this.state = { locale: locale, - messages: messages + messages: messages }; } @@ -110,14 +116,14 @@ class LoginPage extends React.Component {
- {/* */} +
); } } -LoginForm = injectIntl(LoginForm) +LoginForm = injectIntl(LoginForm) export default LoginPage; diff --git a/src/compiled-lang/en.json b/src/compiled-lang/en.json index ce1a50bc..bf04b959 100644 --- a/src/compiled-lang/en.json +++ b/src/compiled-lang/en.json @@ -1,78 +1,116 @@ { - "footer.aboutus": [{ - "type": 0, - "value": "About Us" - }], - "footer.contactus": [{ - "type": 0, - "value": "Contact Us" - }], - "footer.donations": [{ - "type": 0, - "value": "PayPal footer.donations" - }], - "header.donthaveaccount": [{ - "type": 0, - "value": "Don't have an account ?" - }], - "login.email": [{ - "type": 0, - "value": "login.email" - }], - "footer.faq": [{ - "type": 0, - "value": "F.A.Q." - }], - "footer.feedback": [{ - "type": 0, - "value": "footer.feedback" - }], - "login.forgotpwd": [{ - "type": 0, - "value": "Forgot login.password ?" - }], - "login.error": [{ - "type": 0, - "value": "The login.email address or login.password you entered is not valid." - }], - "login.loginto": [{ - "type": 0, - "value": "Log Into Your Account" - }], - "login.hsqldbcofig": [{ - "type": 0, - "value": "Warning: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.7 instead. You can find more information how to configure MySQL" - }], - "footer.opensource": [{ - "type": 0, - "value": "Open Source" - }], - "login.password": [{ - "type": 0, - "value": "login.password" - }], - "login.remberme": [{ - "type": 0, - "value": "Remember me" - }], - "login.signin": [{ - "type": 0, - "value": "Sign In" - }], - "login.signup": [{ - "type": 0, - "value": "Sign Up" - }], - "footer.termsandconditions": [{ - "type": 0, - "value": "Term And Conditions" - }], - "login.userinactive": [{ - "type": 0, - "value": "Sorry, your account has not been activated yet. You'll receive a notification login.email when it becomes active. Stay tuned!." - }], - "login.welcome": [{ - "type": 0, - "value": "login.welcome" - }] + "footer.aboutus": [ + { + "type": 0, + "value": "About Us" + } + ], + "footer.contactus": [ + { + "type": 0, + "value": "Contact Us" + } + ], + "footer.donations": [ + { + "type": 0, + "value": "PayPal Donations" + } + ], + "footer.faq": [ + { + "type": 0, + "value": "F.A.Q." + } + ], + "footer.feedback": [ + { + "type": 0, + "value": "Feedback" + } + ], + "footer.opensource": [ + { + "type": 0, + "value": "Open Source" + } + ], + "footer.termsandconditions": [ + { + "type": 0, + "value": "Term And Conditions" + } + ], + "header.donthaveaccount": [ + { + "type": 0, + "value": "Don't have an account ?" + } + ], + "login.email": [ + { + "type": 0, + "value": "Email" + } + ], + "login.error": [ + { + "type": 0, + "value": "The email address or password you entered is not valid." + } + ], + "login.forgotpwd": [ + { + "type": 0, + "value": "Forgot Password ?" + } + ], + "login.hsqldbcofig": [ + { + "type": 0, + "value": "Warning: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.7 instead. You can find more information how to configure MySQL" + } + ], + "login.loginto": [ + { + "type": 0, + "value": "Log Into Your Account" + } + ], + "login.password": [ + { + "type": 0, + "value": "Password" + } + ], + "login.remberme": [ + { + "type": 0, + "value": "Remember me" + } + ], + "login.signin": [ + { + "type": 0, + "value": "Sign In" + } + ], + "login.signup": [ + { + "type": 0, + "value": "Sign Up" + } + ], + "login.userinactive": [ + { + "type": 0, + "value": "Sorry, your account has not been activated yet. You'll receive a notification email when it becomes active. Stay tuned!." + } + ], + "login.welcome": [ + { + "type": 0, + "value": "Welcome" + } + ] } \ No newline at end of file diff --git a/src/compiled-lang/es.json b/src/compiled-lang/es.json index 93603051..fd78b21e 100644 --- a/src/compiled-lang/es.json +++ b/src/compiled-lang/es.json @@ -1,78 +1,116 @@ { - "footer.aboutus": [{ - "type": 0, - "value": "Sobre Nosotros" - }], - "footer.contactus": [{ - "type": 0, - "value": "Contáctenos" - }], - "footer.donations": [{ - "type": 0, - "value": "PayPal Donaciones" - }], - "header.donthaveaccount": [{ - "type": 0, - "value": "No tienes una cuenta ?" - }], - "login.email": [{ - "type": 0, - "value": "login.email" - }], - "footer.faq": [{ - "type": 0, - "value": "F.A.Q." - }], - "footer.feedback": [{ - "type": 0, - "value": "footer.feedback" - }], - "login.forgotpwd": [{ - "type": 0, - "value": "Olvidaste el login.password ?" - }], - "login.error": [{ - "type": 0, - "value": "El login.email or la contraseña no es valida." - }], - "login.loginto": [{ - "type": 0, - "value": "Ingresar a tu Cuenta" - }], - "login.hsqldbcofig": [{ - "type": 0, - "value": "Warning: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.7 instead. You can find more information how to configure MySQL" - }], - "footer.opensource": [{ - "type": 0, - "value": "Open Source" - }], - "login.password": [{ - "type": 0, - "value": "Contraseña" - }], - "login.remberme": [{ - "type": 0, - "value": "Recordarme" - }], - "login.signin": [{ - "typye": 0, - "value": "Ingresar" - }], - "login.signup": [{ - "type": 0, - "value": "Registrarse" - }], - "footer.termsandconditions": [{ - "type": 0, - "value": "Terminos y Condiciones" - }], - "login.userinactive": [{ - "type": 0, - "value": "Sorry, your account has not been activated yet. You'll receive a notification login.email when it becomes active. Stay tuned!." - }], - "login.welcome": [{ - "type": 0, - "value": "Bienvenido" - }] + "footer.aboutus": [ + { + "type": 0, + "value": "Sobre Nosotros" + } + ], + "footer.contactus": [ + { + "type": 0, + "value": "Contáctenos" + } + ], + "footer.donations": [ + { + "type": 0, + "value": "PayPal Donaciones" + } + ], + "footer.faq": [ + { + "type": 0, + "value": "Preguntas Frecuentes" + } + ], + "footer.feedback": [ + { + "type": 0, + "value": "Feedback" + } + ], + "footer.opensource": [ + { + "type": 0, + "value": "Open Source" + } + ], + "footer.termsandconditions": [ + { + "type": 0, + "value": "Terminos y Condiciones" + } + ], + "header.donthaveaccount": [ + { + "type": 0, + "value": "No tienes una cuenta ?" + } + ], + "login.email": [ + { + "type": 0, + "value": "Email" + } + ], + "login.error": [ + { + "type": 0, + "value": "El email o la contraseña no es valida." + } + ], + "login.forgotpwd": [ + { + "type": 0, + "value": "Olvidaste la contraseña ?" + } + ], + "login.hsqldbcofig": [ + { + "type": 0, + "value": "Warning: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.7 instead. You can find more information how to configure MySQL" + } + ], + "login.loginto": [ + { + "type": 0, + "value": "Ingresar a tu Cuenta" + } + ], + "login.password": [ + { + "type": 0, + "value": "Contraseña" + } + ], + "login.remberme": [ + { + "type": 0, + "value": "Recordarme" + } + ], + "login.signin": [ + { + "type": 0, + "value": "Ingresar" + } + ], + "login.signup": [ + { + "type": 0, + "value": "Registrarse" + } + ], + "login.userinactive": [ + { + "type": 0, + "value": "Sorry, your account has not been activated yet. You'll receive a notification email when it becomes active. Stay tuned!." + } + ], + "login.welcome": [ + { + "type": 0, + "value": "Bienvenido" + } + ] } \ No newline at end of file