From 2909c2b6de21dfb1b6353728193d1e6f2bd448c9 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 29 Nov 2023 23:50:19 +0530 Subject: [PATCH 01/98] add event listner --- lib/Listeners/BeforeTemplateRenderedListener.php | 6 ++++++ src/snappymail.js | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 src/snappymail.js diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 86b5f99b..8b796d32 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -73,5 +73,11 @@ class BeforeTemplateRenderedListener implements IEventListener { if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { return $this->config->getUserValue($username, 'settings', 'email', ''); } + $pathInfo = $this->request->getPathInfo(); + if (strpos($pathInfo, '/apps/snappymail/') !== false) { + $this->util->addScript($this->appName, 'snappymail'); + } + + } } diff --git a/src/snappymail.js b/src/snappymail.js new file mode 100644 index 00000000..06f42221 --- /dev/null +++ b/src/snappymail.js @@ -0,0 +1,3 @@ +document.addEventListener('DOMContentLoaded', function() { + alert("dom loaded") +}) -- GitLab From 040aaa46e5b3517f37a0b2563b722f92818e7525 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 29 Nov 2023 23:53:05 +0530 Subject: [PATCH 02/98] add event listner --- src/snappymail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snappymail.js b/src/snappymail.js index 06f42221..0e68ab31 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -1,3 +1,3 @@ document.addEventListener('DOMContentLoaded', function() { - alert("dom loaded") + alert('dom loaded') }) -- GitLab From b3218114f655837970eac7694e8dacefa7714eaa Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 00:02:20 +0530 Subject: [PATCH 03/98] add event listner --- lib/Listeners/BeforeTemplateRenderedListener.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 8b796d32..c54f0f90 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -41,6 +41,10 @@ class BeforeTemplateRenderedListener implements IEventListener { if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { $this->autoLoginWebmail(); } + $pathInfo = $this->request->getPathInfo(); + if (strpos($pathInfo, '/apps/snappymail/') !== false) { + $this->util->addScript($this->appName, 'snappymail'); + } } @@ -73,11 +77,6 @@ class BeforeTemplateRenderedListener implements IEventListener { if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { return $this->config->getUserValue($username, 'settings', 'email', ''); } - $pathInfo = $this->request->getPathInfo(); - if (strpos($pathInfo, '/apps/snappymail/') !== false) { - $this->util->addScript($this->appName, 'snappymail'); - } - } } -- GitLab From 28dfc04367405fdb568778fec3355aa5d949e96e Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 00:24:25 +0530 Subject: [PATCH 04/98] add event listner --- lib/AppInfo/Application.php | 2 + .../BeforeTemplateRenderedListener.php | 124 +++++++++--------- 2 files changed, 66 insertions(+), 60 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 890b5355..785d4689 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -38,6 +38,7 @@ use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\IUserManager; use OCP\User\Events\BeforeUserDeletedEvent; use OCP\User\Events\UserChangedEvent; +use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; class Application extends App implements IBootstrap { public const APP_ID = 'ecloud-accounts'; @@ -47,6 +48,7 @@ class Application extends App implements IBootstrap { } public function register(IRegistrationContext $context): void { + $context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); $context->registerEventListener(BeforeUserDeletedEvent::class, BeforeUserDeletedListener::class); $context->registerEventListener(UserChangedEvent::class, UserChangedListener::class); $context->registerEventListener(StateChanged::class, TwoFactorStateChangedListener::class); diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index c54f0f90..ce6590dc 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Listeners; -use \OCP\EventDispatcher\IEventListener; +use OCP\EventDispatcher\IEventListener; use OCP\App\IAppManager; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use OCP\EventDispatcher\Event; @@ -13,70 +13,74 @@ use OCP\IRequest; use OCP\ISession; use OCP\IUserSession; -class BeforeTemplateRenderedListener implements IEventListener { - private $userSession; - private $request; - private $appName; - private $session; - private $config; - private $appManager; +class BeforeTemplateRenderedListener implements IEventListener +{ + private $userSession; + private $request; + private $appName; + private $session; + private $config; + private $appManager; - private const SNAPPYMAIL_APP_ID = 'snappymail'; - private const SNAPPYMAIL_URL = '/apps/snappymail/'; - private const SNAPPYMAIL_AUTOLOGIN_PWD = '1'; + private const SNAPPYMAIL_APP_ID = 'snappymail'; + private const SNAPPYMAIL_URL = '/apps/snappymail/'; + private const SNAPPYMAIL_AUTOLOGIN_PWD = '1'; - public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager) { - $this->appName = $appName; - $this->userSession = $userSession; - $this->request = $request; - $this->session = $session; - $this->config = $config; - $this->appManager = $appManager; - } + public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager) + { + $this->appName = $appName; + $this->userSession = $userSession; + $this->request = $request; + $this->session = $session; + $this->config = $config; + $this->appManager = $appManager; + } - public function handle(Event $event): void { - if (!($event instanceof BeforeTemplateRenderedEvent)) { - return; - } - if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { - $this->autoLoginWebmail(); - } - $pathInfo = $this->request->getPathInfo(); - if (strpos($pathInfo, '/apps/snappymail/') !== false) { - $this->util->addScript($this->appName, 'snappymail'); - } - } + public function handle(Event $event): void + { + if (!($event instanceof BeforeTemplateRenderedEvent)) { + return; + } + if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { + $this->autoLoginWebmail(); + } + $pathInfo = $this->request->getPathInfo(); + if (strpos($pathInfo, '/apps/snappymail/') !== false) { + $this->util->addScript($this->appName, 'snappymail'); + } + } - private function autoLoginWebmail() { - $isOidcLogin = $this->session->get('is_oidc'); - if (!$isOidcLogin) { - return; - } - $accountId = $this->getAccountId(); - $actions = \RainLoop\Api::Actions(); - - if (empty($accountId) || $actions->getMainAccountFromToken(false)) { - return; - } - - // Just send over '1' as password to trigger login as the plugin will set the correct access token - $password = self::SNAPPYMAIL_AUTOLOGIN_PWD; // As we cannot pass by reference to LoginProcess - $account = $actions->LoginProcess($accountId, $password, false); - if ($account) { - $actions->Plugins()->RunHook('login.success', array($account)); - $actions->SetAuthToken($account); - } - } + private function autoLoginWebmail() + { + $isOidcLogin = $this->session->get('is_oidc'); + if (!$isOidcLogin) { + return; + } + $accountId = $this->getAccountId(); + $actions = \RainLoop\Api::Actions(); - private function getAccountId() : string { - $username = $this->userSession->getUser()->getUID(); - if ($this->config->getAppValue('snappymail', 'snappymail-autologin', false)) { - return $username; - } - if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { - return $this->config->getUserValue($username, 'settings', 'email', ''); - } + if (empty($accountId) || $actions->getMainAccountFromToken(false)) { + return; + } - } + // Just send over '1' as password to trigger login as the plugin will set the correct access token + $password = self::SNAPPYMAIL_AUTOLOGIN_PWD; // As we cannot pass by reference to LoginProcess + $account = $actions->LoginProcess($accountId, $password, false); + if ($account) { + $actions->Plugins()->RunHook('login.success', array($account)); + $actions->SetAuthToken($account); + } + } + + private function getAccountId(): string + { + $username = $this->userSession->getUser()->getUID(); + if ($this->config->getAppValue('snappymail', 'snappymail-autologin', false)) { + return $username; + } + if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { + return $this->config->getUserValue($username, 'settings', 'email', ''); + } + } } -- GitLab From f05c79485a5c374a7fb6476983ab7ecf207d2321 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 00:27:23 +0530 Subject: [PATCH 05/98] add event listner --- lib/AppInfo/Application.php | 42 ++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 785d4689..20a88845 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -40,26 +40,30 @@ use OCP\User\Events\BeforeUserDeletedEvent; use OCP\User\Events\UserChangedEvent; use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; -class Application extends App implements IBootstrap { - public const APP_ID = 'ecloud-accounts'; +class Application extends App implements IBootstrap +{ + public const APP_ID = 'ecloud-accounts'; - public function __construct(array $urlParams = []) { - parent::__construct(self::APP_ID, $urlParams); - } + public function __construct(array $urlParams = []) + { + parent::__construct(self::APP_ID, $urlParams); + } - public function register(IRegistrationContext $context): void { - $context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); - $context->registerEventListener(BeforeUserDeletedEvent::class, BeforeUserDeletedListener::class); - $context->registerEventListener(UserChangedEvent::class, UserChangedListener::class); - $context->registerEventListener(StateChanged::class, TwoFactorStateChangedListener::class); - } + public function register(IRegistrationContext $context): void + { + $context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); + $context->registerEventListener(BeforeUserDeletedEvent::class, BeforeUserDeletedListener::class); + $context->registerEventListener(UserChangedEvent::class, UserChangedListener::class); + $context->registerEventListener(StateChanged::class, TwoFactorStateChangedListener::class); + } - public function boot(IBootContext $context): void { - $serverContainer = $context->getServerContainer(); - $serverContainer->registerService('LDAPConnectionService', function ($c) { - return new LDAPConnectionService( - $c->get(IUserManager::class) - ); - }); - } + public function boot(IBootContext $context): void + { + $serverContainer = $context->getServerContainer(); + $serverContainer->registerService('LDAPConnectionService', function ($c) { + return new LDAPConnectionService( + $c->get(IUserManager::class) + ); + }); + } } -- GitLab From 545ff60bc90c39fc6bc5006044a2326721e2fc3c Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 00:29:21 +0530 Subject: [PATCH 06/98] add event listner --- lib/AppInfo/Application.php | 44 +++---- .../BeforeTemplateRenderedListener.php | 121 +++++++++--------- 2 files changed, 78 insertions(+), 87 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 20a88845..043f6b18 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -26,6 +26,7 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\AppInfo; +use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; use OCA\EcloudAccounts\Listeners\BeforeUserDeletedListener; use OCA\EcloudAccounts\Listeners\TwoFactorStateChangedListener; use OCA\EcloudAccounts\Listeners\UserChangedListener; @@ -38,32 +39,27 @@ use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\IUserManager; use OCP\User\Events\BeforeUserDeletedEvent; use OCP\User\Events\UserChangedEvent; -use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; -class Application extends App implements IBootstrap -{ - public const APP_ID = 'ecloud-accounts'; +class Application extends App implements IBootstrap { + public const APP_ID = 'ecloud-accounts'; - public function __construct(array $urlParams = []) - { - parent::__construct(self::APP_ID, $urlParams); - } + public function __construct(array $urlParams = []) { + parent::__construct(self::APP_ID, $urlParams); + } - public function register(IRegistrationContext $context): void - { - $context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); - $context->registerEventListener(BeforeUserDeletedEvent::class, BeforeUserDeletedListener::class); - $context->registerEventListener(UserChangedEvent::class, UserChangedListener::class); - $context->registerEventListener(StateChanged::class, TwoFactorStateChangedListener::class); - } + public function register(IRegistrationContext $context): void { + $context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); + $context->registerEventListener(BeforeUserDeletedEvent::class, BeforeUserDeletedListener::class); + $context->registerEventListener(UserChangedEvent::class, UserChangedListener::class); + $context->registerEventListener(StateChanged::class, TwoFactorStateChangedListener::class); + } - public function boot(IBootContext $context): void - { - $serverContainer = $context->getServerContainer(); - $serverContainer->registerService('LDAPConnectionService', function ($c) { - return new LDAPConnectionService( - $c->get(IUserManager::class) - ); - }); - } + public function boot(IBootContext $context): void { + $serverContainer = $context->getServerContainer(); + $serverContainer->registerService('LDAPConnectionService', function ($c) { + return new LDAPConnectionService( + $c->get(IUserManager::class) + ); + }); + } } diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index ce6590dc..b90e833b 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -4,83 +4,78 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Listeners; -use OCP\EventDispatcher\IEventListener; use OCP\App\IAppManager; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; use OCP\IConfig; use OCP\IRequest; use OCP\ISession; use OCP\IUserSession; -class BeforeTemplateRenderedListener implements IEventListener -{ - private $userSession; - private $request; - private $appName; - private $session; - private $config; - private $appManager; +class BeforeTemplateRenderedListener implements IEventListener { + private $userSession; + private $request; + private $appName; + private $session; + private $config; + private $appManager; - private const SNAPPYMAIL_APP_ID = 'snappymail'; - private const SNAPPYMAIL_URL = '/apps/snappymail/'; - private const SNAPPYMAIL_AUTOLOGIN_PWD = '1'; + private const SNAPPYMAIL_APP_ID = 'snappymail'; + private const SNAPPYMAIL_URL = '/apps/snappymail/'; + private const SNAPPYMAIL_AUTOLOGIN_PWD = '1'; - public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager) - { - $this->appName = $appName; - $this->userSession = $userSession; - $this->request = $request; - $this->session = $session; - $this->config = $config; - $this->appManager = $appManager; - } + public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager) { + $this->appName = $appName; + $this->userSession = $userSession; + $this->request = $request; + $this->session = $session; + $this->config = $config; + $this->appManager = $appManager; + } - public function handle(Event $event): void - { - if (!($event instanceof BeforeTemplateRenderedEvent)) { - return; - } - if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { - $this->autoLoginWebmail(); - } - $pathInfo = $this->request->getPathInfo(); - if (strpos($pathInfo, '/apps/snappymail/') !== false) { - $this->util->addScript($this->appName, 'snappymail'); - } - } + public function handle(Event $event): void { + if (!($event instanceof BeforeTemplateRenderedEvent)) { + return; + } + if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { + $this->autoLoginWebmail(); + } + $pathInfo = $this->request->getPathInfo(); + if (strpos($pathInfo, '/apps/snappymail/') !== false) { + $this->util->addScript($this->appName, 'snappymail'); + } + } - private function autoLoginWebmail() - { - $isOidcLogin = $this->session->get('is_oidc'); - if (!$isOidcLogin) { - return; - } - $accountId = $this->getAccountId(); - $actions = \RainLoop\Api::Actions(); + private function autoLoginWebmail() { + $isOidcLogin = $this->session->get('is_oidc'); + if (!$isOidcLogin) { + return; + } + $accountId = $this->getAccountId(); + $actions = \RainLoop\Api::Actions(); - if (empty($accountId) || $actions->getMainAccountFromToken(false)) { - return; - } + if (empty($accountId) || $actions->getMainAccountFromToken(false)) { + return; + } - // Just send over '1' as password to trigger login as the plugin will set the correct access token - $password = self::SNAPPYMAIL_AUTOLOGIN_PWD; // As we cannot pass by reference to LoginProcess - $account = $actions->LoginProcess($accountId, $password, false); - if ($account) { - $actions->Plugins()->RunHook('login.success', array($account)); - $actions->SetAuthToken($account); - } - } + // Just send over '1' as password to trigger login as the plugin will set the correct access token + $password = self::SNAPPYMAIL_AUTOLOGIN_PWD; // As we cannot pass by reference to LoginProcess + $account = $actions->LoginProcess($accountId, $password, false); + if ($account) { + $actions->Plugins()->RunHook('login.success', array($account)); + $actions->SetAuthToken($account); + } + } - private function getAccountId(): string - { - $username = $this->userSession->getUser()->getUID(); - if ($this->config->getAppValue('snappymail', 'snappymail-autologin', false)) { - return $username; - } - if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { - return $this->config->getUserValue($username, 'settings', 'email', ''); - } - } + private function getAccountId(): string { + $username = $this->userSession->getUser()->getUID(); + if ($this->config->getAppValue('snappymail', 'snappymail-autologin', false)) { + return $username; + } + if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { + return $this->config->getUserValue($username, 'settings', 'email', ''); + } + } } -- GitLab From c9f988e5c562401658be1596513ed3b8ed7c5515 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 00:38:17 +0530 Subject: [PATCH 07/98] add event listner --- lib/Listeners/BeforeTemplateRenderedListener.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index b90e833b..6fc3939c 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -12,6 +12,7 @@ use OCP\IConfig; use OCP\IRequest; use OCP\ISession; use OCP\IUserSession; +use OCP\Util; class BeforeTemplateRenderedListener implements IEventListener { private $userSession; -- GitLab From 2c32bedcd5c5759fff66bcdedf6d703e90f344c1 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 00:39:50 +0530 Subject: [PATCH 08/98] add event listner --- lib/Listeners/BeforeTemplateRenderedListener.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 6fc3939c..f137e442 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -21,18 +21,20 @@ class BeforeTemplateRenderedListener implements IEventListener { private $session; private $config; private $appManager; + private Util $util; private const SNAPPYMAIL_APP_ID = 'snappymail'; private const SNAPPYMAIL_URL = '/apps/snappymail/'; private const SNAPPYMAIL_AUTOLOGIN_PWD = '1'; - public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager) { + public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager, Util $util) { $this->appName = $appName; $this->userSession = $userSession; $this->request = $request; $this->session = $session; $this->config = $config; $this->appManager = $appManager; + $this->util = $util; } public function handle(Event $event): void { -- GitLab From b9bfa4d760e8dc1919357217e6e2212b9e5f590f Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 13:09:05 +0530 Subject: [PATCH 09/98] check event fired --- lib/AppInfo/Application.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 043f6b18..1f2db4c2 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -48,7 +48,9 @@ class Application extends App implements IBootstrap { } public function register(IRegistrationContext $context): void { + \OC::$server->getLogger()->error("here it is"); $context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); + \OC::$server->getLogger()->error("here it is after"); $context->registerEventListener(BeforeUserDeletedEvent::class, BeforeUserDeletedListener::class); $context->registerEventListener(UserChangedEvent::class, UserChangedListener::class); $context->registerEventListener(StateChanged::class, TwoFactorStateChangedListener::class); -- GitLab From 0eb5fc2c12e10b80d291d2ed540b29d64d275203 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 13:19:22 +0530 Subject: [PATCH 10/98] check event fired --- lib/AppInfo/Application.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 1f2db4c2..9f5e7ec0 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -48,9 +48,7 @@ class Application extends App implements IBootstrap { } public function register(IRegistrationContext $context): void { - \OC::$server->getLogger()->error("here it is"); $context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); - \OC::$server->getLogger()->error("here it is after"); $context->registerEventListener(BeforeUserDeletedEvent::class, BeforeUserDeletedListener::class); $context->registerEventListener(UserChangedEvent::class, UserChangedListener::class); $context->registerEventListener(StateChanged::class, TwoFactorStateChangedListener::class); @@ -58,7 +56,7 @@ class Application extends App implements IBootstrap { public function boot(IBootContext $context): void { $serverContainer = $context->getServerContainer(); - $serverContainer->registerService('LDAPConnectionService', function ($c) { + $serverContainer->registerService('LDAPConnectionService', function ($context) { return new LDAPConnectionService( $c->get(IUserManager::class) ); -- GitLab From d465b51ed4ab70c423f9fd94d7aaba376c455e71 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 14:26:43 +0530 Subject: [PATCH 11/98] check event fired --- lib/AppInfo/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 9f5e7ec0..58a019bd 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -58,7 +58,7 @@ class Application extends App implements IBootstrap { $serverContainer = $context->getServerContainer(); $serverContainer->registerService('LDAPConnectionService', function ($context) { return new LDAPConnectionService( - $c->get(IUserManager::class) + $context->get(IUserManager::class) ); }); } -- GitLab From d9e30a971caf9670a7acb8870457bf9d78416e78 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 14:36:13 +0530 Subject: [PATCH 12/98] check event fired --- lib/AppInfo/Application.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 58a019bd..6bd19676 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -55,11 +55,11 @@ class Application extends App implements IBootstrap { } public function boot(IBootContext $context): void { - $serverContainer = $context->getServerContainer(); - $serverContainer->registerService('LDAPConnectionService', function ($context) { + /*$serverContainer = $context->getServerContainer(); + $serverContainer->registerService('LDAPConnectionService', function ($c) { return new LDAPConnectionService( - $context->get(IUserManager::class) + $c->get(IUserManager::class) ); - }); + });*/ } } -- GitLab From 5fd74942d89c5948c5c41bd52b14052ea83ba985 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 14:41:40 +0530 Subject: [PATCH 13/98] check event fired --- lib/Listeners/BeforeTemplateRenderedListener.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index f137e442..932e31bb 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -38,9 +38,11 @@ class BeforeTemplateRenderedListener implements IEventListener { } public function handle(Event $event): void { + \OC::$server->getLogger()->error("cal data new before"); if (!($event instanceof BeforeTemplateRenderedEvent)) { return; } + \OC::$server->getLogger()->error("cal data new"); if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { $this->autoLoginWebmail(); } -- GitLab From b5c4e74b96b23be77931378dcc81615395de8da7 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 14:49:52 +0530 Subject: [PATCH 14/98] check event fired --- lib/AppInfo/Application.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 6bd19676..150ddda3 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\AppInfo; -use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; use OCA\EcloudAccounts\Listeners\BeforeUserDeletedListener; use OCA\EcloudAccounts\Listeners\TwoFactorStateChangedListener; use OCA\EcloudAccounts\Listeners\UserChangedListener; @@ -37,8 +36,10 @@ use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\IUserManager; +use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use OCP\User\Events\BeforeUserDeletedEvent; use OCP\User\Events\UserChangedEvent; +use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; class Application extends App implements IBootstrap { public const APP_ID = 'ecloud-accounts'; -- GitLab From 6d08820e3e26d0680206723da3f7fff59436fa2d Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 14:51:04 +0530 Subject: [PATCH 15/98] check event fired --- lib/AppInfo/Application.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 150ddda3..daadebb0 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -26,6 +26,7 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\AppInfo; +use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; use OCA\EcloudAccounts\Listeners\BeforeUserDeletedListener; use OCA\EcloudAccounts\Listeners\TwoFactorStateChangedListener; use OCA\EcloudAccounts\Listeners\UserChangedListener; @@ -35,11 +36,10 @@ use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; -use OCP\IUserManager; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; +use OCP\IUserManager; use OCP\User\Events\BeforeUserDeletedEvent; use OCP\User\Events\UserChangedEvent; -use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; class Application extends App implements IBootstrap { public const APP_ID = 'ecloud-accounts'; -- GitLab From 3c2555f33b04e320ea6f06c6548aa7684bf6b073 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 14:54:01 +0530 Subject: [PATCH 16/98] check event fired --- lib/AppInfo/Application.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index daadebb0..b8070465 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -56,11 +56,11 @@ class Application extends App implements IBootstrap { } public function boot(IBootContext $context): void { - /*$serverContainer = $context->getServerContainer(); + $serverContainer = $context->getServerContainer(); $serverContainer->registerService('LDAPConnectionService', function ($c) { return new LDAPConnectionService( $c->get(IUserManager::class) ); - });*/ + }); } } -- GitLab From 726dcbcf10fb881c085edeb27cc0af4019f75150 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 15:36:59 +0530 Subject: [PATCH 17/98] check event fired --- webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index b6eaacba..b6b4a397 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,6 +9,7 @@ module.exports = { 'delete-shop-account-setting': path.join(__dirname, 'src/delete-shop-account-setting.js'), 'delete-account-listeners': path.join(__dirname, 'src/delete-account-listeners.js'), 'beta-user-setting': path.join(__dirname, 'src/beta-user-setting.js'), - 'signup': path.join(__dirname, 'src/signup.js') + 'signup': path.join(__dirname, 'src/signup.js'), + 'snappymail': path.join(__dirname, 'src/snappymail.js'), }, } -- GitLab From 1e6ef06e7b51189e16a58b973dec919123c26777 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 15:44:29 +0530 Subject: [PATCH 18/98] check event fired --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index b6b4a397..6fc16987 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,6 +10,6 @@ module.exports = { 'delete-account-listeners': path.join(__dirname, 'src/delete-account-listeners.js'), 'beta-user-setting': path.join(__dirname, 'src/beta-user-setting.js'), 'signup': path.join(__dirname, 'src/signup.js'), - 'snappymail': path.join(__dirname, 'src/snappymail.js'), + 'snappymail': path.join(__dirname, 'src/snappymail.js') }, } -- GitLab From 9d165d43e8b4efb5c718091f41f766713ddc7fb3 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 15:53:34 +0530 Subject: [PATCH 19/98] check event fired --- lib/Listeners/BeforeTemplateRenderedListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 932e31bb..ff53e6f5 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -48,7 +48,7 @@ class BeforeTemplateRenderedListener implements IEventListener { } $pathInfo = $this->request->getPathInfo(); if (strpos($pathInfo, '/apps/snappymail/') !== false) { - $this->util->addScript($this->appName, 'snappymail'); + $this->util->addScript($this->appName, $this->appName .'-snappymail'); } } -- GitLab From 2681afbada954525d1fffc7bc4ab98fb3964f281 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 15:55:00 +0530 Subject: [PATCH 20/98] check event fired --- lib/Listeners/BeforeTemplateRenderedListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index ff53e6f5..b3ddfa2e 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -48,7 +48,7 @@ class BeforeTemplateRenderedListener implements IEventListener { } $pathInfo = $this->request->getPathInfo(); if (strpos($pathInfo, '/apps/snappymail/') !== false) { - $this->util->addScript($this->appName, $this->appName .'-snappymail'); + $this->util->addScript($this->appName, $this->appName .'-snappymail'); } } -- GitLab From 0d0f39b139868f4848b2c6ca7d447cc7f2beab5a Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 16:01:25 +0530 Subject: [PATCH 21/98] check event fired --- src/snappymail.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/snappymail.js b/src/snappymail.js index 0e68ab31..fce06c80 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -1,3 +1,6 @@ document.addEventListener('DOMContentLoaded', function() { - alert('dom loaded') + var targetElement = document.getElementById("rl-app"); + var newDiv = document.createElement("div"); + newDiv.textContent = "Please verify your recovery address"; + targetElement.insertBefore(newDiv, targetElement.firstChild); }) -- GitLab From 2af1a86dc701cd9c13a36417e650af4ceae28b37 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 16:03:26 +0530 Subject: [PATCH 22/98] check event fired --- src/snappymail.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/snappymail.js b/src/snappymail.js index fce06c80..a43aaca5 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -1,6 +1,6 @@ document.addEventListener('DOMContentLoaded', function() { - var targetElement = document.getElementById("rl-app"); - var newDiv = document.createElement("div"); - newDiv.textContent = "Please verify your recovery address"; - targetElement.insertBefore(newDiv, targetElement.firstChild); + let targetElement = document.getElementById("rl-app") + let newDiv = document.createElement("div") + newDiv.textContent = "Please verify your recovery address" + targetElement.insertBefore(newDiv, targetElement.firstChild) }) -- GitLab From 688801baf0a8c59890b4dca599b9e43c9fb7a767 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 16:05:39 +0530 Subject: [PATCH 23/98] fix indent --- src/snappymail.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/snappymail.js b/src/snappymail.js index a43aaca5..0b4bb4ad 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -1,6 +1,6 @@ document.addEventListener('DOMContentLoaded', function() { - let targetElement = document.getElementById("rl-app") - let newDiv = document.createElement("div") - newDiv.textContent = "Please verify your recovery address" + const targetElement = document.getElementById('rl-app') + const newDiv = document.createElement('div') + newDiv.textContent = 'Please verify your recovery address' targetElement.insertBefore(newDiv, targetElement.firstChild) }) -- GitLab From e50de32a04e5ee11235e3e3992e2c009cf799bcc Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 16:07:16 +0530 Subject: [PATCH 24/98] fix indent --- src/snappymail.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/snappymail.js b/src/snappymail.js index 0b4bb4ad..4d615dc1 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -1,6 +1,6 @@ document.addEventListener('DOMContentLoaded', function() { const targetElement = document.getElementById('rl-app') - const newDiv = document.createElement('div') - newDiv.textContent = 'Please verify your recovery address' - targetElement.insertBefore(newDiv, targetElement.firstChild) + const newDiv = document.createElement('div') + newDiv.textContent = 'Please verify your recovery address' + targetElement.insertBefore(newDiv, targetElement.firstChild) }) -- GitLab From 3ca6c3e6984ed9351295f64d3dedfd6af7add7b4 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 30 Nov 2023 18:13:00 +0530 Subject: [PATCH 25/98] remove msg --- lib/Listeners/BeforeTemplateRenderedListener.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index b3ddfa2e..0840f718 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -38,11 +38,9 @@ class BeforeTemplateRenderedListener implements IEventListener { } public function handle(Event $event): void { - \OC::$server->getLogger()->error("cal data new before"); if (!($event instanceof BeforeTemplateRenderedEvent)) { return; } - \OC::$server->getLogger()->error("cal data new"); if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { $this->autoLoginWebmail(); } -- GitLab From 00a44ddf4416c9f67b865dbc2b327d33c64124bd Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Fri, 1 Dec 2023 16:27:34 +0530 Subject: [PATCH 26/98] recovery check --- lib/Listeners/BeforeTemplateRenderedListener.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 0840f718..36e6e8b6 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -45,9 +45,13 @@ class BeforeTemplateRenderedListener implements IEventListener { $this->autoLoginWebmail(); } $pathInfo = $this->request->getPathInfo(); - if (strpos($pathInfo, '/apps/snappymail/') !== false) { - $this->util->addScript($this->appName, $this->appName .'-snappymail'); + $emailVerified=$this->config->getUserValue($username,'email-recovery', 'recovery-email-verified','true'); + if($emailVerified == 'false'){ + if (strpos($pathInfo, '/apps/snappymail/') !== false) { + $this->util->addScript($this->appName, $this->appName .'-snappymail'); + } } + } -- GitLab From 89871a5b4c077e61af6128d33d21963b5ef35b89 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Fri, 1 Dec 2023 16:36:30 +0530 Subject: [PATCH 27/98] recovery check --- lib/Listeners/BeforeTemplateRenderedListener.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 36e6e8b6..e48fc499 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -45,8 +45,8 @@ class BeforeTemplateRenderedListener implements IEventListener { $this->autoLoginWebmail(); } $pathInfo = $this->request->getPathInfo(); - $emailVerified=$this->config->getUserValue($username,'email-recovery', 'recovery-email-verified','true'); - if($emailVerified == 'false'){ + $emailVerified = $this->config->getUserValue($username, 'email-recovery', 'recovery-email-verified', 'true'); + if($emailVerified == 'false') { if (strpos($pathInfo, '/apps/snappymail/') !== false) { $this->util->addScript($this->appName, $this->appName .'-snappymail'); } -- GitLab From fde6d9993d939fb4861356ca2e8a750ade33d84e Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 4 Dec 2023 19:15:01 +0530 Subject: [PATCH 28/98] recovery email link --- src/snappymail.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/snappymail.js b/src/snappymail.js index 4d615dc1..433068ad 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -1,6 +1,12 @@ document.addEventListener('DOMContentLoaded', function() { const targetElement = document.getElementById('rl-app') const newDiv = document.createElement('div') - newDiv.textContent = 'Please verify your recovery address' + newDiv.className = + newDiv.textContent = 'Please set your recovery email address now and use your email account without restrictions.' + const link = document.createElement('a') + link.textContent = 'SET RECOVERY EMAIL NOW' + link.href = 'settings/user/security' + link.style.display = 'block' + newDiv.appendChild(link) targetElement.insertBefore(newDiv, targetElement.firstChild) }) -- GitLab From 205457333ee89ce4640cb8c715bed0b9a8690c73 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 4 Dec 2023 19:18:22 +0530 Subject: [PATCH 29/98] recovery email link --- src/snappymail.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snappymail.js b/src/snappymail.js index 433068ad..03fca6e1 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -1,10 +1,10 @@ document.addEventListener('DOMContentLoaded', function() { const targetElement = document.getElementById('rl-app') const newDiv = document.createElement('div') - newDiv.className = + newDiv.className = 'recovery-email' newDiv.textContent = 'Please set your recovery email address now and use your email account without restrictions.' const link = document.createElement('a') - link.textContent = 'SET RECOVERY EMAIL NOW' + link.textContent = 'SET RECOVERY EMAIL NOW' link.href = 'settings/user/security' link.style.display = 'block' newDiv.appendChild(link) -- GitLab From 452db36fbcc09286e95b6872c745356c4771221e Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 4 Dec 2023 20:15:26 +0530 Subject: [PATCH 30/98] recovery email link --- lib/Listeners/BeforeTemplateRenderedListener.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index e48fc499..1f6d66dd 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -45,6 +45,7 @@ class BeforeTemplateRenderedListener implements IEventListener { $this->autoLoginWebmail(); } $pathInfo = $this->request->getPathInfo(); + $username = $this->userSession->getUser()->getUID(); $emailVerified = $this->config->getUserValue($username, 'email-recovery', 'recovery-email-verified', 'true'); if($emailVerified == 'false') { if (strpos($pathInfo, '/apps/snappymail/') !== false) { -- GitLab From c733e2cda0146284961064cbc3a97dc211173ce3 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 4 Dec 2023 20:22:39 +0530 Subject: [PATCH 31/98] recovery email link --- .../BeforeTemplateRenderedListener.php | 139 ++++++++++-------- 1 file changed, 75 insertions(+), 64 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 1f6d66dd..674f0241 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -14,76 +14,87 @@ use OCP\ISession; use OCP\IUserSession; use OCP\Util; -class BeforeTemplateRenderedListener implements IEventListener { - private $userSession; - private $request; - private $appName; - private $session; - private $config; - private $appManager; - private Util $util; +class BeforeTemplateRenderedListener implements IEventListener +{ + private $userSession; + private $request; + private $appName; + private $session; + private $config; + private $appManager; + private Util $util; - private const SNAPPYMAIL_APP_ID = 'snappymail'; - private const SNAPPYMAIL_URL = '/apps/snappymail/'; - private const SNAPPYMAIL_AUTOLOGIN_PWD = '1'; + private const SNAPPYMAIL_APP_ID = 'snappymail'; + private const SNAPPYMAIL_URL = '/apps/snappymail/'; + private const SNAPPYMAIL_AUTOLOGIN_PWD = '1'; - public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager, Util $util) { - $this->appName = $appName; - $this->userSession = $userSession; - $this->request = $request; - $this->session = $session; - $this->config = $config; - $this->appManager = $appManager; - $this->util = $util; - } + public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager, Util $util) + { + $this->appName = $appName; + $this->userSession = $userSession; + $this->request = $request; + $this->session = $session; + $this->config = $config; + $this->appManager = $appManager; + $this->util = $util; + } - public function handle(Event $event): void { - if (!($event instanceof BeforeTemplateRenderedEvent)) { - return; - } - if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { - $this->autoLoginWebmail(); - } - $pathInfo = $this->request->getPathInfo(); - $username = $this->userSession->getUser()->getUID(); - $emailVerified = $this->config->getUserValue($username, 'email-recovery', 'recovery-email-verified', 'true'); - if($emailVerified == 'false') { - if (strpos($pathInfo, '/apps/snappymail/') !== false) { - $this->util->addScript($this->appName, $this->appName .'-snappymail'); - } - } - - } + public function handle(Event $event): void + { + if (!($event instanceof BeforeTemplateRenderedEvent)) { + return; + } + if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { + $this->autoLoginWebmail(); + } + + $user = $this->userSession->getUser(); + if ($user instanceof IUser) { + $username = $currentUser->getUID(); + $pathInfo = $this->request->getPathInfo(); + $emailVerified = $this->config->getUserValue($username, 'email-recovery', 'recovery-email-verified', 'true'); + if($emailVerified == 'false') { + if (strpos($pathInfo, '/apps/snappymail/') !== false) { + $this->util->addScript($this->appName, $this->appName . '-snappymail'); + } + } + } - private function autoLoginWebmail() { - $isOidcLogin = $this->session->get('is_oidc'); - if (!$isOidcLogin) { - return; - } - $accountId = $this->getAccountId(); - $actions = \RainLoop\Api::Actions(); - if (empty($accountId) || $actions->getMainAccountFromToken(false)) { - return; - } + } - // Just send over '1' as password to trigger login as the plugin will set the correct access token - $password = self::SNAPPYMAIL_AUTOLOGIN_PWD; // As we cannot pass by reference to LoginProcess - $account = $actions->LoginProcess($accountId, $password, false); - if ($account) { - $actions->Plugins()->RunHook('login.success', array($account)); - $actions->SetAuthToken($account); - } - } - private function getAccountId(): string { - $username = $this->userSession->getUser()->getUID(); - if ($this->config->getAppValue('snappymail', 'snappymail-autologin', false)) { - return $username; - } - if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { - return $this->config->getUserValue($username, 'settings', 'email', ''); - } - } + private function autoLoginWebmail() + { + $isOidcLogin = $this->session->get('is_oidc'); + if (!$isOidcLogin) { + return; + } + $accountId = $this->getAccountId(); + $actions = \RainLoop\Api::Actions(); + + if (empty($accountId) || $actions->getMainAccountFromToken(false)) { + return; + } + + // Just send over '1' as password to trigger login as the plugin will set the correct access token + $password = self::SNAPPYMAIL_AUTOLOGIN_PWD; // As we cannot pass by reference to LoginProcess + $account = $actions->LoginProcess($accountId, $password, false); + if ($account) { + $actions->Plugins()->RunHook('login.success', array($account)); + $actions->SetAuthToken($account); + } + } + + private function getAccountId(): string + { + $username = $this->userSession->getUser()->getUID(); + if ($this->config->getAppValue('snappymail', 'snappymail-autologin', false)) { + return $username; + } + if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { + return $this->config->getUserValue($username, 'settings', 'email', ''); + } + } } -- GitLab From 0dde79fcb340780e521ece4864aeb4abbed54293 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 4 Dec 2023 20:24:07 +0530 Subject: [PATCH 32/98] recovery email link --- .../BeforeTemplateRenderedListener.php | 137 +++++++++--------- 1 file changed, 66 insertions(+), 71 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 674f0241..5de686ab 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -14,87 +14,82 @@ use OCP\ISession; use OCP\IUserSession; use OCP\Util; -class BeforeTemplateRenderedListener implements IEventListener -{ - private $userSession; - private $request; - private $appName; - private $session; - private $config; - private $appManager; - private Util $util; +class BeforeTemplateRenderedListener implements IEventListener { + private $userSession; + private $request; + private $appName; + private $session; + private $config; + private $appManager; + private Util $util; - private const SNAPPYMAIL_APP_ID = 'snappymail'; - private const SNAPPYMAIL_URL = '/apps/snappymail/'; - private const SNAPPYMAIL_AUTOLOGIN_PWD = '1'; + private const SNAPPYMAIL_APP_ID = 'snappymail'; + private const SNAPPYMAIL_URL = '/apps/snappymail/'; + private const SNAPPYMAIL_AUTOLOGIN_PWD = '1'; - public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager, Util $util) - { - $this->appName = $appName; - $this->userSession = $userSession; - $this->request = $request; - $this->session = $session; - $this->config = $config; - $this->appManager = $appManager; - $this->util = $util; - } + public function __construct($appName, IUserSession $userSession, IRequest $request, ISession $session, IConfig $config, IAppManager $appManager, Util $util) { + $this->appName = $appName; + $this->userSession = $userSession; + $this->request = $request; + $this->session = $session; + $this->config = $config; + $this->appManager = $appManager; + $this->util = $util; + } - public function handle(Event $event): void - { - if (!($event instanceof BeforeTemplateRenderedEvent)) { - return; - } - if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { - $this->autoLoginWebmail(); - } - - $user = $this->userSession->getUser(); - if ($user instanceof IUser) { - $username = $currentUser->getUID(); + public function handle(Event $event): void { + if (!($event instanceof BeforeTemplateRenderedEvent)) { + return; + } + if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { + $this->autoLoginWebmail(); + } + + $user = $this->userSession->getUser(); + if ($user instanceof IUser) { + $username = $currentUser->getUID(); $pathInfo = $this->request->getPathInfo(); - $emailVerified = $this->config->getUserValue($username, 'email-recovery', 'recovery-email-verified', 'true'); - if($emailVerified == 'false') { - if (strpos($pathInfo, '/apps/snappymail/') !== false) { - $this->util->addScript($this->appName, $this->appName . '-snappymail'); - } - } - } + $emailVerified = $this->config->getUserValue($username, 'email-recovery', 'recovery-email-verified', 'true'); + if($emailVerified == 'false') { + if (strpos($pathInfo, '/apps/snappymail/') !== false) { + $this->util->addScript($this->appName, $this->appName . '-snappymail'); + } + } + } - } + } - private function autoLoginWebmail() - { - $isOidcLogin = $this->session->get('is_oidc'); - if (!$isOidcLogin) { - return; - } - $accountId = $this->getAccountId(); - $actions = \RainLoop\Api::Actions(); + private function autoLoginWebmail() { + $isOidcLogin = $this->session->get('is_oidc'); + if (!$isOidcLogin) { + return; + } + $accountId = $this->getAccountId(); + $actions = \RainLoop\Api::Actions(); - if (empty($accountId) || $actions->getMainAccountFromToken(false)) { - return; - } + if (empty($accountId) || $actions->getMainAccountFromToken(false)) { + return; + } - // Just send over '1' as password to trigger login as the plugin will set the correct access token - $password = self::SNAPPYMAIL_AUTOLOGIN_PWD; // As we cannot pass by reference to LoginProcess - $account = $actions->LoginProcess($accountId, $password, false); - if ($account) { - $actions->Plugins()->RunHook('login.success', array($account)); - $actions->SetAuthToken($account); - } - } + // Just send over '1' as password to trigger login as the plugin will set the correct access token + $password = self::SNAPPYMAIL_AUTOLOGIN_PWD; // As we cannot pass by reference to LoginProcess + $account = $actions->LoginProcess($accountId, $password, false); + if ($account) { + $actions->Plugins()->RunHook('login.success', array($account)); + $actions->SetAuthToken($account); + } + } - private function getAccountId(): string - { - $username = $this->userSession->getUser()->getUID(); - if ($this->config->getAppValue('snappymail', 'snappymail-autologin', false)) { - return $username; - } - if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { - return $this->config->getUserValue($username, 'settings', 'email', ''); - } - } + private function getAccountId(): string { + $username = $this->userSession->getUser()->getUID(); + if ($this->config->getAppValue('snappymail', 'snappymail-autologin', false)) { + return $username; + } + if ($this->config->getAppValue('snappymail', 'snappymail-autologin-with-email', false)) { + return $this->config->getUserValue($username, 'settings', 'email', ''); + } + } } -- GitLab From 279327ac81564266311ffead24015c27ca87a491 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 5 Dec 2023 10:35:58 +0530 Subject: [PATCH 33/98] test --- lib/Listeners/BeforeTemplateRenderedListener.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 5de686ab..143bee9a 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -47,9 +47,9 @@ class BeforeTemplateRenderedListener implements IEventListener { $user = $this->userSession->getUser(); if ($user instanceof IUser) { - $username = $currentUser->getUID(); + $userID = $currentUser->getUID(); $pathInfo = $this->request->getPathInfo(); - $emailVerified = $this->config->getUserValue($username, 'email-recovery', 'recovery-email-verified', 'true'); + $emailVerified = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email-verified', 'true'); if($emailVerified == 'false') { if (strpos($pathInfo, '/apps/snappymail/') !== false) { $this->util->addScript($this->appName, $this->appName . '-snappymail'); -- GitLab From 96ebf550763d689888d60efc6a901cd2ae940549 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 5 Dec 2023 13:34:55 +0530 Subject: [PATCH 34/98] banner buttom --- lib/Listeners/BeforeTemplateRenderedListener.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 143bee9a..04dfde83 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -12,6 +12,7 @@ use OCP\IConfig; use OCP\IRequest; use OCP\ISession; use OCP\IUserSession; +use OCP\IUser; use OCP\Util; class BeforeTemplateRenderedListener implements IEventListener { @@ -47,7 +48,7 @@ class BeforeTemplateRenderedListener implements IEventListener { $user = $this->userSession->getUser(); if ($user instanceof IUser) { - $userID = $currentUser->getUID(); + $userID = $user->getUID(); $pathInfo = $this->request->getPathInfo(); $emailVerified = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email-verified', 'true'); if($emailVerified == 'false') { -- GitLab From 1c48c87e2a680fd8b12c754b5eba75384e5cd1e5 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 5 Dec 2023 13:40:23 +0530 Subject: [PATCH 35/98] banner buttom --- lib/Listeners/BeforeTemplateRenderedListener.php | 2 +- src/snappymail.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 04dfde83..b890ec06 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -51,7 +51,7 @@ class BeforeTemplateRenderedListener implements IEventListener { $userID = $user->getUID(); $pathInfo = $this->request->getPathInfo(); $emailVerified = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email-verified', 'true'); - if($emailVerified == 'false') { + if($emailVerified === 'false') { if (strpos($pathInfo, '/apps/snappymail/') !== false) { $this->util->addScript($this->appName, $this->appName . '-snappymail'); } diff --git a/src/snappymail.js b/src/snappymail.js index 03fca6e1..40b67cef 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -5,7 +5,8 @@ document.addEventListener('DOMContentLoaded', function() { newDiv.textContent = 'Please set your recovery email address now and use your email account without restrictions.' const link = document.createElement('a') link.textContent = 'SET RECOVERY EMAIL NOW' - link.href = 'settings/user/security' + var rootUrl = OC.getRootPath() + link.href = rootURL+'settings/user/security' link.style.display = 'block' newDiv.appendChild(link) targetElement.insertBefore(newDiv, targetElement.firstChild) -- GitLab From 1a3d24558a8baa4c51f7aca0e5ef3ae62838127d Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 5 Dec 2023 13:42:18 +0530 Subject: [PATCH 36/98] banner buttom --- lib/Listeners/BeforeTemplateRenderedListener.php | 2 +- src/snappymail.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index b890ec06..1145abb1 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -11,8 +11,8 @@ use OCP\EventDispatcher\IEventListener; use OCP\IConfig; use OCP\IRequest; use OCP\ISession; -use OCP\IUserSession; use OCP\IUser; +use OCP\IUserSession; use OCP\Util; class BeforeTemplateRenderedListener implements IEventListener { diff --git a/src/snappymail.js b/src/snappymail.js index 40b67cef..8770d295 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -6,7 +6,7 @@ document.addEventListener('DOMContentLoaded', function() { const link = document.createElement('a') link.textContent = 'SET RECOVERY EMAIL NOW' var rootUrl = OC.getRootPath() - link.href = rootURL+'settings/user/security' + link.href = rootUrl + 'settings/user/security' link.style.display = 'block' newDiv.appendChild(link) targetElement.insertBefore(newDiv, targetElement.firstChild) -- GitLab From 4503523a616f889060cf9f2ba550ed4bae6320fb Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 5 Dec 2023 13:43:28 +0530 Subject: [PATCH 37/98] banner buttom --- src/snappymail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snappymail.js b/src/snappymail.js index 8770d295..e2999088 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -5,7 +5,7 @@ document.addEventListener('DOMContentLoaded', function() { newDiv.textContent = 'Please set your recovery email address now and use your email account without restrictions.' const link = document.createElement('a') link.textContent = 'SET RECOVERY EMAIL NOW' - var rootUrl = OC.getRootPath() + const rootUrl = OC.getRootPath() link.href = rootUrl + 'settings/user/security' link.style.display = 'block' newDiv.appendChild(link) -- GitLab From 0998af67cc27e9b56f5224b58a187f914e784d71 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 11 Dec 2023 21:15:02 +0530 Subject: [PATCH 38/98] banner trans --- l10n/de.js | 4 +++- l10n/de.json | 4 +++- l10n/en.js | 5 +++-- l10n/en.json | 4 +++- l10n/es.js | 2 ++ l10n/es.json | 4 +++- l10n/fr.js | 4 +++- l10n/fr.json | 4 +++- l10n/it.js | 4 +++- l10n/it.json | 4 +++- src/snappymail.js | 2 +- 11 files changed, 30 insertions(+), 11 deletions(-) diff --git a/l10n/de.js b/l10n/de.js index a205f974..f43ce23d 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -73,6 +73,8 @@ OC.L10N.register( "I have read and accept the Terms of Service.": "Ich habe die Nutzungsbedingungen gelesen und akzeptiere diese.", "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", - "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite." + "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", + "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index 54c2e888..1aeb7b1e 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -71,7 +71,9 @@ "I have read and accept the Terms of Service.": "Ich habe die Nutzungsbedingungen gelesen und akzeptiere diese.", "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", - "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite." + "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", + "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/en.js b/l10n/en.js index 3a55d272..8fcedd62 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -77,7 +77,8 @@ OC.L10N.register( "Success!": "Success!", "Your __username__@__domain__ account was successfully created.": "Your __username__@__domain__ account was successfully created.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", - - "Recovery email address is already taken.": "Recovery email address is already taken." + "Recovery email address is already taken.": "Recovery email address is already taken.", + "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/en.json b/l10n/en.json index 5d15841a..3012a269 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -73,7 +73,9 @@ "I have read and accept the Terms of Service.": "I have read and accept the Terms of Service.", "Success!": "Success!", "Your __username__@__domain__ account was successfully created.": "Your __username__@__domain__ account was successfully created.", - "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page." + "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", + "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW]" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/es.js b/l10n/es.js index ea832b36..085d5eb3 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -76,5 +76,7 @@ OC.L10N.register( "Success!": "¡Éxito!", "Your __username__@__domain__ account was successfully created.": "Su cuenta __username__@__domain__ se ha creado correctamente.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si desea utilizar su correo electrónico de murena.io en una aplicación de correo como Thunderbird, Outlook u otra, visite esta página.", + "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index e5c3daa6..b91775f1 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -74,7 +74,9 @@ "I have read and accept the Terms of Service.": "He leído y acepto las Condiciones del servicio.", "Success!": "¡Éxito!", "Your __username__@__domain__ account was successfully created.": "Su cuenta __username__@__domain__ se ha creado correctamente.", - "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si desea utilizar su correo electrónico de murena.io en una aplicación de correo como Thunderbird, Outlook u otra, visite esta página." + "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si desea utilizar su correo electrónico de murena.io en una aplicación de correo como Thunderbird, Outlook u otra, visite esta página.", + "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/fr.js b/l10n/fr.js index 81fb0b81..550df8fd 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -74,6 +74,8 @@ OC.L10N.register( "I have read and accept the Terms of Service.": "J'ai lu et j'accepte les Termes de service.", "Success!": "Succès !", "Your __username__@__domain__ account was successfully created.": "Votre compte __username__@__domain__ a été créé avec succès.", - "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si vous souhaitez utiliser votre email murena.io dans une application de messagerie comme Thunderbird, Outlook ou autre, veuillez visiter cette page." + "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si vous souhaitez utiliser votre email murena.io dans une application de messagerie comme Thunderbird, Outlook ou autre, veuillez visiter cette page.", + "Please set your recovery email address and use your email account without restrictions.": "Merci de définir une adresse e-mail de récupération pour bénéficier d'un usage de votre compte sans restrictions.", + "SET RECOVERY EMAIL NOW": "DEFINIR L'ADRESSE DE RECUPERATION MAINTENANT" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index a371d46d..e273f9f7 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -73,7 +73,9 @@ "I have read and accept the Terms of Service.": "J'ai lu et j'accepte les Termes de service.", "Success!": "Succès !", "Your __username__@__domain__ account was successfully created.": "Votre compte __username__@__domain__ a été créé avec succès.", - "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si vous souhaitez utiliser votre email murena.io dans une application de messagerie comme Thunderbird, Outlook ou autre, veuillez visiter cette page." + "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si vous souhaitez utiliser votre email murena.io dans une application de messagerie comme Thunderbird, Outlook ou autre, veuillez visiter cette page.", + "Please set your recovery email address and use your email account without restrictions.": "Merci de définir une adresse e-mail de récupération pour bénéficier d'un usage de votre compte sans restrictions.", + "SET RECOVERY EMAIL NOW": "DEFINIR L'ADRESSE DE RECUPERATION MAINTENANT" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/it.js b/l10n/it.js index 008a8d01..ebe9d05a 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -74,6 +74,8 @@ OC.L10N.register( "I have read and accept the Terms of Service.": "Ho letto e accetto i Termini di servizio.", "Success!": "Successo!", "Your __username__@__domain__ account was successfully created.": "L'account __username__@__domain__ è stato creato con successo.", - "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Se si desidera utilizzare l'e-mail di murena.io in un'applicazione di posta elettronica come Thunderbird, Outlook o altre, visitare questa pagina." + "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Se si desidera utilizzare l'e-mail di murena.io in un'applicazione di posta elettronica come Thunderbird, Outlook o altre, visitare questa pagina.", + "Please set your recovery email address and use your email account without restrictions.": "Per poter usare l'account email senza restrizioni devi impostare l'indirizzo email di recovery.", + "SET RECOVERY EMAIL NOW": "IMPOSTA ADESSO LA EMAIL DI RECOVERY" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/it.json b/l10n/it.json index 2dcaf6c5..535da203 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -68,7 +68,9 @@ "Human Verification is required.": "È necessaria la verifica umana.", "Human Verification code is not correct.": "Il codice di verifica umano non è corretto.", "Recovery Email is required.": "L'e-mail di recupero è necessaria.", - "You must read and accept the Terms of Service to create your account.": "Per creare il proprio account è necessario leggere e accettare i Termini di servizio." + "You must read and accept the Terms of Service to create your account.": "Per creare il proprio account è necessario leggere e accettare i Termini di servizio.", + "Please set your recovery email address and use your email account without restrictions.": "Per poter usare l'account email senza restrizioni devi impostare l'indirizzo email di recovery.", + "SET RECOVERY EMAIL NOW": "IMPOSTA ADESSO LA EMAIL DI RECOVERY" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/src/snappymail.js b/src/snappymail.js index e2999088..ca5ae172 100644 --- a/src/snappymail.js +++ b/src/snappymail.js @@ -6,7 +6,7 @@ document.addEventListener('DOMContentLoaded', function() { const link = document.createElement('a') link.textContent = 'SET RECOVERY EMAIL NOW' const rootUrl = OC.getRootPath() - link.href = rootUrl + 'settings/user/security' + link.href = rootUrl + '/settings/user/security' link.style.display = 'block' newDiv.appendChild(link) targetElement.insertBefore(newDiv, targetElement.firstChild) -- GitLab From a401f3be96409d2d1375d51578ffefd00f310182 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 11:54:21 +0530 Subject: [PATCH 39/98] recovery email banner --- lib/Listeners/BeforeTemplateRenderedListener.php | 9 ++++----- src/{snappymail.js => emailrecovery.js} | 0 2 files changed, 4 insertions(+), 5 deletions(-) rename src/{snappymail.js => emailrecovery.js} (100%) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 1145abb1..2296a4a8 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -50,11 +50,10 @@ class BeforeTemplateRenderedListener implements IEventListener { if ($user instanceof IUser) { $userID = $user->getUID(); $pathInfo = $this->request->getPathInfo(); - $emailVerified = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email-verified', 'true'); - if($emailVerified === 'false') { - if (strpos($pathInfo, '/apps/snappymail/') !== false) { - $this->util->addScript($this->appName, $this->appName . '-snappymail'); - } + $recoveryEmail = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email', ''); + if($recoveryEmail === '') { + $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); + $this->util->addScript($this->appName, $this->appName . '-emailrecovery'); } } diff --git a/src/snappymail.js b/src/emailrecovery.js similarity index 100% rename from src/snappymail.js rename to src/emailrecovery.js -- GitLab From 4f02957f3ddeae43eb788d04e533ff16e069149c Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 11:57:50 +0530 Subject: [PATCH 40/98] recovery email banner --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 6fc16987..220a2c93 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,6 +10,6 @@ module.exports = { 'delete-account-listeners': path.join(__dirname, 'src/delete-account-listeners.js'), 'beta-user-setting': path.join(__dirname, 'src/beta-user-setting.js'), 'signup': path.join(__dirname, 'src/signup.js'), - 'snappymail': path.join(__dirname, 'src/snappymail.js') + 'snappymail': path.join(__dirname, 'src/emailrecovery.js') }, } -- GitLab From 7709eef25e9dc2bdf85d85b2f09faf47929a2fb7 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 12:07:32 +0530 Subject: [PATCH 41/98] recovery email banner --- lib/Listeners/BeforeTemplateRenderedListener.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 2296a4a8..ea2715a2 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -51,10 +51,10 @@ class BeforeTemplateRenderedListener implements IEventListener { $userID = $user->getUID(); $pathInfo = $this->request->getPathInfo(); $recoveryEmail = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email', ''); - if($recoveryEmail === '') { + //if($recoveryEmail === '') { $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); $this->util->addScript($this->appName, $this->appName . '-emailrecovery'); - } + //} } -- GitLab From 57992062a0e8bda5dc3785bc3322924955110bcc Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 12:09:22 +0530 Subject: [PATCH 42/98] recovery email banner --- lib/Listeners/BeforeTemplateRenderedListener.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index ea2715a2..8258b3c2 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -52,8 +52,8 @@ class BeforeTemplateRenderedListener implements IEventListener { $pathInfo = $this->request->getPathInfo(); $recoveryEmail = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email', ''); //if($recoveryEmail === '') { - $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); - $this->util->addScript($this->appName, $this->appName . '-emailrecovery'); + $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); + $this->util->addScript($this->appName, $this->appName . '-emailrecovery'); //} } -- GitLab From 025dba36ef2365a8c0feda41f9e1206b17097b81 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 12:17:17 +0530 Subject: [PATCH 43/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 0 src/emailrecovery.js | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 css/ecloud-accounts-emailrecovery.css diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css new file mode 100644 index 00000000..e69de29b diff --git a/src/emailrecovery.js b/src/emailrecovery.js index ca5ae172..2a921f7d 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -1,13 +1,13 @@ document.addEventListener('DOMContentLoaded', function() { - const targetElement = document.getElementById('rl-app') + const targetElement = document.getElementById('header') const newDiv = document.createElement('div') newDiv.className = 'recovery-email' - newDiv.textContent = 'Please set your recovery email address now and use your email account without restrictions.' + newDiv.textContent = t('ecloud-accounts','Please set your recovery email address now and use your email account without restrictions.') const link = document.createElement('a') - link.textContent = 'SET RECOVERY EMAIL NOW' + link.textContent =t('ecloud-accounts','SET RECOVERY EMAIL NOW') const rootUrl = OC.getRootPath() link.href = rootUrl + '/settings/user/security' link.style.display = 'block' newDiv.appendChild(link) - targetElement.insertBefore(newDiv, targetElement.firstChild) + targetElement.appendChild(newDiv) }) -- GitLab From 74bcb5e4e88bdd2b4c57b4ecbdde6456efc7372c Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 12:22:38 +0530 Subject: [PATCH 44/98] recovery email banner --- src/emailrecovery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index 2a921f7d..f78f25d2 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -2,9 +2,9 @@ document.addEventListener('DOMContentLoaded', function() { const targetElement = document.getElementById('header') const newDiv = document.createElement('div') newDiv.className = 'recovery-email' - newDiv.textContent = t('ecloud-accounts','Please set your recovery email address now and use your email account without restrictions.') + newDiv.textContent = t('ecloud-accounts', 'Please set your recovery email address now and use your email account without restrictions.') const link = document.createElement('a') - link.textContent =t('ecloud-accounts','SET RECOVERY EMAIL NOW') + link.textContent =t ('ecloud-accounts', 'SET RECOVERY EMAIL NOW') const rootUrl = OC.getRootPath() link.href = rootUrl + '/settings/user/security' link.style.display = 'block' -- GitLab From 0c580c27af5807acd63b668b82505243626b2fb3 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 12:24:15 +0530 Subject: [PATCH 45/98] recovery email banner --- src/emailrecovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index f78f25d2..a2abc99b 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -4,7 +4,7 @@ document.addEventListener('DOMContentLoaded', function() { newDiv.className = 'recovery-email' newDiv.textContent = t('ecloud-accounts', 'Please set your recovery email address now and use your email account without restrictions.') const link = document.createElement('a') - link.textContent =t ('ecloud-accounts', 'SET RECOVERY EMAIL NOW') + link.textContent = t('ecloud-accounts', 'SET RECOVERY EMAIL NOW') const rootUrl = OC.getRootPath() link.href = rootUrl + '/settings/user/security' link.style.display = 'block' -- GitLab From 7657afeafb7afa74c5fddbed15f7a2cdb316e407 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 12:30:50 +0530 Subject: [PATCH 46/98] recovery email banner --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 220a2c93..c91270a9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,6 +10,6 @@ module.exports = { 'delete-account-listeners': path.join(__dirname, 'src/delete-account-listeners.js'), 'beta-user-setting': path.join(__dirname, 'src/beta-user-setting.js'), 'signup': path.join(__dirname, 'src/signup.js'), - 'snappymail': path.join(__dirname, 'src/emailrecovery.js') + 'emailrecovery': path.join(__dirname, 'src/emailrecovery.js') }, } -- GitLab From 4b184adcd17e3adf43e0d25cbd53f6a7050466ed Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 13:13:59 +0530 Subject: [PATCH 47/98] recovery email banner --- src/emailrecovery.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index a2abc99b..f199cd36 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -9,5 +9,6 @@ document.addEventListener('DOMContentLoaded', function() { link.href = rootUrl + '/settings/user/security' link.style.display = 'block' newDiv.appendChild(link) - targetElement.appendChild(newDiv) + const parentElement = targetElement.parentNode + parentElement.insertBefore(newDiv, targetElement.nextSibling) }) -- GitLab From 990e7ed83a42a14ffdd12cc3eb1b3f3a145ff821 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 14:54:50 +0530 Subject: [PATCH 48/98] recovery email banner --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68fe5ad2..c268fb41 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - TO_PACKAGE: 'appinfo l10n lib templates js img' + TO_PACKAGE: 'appinfo l10n lib templates js img css' include: - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: main -- GitLab From d771be8098ad5284905036c718c8051dcb69c4d4 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 15:26:15 +0530 Subject: [PATCH 49/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index e69de29b..d07cf508 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -0,0 +1,13 @@ +.recovery-email { + display: inline-flex; + position: absolute; + top: 50px; + width: 100%; + z-index: 2000; + height: 50px; + box-sizing: border-box; + justify-content: center; + align-items: center; + background: #333333; + color: #ffffff; +} \ No newline at end of file -- GitLab From fceee7b944040b6f2a528ba2d1dcd0099e26f756 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 16:06:03 +0530 Subject: [PATCH 50/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index d07cf508..1ca56b70 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -10,4 +10,12 @@ align-items: center; background: #333333; color: #ffffff; + + a { + color: #ffffff; + } +} + +#content { + height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; } \ No newline at end of file -- GitLab From fde520261fd9518fc9441843f5dc4d53078dce11 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 16:11:23 +0530 Subject: [PATCH 51/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index 1ca56b70..6cb5b570 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -3,14 +3,13 @@ position: absolute; top: 50px; width: 100%; - z-index: 2000; + z-index: 2100; height: 50px; box-sizing: border-box; justify-content: center; align-items: center; background: #333333; color: #ffffff; - a { color: #ffffff; } -- GitLab From 4523de19a0e4b1a9b1dde91477702b24085bbceb Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 16:17:39 +0530 Subject: [PATCH 52/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index 6cb5b570..cb1a7007 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -3,18 +3,17 @@ position: absolute; top: 50px; width: 100%; - z-index: 2100; + z-index: 100; height: 50px; box-sizing: border-box; justify-content: center; align-items: center; background: #333333; color: #ffffff; - a { - color: #ffffff; - } } - +.recovery-email a { + color: #ffffff; +} #content { height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; } \ No newline at end of file -- GitLab From 3c2c5735889f3d85aa0b654b50c30a9c93216ec4 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 16:27:53 +0530 Subject: [PATCH 53/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 2 ++ src/emailrecovery.js | 1 + 2 files changed, 3 insertions(+) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index cb1a7007..dd8840f2 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -13,6 +13,8 @@ } .recovery-email a { color: #ffffff; + padding-left: 24px; + text-decoration: underline; } #content { height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; diff --git a/src/emailrecovery.js b/src/emailrecovery.js index f199cd36..8c58d972 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -2,6 +2,7 @@ document.addEventListener('DOMContentLoaded', function() { const targetElement = document.getElementById('header') const newDiv = document.createElement('div') newDiv.className = 'recovery-email' + newDiv.appendChild('') newDiv.textContent = t('ecloud-accounts', 'Please set your recovery email address now and use your email account without restrictions.') const link = document.createElement('a') link.textContent = t('ecloud-accounts', 'SET RECOVERY EMAIL NOW') -- GitLab From ac13cf3db9ef686bea9fe5488ef578c35390642f Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 16:31:44 +0530 Subject: [PATCH 54/98] recovery email banner --- src/emailrecovery.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index 8c58d972..84c3fe63 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -1,8 +1,17 @@ -document.addEventListener('DOMContentLoaded', function() { +document.addEventListener('DOMContentLoaded', function () { const targetElement = document.getElementById('header') const newDiv = document.createElement('div') newDiv.className = 'recovery-email' - newDiv.appendChild('') + const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg') + svg.setAttribute('width', '21') + svg.setAttribute('height', '20') + svg.setAttribute('viewBox', '0 0 21 20') + svg.setAttribute('fill', 'none') + const path = document.createElementNS('http://www.w3.org/2000/svg', 'path') + path.setAttribute('d', 'M1.3335 17.9167H19.6668L10.5002 2.08334L1.3335 17.9167ZM11.3335 15.4167H9.66683V13.75H11.3335V15.4167ZM11.3335 12.0833H9.66683V8.75001H11.3335V12.0833Z') + path.setAttribute('fill', '#FFBB00') + svg.appendChild(path) + newDiv.prepend(svg) newDiv.textContent = t('ecloud-accounts', 'Please set your recovery email address now and use your email account without restrictions.') const link = document.createElement('a') link.textContent = t('ecloud-accounts', 'SET RECOVERY EMAIL NOW') -- GitLab From 96481a9961a7a4645c5ae13393f3cc310236159c Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 16:33:12 +0530 Subject: [PATCH 55/98] recovery email banner --- src/emailrecovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index 84c3fe63..b67d20d1 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -1,4 +1,4 @@ -document.addEventListener('DOMContentLoaded', function () { +document.addEventListener('DOMContentLoaded', function() { const targetElement = document.getElementById('header') const newDiv = document.createElement('div') newDiv.className = 'recovery-email' -- GitLab From dcafd9f87f5e3d22cca6d538a1e8799f77caee62 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 16:40:16 +0530 Subject: [PATCH 56/98] recovery email banner --- img/warning.svg | 5 +++++ src/emailrecovery.js | 14 ++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 img/warning.svg diff --git a/img/warning.svg b/img/warning.svg new file mode 100644 index 00000000..704197c7 --- /dev/null +++ b/img/warning.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/emailrecovery.js b/src/emailrecovery.js index b67d20d1..a48031a1 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -1,17 +1,11 @@ document.addEventListener('DOMContentLoaded', function() { + const APPLICATION_NAME = 'ecloud-accounts' const targetElement = document.getElementById('header') const newDiv = document.createElement('div') newDiv.className = 'recovery-email' - const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg') - svg.setAttribute('width', '21') - svg.setAttribute('height', '20') - svg.setAttribute('viewBox', '0 0 21 20') - svg.setAttribute('fill', 'none') - const path = document.createElementNS('http://www.w3.org/2000/svg', 'path') - path.setAttribute('d', 'M1.3335 17.9167H19.6668L10.5002 2.08334L1.3335 17.9167ZM11.3335 15.4167H9.66683V13.75H11.3335V15.4167ZM11.3335 12.0833H9.66683V8.75001H11.3335V12.0833Z') - path.setAttribute('fill', '#FFBB00') - svg.appendChild(path) - newDiv.prepend(svg) + const img = document.createElement('img') + img.src = OC.generateUrl('/custom_apps/' + APPLICATION_NAME + '/img/warning.svg') + newDiv.appendChild(img); newDiv.textContent = t('ecloud-accounts', 'Please set your recovery email address now and use your email account without restrictions.') const link = document.createElement('a') link.textContent = t('ecloud-accounts', 'SET RECOVERY EMAIL NOW') -- GitLab From 6c3e46a94e4868857f15e879fbb2ae9e6abeec54 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 16:41:34 +0530 Subject: [PATCH 57/98] recovery email banner --- src/emailrecovery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index a48031a1..9e7e6eb6 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -4,8 +4,8 @@ document.addEventListener('DOMContentLoaded', function() { const newDiv = document.createElement('div') newDiv.className = 'recovery-email' const img = document.createElement('img') - img.src = OC.generateUrl('/custom_apps/' + APPLICATION_NAME + '/img/warning.svg') - newDiv.appendChild(img); + img.src = OC.generateUrl('/custom_apps/' + APPLICATION_NAME + '/img/warning.svg') + newDiv.appendChild(img) newDiv.textContent = t('ecloud-accounts', 'Please set your recovery email address now and use your email account without restrictions.') const link = document.createElement('a') link.textContent = t('ecloud-accounts', 'SET RECOVERY EMAIL NOW') -- GitLab From 8f593e21eff67428351b51e7dada4236c04fb88c Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 16:55:03 +0530 Subject: [PATCH 58/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 1 + l10n/de.js | 2 +- l10n/de.json | 2 +- l10n/en.js | 2 +- l10n/en.json | 4 ++-- l10n/es.js | 2 +- l10n/es.json | 2 +- l10n/fr.js | 2 +- l10n/fr.json | 2 +- l10n/it.js | 2 +- l10n/it.json | 2 +- 11 files changed, 12 insertions(+), 11 deletions(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index dd8840f2..eef30bfc 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -17,5 +17,6 @@ text-decoration: underline; } #content { + margin-top:100px !important; height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; } \ No newline at end of file diff --git a/l10n/de.js b/l10n/de.js index f43ce23d..50c810db 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -74,7 +74,7 @@ OC.L10N.register( "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", - "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index 1aeb7b1e..d431dfa0 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -72,7 +72,7 @@ "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", - "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "pluralForm": "nplurals=2; plural=(n != 1);" diff --git a/l10n/en.js b/l10n/en.js index 8fcedd62..c9dea466 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -78,7 +78,7 @@ OC.L10N.register( "Your __username__@__domain__ account was successfully created.": "Your __username__@__domain__ account was successfully created.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", "Recovery email address is already taken.": "Recovery email address is already taken.", - "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/en.json b/l10n/en.json index 3012a269..b610b501 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -74,8 +74,8 @@ "Success!": "Success!", "Your __username__@__domain__ account was successfully created.": "Your __username__@__domain__ account was successfully created.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", - "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", - "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW]" + "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/es.js b/l10n/es.js index 085d5eb3..71fae8c1 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -76,7 +76,7 @@ OC.L10N.register( "Success!": "¡Éxito!", "Your __username__@__domain__ account was successfully created.": "Su cuenta __username__@__domain__ se ha creado correctamente.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si desea utilizar su correo electrónico de murena.io en una aplicación de correo como Thunderbird, Outlook u otra, visite esta página.", - "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index b91775f1..4ae1a8b4 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -75,7 +75,7 @@ "Success!": "¡Éxito!", "Your __username__@__domain__ account was successfully created.": "Su cuenta __username__@__domain__ se ha creado correctamente.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si desea utilizar su correo electrónico de murena.io en una aplicación de correo como Thunderbird, Outlook u otra, visite esta página.", - "Please set your recovery email address and use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "pluralForm": "nplurals=2; plural=(n != 1);" diff --git a/l10n/fr.js b/l10n/fr.js index 550df8fd..c6bcb321 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -75,7 +75,7 @@ OC.L10N.register( "Success!": "Succès !", "Your __username__@__domain__ account was successfully created.": "Votre compte __username__@__domain__ a été créé avec succès.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si vous souhaitez utiliser votre email murena.io dans une application de messagerie comme Thunderbird, Outlook ou autre, veuillez visiter cette page.", - "Please set your recovery email address and use your email account without restrictions.": "Merci de définir une adresse e-mail de récupération pour bénéficier d'un usage de votre compte sans restrictions.", + "Please set your recovery email address to use your email account without restrictions.": "Merci de définir une adresse e-mail de récupération pour bénéficier d'un usage de votre compte sans restrictions.", "SET RECOVERY EMAIL NOW": "DEFINIR L'ADRESSE DE RECUPERATION MAINTENANT" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index e273f9f7..2d67c07d 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -74,7 +74,7 @@ "Success!": "Succès !", "Your __username__@__domain__ account was successfully created.": "Votre compte __username__@__domain__ a été créé avec succès.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si vous souhaitez utiliser votre email murena.io dans une application de messagerie comme Thunderbird, Outlook ou autre, veuillez visiter cette page.", - "Please set your recovery email address and use your email account without restrictions.": "Merci de définir une adresse e-mail de récupération pour bénéficier d'un usage de votre compte sans restrictions.", + "Please set your recovery email address to use your email account without restrictions.": "Merci de définir une adresse e-mail de récupération pour bénéficier d'un usage de votre compte sans restrictions.", "SET RECOVERY EMAIL NOW": "DEFINIR L'ADRESSE DE RECUPERATION MAINTENANT" }, "pluralForm": "nplurals=2; plural=(n != 1);" diff --git a/l10n/it.js b/l10n/it.js index ebe9d05a..1942976f 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -75,7 +75,7 @@ OC.L10N.register( "Success!": "Successo!", "Your __username__@__domain__ account was successfully created.": "L'account __username__@__domain__ è stato creato con successo.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Se si desidera utilizzare l'e-mail di murena.io in un'applicazione di posta elettronica come Thunderbird, Outlook o altre, visitare questa pagina.", - "Please set your recovery email address and use your email account without restrictions.": "Per poter usare l'account email senza restrizioni devi impostare l'indirizzo email di recovery.", + "Please set your recovery email address to use your email account without restrictions.": "Per poter usare l'account email senza restrizioni devi impostare l'indirizzo email di recovery.", "SET RECOVERY EMAIL NOW": "IMPOSTA ADESSO LA EMAIL DI RECOVERY" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/it.json b/l10n/it.json index 535da203..58eb310c 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -69,7 +69,7 @@ "Human Verification code is not correct.": "Il codice di verifica umano non è corretto.", "Recovery Email is required.": "L'e-mail di recupero è necessaria.", "You must read and accept the Terms of Service to create your account.": "Per creare il proprio account è necessario leggere e accettare i Termini di servizio.", - "Please set your recovery email address and use your email account without restrictions.": "Per poter usare l'account email senza restrizioni devi impostare l'indirizzo email di recovery.", + "Please set your recovery email address to use your email account without restrictions.": "Per poter usare l'account email senza restrizioni devi impostare l'indirizzo email di recovery.", "SET RECOVERY EMAIL NOW": "IMPOSTA ADESSO LA EMAIL DI RECOVERY" }, "pluralForm": "nplurals=2; plural=(n != 1);" -- GitLab From ae192ed3ef0ac368e1156edeec29793c20ec9888 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 17:00:18 +0530 Subject: [PATCH 59/98] recovery email banner --- src/emailrecovery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index 9e7e6eb6..a89c814b 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -6,9 +6,9 @@ document.addEventListener('DOMContentLoaded', function() { const img = document.createElement('img') img.src = OC.generateUrl('/custom_apps/' + APPLICATION_NAME + '/img/warning.svg') newDiv.appendChild(img) - newDiv.textContent = t('ecloud-accounts', 'Please set your recovery email address now and use your email account without restrictions.') + newDiv.textContent = t(APPLICATION_NAME, 'Please set your recovery email address to use your email account without restrictions.') const link = document.createElement('a') - link.textContent = t('ecloud-accounts', 'SET RECOVERY EMAIL NOW') + link.textContent = t(APPLICATION_NAME, 'SET RECOVERY EMAIL NOW') const rootUrl = OC.getRootPath() link.href = rootUrl + '/settings/user/security' link.style.display = 'block' -- GitLab From 9cc1eb1ce5370da33db77a917a18dc899f20b503 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 18:05:15 +0530 Subject: [PATCH 60/98] recovery email banner --- src/emailrecovery.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index a89c814b..84fd6dd3 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -6,7 +6,8 @@ document.addEventListener('DOMContentLoaded', function() { const img = document.createElement('img') img.src = OC.generateUrl('/custom_apps/' + APPLICATION_NAME + '/img/warning.svg') newDiv.appendChild(img) - newDiv.textContent = t(APPLICATION_NAME, 'Please set your recovery email address to use your email account without restrictions.') + const textNode = document.createTextNode(t(APPLICATION_NAME, 'Please set your recovery email address to use your email account without restrictions.')) + newDiv.appendChild(textNode) const link = document.createElement('a') link.textContent = t(APPLICATION_NAME, 'SET RECOVERY EMAIL NOW') const rootUrl = OC.getRootPath() -- GitLab From d1680bc0bc6e87e703e20e3ddb54fc0f2391ea97 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 18:06:35 +0530 Subject: [PATCH 61/98] recovery email banner --- src/emailrecovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index 84fd6dd3..f60fb0ed 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -7,7 +7,7 @@ document.addEventListener('DOMContentLoaded', function() { img.src = OC.generateUrl('/custom_apps/' + APPLICATION_NAME + '/img/warning.svg') newDiv.appendChild(img) const textNode = document.createTextNode(t(APPLICATION_NAME, 'Please set your recovery email address to use your email account without restrictions.')) - newDiv.appendChild(textNode) + newDiv.appendChild(textNode) const link = document.createElement('a') link.textContent = t(APPLICATION_NAME, 'SET RECOVERY EMAIL NOW') const rootUrl = OC.getRootPath() -- GitLab From 803f567e5d4e55488f00789cff86cb3970bdd6dc Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 18:10:14 +0530 Subject: [PATCH 62/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index eef30bfc..57f8e804 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -10,11 +10,16 @@ align-items: center; background: #333333; color: #ffffff; + font-size:16px; + font-weight: 400; + line-height: 24px; } .recovery-email a { color: #ffffff; padding-left: 24px; text-decoration: underline; + font-size:16px; + font-weight: 600; } #content { margin-top:100px !important; -- GitLab From aef4948409a8458ed3676149221bcbfd9ca706cd Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 18:19:56 +0530 Subject: [PATCH 63/98] recovery email banner --- l10n/de.js | 4 ++-- l10n/de.json | 4 ++-- l10n/en.js | 2 +- l10n/en.json | 2 +- l10n/es.js | 4 ++-- l10n/es.json | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/l10n/de.js b/l10n/de.js index 50c810db..7a580959 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -74,7 +74,7 @@ OC.L10N.register( "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", - "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", - "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" + "Please set your recovery email address to use your email account without restrictions.": "Bitte geben Sie Ihre Wiederherstellungs-E-Mail-Adresse an, damit Sie Ihr E-Mail ohne Beschränkungen nutzen können.", + "SET RECOVERY EMAIL NOW": "MEINE WIEDERHERSTELLUNGS-E-MAIL-ADRESSE ANGEBEN" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index d431dfa0..a6a559f2 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -72,8 +72,8 @@ "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", - "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", - "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" + "Please set your recovery email address to use your email account without restrictions.": "Bitte geben Sie Ihre Wiederherstellungs-E-Mail-Adresse an, damit Sie Ihr E-Mail ohne Beschränkungen nutzen können.", + "SET RECOVERY EMAIL NOW": "MEINE WIEDERHERSTELLUNGS-E-MAIL-ADRESSE ANGEBEN" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/en.js b/l10n/en.js index c9dea466..c1719973 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -78,7 +78,7 @@ OC.L10N.register( "Your __username__@__domain__ account was successfully created.": "Your __username__@__domain__ account was successfully created.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", "Recovery email address is already taken.": "Recovery email address is already taken.", - "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address to use your email account without restrictions.", "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/en.json b/l10n/en.json index b610b501..f7ba59dc 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -74,7 +74,7 @@ "Success!": "Success!", "Your __username__@__domain__ account was successfully created.": "Your __username__@__domain__ account was successfully created.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", - "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", + "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address to use your email account without restrictions.", "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" }, "pluralForm": "nplurals=2; plural=(n != 1);" diff --git a/l10n/es.js b/l10n/es.js index 71fae8c1..2464f622 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -76,7 +76,7 @@ OC.L10N.register( "Success!": "¡Éxito!", "Your __username__@__domain__ account was successfully created.": "Su cuenta __username__@__domain__ se ha creado correctamente.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si desea utilizar su correo electrónico de murena.io en una aplicación de correo como Thunderbird, Outlook u otra, visite esta página.", - "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", - "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" + "Please set your recovery email address to use your email account without restrictions.": "Configura tu dirección de correo electrónico de recuperación para utilizar tu cuenta de correo electrónico sin restricciones.", + "SET RECOVERY EMAIL NOW": "CONFIGURAR CORREO ELECTRÓNICO DE RECUPERACIÓN" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 4ae1a8b4..a426208c 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -75,8 +75,8 @@ "Success!": "¡Éxito!", "Your __username__@__domain__ account was successfully created.": "Su cuenta __username__@__domain__ se ha creado correctamente.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si desea utilizar su correo electrónico de murena.io en una aplicación de correo como Thunderbird, Outlook u otra, visite esta página.", - "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address and use your email account without restrictions.", - "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW" + "Please set your recovery email address to use your email account without restrictions.": "Configura tu dirección de correo electrónico de recuperación para utilizar tu cuenta de correo electrónico sin restricciones.", + "SET RECOVERY EMAIL NOW": "CONFIGURAR CORREO ELECTRÓNICO DE RECUPERACIÓN" }, "pluralForm": "nplurals=2; plural=(n != 1);" } -- GitLab From c5b218b89743b69b36924efc6ea32715daf571f3 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 18:37:59 +0530 Subject: [PATCH 64/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index 57f8e804..adba0ad6 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -4,7 +4,7 @@ top: 50px; width: 100%; z-index: 100; - height: 50px; + min-height: 50px; box-sizing: border-box; justify-content: center; align-items: center; -- GitLab From e60f37729c62e9fa33db62e1014662ec4938cc11 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 18:44:20 +0530 Subject: [PATCH 65/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index adba0ad6..7d1e37d7 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -24,4 +24,16 @@ #content { margin-top:100px !important; height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; -} \ No newline at end of file +} +@media only screen and (max-width: 480px) { + #content { + margin-top:100px !important; + height: calc(100% - env(safe-area-inset-bottom) - 150px - var(--body-container-margin)) !important; + } +} +@media only screen and (min-width: 481px) and (max-width: 768px) { + #content { + margin-top:100px !important; + height: calc(100% - env(safe-area-inset-bottom) - 125px - var(--body-container-margin)) !important; + } +} \ No newline at end of file -- GitLab From f347d74e341e4dba77bd5bb357105061ad6819f6 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 18:48:22 +0530 Subject: [PATCH 66/98] recovery email banner --- css/ecloud-accounts-emailrecovery.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index 7d1e37d7..6cb1504d 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -27,13 +27,13 @@ } @media only screen and (max-width: 480px) { #content { - margin-top:100px !important; + margin-top:150px !important; height: calc(100% - env(safe-area-inset-bottom) - 150px - var(--body-container-margin)) !important; } } @media only screen and (min-width: 481px) and (max-width: 768px) { #content { - margin-top:100px !important; + margin-top:125px !important; height: calc(100% - env(safe-area-inset-bottom) - 125px - var(--body-container-margin)) !important; } } \ No newline at end of file -- GitLab From 829af2eef4456c409f7ce83700fdfb0e285bb6f3 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 18:53:12 +0530 Subject: [PATCH 67/98] recovery email banner --- lib/Listeners/BeforeTemplateRenderedListener.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 8258b3c2..2296a4a8 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -51,10 +51,10 @@ class BeforeTemplateRenderedListener implements IEventListener { $userID = $user->getUID(); $pathInfo = $this->request->getPathInfo(); $recoveryEmail = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email', ''); - //if($recoveryEmail === '') { - $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); - $this->util->addScript($this->appName, $this->appName . '-emailrecovery'); - //} + if($recoveryEmail === '') { + $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); + $this->util->addScript($this->appName, $this->appName . '-emailrecovery'); + } } -- GitLab From dd0582a00fded77bcab5332a1a386d277578e0cd Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 12 Dec 2023 19:32:19 +0530 Subject: [PATCH 68/98] recovery email banner --- src/emailrecovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index f60fb0ed..c0e07a6d 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -11,7 +11,7 @@ document.addEventListener('DOMContentLoaded', function() { const link = document.createElement('a') link.textContent = t(APPLICATION_NAME, 'SET RECOVERY EMAIL NOW') const rootUrl = OC.getRootPath() - link.href = rootUrl + '/settings/user/security' + link.href = rootUrl + '/settings/user/security#recovery-email-div' link.style.display = 'block' newDiv.appendChild(link) const parentElement = targetElement.parentNode -- GitLab From 727fcff5d171c6c701c2d4b58ea537936972ecf3 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 14 Dec 2023 12:56:34 -0800 Subject: [PATCH 69/98] stylelint fi --- css/ecloud-accounts-emailrecovery.css | 66 ++++++++++++++------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index 6cb1504d..aa88d429 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -1,39 +1,43 @@ .recovery-email { - display: inline-flex; - position: absolute; - top: 50px; - width: 100%; - z-index: 100; - min-height: 50px; - box-sizing: border-box; - justify-content: center; - align-items: center; - background: #333333; - color: #ffffff; - font-size:16px; - font-weight: 400; - line-height: 24px; + display: inline-flex; + position: absolute; + top: 50px; + width: 100%; + z-index: 100; + min-height: 50px; + box-sizing: border-box; + justify-content: center; + align-items: center; + background: #333333; + color: #ffffff; + font-size: 16px; + font-weight: 400; + line-height: 24px; } + .recovery-email a { - color: #ffffff; - padding-left: 24px; - text-decoration: underline; - font-size:16px; - font-weight: 600; + color: #ffffff; + padding-left: 24px; + text-decoration: underline; + font-size: 16px; + font-weight: 600; } + #content { - margin-top:100px !important; - height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; + margin-top: 100px !important; + height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; } + @media only screen and (max-width: 480px) { - #content { - margin-top:150px !important; - height: calc(100% - env(safe-area-inset-bottom) - 150px - var(--body-container-margin)) !important; - } -} + #content { + margin-top: 150px !important; + height: calc(100% - env(safe-area-inset-bottom) - 150px - var(--body-container-margin)) !important; + } +} + @media only screen and (min-width: 481px) and (max-width: 768px) { - #content { - margin-top:125px !important; - height: calc(100% - env(safe-area-inset-bottom) - 125px - var(--body-container-margin)) !important; - } -} \ No newline at end of file + #content { + margin-top: 125px !important; + height: calc(100% - env(safe-area-inset-bottom) - 125px - var(--body-container-margin)) !important; + } +} \ No newline at end of file -- GitLab From a826cbac2d75f7a0e97fa02327650b8d7a48efd9 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Fri, 15 Dec 2023 17:59:08 +0530 Subject: [PATCH 70/98] code refactor --- .../BeforeTemplateRenderedListener.php | 1 - src/emailrecovery.js | 58 +++++++++++++------ 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 2296a4a8..58777698 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -49,7 +49,6 @@ class BeforeTemplateRenderedListener implements IEventListener { $user = $this->userSession->getUser(); if ($user instanceof IUser) { $userID = $user->getUID(); - $pathInfo = $this->request->getPathInfo(); $recoveryEmail = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email', ''); if($recoveryEmail === '') { $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); diff --git a/src/emailrecovery.js b/src/emailrecovery.js index c0e07a6d..78c73334 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -1,19 +1,43 @@ document.addEventListener('DOMContentLoaded', function() { - const APPLICATION_NAME = 'ecloud-accounts' - const targetElement = document.getElementById('header') - const newDiv = document.createElement('div') - newDiv.className = 'recovery-email' - const img = document.createElement('img') - img.src = OC.generateUrl('/custom_apps/' + APPLICATION_NAME + '/img/warning.svg') - newDiv.appendChild(img) - const textNode = document.createTextNode(t(APPLICATION_NAME, 'Please set your recovery email address to use your email account without restrictions.')) - newDiv.appendChild(textNode) - const link = document.createElement('a') - link.textContent = t(APPLICATION_NAME, 'SET RECOVERY EMAIL NOW') - const rootUrl = OC.getRootPath() - link.href = rootUrl + '/settings/user/security#recovery-email-div' - link.style.display = 'block' - newDiv.appendChild(link) - const parentElement = targetElement.parentNode - parentElement.insertBefore(newDiv, targetElement.nextSibling) + const APPLICATION_NAME = 'ecloud-accounts' + const newDiv = createNewDiv('recovery-email') + const img = createImageElement(APPLICATION_NAME) + const textNode = createTextNode(APPLICATION_NAME) + const link = createLinkElement(APPLICATION_NAME) + + newDiv.appendChild(img) + newDiv.appendChild(textNode) + newDiv.appendChild(link) + + insertIntoDOM(newDiv) }) + +function createNewDiv(className) { + const div = document.createElement('div') + div.className = className + return div +} + +function createImageElement(appName) { + const img = document.createElement('img') + img.src = OC.generateUrl('/custom_apps/' + appName + '/img/warning.svg') + return img +} + +function createTextNode(appName) { + return document.createTextNode(t(appName, 'Please set your recovery email address to use your email account without restrictions.')) +} + +function createLinkElement(appName) { + const link = document.createElement('a') + link.textContent = t(appName, 'SET RECOVERY EMAIL NOW') + link.href = OC.getRootPath() + '/settings/user/security#recovery-email-div' + link.style.display = 'block' + return link +} + +function insertIntoDOM(element) { + const targetElement = document.getElementById('header') + const parentElement = targetElement.parentNode + parentElement.insertBefore(element, targetElement.nextSibling) +} -- GitLab From 83de9c7f694cc10a0d96773478bb6fefb35d8bd6 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Fri, 15 Dec 2023 18:02:07 +0530 Subject: [PATCH 71/98] refactor --- src/emailrecovery.js | 68 ++++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index 78c73334..445fa051 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -1,43 +1,63 @@ document.addEventListener('DOMContentLoaded', function() { - const APPLICATION_NAME = 'ecloud-accounts' - const newDiv = createNewDiv('recovery-email') - const img = createImageElement(APPLICATION_NAME) - const textNode = createTextNode(APPLICATION_NAME) - const link = createLinkElement(APPLICATION_NAME) + const APPLICATION_NAME = 'ecloud-accounts' + const newDiv = createNewDiv('recovery-email') + const img = createImageElement(APPLICATION_NAME) + const textNode = createTextNode(APPLICATION_NAME) + const link = createLinkElement(APPLICATION_NAME) - newDiv.appendChild(img) - newDiv.appendChild(textNode) - newDiv.appendChild(link) + newDiv.appendChild(img) + newDiv.appendChild(textNode) + newDiv.appendChild(link) - insertIntoDOM(newDiv) + insertIntoDOM(newDiv) }) +/** + * + * @param className + */ function createNewDiv(className) { - const div = document.createElement('div') - div.className = className - return div + const div = document.createElement('div') + div.className = className + return div } +/** + * + * @param appName + */ function createImageElement(appName) { - const img = document.createElement('img') - img.src = OC.generateUrl('/custom_apps/' + appName + '/img/warning.svg') - return img + const img = document.createElement('img') + img.src = OC.generateUrl('/custom_apps/' + appName + '/img/warning.svg') + return img } +/** + * + * @param appName + */ function createTextNode(appName) { - return document.createTextNode(t(appName, 'Please set your recovery email address to use your email account without restrictions.')) + return document.createTextNode(t(appName, 'Please set your recovery email address to use your email account without restrictions.')) } +/** + * + * @param appName + */ function createLinkElement(appName) { - const link = document.createElement('a') - link.textContent = t(appName, 'SET RECOVERY EMAIL NOW') - link.href = OC.getRootPath() + '/settings/user/security#recovery-email-div' - link.style.display = 'block' - return link + const link = document.createElement('a') + link.textContent = t(appName, 'SET RECOVERY EMAIL NOW') + link.href = OC.getRootPath() + '/settings/user/security#recovery-email-div' + link.style.display = 'block' + return link } +/** + * + * @param element + */ function insertIntoDOM(element) { - const targetElement = document.getElementById('header') - const parentElement = targetElement.parentNode - parentElement.insertBefore(element, targetElement.nextSibling) + const targetElement = document.getElementById('header') + const parentElement = targetElement.parentNode + parentElement.insertBefore(element, targetElement.nextSibling) } -- GitLab From b7cc6a401b24018e26349567ad9a7c75e1af0b0c Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Fri, 15 Dec 2023 18:56:39 +0530 Subject: [PATCH 72/98] conflict resolved --- l10n/de.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n/de.json b/l10n/de.json index 75c642a0..01c29cc7 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -71,7 +71,7 @@ "I have read and accept the Terms of Service.": "Ich habe die Nutzungsbedingungen gelesen und akzeptiere diese.", "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", - "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", + "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", "Please set your recovery email address to use your email account without restrictions.": "Bitte geben Sie Ihre Wiederherstellungs-E-Mail-Adresse an, damit Sie Ihr E-Mail ohne Beschränkungen nutzen können.", "SET RECOVERY EMAIL NOW": "MEINE WIEDERHERSTELLUNGS-E-MAIL-ADRESSE ANGEBEN", "Incorrect password length: Required length is 8 to 32": "Falsche Passwortlänge: Erforderliche Länge ist 8 bis 32" -- GitLab From 57617724314eb03ff414b23d462f845dc8fab269 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Fri, 15 Dec 2023 19:00:58 +0530 Subject: [PATCH 73/98] conflict resolved --- l10n/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n/en.json b/l10n/en.json index 7c4118b5..0978cc04 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -73,7 +73,7 @@ "I have read and accept the Terms of Service.": "I have read and accept the Terms of Service.", "Success!": "Success!", "Your __username__@__domain__ account was successfully created.": "Your __username__@__domain__ account was successfully created.", - "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", + "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", "Please set your recovery email address to use your email account without restrictions.": "Please set your recovery email address to use your email account without restrictions.", "SET RECOVERY EMAIL NOW": "SET RECOVERY EMAIL NOW", "Incorrect password length: Required length is 8 to 32": "Incorrect password length: Required length is 8 to 32" -- GitLab From 01bece7b8dfb791c9d605ba329f1d0c8481498b7 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 14:29:12 +0530 Subject: [PATCH 74/98] above header --- css/ecloud-accounts-emailrecovery.css | 4 ++++ src/emailrecovery.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index aa88d429..7cb3011f 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -23,6 +23,10 @@ font-weight: 600; } +#body-user #header{ + top:50px; +} + #content { margin-top: 100px !important; height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; diff --git a/src/emailrecovery.js b/src/emailrecovery.js index 445fa051..b9169fc7 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -59,5 +59,5 @@ function createLinkElement(appName) { function insertIntoDOM(element) { const targetElement = document.getElementById('header') const parentElement = targetElement.parentNode - parentElement.insertBefore(element, targetElement.nextSibling) + parentElement.insertBefore(element, targetElement) } -- GitLab From 3d0e54d324f6e4260fa32b86cf29ba0f43b121f2 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 14:31:42 +0530 Subject: [PATCH 75/98] lint fix --- css/ecloud-accounts-emailrecovery.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index 7cb3011f..a9e79bae 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -24,7 +24,7 @@ } #body-user #header{ - top:50px; + top:50px; } #content { -- GitLab From bc2cddbb3ea012cbef84ffb160eea719b1fa7528 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 14:34:33 +0530 Subject: [PATCH 76/98] lint fix --- css/ecloud-accounts-emailrecovery.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index a9e79bae..c5906c5f 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -1,9 +1,9 @@ .recovery-email { display: inline-flex; position: absolute; - top: 50px; + top: 0px; width: 100%; - z-index: 100; + z-index: 9999; min-height: 50px; box-sizing: border-box; justify-content: center; -- GitLab From cf1fd3e2bffe2f75dd787f37ae647173a06890ed Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 19:34:00 +0530 Subject: [PATCH 77/98] header fix for other apps --- css/ecloud-accounts-emailrecovery.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index c5906c5f..fceac143 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -23,8 +23,8 @@ font-weight: 600; } -#body-user #header{ - top:50px; +#body-user #header, #body-settings #header, #body-public #header{ + top:50px !important; } #content { -- GitLab From 9c7b1045ba3c706e83d35ef9a480fd7af6c6eabb Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 19:36:30 +0530 Subject: [PATCH 78/98] header fix for other apps --- css/ecloud-accounts-emailrecovery.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index fceac143..891ce037 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -24,7 +24,7 @@ } #body-user #header, #body-settings #header, #body-public #header{ - top:50px !important; + top:50px !important ; } #content { -- GitLab From 34003ccb0269aa79bcb3a7a87dc63d76541b44f3 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 19:37:21 +0530 Subject: [PATCH 79/98] header fix for other apps --- css/ecloud-accounts-emailrecovery.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css index 891ce037..fceac143 100644 --- a/css/ecloud-accounts-emailrecovery.css +++ b/css/ecloud-accounts-emailrecovery.css @@ -24,7 +24,7 @@ } #body-user #header, #body-settings #header, #body-public #header{ - top:50px !important ; + top:50px !important; } #content { -- GitLab From d84b2e21f90913e821df6e5376213de4ce7cc2fe Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 20:38:25 +0530 Subject: [PATCH 80/98] scss added --- css/ecloud-accounts-emailrecovery.css | 47 ---------------- css/ecloud-accounts-userregistration.css | 46 --------------- package.json | 5 +- scss/ecloud-accounts-emailrecovery.scss | 45 +++++++++++++++ scss/ecloud-accounts-userregistration.scss | 65 ++++++++++++++++++++++ 5 files changed, 113 insertions(+), 95 deletions(-) delete mode 100644 css/ecloud-accounts-emailrecovery.css delete mode 100644 css/ecloud-accounts-userregistration.css create mode 100644 scss/ecloud-accounts-emailrecovery.scss create mode 100644 scss/ecloud-accounts-userregistration.scss diff --git a/css/ecloud-accounts-emailrecovery.css b/css/ecloud-accounts-emailrecovery.css deleted file mode 100644 index fceac143..00000000 --- a/css/ecloud-accounts-emailrecovery.css +++ /dev/null @@ -1,47 +0,0 @@ -.recovery-email { - display: inline-flex; - position: absolute; - top: 0px; - width: 100%; - z-index: 9999; - min-height: 50px; - box-sizing: border-box; - justify-content: center; - align-items: center; - background: #333333; - color: #ffffff; - font-size: 16px; - font-weight: 400; - line-height: 24px; -} - -.recovery-email a { - color: #ffffff; - padding-left: 24px; - text-decoration: underline; - font-size: 16px; - font-weight: 600; -} - -#body-user #header, #body-settings #header, #body-public #header{ - top:50px !important; -} - -#content { - margin-top: 100px !important; - height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; -} - -@media only screen and (max-width: 480px) { - #content { - margin-top: 150px !important; - height: calc(100% - env(safe-area-inset-bottom) - 150px - var(--body-container-margin)) !important; - } -} - -@media only screen and (min-width: 481px) and (max-width: 768px) { - #content { - margin-top: 125px !important; - height: calc(100% - env(safe-area-inset-bottom) - 125px - var(--body-container-margin)) !important; - } -} \ No newline at end of file diff --git a/css/ecloud-accounts-userregistration.css b/css/ecloud-accounts-userregistration.css deleted file mode 100644 index 895b680c..00000000 --- a/css/ecloud-accounts-userregistration.css +++ /dev/null @@ -1,46 +0,0 @@ -html { - background: var(--color-main-background); -} - -#body-login .warning-messsage { - width: 100% !important; -} - -#body-login .v-align { - align-items: flex-start !important; - justify-content: flex-start !important; -} - -.v-align header { - width: 100% !important; - display: flex !important; - align-items: flex-start !important; - justify-content: flex-start !important; -} - -#header { - padding-left: 5% !important; -} - -.v-align main { - width: 50% !important; - margin: 0 auto; -} - -.password-group #password { - height: 58px !important; -} - -@media only screen and (max-width: 768px) { - .v-align main { - width: 100% !important; - } - - #body-login .v-align { - padding: 5vh 0vh !important; - } -} - -#fields-password .Password__strength-meter { - margin-bottom: 0; -} \ No newline at end of file diff --git a/package.json b/package.json index 74dc503c..38b72007 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,9 @@ }, "private": true, "scripts": { - "build": "NODE_ENV=production webpack --progress", - "dev": "NODE_ENV=development webpack --progress", + "build-scss": "sass scss:css --style compressed --no-source-map", + "build": "npm run build-scss && NODE_ENV=production webpack --progress", + "dev": "npm run build-scss && NODE_ENV=development webpack --progress", "watch": "NODE_ENV=development webpack --progress --watch", "lint": "eslint --ext .js,.vue src", "lint:fix": "eslint --ext .js,.vue src --fix", diff --git a/scss/ecloud-accounts-emailrecovery.scss b/scss/ecloud-accounts-emailrecovery.scss new file mode 100644 index 00000000..487ee78e --- /dev/null +++ b/scss/ecloud-accounts-emailrecovery.scss @@ -0,0 +1,45 @@ +.recovery-email { + display: inline-flex; + position: absolute; + top: 0px; + width: 100%; + z-index: 9999; + min-height: 50px; + box-sizing: border-box; + justify-content: center; + align-items: center; + background: #333333; + color: #ffffff; + font-size: 16px; + font-weight: 400; + line-height: 24px; + + a { + color: #ffffff; + padding-left: 24px; + text-decoration: underline; + font-size: 16px; + font-weight: 600; + } +} + +#body-user #header, +#body-settings #header, +#body-public #header { + top: 50px !important; +} + +#content { + margin-top: 100px !important; + height: calc(100% - env(safe-area-inset-bottom) - 100px - var(--body-container-margin)) !important; + + @media only screen and (max-width: 480px) { + margin-top: 150px !important; + height: calc(100% - env(safe-area-inset-bottom) - 150px - var(--body-container-margin)) !important; + } + + @media only screen and (min-width: 481px) and (max-width: 768px) { + margin-top: 125px !important; + height: calc(100% - env(safe-area-inset-bottom) - 125px - var(--body-container-margin)) !important; + } +} diff --git a/scss/ecloud-accounts-userregistration.scss b/scss/ecloud-accounts-userregistration.scss new file mode 100644 index 00000000..187e81e5 --- /dev/null +++ b/scss/ecloud-accounts-userregistration.scss @@ -0,0 +1,65 @@ +html { + background: var(--color-main-background); +} + +#body-login { + .warning-messsage { + width: 100% !important; + } + + .v-align { + align-items: flex-start !important; + justify-content: flex-start !important; + + header { + width: 100% !important; + display: flex !important; + align-items: flex-start !important; + justify-content: flex-start !important; + } + + main { + width: 50% !important; + margin: 0 auto; + } + + @media only screen and (max-width: 768px) { + padding: 5vh 0vh !important; + + main { + width: 100% !important; + } + } + } +} + +#header { + padding-left: 5% !important; +} + +.v-align { + main { + width: 50% !important; + margin: 0 auto; + } +} + +.password-group { + #password { + height: 58px !important; + } +} + +@media only screen and (max-width: 768px) { + .v-align { + main { + width: 100% !important; + } + } +} + +#fields-password { + .Password__strength-meter { + margin-bottom: 0; + } +} -- GitLab From d1d20962b358525b3229776da2045fa1e407b23a Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 20:50:36 +0530 Subject: [PATCH 81/98] checked session --- .../BeforeTemplateRenderedListener.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 87ec709f..6130f44a 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -45,19 +45,18 @@ class BeforeTemplateRenderedListener implements IEventListener { if ($this->userSession->isLoggedIn() && $this->appManager->isEnabledForUser(self::SNAPPYMAIL_APP_ID) && strpos($this->request->getPathInfo(), self::SNAPPYMAIL_URL) !== false) { $this->autoLoginWebmail(); } - - $user = $this->userSession->getUser(); - if ($user instanceof IUser) { - $userID = $user->getUID(); - $recoveryEmail = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email', ''); - if($recoveryEmail === '') { - $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); - $this->util->addScript($this->appName, $this->appName . '-emailrecovery'); + if ($this->userSession->isLoggedIn()) { + $user = $this->userSession->getUser(); + if ($user instanceof IUser) { + $userID = $user->getUID(); + $recoveryEmail = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email', ''); + if($recoveryEmail === '') { + $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); + $this->util->addScript($this->appName, $this->appName . '-emailrecovery'); + } } } - - $pathInfo = $this->request->getPathInfo(); if (strpos($pathInfo, '/apps/ecloud-accounts/accounts') !== false) { -- GitLab From 99750a7c6d37ae64a46f3a7fc1f68502eff96d0e Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 20:56:53 +0530 Subject: [PATCH 82/98] generateurl fix --- src/emailrecovery.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index b9169fc7..83362bc7 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -1,5 +1,6 @@ +import { generateUrl } from '@nextcloud/router' +const APPLICATION_NAME = 'ecloud-accounts' document.addEventListener('DOMContentLoaded', function() { - const APPLICATION_NAME = 'ecloud-accounts' const newDiv = createNewDiv('recovery-email') const img = createImageElement(APPLICATION_NAME) const textNode = createTextNode(APPLICATION_NAME) @@ -28,7 +29,7 @@ function createNewDiv(className) { */ function createImageElement(appName) { const img = document.createElement('img') - img.src = OC.generateUrl('/custom_apps/' + appName + '/img/warning.svg') + img.src = generateUrl('/custom_apps/' + appName + '/img/warning.svg') return img } -- GitLab From a55c33952098e3b52cbaf63f593712a1758196ca Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 21:39:19 +0530 Subject: [PATCH 83/98] naming fix --- lib/Listeners/BeforeTemplateRenderedListener.php | 6 +++--- ...ailrecovery.scss => ecloud-accounts-email-recovery.scss} | 0 ...stration.scss => ecloud-accounts-user-registration.scss} | 0 webpack.config.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename scss/{ecloud-accounts-emailrecovery.scss => ecloud-accounts-email-recovery.scss} (100%) rename scss/{ecloud-accounts-userregistration.scss => ecloud-accounts-user-registration.scss} (100%) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 6130f44a..4e6ee301 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -51,8 +51,8 @@ class BeforeTemplateRenderedListener implements IEventListener { $userID = $user->getUID(); $recoveryEmail = $this->config->getUserValue($userID, 'email-recovery', 'recovery-email', ''); if($recoveryEmail === '') { - $this->util->addStyle($this->appName, $this->appName . '-emailrecovery'); - $this->util->addScript($this->appName, $this->appName . '-emailrecovery'); + $this->util->addStyle($this->appName, $this->appName . '-email-recovery'); + $this->util->addScript($this->appName, $this->appName . '-email-recovery'); } } } @@ -60,7 +60,7 @@ class BeforeTemplateRenderedListener implements IEventListener { $pathInfo = $this->request->getPathInfo(); if (strpos($pathInfo, '/apps/ecloud-accounts/accounts') !== false) { - $this->util->addStyle($this->appName, $this->appName . '-userregistration'); + $this->util->addStyle($this->appName, $this->appName . '-user-registration'); } } diff --git a/scss/ecloud-accounts-emailrecovery.scss b/scss/ecloud-accounts-email-recovery.scss similarity index 100% rename from scss/ecloud-accounts-emailrecovery.scss rename to scss/ecloud-accounts-email-recovery.scss diff --git a/scss/ecloud-accounts-userregistration.scss b/scss/ecloud-accounts-user-registration.scss similarity index 100% rename from scss/ecloud-accounts-userregistration.scss rename to scss/ecloud-accounts-user-registration.scss diff --git a/webpack.config.js b/webpack.config.js index c91270a9..db727110 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,6 +10,6 @@ module.exports = { 'delete-account-listeners': path.join(__dirname, 'src/delete-account-listeners.js'), 'beta-user-setting': path.join(__dirname, 'src/beta-user-setting.js'), 'signup': path.join(__dirname, 'src/signup.js'), - 'emailrecovery': path.join(__dirname, 'src/emailrecovery.js') + 'email-recovery': path.join(__dirname, 'src/emailrecovery.js') }, } -- GitLab From e94e31fcf5f01abf97825db43689391ca4b2935c Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 18 Dec 2023 23:32:33 +0530 Subject: [PATCH 84/98] naming fix --- lib/Listeners/BeforeTemplateRenderedListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index 4e6ee301..cc662a19 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -35,7 +35,7 @@ class BeforeTemplateRenderedListener implements IEventListener { $this->session = $session; $this->config = $config; $this->appManager = $appManager; - $this->util = $util; + $this->util = $util; } public function handle(Event $event): void { -- GitLab From 3735e4a50334fa086f8e04b23cbec8a03db67b1b Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 00:08:05 +0530 Subject: [PATCH 85/98] naming fix --- lib/Listeners/BeforeTemplateRenderedListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Listeners/BeforeTemplateRenderedListener.php b/lib/Listeners/BeforeTemplateRenderedListener.php index cc662a19..4e6ee301 100644 --- a/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/lib/Listeners/BeforeTemplateRenderedListener.php @@ -35,7 +35,7 @@ class BeforeTemplateRenderedListener implements IEventListener { $this->session = $session; $this->config = $config; $this->appManager = $appManager; - $this->util = $util; + $this->util = $util; } public function handle(Event $event): void { -- GitLab From cd5edb5472535344639b1402e61785cd1a2a9e5b Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 00:43:29 +0530 Subject: [PATCH 86/98] mobile responsive fix --- scss/ecloud-accounts-email-recovery.scss | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index 487ee78e..1876e2ab 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -43,3 +43,18 @@ height: calc(100% - env(safe-area-inset-bottom) - 125px - var(--body-container-margin)) !important; } } +@media only screen and (max-width: 768px) { + .recovery-email { + display: block; + padding-left: 10px; + + a{ + text-align:center; + } + } + #body-user #header, + #body-settings #header, + #body-public #header { + top: 75px !important; + } +} -- GitLab From de45ede5c84f072f424c8d588d998eb2101dcc4d Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 00:50:43 +0530 Subject: [PATCH 87/98] mobile responsive fix --- scss/ecloud-accounts-email-recovery.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index 1876e2ab..c229c7af 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -3,7 +3,7 @@ position: absolute; top: 0px; width: 100%; - z-index: 9999; + z-index: 1000; min-height: 50px; box-sizing: border-box; justify-content: center; -- GitLab From d0ae7f1a39222772cd2f1af3d17e36e14e01c47f Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 01:08:24 +0530 Subject: [PATCH 88/98] mobile responsive fix --- scss/ecloud-accounts-email-recovery.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index c229c7af..9437e097 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -13,6 +13,9 @@ font-size: 16px; font-weight: 400; line-height: 24px; + img { + padding-right:10px; + } a { color: #ffffff; @@ -48,8 +51,9 @@ display: block; padding-left: 10px; - a{ - text-align:center; + img { + top:5px; + position: relative; } } #body-user #header, -- GitLab From b243b4574334d3fd5896e5530d69a5a0ea32d1b9 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 01:13:49 +0530 Subject: [PATCH 89/98] mobile responsive fix --- src/emailrecovery.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index 83362bc7..3eef57fa 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -38,7 +38,10 @@ function createImageElement(appName) { * @param appName */ function createTextNode(appName) { - return document.createTextNode(t(appName, 'Please set your recovery email address to use your email account without restrictions.')) + const p = document.createElement('p') + const text = document.createTextNode(t(appName, 'Please set your recovery email address to use your email account without restrictions.')) + p.appendChild(text) + return p } /** -- GitLab From d54661e630102978c9e9c2c5fcde2fab1502002c Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 10:15:40 +0530 Subject: [PATCH 90/98] figma changes --- src/emailrecovery.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/emailrecovery.js b/src/emailrecovery.js index 3eef57fa..4d34cf2b 100644 --- a/src/emailrecovery.js +++ b/src/emailrecovery.js @@ -2,14 +2,16 @@ import { generateUrl } from '@nextcloud/router' const APPLICATION_NAME = 'ecloud-accounts' document.addEventListener('DOMContentLoaded', function() { const newDiv = createNewDiv('recovery-email') + const contentDiv = document.createElement('div') + contentDiv.id = 'image-text-container' const img = createImageElement(APPLICATION_NAME) const textNode = createTextNode(APPLICATION_NAME) const link = createLinkElement(APPLICATION_NAME) - newDiv.appendChild(img) - newDiv.appendChild(textNode) + contentDiv.appendChild(img) + contentDiv.appendChild(textNode) + newDiv.appendChild(contentDiv) newDiv.appendChild(link) - insertIntoDOM(newDiv) }) -- GitLab From 5f43b7fd764282485e587acce9a58704fdd52dac Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 10:29:00 +0530 Subject: [PATCH 91/98] mobile fix --- scss/ecloud-accounts-email-recovery.scss | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index 9437e097..8d6df8ab 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -49,16 +49,21 @@ @media only screen and (max-width: 768px) { .recovery-email { display: block; - padding-left: 10px; - - img { - top:5px; - position: relative; + padding: 16px 0 16px 10px; + #image-text-container{ + display:inline-flex; + img { + top:5px; + position: relative; + } + } + a{ + padding-top: 8px; } } #body-user #header, #body-settings #header, #body-public #header { - top: 75px !important; + top: 120px !important; } } -- GitLab From ab968cabb18038dcf5f2ee0fde92a546c0bf06aa Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 10:34:45 +0530 Subject: [PATCH 92/98] mobile fix --- scss/ecloud-accounts-email-recovery.scss | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index 8d6df8ab..587d52a1 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -13,16 +13,19 @@ font-size: 16px; font-weight: 400; line-height: 24px; - img { - padding-right:10px; - } + #image-text-container{ + display:inline-flex; + img { + padding-right:10px; + } - a { - color: #ffffff; - padding-left: 24px; - text-decoration: underline; - font-size: 16px; - font-weight: 600; + a { + color: #ffffff; + padding-left: 24px; + text-decoration: underline; + font-size: 16px; + font-weight: 600; + } } } @@ -51,7 +54,6 @@ display: block; padding: 16px 0 16px 10px; #image-text-container{ - display:inline-flex; img { top:5px; position: relative; -- GitLab From d48d2bd9a8060219193b71e16a001e9b334ff6f4 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 10:42:53 +0530 Subject: [PATCH 93/98] mobile fix --- scss/ecloud-accounts-email-recovery.scss | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index 587d52a1..a82f74c5 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -18,15 +18,16 @@ img { padding-right:10px; } + } - a { - color: #ffffff; - padding-left: 24px; - text-decoration: underline; - font-size: 16px; - font-weight: 600; - } + a { + color: #ffffff; + padding-left: 24px; + text-decoration: underline; + font-size: 16px; + font-weight: 600; } + } #body-user #header, @@ -60,7 +61,7 @@ } } a{ - padding-top: 8px; + padding: 8px 0 0 30px; } } #body-user #header, -- GitLab From 6c787b8a5a1b42585104d14e38a065dc8fb62099 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 10:50:11 +0530 Subject: [PATCH 94/98] mobile fix --- scss/ecloud-accounts-email-recovery.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index a82f74c5..f64ee08e 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -56,7 +56,7 @@ padding: 16px 0 16px 10px; #image-text-container{ img { - top:5px; + top:-13px; position: relative; } } -- GitLab From c3c18054b53385c19774c25d171bc5fa0a010f4a Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 10:54:51 +0530 Subject: [PATCH 95/98] mobile fix --- scss/ecloud-accounts-email-recovery.scss | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index f64ee08e..afb4a300 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -17,6 +17,7 @@ display:inline-flex; img { padding-right:10px; + align-self: start; } } @@ -54,12 +55,6 @@ .recovery-email { display: block; padding: 16px 0 16px 10px; - #image-text-container{ - img { - top:-13px; - position: relative; - } - } a{ padding: 8px 0 0 30px; } -- GitLab From aaa8ab1ff9d27f074d08450640744e3832d97c27 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 11:02:28 +0530 Subject: [PATCH 96/98] mobile fix --- scss/ecloud-accounts-email-recovery.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index afb4a300..14ac061f 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -54,7 +54,7 @@ @media only screen and (max-width: 768px) { .recovery-email { display: block; - padding: 16px 0 16px 10px; + padding: 16px 10px; a{ padding: 8px 0 0 30px; } -- GitLab From e304708099adf65fb292ea42bc44be8e2236e3aa Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 11:20:22 +0530 Subject: [PATCH 97/98] mobile fix --- scss/ecloud-accounts-email-recovery.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index 14ac061f..410849e9 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -51,6 +51,13 @@ height: calc(100% - env(safe-area-inset-bottom) - 125px - var(--body-container-margin)) !important; } } +@media only screen and (max-width: 1024px) { + #body-user #header, + #body-settings #header, + #body-public #header { + top: 90px !important; + } +} @media only screen and (max-width: 768px) { .recovery-email { display: block; -- GitLab From 5ecd54aba0a8335b885927e408e18f24c69825e2 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 19 Dec 2023 11:52:46 +0530 Subject: [PATCH 98/98] mobile fix --- scss/ecloud-accounts-email-recovery.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/ecloud-accounts-email-recovery.scss b/scss/ecloud-accounts-email-recovery.scss index 410849e9..162bce02 100644 --- a/scss/ecloud-accounts-email-recovery.scss +++ b/scss/ecloud-accounts-email-recovery.scss @@ -61,7 +61,7 @@ @media only screen and (max-width: 768px) { .recovery-email { display: block; - padding: 16px 10px; + padding: 16px 7%; a{ padding: 8px 0 0 30px; } -- GitLab