From 3c199d8c78e324116eaae6e462ca764e8acdffd7 Mon Sep 17 00:00:00 2001 From: Ayush Kumar <2580ayush2580@gmail.com> Date: Sun, 17 Jan 2021 15:18:17 +0530 Subject: [PATCH 1/4] Improved language search --- src/components/views/elements/LanguageDropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/LanguageDropdown.js b/src/components/views/elements/LanguageDropdown.js index e37109caff..707983c2a9 100644 --- a/src/components/views/elements/LanguageDropdown.js +++ b/src/components/views/elements/LanguageDropdown.js @@ -24,7 +24,7 @@ import SettingsStore from "../../../settings/SettingsStore"; import { _t } from "../../../languageHandler"; function languageMatchesSearchQuery(query, language) { - if (language.label.toUpperCase().includes(query.toUpperCase())) return true; + if (language.label.toUpperCase().startsWith(query.toUpperCase())) return true; if (language.value.toUpperCase() === query.toUpperCase()) return true; return false; } From 2c8aaa27dd2e69d445b67bd519c1b23e0a63c1b2 Mon Sep 17 00:00:00 2001 From: Ayush Kumar <2580ayush2580@gmail.com> Date: Sun, 17 Jan 2021 18:50:33 +0530 Subject: [PATCH 2/4] Increase width of language dropdown --- res/css/views/auth/_LanguageSelector.scss | 1 + res/css/views/auth/_Welcome.scss | 2 +- src/components/views/elements/LanguageDropdown.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/res/css/views/auth/_LanguageSelector.scss b/res/css/views/auth/_LanguageSelector.scss index 781561f876..0823d47720 100644 --- a/res/css/views/auth/_LanguageSelector.scss +++ b/res/css/views/auth/_LanguageSelector.scss @@ -23,6 +23,7 @@ limitations under the License. font-size: $font-14px; font-weight: 600; color: $authpage-lang-color; + width: 160px; } .mx_AuthBody_language .mx_Dropdown_arrow { diff --git a/res/css/views/auth/_Welcome.scss b/res/css/views/auth/_Welcome.scss index f0e2b3de33..6c16c953fa 100644 --- a/res/css/views/auth/_Welcome.scss +++ b/res/css/views/auth/_Welcome.scss @@ -27,6 +27,6 @@ limitations under the License. } .mx_Welcome .mx_AuthBody_language { - width: 120px; + width: 160px; margin-bottom: 10px; } diff --git a/src/components/views/elements/LanguageDropdown.js b/src/components/views/elements/LanguageDropdown.js index 707983c2a9..e37109caff 100644 --- a/src/components/views/elements/LanguageDropdown.js +++ b/src/components/views/elements/LanguageDropdown.js @@ -24,7 +24,7 @@ import SettingsStore from "../../../settings/SettingsStore"; import { _t } from "../../../languageHandler"; function languageMatchesSearchQuery(query, language) { - if (language.label.toUpperCase().startsWith(query.toUpperCase())) return true; + if (language.label.toUpperCase().includes(query.toUpperCase())) return true; if (language.value.toUpperCase() === query.toUpperCase()) return true; return false; } From 6031e34fbeb5327fc7dbf18e917203e111e7b032 Mon Sep 17 00:00:00 2001 From: Ayush Kumar <2580ayush2580@gmail.com> Date: Thu, 28 Jan 2021 23:07:59 +0530 Subject: [PATCH 3/4] fix language dropdown to center --- res/css/views/auth/_AuthHeader.scss | 4 ++-- res/css/views/auth/_AuthHeaderLogo.scss | 4 ++-- res/css/views/auth/_LanguageSelector.scss | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/res/css/views/auth/_AuthHeader.scss b/res/css/views/auth/_AuthHeader.scss index b1372affee..ea17723da4 100644 --- a/res/css/views/auth/_AuthHeader.scss +++ b/res/css/views/auth/_AuthHeader.scss @@ -18,7 +18,7 @@ limitations under the License. display: flex; flex-direction: column; width: 206px; - padding: 25px 40px; + padding: 25px 25px; box-sizing: border-box; } @@ -26,4 +26,4 @@ limitations under the License. .mx_AuthHeader { display: none; } -} +} \ No newline at end of file diff --git a/res/css/views/auth/_AuthHeaderLogo.scss b/res/css/views/auth/_AuthHeaderLogo.scss index 917dcabf67..7bc2a389c1 100644 --- a/res/css/views/auth/_AuthHeaderLogo.scss +++ b/res/css/views/auth/_AuthHeaderLogo.scss @@ -17,7 +17,7 @@ limitations under the License. .mx_AuthHeaderLogo { margin-top: 15px; flex: 1; - padding: 0 10px; + padding: 0 25px; } .mx_AuthHeaderLogo img { @@ -28,4 +28,4 @@ limitations under the License. .mx_AuthHeaderLogo { display: none; } -} +} \ No newline at end of file diff --git a/res/css/views/auth/_LanguageSelector.scss b/res/css/views/auth/_LanguageSelector.scss index 0823d47720..a039dce408 100644 --- a/res/css/views/auth/_LanguageSelector.scss +++ b/res/css/views/auth/_LanguageSelector.scss @@ -23,9 +23,9 @@ limitations under the License. font-size: $font-14px; font-weight: 600; color: $authpage-lang-color; - width: 160px; + width: auto; } .mx_AuthBody_language .mx_Dropdown_arrow { background: $authpage-lang-color; -} +} \ No newline at end of file From d006c521c26f8623e908909d9b738bec2f1200af Mon Sep 17 00:00:00 2001 From: Ayush Kumar <2580ayush2580@gmail.com> Date: Thu, 28 Jan 2021 23:49:13 +0530 Subject: [PATCH 4/4] solved style-lint errors --- res/css/views/auth/_AuthHeader.scss | 2 +- res/css/views/auth/_AuthHeaderLogo.scss | 2 +- res/css/views/auth/_LanguageSelector.scss | 2 +- res/css/views/auth/_Welcome.scss | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/res/css/views/auth/_AuthHeader.scss b/res/css/views/auth/_AuthHeader.scss index ea17723da4..13d5195160 100644 --- a/res/css/views/auth/_AuthHeader.scss +++ b/res/css/views/auth/_AuthHeader.scss @@ -26,4 +26,4 @@ limitations under the License. .mx_AuthHeader { display: none; } -} \ No newline at end of file +} diff --git a/res/css/views/auth/_AuthHeaderLogo.scss b/res/css/views/auth/_AuthHeaderLogo.scss index 7bc2a389c1..86f0313b68 100644 --- a/res/css/views/auth/_AuthHeaderLogo.scss +++ b/res/css/views/auth/_AuthHeaderLogo.scss @@ -28,4 +28,4 @@ limitations under the License. .mx_AuthHeaderLogo { display: none; } -} \ No newline at end of file +} diff --git a/res/css/views/auth/_LanguageSelector.scss b/res/css/views/auth/_LanguageSelector.scss index a039dce408..885ee7f30d 100644 --- a/res/css/views/auth/_LanguageSelector.scss +++ b/res/css/views/auth/_LanguageSelector.scss @@ -28,4 +28,4 @@ limitations under the License. .mx_AuthBody_language .mx_Dropdown_arrow { background: $authpage-lang-color; -} \ No newline at end of file +} diff --git a/res/css/views/auth/_Welcome.scss b/res/css/views/auth/_Welcome.scss index 6c16c953fa..894174d6e2 100644 --- a/res/css/views/auth/_Welcome.scss +++ b/res/css/views/auth/_Welcome.scss @@ -18,7 +18,6 @@ limitations under the License. display: flex; flex-direction: column; align-items: center; - &.mx_WelcomePage_registrationDisabled { .mx_ButtonCreateAccount { display: none;