From 0ec0af71bbe288d00cf8a74b27507fe2e8406d9f Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 2 Sep 2023 09:51:58 -0400 Subject: [PATCH 1/2] Fix husky for yarn 2 . (#2110) - Context: https://typicode.github.io/husky/getting-started.html#yarn-2 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 6f05ca20..addee2a7 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "dev": "yarn build:dev --watch", "lint": "yarn translations:generate && tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx \"src/**\" && prettier --check \"src/**/*.{ts,tsx,js,css,scss}\"", "prepare": "husky install", + "postinstall": "husky install", "themes:build": "sass src/assets/css/themes/:src/assets/css/themes", "themes:watch": "sass --watch src/assets/css/themes/:src/assets/css/themes", "translations:generate": "node generate_translations.js", From 38ec8c0b062fa28b18aa4a1a4af73d8d7b561fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw?= Date: Sat, 2 Sep 2023 20:11:46 +0300 Subject: [PATCH 2/2] Display more information why has the login failed (#2109) * Add registration_application_pending and email_not_verified as a toast message * Fix linting errors * Fix more linting errors * Skip key checks on login error --------- Co-authored-by: SleeplessOne1917 --- src/shared/components/home/login.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/shared/components/home/login.tsx b/src/shared/components/home/login.tsx index ad5afcab..05ee1cfb 100644 --- a/src/shared/components/home/login.tsx +++ b/src/shared/components/home/login.tsx @@ -154,9 +154,8 @@ export class Login extends Component { if (loginRes.msg === "missing_totp_token") { i.setState({ showTotp: true }); toast(I18NextService.i18n.t("enter_two_factor_code"), "info"); - } - if (loginRes.msg === "incorrect_login") { - toast(I18NextService.i18n.t("incorrect_login"), "danger"); + } else { + toast(I18NextService.i18n.t(loginRes.msg), "danger"); } i.setState({ loginRes: { state: "failed", msg: loginRes.msg } });