From 5de15294c9e489b10674215f08435f8af3f767c4 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 1 Jan 2024 17:01:22 -0800 Subject: [PATCH 01/11] Fixes for common services --- lib/Service/UserService.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index dbda65c4..cd5011e2 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -48,10 +48,14 @@ class UserService { $this->defaults = $defaults; $this->l10nFactory = $l10nFactory; $this->LDAPConnectionService = $LDAPConnectionService; + $commonServiceURL = $this->config->getSystemValue('common_services_url', ''); + if(!$commonServiceURL) { + $commonServiceURL = rtrim($commonServiceURL, '/') . '/'; + } $this->apiConfig = [ 'mainDomain' => $this->config->getSystemValue('main_domain', ''), - 'commonApiUrl' => rtrim($this->config->getSystemValue('common_services_url', ''), '/') . '/', - 'commonServiceToken' => $this->config->getSystemValue('common_service_token', ''), + 'commonApiUrl' => $commonServiceURL, + 'commonServiceToken' => $this->config->getSystemValue('common_services_token', ''), 'aliasDomain' => $this->config->getSystemValue('alias_domain', ''), 'commonApiVersion' => $this->config->getSystemValue('common_api_version', ''), 'userCluserId' => $this->config->getSystemValue('user_cluser_id', ''), -- GitLab From 04426ef7bf9b4db7774f7bb26e0e915b5d00d0a0 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 1 Jan 2024 18:48:12 -0800 Subject: [PATCH 02/11] refconfig --- lib/Service/UserService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index cd5011e2..e0ae3e8e 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -49,9 +49,11 @@ class UserService { $this->l10nFactory = $l10nFactory; $this->LDAPConnectionService = $LDAPConnectionService; $commonServiceURL = $this->config->getSystemValue('common_services_url', ''); - if(!$commonServiceURL) { + + if (!empty($commonServiceURL)) { $commonServiceURL = rtrim($commonServiceURL, '/') . '/'; } + $this->apiConfig = [ 'mainDomain' => $this->config->getSystemValue('main_domain', ''), 'commonApiUrl' => $commonServiceURL, -- GitLab From 1824d9437cd6a31e6a0edac2add04dfc88924e4b Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 2 Jan 2024 10:32:01 -0800 Subject: [PATCH 03/11] dark mode setting --- src/signup/CaptchaForm.vue | 4 ++-- src/signup/RecoveryEmailForm.vue | 6 +++--- src/signup/RegistrationForm.vue | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index b0720bd5..b4200966 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -166,9 +166,9 @@ export default { margin-bottom: 10px; } #fields input { - background-color: var(--color-secondary-element); + background-color: var(--input-background-color); margin-bottom: 0; - color: rgba(0, 0, 0, 0.8); + color: var(--color-main-text); display: block; width: 100%; font-size: 16px; diff --git a/src/signup/RecoveryEmailForm.vue b/src/signup/RecoveryEmailForm.vue index 639bd36a..e1b832b4 100644 --- a/src/signup/RecoveryEmailForm.vue +++ b/src/signup/RecoveryEmailForm.vue @@ -159,10 +159,10 @@ export default { margin-bottom: 10px; } -#fields input{ - background-color: var(--color-secondary-element); +#recoveryEmailForm #fields input{ + background-color: var(--input-background-color); margin-bottom: 0; - color: rgba(0, 0, 0, 0.8); + color: var(--color-main-text); display: block; width: 100%; font-size: 16px; diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index e9178c1a..36b7eb75 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -351,9 +351,9 @@ export default { } .fields input, .fields input[type="password"] { - background-color: var(--color-secondary-element); + background-color: var(--input-background-color); margin-bottom: 0; - color: rgba(0, 0, 0, 0.8); + color: var(--color-main-text); display: block; width: 100%; font-size: 16px; -- GitLab From a1f6b60e35640555acab4995c61fe9122b9e1a0d Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 2 Jan 2024 10:33:07 -0800 Subject: [PATCH 04/11] dark mode setting --- src/signup/CaptchaForm.vue | 2 +- src/signup/RegistrationForm.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index b4200966..aa2eba48 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -165,7 +165,7 @@ export default { margin-top: 10px; margin-bottom: 10px; } -#fields input { +#captchaForm #fields input { background-color: var(--input-background-color); margin-bottom: 0; color: var(--color-main-text); diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 36b7eb75..42f19a2c 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -349,9 +349,9 @@ export default { .fields input#username { width: 50%; } -.fields input, -.fields input[type="password"] { - background-color: var(--input-background-color); +#registrationForm .fields input, +#registrationForm .fields input[type="password"] { +#registrationForm background-color: var(--input-background-color); margin-bottom: 0; color: var(--color-main-text); display: block; -- GitLab From 9abff1ad5cc8f5006df2fefb85e4e9f93e52c12b Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 2 Jan 2024 10:39:39 -0800 Subject: [PATCH 05/11] linting --- src/signup/RegistrationForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 42f19a2c..7acd485f 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -351,7 +351,7 @@ export default { } #registrationForm .fields input, #registrationForm .fields input[type="password"] { -#registrationForm background-color: var(--input-background-color); + background-color: var(--input-background-color); margin-bottom: 0; color: var(--color-main-text); display: block; -- GitLab From ce4cbc8c88890be4b0ccc14779c8faa70f77ab3f Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 2 Jan 2024 10:50:15 -0800 Subject: [PATCH 06/11] linting --- src/signup/RegistrationForm.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 7acd485f..2e475142 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -349,13 +349,15 @@ export default { .fields input#username { width: 50%; } +.fields input{ + width: 100%; +} #registrationForm .fields input, #registrationForm .fields input[type="password"] { background-color: var(--input-background-color); margin-bottom: 0; color: var(--color-main-text); display: block; - width: 100%; font-size: 16px; line-height: 1.3em; transition: all 0.5s linear; -- GitLab From 7f484059a6605fdcff7a94c6aeb77857a787afa5 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 2 Jan 2024 11:09:30 -0800 Subject: [PATCH 07/11] added margintop --- src/signup/RegistrationForm.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 2e475142..b35197d2 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -353,7 +353,8 @@ export default { width: 100%; } #registrationForm .fields input, -#registrationForm .fields input[type="password"] { +#registrationForm .fields input[type="password"], +#registrationForm .password-group #password { background-color: var(--input-background-color); margin-bottom: 0; color: var(--color-main-text); @@ -367,6 +368,9 @@ export default { margin: 10px 0; box-sizing: border-box; } +#registrationForm .password-group #password { + margin-top: 6px; +} .username-group { display: flex; } -- GitLab From 148f980b668e82d15560d30135e10e053e059247 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 2 Jan 2024 11:43:19 -0800 Subject: [PATCH 08/11] added margintop --- scss/ecloud-accounts-userregistration.scss | 3 +++ src/signup/RegistrationForm.vue | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scss/ecloud-accounts-userregistration.scss b/scss/ecloud-accounts-userregistration.scss index 991c2c11..0b2198ca 100644 --- a/scss/ecloud-accounts-userregistration.scss +++ b/scss/ecloud-accounts-userregistration.scss @@ -25,6 +25,9 @@ html { .v-align main { width: 50% !important; margin: 0 auto; + background-color: var(--input-background-color); + color: var(--color-main-text); + border: 1px solid #E6E8E9; } .password-group #password { diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index b35197d2..2e475142 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -353,8 +353,7 @@ export default { width: 100%; } #registrationForm .fields input, -#registrationForm .fields input[type="password"], -#registrationForm .password-group #password { +#registrationForm .fields input[type="password"] { background-color: var(--input-background-color); margin-bottom: 0; color: var(--color-main-text); @@ -368,9 +367,6 @@ export default { margin: 10px 0; box-sizing: border-box; } -#registrationForm .password-group #password { - margin-top: 6px; -} .username-group { display: flex; } -- GitLab From d0b2e25c290a00ece657955d74a22e4dcfc460b1 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 2 Jan 2024 12:00:20 -0800 Subject: [PATCH 09/11] added margintop --- scss/ecloud-accounts-userregistration.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scss/ecloud-accounts-userregistration.scss b/scss/ecloud-accounts-userregistration.scss index 0b2198ca..d8941dc8 100644 --- a/scss/ecloud-accounts-userregistration.scss +++ b/scss/ecloud-accounts-userregistration.scss @@ -25,14 +25,14 @@ html { .v-align main { width: 50% !important; margin: 0 auto; - background-color: var(--input-background-color); - color: var(--color-main-text); - border: 1px solid #E6E8E9; } .password-group #password { height: 58px !important; margin-left: 0; + background-color: var(--input-background-color); + color: var(--color-main-text); + border: 1px solid #E6E8E9; } @media only screen and (max-width: 768px) { -- GitLab From 8160ad6b819d2c522ed3c1810e56ecdd4d8c70c0 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 2 Jan 2024 12:23:25 -0800 Subject: [PATCH 10/11] changes --- scss/ecloud-accounts-userregistration.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scss/ecloud-accounts-userregistration.scss b/scss/ecloud-accounts-userregistration.scss index d8941dc8..f7f9c14b 100644 --- a/scss/ecloud-accounts-userregistration.scss +++ b/scss/ecloud-accounts-userregistration.scss @@ -27,8 +27,8 @@ html { margin: 0 auto; } -.password-group #password { - height: 58px !important; +#registrationForm .password-group #password { + height: 62px; margin-left: 0; background-color: var(--input-background-color); color: var(--color-main-text); -- GitLab From 3aabc77d67a1af6b19ccbf97772399a96550d6c0 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 2 Jan 2024 21:27:01 -0800 Subject: [PATCH 11/11] renamed var --- lib/Service/UserService.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index e0ae3e8e..221cae5c 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -56,8 +56,8 @@ class UserService { $this->apiConfig = [ 'mainDomain' => $this->config->getSystemValue('main_domain', ''), - 'commonApiUrl' => $commonServiceURL, - 'commonServiceToken' => $this->config->getSystemValue('common_services_token', ''), + 'commonServicesURL' => $commonServiceURL, + 'commonServicesToken' => $this->config->getSystemValue('common_services_token', ''), 'aliasDomain' => $this->config->getSystemValue('alias_domain', ''), 'commonApiVersion' => $this->config->getSystemValue('common_api_version', ''), 'userCluserId' => $this->config->getSystemValue('user_cluser_id', ''), @@ -321,13 +321,13 @@ class UserService { * @return void */ public function createHMEAlias(string $username, string $resultmail): void { - $commonApiUrl = $this->apiConfig['commonApiUrl']; + $commonServicesURL = $this->apiConfig['commonServicesURL']; $aliasDomain = $this->apiConfig['aliasDomain']; - $token = $this->apiConfig['commonServiceToken']; + $token = $this->apiConfig['commonServicesToken']; $commonApiVersion = $this->apiConfig['commonApiVersion']; $endpoint = $commonApiVersion . '/aliases/hide-my-email/'; - $url = $commonApiUrl . $endpoint . $resultmail; + $url = $commonServicesURL . $endpoint . $resultmail; $data = array( "domain" => $aliasDomain ); @@ -354,14 +354,14 @@ class UserService { * @return mixed The result of the domain alias creation request, decoded from JSON. */ public function createNewDomainAlias(string $username, string $userEmail): mixed { - $commonApiUrl = $this->apiConfig['commonApiUrl']; + $commonServicesURL = $this->apiConfig['commonServicesURL']; $commonApiVersion = $this->config->getSystemValue('commonApiVersion', ''); $domain = $this->apiConfig['mainDomain']; - $token = $this->apiConfig['commonServiceToken']; + $token = $this->apiConfig['commonServicesToken']; $commonApiVersion = $this->apiConfig['commonApiVersion']; $endpoint = $commonApiVersion . '/aliases/'; - $url = $commonApiUrl . $endpoint . $userEmail; + $url = $commonServicesURL . $endpoint . $userEmail; $data = array( "alias" => $username, @@ -401,16 +401,16 @@ class UserService { } public function isUsernameTaken(string $username) : bool { - $commonApiUrl = $this->apiConfig['commonApiUrl']; + $commonServicesURL = $this->apiConfig['commonServicesURL']; $commonApiVersion = $this->apiConfig['commonApiVersion']; - if (!isset($commonApiUrl) || empty($commonApiUrl)) { + if (!isset($commonServicesURL) || empty($commonServicesURL)) { return false; } $endpoint = $commonApiVersion . '/users/'; - $url = $commonApiUrl . $endpoint . $username; + $url = $commonServicesURL . $endpoint . $username; - $token = $this->apiConfig['commonServiceToken']; + $token = $this->apiConfig['commonServicesToken']; $headers = [ "Authorization: Bearer $token" ]; @@ -430,20 +430,20 @@ class UserService { } public function addUsernameToCommonDataStore(string $username) : void { - $commonApiUrl = $this->apiConfig['commonApiUrl']; + $commonServicesURL = $this->apiConfig['commonServicesURL']; $commonApiVersion = $this->apiConfig['commonApiVersion']; - if (!isset($commonApiUrl) || empty($commonApiUrl)) { + if (!isset($commonServicesURL) || empty($commonServicesURL)) { return; } $endpoint = $commonApiVersion . '/users/'; - $url = $commonApiUrl . $endpoint ; + $url = $commonServicesURL . $endpoint ; $params = [ 'username' => $username ]; - $token = $this->apiConfig['commonServiceToken']; + $token = $this->apiConfig['commonServicesToken']; $headers = [ "Authorization: Bearer $token" ]; -- GitLab