From f192acde3c3bb48c19a1d38c189b6bc455eb767a Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 8 Aug 2023 04:58:44 -0700 Subject: [PATCH 001/427] Signup page --- appinfo/routes.php | 3 +- lib/Controller/AccountController.php | 42 ++++++++++++++++++++++++++++ lib/Service/AccountService.php | 30 ++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 lib/Controller/AccountController.php create mode 100644 lib/Service/AccountService.php diff --git a/appinfo/routes.php b/appinfo/routes.php index aedd9131..717a5eae 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -23,5 +23,6 @@ return ['routes' => [ [ 'name' => 'beta_user#submit_issue', 'url' => '/issue/submit', 'verb' => 'POST' - ] + ], + ['name' => 'account#index', 'url' => '/account/signup', 'verb' => 'GET'], ]]; diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php new file mode 100644 index 00000000..f36f1de3 --- /dev/null +++ b/lib/Controller/AccountController.php @@ -0,0 +1,42 @@ +appName = $AppName; + } + + /** + * @PublicPage + * @NoCSRFRequired + * + */ + public function index() { + echo 'index page'; die; + return true; + } + /** + * @PublicPage + * @NoCSRFRequired + * + */ + public function signup() { + echo 'signup page'; die; + return true; + } +} diff --git a/lib/Service/AccountService.php b/lib/Service/AccountService.php new file mode 100644 index 00000000..e084139e --- /dev/null +++ b/lib/Service/AccountService.php @@ -0,0 +1,30 @@ +config = $config; + $this->groupManager = $groupManager; + $this->userSession = $userSession; + $this->appManager = $appManager; + } + +} -- GitLab From 8f0e73f54977479fa988ebd6a8fe4da69b074498 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 8 Aug 2023 11:34:05 -0700 Subject: [PATCH 002/427] signup page added --- lib/Controller/AccountController.php | 23 +- scss/signup.scss | 487 +++++++++++++++++++++++++++ src/Signup.vue | 260 ++++++++++++++ src/signup.js | 8 + templates/signup.php | 4 + webpack.config.js | 1 + 6 files changed, 772 insertions(+), 11 deletions(-) create mode 100644 scss/signup.scss create mode 100644 src/Signup.vue create mode 100644 src/signup.js create mode 100644 templates/signup.php diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index f36f1de3..51cfa09d 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -8,6 +8,10 @@ namespace OCA\EcloudAccounts\Controller; use OCP\AppFramework\Controller; use OCP\IRequest; +use OCP\AppFramework\Http\TemplateResponse; +use OC_App; +use OCA\EcloudAccounts\AppInfo\Application; + class AccountController extends Controller { protected $appName; @@ -22,21 +26,18 @@ class AccountController extends Controller { } /** + * @NoAdminRequired * @PublicPage * @NoCSRFRequired * */ public function index() { - echo 'index page'; die; - return true; - } - /** - * @PublicPage - * @NoCSRFRequired - * - */ - public function signup() { - echo 'signup page'; die; - return true; + return new TemplateResponse( + Application::APP_ID, + 'signup', + ['appName' => Application::APP_ID], + TemplateResponse::RENDER_AS_GUEST + ); } + } diff --git a/scss/signup.scss b/scss/signup.scss new file mode 100644 index 00000000..bbf20c14 --- /dev/null +++ b/scss/signup.scss @@ -0,0 +1,487 @@ +/** mobile font sizes **/ +@media screen and (max-width: 650px) { + #footer { + font-size: 0.8em; + } + + #fields .field .control input { + padding-left: 2%; + padding-right: 2%; + } + + #main { + margin-top: 8%; + } +} + +@media screen and (max-width: 768px) { + button { + font-size: 1.0em; + } + + #successMessages { + margin-left: 5%; + margin-right: 5%; + } + + #success h1 { + font-size: 1.5em; + } + + .lang-dropdown-div { + padding-right: 4%; + } + + #inviteHeader, + #registerHeading { + font-size: 1.5em; + } + + #fields { + font-size: 0; + background-color: white; + } + + #fields .field { + font-size: 1.0em; + } + + #fields .field .control input { + font-size: 1.0em; + line-height: 1.0em; + } + + #fields p { + font-size: 1.0em; + } + + input { + font-size: 1.0em; + line-height: 1.0em; + } + + #footer { + display: flex; + flex-direction: column; + position: unset !important; + } + + #main { + max-width: 100%; + padding: 10%; + } +} + +#body-login, +#body-login a, +#body-login p { + background-color: #ffffff; + color: #808080; + font-family: "Montserrat"; +} + +.isa_info, +.isa_success, +.isa_warning, +.isa_error { + margin: 10px 0px; + padding: 12px; + font-family: "Montserrat"; +} + +.isa_info { + color: #00529b; + background-color: #bde5f8; +} + +.isa_success { + color: rgba(0, 0, 0, 0.6); + background-color: white; +} + +.isa_warning { + color: #9f6000; + background-color: #feefb3; +} + +.isa_error { + color: white; + background-color: #FF363F; + font-size: 14px; +} + +.e_logo_div { + text-align: center; + position: absolute; + left: 5%; + top: 5%; + max-width: 40%; +} + +.hint { + margin: 0.2em auto 0.3em; +} + +.isa_info i, +.isa_success i, +.isa_warning i, +.isa_error i { + margin: 10px 22px; + font-size: 1.5em; + vertical-align: middle; +} + +section { + width: 100%; + max-width: 40%; + margin-left: auto; + margin-right: auto; +} + +.button:disabled { + background-color: grey; + /* Grey */ +} + +/* input:hover, + input:focus { + outline: 0; + transition: all 0.5s linear; + box-shadow: inset 0px 0px 10px #ccc; + } */ +input[type="checkbox"] { + box-shadow: none; + width: 1.5rem; + margin-right: 0.5rem; +} + +#password-strength-meter { + height: 15px; +} + +meter { + /* Reset the default appearance */ + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + + margin: 0 auto 0.1em; + width: 100%; + height: 0.5em; + + /* Applicable only to Firefox */ + background: none; + background-color: rgba(54, 47, 47, 0.1); +} + +meter::-webkit-meter-bar { + background: none; + background-color: rgba(54, 47, 47, 0.1); +} + +meter[value="1"]::-webkit-meter-optimum-value { + background: #f6bb97; +} + +meter[value="2"]::-webkit-meter-optimum-value { + background: #ffddca; +} + +meter[value="3"]::-webkit-meter-optimum-value { + background: #ffddca; +} + +meter[value="4"]::-webkit-meter-optimum-value { + background: #a0e6bb; +} + +meter[value="1"]::-moz-meter-bar { + background: #f6bb97; +} + +meter[value="2"]::-moz-meter-bar { + background: #ffddca; +} + +meter[value="3"]::-moz-meter-bar { + background: #ffddca; +} + +meter[value="4"]::-moz-meter-bar { + background: #a0e6bb; +} + +.feedback { + color: #fff; + font-size: 90%; + padding: 0 0.25em; + font-family: Arial, cursive; + margin-top: 1em; +} + +#footer { + background-color: #ffffff; + font-size: 14px; + width: 100%; + height: 100px; +} + +#langButton { + border: none; + padding: 0; + background-color: #ffffff; +} + +#icon-down { + color: blue; + padding-top: 10%; +} + +.button-primary { + background-color: #007fff; + color: white; + width: 100%; + padding: 22px 0; + margin-top: 1em; + margin-bottom: 1em; +} + +.button-primary:hover { + color: white; +} + +.button-primary:disabled { + background-color: #007fff; + color: white; + border-radius: 290486px; + padding-left: calc(1em + 0.25em); + padding-right: calc(1em + 0.25em); +} + +.button-primary .button-text { + text-overflow: ellipsis; + overflow: hidden; + font-weight: 700; +} + +#buttonField { + clear: left; +} + +#buttonField .control { + width: 100%; +} + +button { + font-size: 20px; +} + +#fields { + font-size: 0; + background-color: white; +} + +#fields .field { + font-size: 1.3em; +} + +#fields p { + font-size: 15px; +} + +input { + color: rgba(0, 0, 0, 0.8); + background-color: white; + display: block; + width: 100%; + font-size: 16px; + line-height: 1.3em; + transition: all 0.5s linear; + border: 1px solid #E6E8E9; + border-radius: 8px; + padding: 10px 20px; + margin-top: 10px; + margin-bottom: 20px; +} + +#captcha_img { + font-size: 12px; + width: 100%; +} + +.lang-dropdown-div { + float: right; + margin-top: 2%; + margin-right: 2%; +} + +#lang-dropdown-menu { + right: auto; +} + +#inviteHeader, +#registerHeading { + margin-bottom: 10%; + font-size: 24px; + text-align: left !important; + font-weight: 500; +} + +.lang-dropdown-item { + text-align: center; + display: flex; + justify-content: center; + padding-right: 1rem !important; +} + +.dropdown-content { + max-width: max-content; +} + +#currentLangImg, +.lang-image { + border-radius: 50%; + margin: 0 auto; + border: 0.1em transparent black; + height: 24px; + width: 24px; + max-width: none; +} + +#submitButton:hover { + opacity: 0.9; +} + +.wrong-icon, +.correct-icon, +.notification-text { + vertical-align: middle; +} + +.correct-icon, +.wrong-icon { + padding-left: 3%; + padding-right: 5%; +} + +#main { + width: 100%; +} + +.container { + height: 100vh; + max-width: unset !important; +} + +#fields label { + color: #333333; + font-size: 16px; + font-weight: 900; +} + +#inviteRequestForm .image { + float: left; + width: auto; +} + +.captcha_img_div { + height: 50px; +} + +.pad-left-5 { + padding-top: 3%; + padding-left: 5%; +} + +.domain-username { + display: flex; +} + +#repassword { + width: 48%; + margin-left: 4%; +} + +#password { + width: 48%; +} + +#username { + width: 70%; +} + +.email-invite-page .fa-check { + display: none; +} + +#success { + margin-top: -20%; + max-width: 100%; +} + +.success__title { + font-family: 'Montserrat'; + font-style: normal; + font-weight: 700; + font-size: 24px; + line-height: 150%; + margin: 1em 0 0.5em 0; + text-align: center; +} + +.notification a:not(.button):not(.dropdown-item) { + color: #0086FF; + text-decoration: none; +} + +sup { + color: #ff0000; + font-weight: 500; + font-size: 14px; + padding-left: 3px; +} + +#tos_div label { + line-height: 1.5rem; +} + +@media screen and (max-width: 500px) { + #main { + padding: 0 1.5rem; + } + + .lang-dropdown-div { + margin-top: 10%; + } + + .e_logo_div, + .lang-dropdown-div { + position: unset; + max-width: 100%; + padding: 2%; + float: none; + margin-top: unset; + text-align: center; + } + + #inviteHeader, + #registerHeading { + font-size: 18px; + } + + footer p { + font-size: 10px; + } +} + +.welcome-header { + height: 100px; + padding-top: 5px; +} + +.welcome-container { + min-height: 100vh; + display: flex; + flex-direction: column; + justify-content: space-between; +} \ No newline at end of file diff --git a/src/Signup.vue b/src/Signup.vue new file mode 100644 index 00000000..8763159d --- /dev/null +++ b/src/Signup.vue @@ -0,0 +1,260 @@ + + + + diff --git a/src/signup.js b/src/signup.js new file mode 100644 index 00000000..591ad0f5 --- /dev/null +++ b/src/signup.js @@ -0,0 +1,8 @@ +import Vue from 'vue' +import './common.js' +import Signup from './Signup.vue' + +export default new Vue({ + el: '#ecloud-accounts-signup', + render: h => h(Signup), +}) diff --git a/templates/signup.php b/templates/signup.php new file mode 100644 index 00000000..95f0ce04 --- /dev/null +++ b/templates/signup.php @@ -0,0 +1,4 @@ + +
\ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index b2b5fbb0..c5e35203 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,5 +9,6 @@ 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'), }, } -- GitLab From b0d3100bd0c082016643f17af01b6873ab5f46b6 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 8 Aug 2023 22:50:02 -0700 Subject: [PATCH 003/427] added translations --- l10n/de.js | 10 +++++++++- l10n/de.json | 10 +++++++++- l10n/en.js | 10 +++++++++- l10n/en.json | 10 +++++++++- l10n/es.js | 10 +++++++++- l10n/es.json | 10 +++++++++- l10n/fr.js | 10 +++++++++- l10n/fr.json | 9 ++++++++- l10n/it.js | 10 +++++++++- 9 files changed, 80 insertions(+), 9 deletions(-) diff --git a/l10n/de.js b/l10n/de.js index 47243d09..58003da2 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -39,7 +39,15 @@ OC.L10N.register( "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Für dieses Konto ist ein Abonnement aktiv. Bitte kündigen Sie es oder lassen Sie es auslaufen, bevor Sie Ihr Konto löschen.", "Loading...": "Laden...", "Temporary error contacting murena.com; please try again later!": "Vorübergehender Fehler bei der Kontaktaufnahme mit murena.com; bitte versuchen Sie es später noch einmal!", - "Murena Cloud 2FA": "Murena Cloud 2FA" + "Murena Cloud 2FA": "Murena Cloud 2FA", + "Request Murena Account": "Anfrage für ein Murena Konto", + "Email": "E-Mail", + "Enter email to receive invitation": "Geben Sie Ihre E-Mail-Adresse an, um den Einladungslink zu erhalten", + "Email is required.": "E-Mail ist erforderlich.", + "Confirm email": "Bestätigungs-E-Mail", + "Verify your email address": "E-Mail-Adresse bestätigen", + "Confirm email is required.": "Bestätigung der E-Mail ist erforderlich.", + "Request Invitation": "Einladung anfordern" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index d70e6d9c..927d0bb3 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -38,7 +38,15 @@ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Für dieses Konto ist ein Abonnement aktiv. Bitte kündigen Sie es oder lassen Sie es auslaufen, bevor Sie Ihr Konto löschen.", "Loading...": "Laden...", "Temporary error contacting murena.com; please try again later!": "Vorübergehender Fehler bei der Kontaktaufnahme mit murena.com; bitte versuchen Sie es später noch einmal!", - "Murena Cloud 2FA": "Murena Cloud 2FA" + "Murena Cloud 2FA": "Murena Cloud 2FA", + "Request Murena Account": "Anfrage für ein Murena Konto", + "Email": "E-Mail", + "Enter email to receive invitation": "Geben Sie Ihre E-Mail-Adresse an, um den Einladungslink zu erhalten", + "Email is required.": "E-Mail ist erforderlich.", + "Confirm email": "Bestätigungs-E-Mail", + "Verify your email address": "E-Mail-Adresse bestätigen", + "Confirm email is required.": "Bestätigung der E-Mail ist erforderlich.", + "Request Invitation": "Einladung anfordern" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/en.js b/l10n/en.js index 422054cf..ce031c75 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -41,6 +41,14 @@ OC.L10N.register( "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "A subscription is active in this account. Please cancel it or let it expire before deleting your account.", "Loading...": "Loading...", "Temporary error contacting murena.com; please try again later!": "Temporary error contacting murena.com; please try again later!", - "Murena Cloud 2FA": "Murena Cloud 2FA" + "Murena Cloud 2FA": "Murena Cloud 2FA", + "Request Murena Account": "Request Murena Account", + "Email": "Email", + "Enter email to receive invitation": "Enter email to receive invitation", + "Email is required.": "Email is required.", + "Confirm email": "Confirm email", + "Verify your email address": "Verify your email address", + "Confirm email is required.": "Confirm email is required.", + "Request Invitation": "Request Invitation" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/en.json b/l10n/en.json index 83db6b42..314725c5 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -38,7 +38,15 @@ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "A subscription is active in this account. Please cancel it or let it expire before deleting your account.", "Loading...": "Loading...", "Temporary error contacting murena.com; please try again later!": "Temporary error contacting murena.com; please try again later!", - "Murena Cloud 2FA": "Murena Cloud 2FA" + "Murena Cloud 2FA": "Murena Cloud 2FA", + "Request Murena Account": "Request Murena Account", + "Email": "Email", + "Enter email to receive invitation": "Enter email to receive invitation", + "Email is required.": "Email is required.", + "Confirm email": "Confirm email", + "Verify your email address": "Verify your email address", + "Confirm email is required.": "Confirm email is required.", + "Request Invitation": "Request Invitation" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/es.js b/l10n/es.js index 3a081dd1..3a94b811 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -40,6 +40,14 @@ OC.L10N.register( "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Hay una suscripción activa en esta cuenta. Por favor, cancélala o deja que expire antes de eliminar tu cuenta.", "Loading...": "Cargando...", "Temporary error contacting murena.com; please try again later!": "Error temporal al contactar con murena.com; ¡por favor, inténtalo más tarde!", - "Murena Cloud 2FA": "Nube Murena A2F" + "Murena Cloud 2FA": "Nube Murena A2F", + "Request Murena Account": "Solicitar una cuenta Murena", + "Email": "Email", + "Enter email to receive invitation": "Tu correo electrónico", + "Email is required.": "Correo electrónico obligatorio.", + "Confirm email": "Confirmar correo electrónico", + "Verify your email address": "Repite la dirección de correo electrónico", + "Confirm email is required.": "Confirmar correo electrónico.", + "Request Invitation": "Solicitar invitación" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index b8594865..86c96ebc 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -38,7 +38,15 @@ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Hay una suscripción activa en esta cuenta. Por favor, cancélala o deja que expire antes de eliminar tu cuenta.", "Loading...": "Cargando...", "Temporary error contacting murena.com; please try again later!": "Error temporal al contactar con murena.com; ¡por favor, inténtalo más tarde!", - "Murena Cloud 2FA": "Nube Murena A2F" + "Murena Cloud 2FA": "Nube Murena A2F", + "Request Murena Account": "Solicitar una cuenta Murena", + "Email": "Email", + "Enter email to receive invitation": "Tu correo electrónico", + "Email is required.": "Correo electrónico obligatorio.", + "Confirm email": "Confirmar correo electrónico", + "Verify your email address": "Repite la dirección de correo electrónico", + "Confirm email is required.": "Confirmar correo electrónico.", + "Request Invitation": "Solicitar invitación" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/fr.js b/l10n/fr.js index 1f668c1f..eee4851e 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -39,6 +39,14 @@ OC.L10N.register( "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Un abonnement est actif dans ce compte. Veuillez l'annuler ou le laisser expirer avant de supprimer votre compte.", "Loading...": "Chargement...", "Temporary error contacting murena.com; please try again later!": "Erreur temporaire en contactant murena.com ; veuillez réessayer plus tard !", - "Murena Cloud 2FA": "Authentification à 2 facteurs Murena Cloud" + "Murena Cloud 2FA": "Authentification à 2 facteurs Murena Cloud", + "Request Murena Account": "Création d'un compte Murena", + "Email": "Email", + "Enter email to receive invitation": "Saisissez votre adresse e-mail pour recevoir l'invitation", + "Email is required.": "L'adresse électronique est requise.", + "Confirm email": "Confirmez votre email", + "Verify your email address": "Confirmez votre adresse e-mail", + "Confirm email is required.": "Confirmer l'email est nécessaire.", + "Request Invitation": "Demander une invitation" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 48a79c47..294aeacb 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -38,7 +38,14 @@ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Un abonnement est actif dans ce compte. Veuillez l'annuler ou le laisser expirer avant de supprimer votre compte.", "Loading...": "Chargement...", "Temporary error contacting murena.com; please try again later!": "Erreur temporaire en contactant murena.com ; veuillez réessayer plus tard !", - "Murena Cloud 2FA": "Authentification à 2 facteurs Murena Cloud" + "Murena Cloud 2FA": "Authentification à 2 facteurs Murena Cloud", + "Email": "Email", + "Enter email to receive invitation": "Saisissez votre adresse e-mail pour recevoir l'invitation", + "Email is required.": "L'adresse électronique est requise.", + "Confirm email": "Confirmez votre email", + "Verify your email address": "Confirmez votre adresse e-mail", + "Confirm email is required.": "Confirmer l'email est nécessaire.", + "Request Invitation": "Demander une invitation" }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/it.js b/l10n/it.js index 7dbe4434..77d51191 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -39,6 +39,14 @@ OC.L10N.register( "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "In questo account è attivo un abbonamento. Si prega di annullarlo o di lasciarlo scadere prima di cancellare l'account.", "Loading...": "Caricamento...", "Temporary error contacting murena.com; please try again later!": "Errore temporaneo nel contattare murena.com; riprova più tardi!", - "Murena Cloud 2FA": "Codice di Autenticazione a 2 Fattori Murena Cloud" + "Murena Cloud 2FA": "Codice di Autenticazione a 2 Fattori Murena Cloud", + "Request Murena Account": "Richiedi un Account Murena", + "Email": "Email", + "Enter email to receive invitation": "Inserisci l'email cui inviare l'invito", + "Email is required.": "L'e-mail è necessaria.", + "Confirm email": "Conferma email", + "Verify your email address": "Verifica l'indirizzo email", + "Confirm email is required.": "È necessario confermare l'e-mail.", + "Request Invitation": "Richiedi invito" }, "nplurals=2; plural=(n != 1);"); -- GitLab From ef7b0058525d6eaee4191a5e807be6b016bcf708 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 8 Aug 2023 22:51:18 -0700 Subject: [PATCH 004/427] php lint --- lib/Controller/AccountController.php | 13 ++++----- lib/Service/AccountService.php | 1 - src/Signup.vue | 41 ++++++++++++++++------------ 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 51cfa09d..d2b24892 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -9,10 +9,8 @@ namespace OCA\EcloudAccounts\Controller; use OCP\AppFramework\Controller; use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; -use OC_App; use OCA\EcloudAccounts\AppInfo\Application; - class AccountController extends Controller { protected $appName; protected $request; @@ -33,11 +31,10 @@ class AccountController extends Controller { */ public function index() { return new TemplateResponse( - Application::APP_ID, - 'signup', - ['appName' => Application::APP_ID], - TemplateResponse::RENDER_AS_GUEST - ); + Application::APP_ID, + 'signup', + ['appName' => Application::APP_ID], + TemplateResponse::RENDER_AS_GUEST + ); } - } diff --git a/lib/Service/AccountService.php b/lib/Service/AccountService.php index e084139e..c15a631e 100644 --- a/lib/Service/AccountService.php +++ b/lib/Service/AccountService.php @@ -26,5 +26,4 @@ class AccountService { $this->userSession = $userSession; $this->appManager = $appManager; } - } diff --git a/src/Signup.vue b/src/Signup.vue index 8763159d..7b9fac60 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -2,7 +2,7 @@
-

+

{{ getLocalizedText('Request Murena Account') }}

@@ -10,9 +10,13 @@
- -

+ +

{{ getLocalizedText('Email is required.') }}

@@ -22,11 +26,14 @@
-

+

{{ getLocalizedText('Confirm email is required.') }}

@@ -46,12 +53,12 @@ diff --git a/src/create-account.js b/src/create-account.js new file mode 100644 index 00000000..ddfac174 --- /dev/null +++ b/src/create-account.js @@ -0,0 +1,8 @@ +import Vue from 'vue' +import './common.js' +import Signup from './CreateAccount.vue' + +export default new Vue({ + el: '#ecloud-accounts-create-account', + render: h => h(Signup), +}) diff --git a/templates/create-account.php b/templates/create-account.php new file mode 100644 index 00000000..c5e0eb54 --- /dev/null +++ b/templates/create-account.php @@ -0,0 +1,4 @@ + +
\ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index c5e35203..5070b126 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,5 +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'), + 'create-account': path.join(__dirname, 'src/create-account.js'), }, } -- GitLab From c1774abeaa29bdcb5966a52b866104e98b9d788a Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Sun, 20 Aug 2023 09:45:19 -0700 Subject: [PATCH 008/427] removed unncessary --- appinfo/routes.php | 2 +- lib/Controller/AccountController.php | 106 ++++++++- src/CreateAccount.vue | 316 --------------------------- src/Signup.vue | 134 ++++++++---- src/create-account.js | 8 - templates/create-account.php | 4 - webpack.config.js | 3 +- 7 files changed, 183 insertions(+), 390 deletions(-) delete mode 100644 src/CreateAccount.vue delete mode 100644 src/create-account.js delete mode 100644 templates/create-account.php diff --git a/appinfo/routes.php b/appinfo/routes.php index 5bb37f4f..36ae5574 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -25,5 +25,5 @@ return ['routes' => [ 'url' => '/issue/submit', 'verb' => 'POST' ], ['name' => 'account#index', 'url' => '/account/signup', 'verb' => 'GET'], - ['name' => 'account#create_account', 'url' => '/account/create-account', 'verb' => 'GET'], + // ['name' => 'account#recaptcha', 'url' => '/account/recaptcha', 'verb' => 'GET'], ]]; diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index d2a375a5..71e2f7d4 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -10,17 +10,23 @@ use OCP\AppFramework\Controller; use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; use OCA\EcloudAccounts\AppInfo\Application; +use OCP\ISession; -class AccountController extends Controller { +class AccountController extends Controller +{ protected $appName; protected $request; + // private ISession $session; + public function __construct( $AppName, IRequest $request, + ISession $session ) { parent::__construct($AppName, $request); $this->appName = $AppName; + // $this->session = $session; } /** @@ -29,7 +35,8 @@ class AccountController extends Controller { * @NoCSRFRequired * */ - public function index() { + public function index() + { return new TemplateResponse( Application::APP_ID, 'signup', @@ -44,14 +51,91 @@ class AccountController extends Controller { * @NoCSRFRequired * */ - public function createAccount() { - return new TemplateResponse( - Application::APP_ID, - 'create-account', - ['appName' => Application::APP_ID], - TemplateResponse::RENDER_AS_GUEST - ); - } + // public function recaptcha() + // { + // session_set_cookie_params(['SameSite' => 'None', 'Secure' => true]); + // session_start(); + + // $width = 80; + // $height = 40; + // $length = 2; + // $liste = '123456789ABCDEFGHIJKLMNPQRSTUVWXYZ'; + // $numbers = '123456789'; + // $symbols = '+-'; + // $code = ''; + // $counter = 0; + // $im = imagecreatetruecolor($width, $height); + // $ns = imagecolorallocate($im, 200, 200, 200); //noise color + // //amount of background noise to add in captcha image + // $noise_level = 13; + + // $image = imagecreate($width, $height) or die('Impossible d\'initializer GD'); + + // for ($i = 0; $i < 10; $i++) { + // imageline( + // $image, + // mt_rand(0, $width), + // mt_rand(0, $height), + // mt_rand(0, $width), + // mt_rand(0, $height), + // imagecolorallocate( + // $image, + // mt_rand(200, 255), + // mt_rand(200, 255), + // mt_rand(200, 255) + // ) + // ); + // } + // $x = 10 + mt_rand(0, 10); + // $num1 = substr($numbers, rand(0, strlen($numbers) - 1), 1); + // $this->update_image($image, $x, $num1); + + // $x += 10 + mt_rand(0, 10); + // $sym = substr($symbols, rand(0, strlen($symbols) - 1), 1); + // $this->update_image($image, $x, $sym); + + // $x += 10 + mt_rand(0, 10); + // $num2 = substr($numbers, rand(0, strlen($numbers) - 1), 1); + // $this->update_image($image, $x, $num2); + + // # Rotate numbers randomly -15 to +15 degrees + // $image = imagerotate($image, mt_rand(-15, 15), 0); + + // $x += 10 + mt_rand(0, 10); + // $this->update_image($image, $x, "="); + + // $code = $num1 . $sym . $num2; + + // eval("\$code = $code;"); + + // // Add some noise to the image. + // for ($i = 0; $i < $noise_level; $i++) { + // for ($j = 0; $j < $noise_level; $j++) { + // imagesetpixel( + // $image, + // rand(0, $width), + // rand(0, $height), //make sure the pixels are rcandom and don't overflow out of the image + // $ns + // ); + // } + // } + + // header('Content-Type: image/png'); + // imagepng($image); + // imagedestroy($image); + + // $_SESSION['securecode'] = "$code"; + // } - + // function update_image(&$image, $x, $num) + // { + // imagechar( + // $image, + // mt_rand(4, 5), + // $x, + // mt_rand(5, 20), + // $num, + // imagecolorallocate($image, mt_rand(0, 155), mt_rand(0, 155), mt_rand(0, 155)) + // ); + // } } diff --git a/src/CreateAccount.vue b/src/CreateAccount.vue deleted file mode 100644 index f724a02c..00000000 --- a/src/CreateAccount.vue +++ /dev/null @@ -1,316 +0,0 @@ - - - - diff --git a/src/Signup.vue b/src/Signup.vue index 7c30b740..67c00a2d 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -3,46 +3,81 @@

- {{ getLocalizedText('Request Murena Account') }} + {{ getLocalizedText('Create Murena Account') }}

+ +
+
+
+ + +

+ {{ getLocalizedText('Display name is required.') }} +

+
+
+
+
- +

{{ getLocalizedText('Email is required.') }}

+
+ +
- -
+
+
+
+ +
+ + +
+

+ {{ getLocalizedText('Password is required.') }} +

+

+ {{ getLocalizedText('Confirm password is required.') }} +

+
+ + + +
+
- {{ getLocalizedText('Request Invitation') }} + {{ getLocalizedText('Signup') }}
@@ -63,32 +98,33 @@ export default { data() { return { appName: APPLICATION_NAME, + domain: window.location.host, + displayname: '', email: '', - confirmEmail: '', + username: '', + password: '', + repassword: '', isEmailEmpty: false, - isConfirmEmailEmpty: false, + isDisplayNameEmpty: false, + isUsernameEmpty: false, + isPasswordEmpty: false, + isRePasswordEmpty: false, } }, methods: { async submitSignupForm() { try { - if (this.email === '') { - this.isEmailEmpty = true - } else { - this.isEmailEmpty = false - } + this.isEmailEmpty = this.email === ''; + this.isDisplayNameEmpty = this.displayname === ''; + this.isUsernameEmpty = this.username === ''; + this.isPasswordEmpty = this.password === ''; + this.isRePasswordEmpty = this.repassword === ''; - if (this.confirmEmail === '') { - this.isConfirmEmailEmpty = true - } else { - this.isConfirmEmailEmpty = false - } - - if (!this.isEmailEmpty && !this.isConfirmEmailEmpty) { + if (!this.isEmailEmpty && !this.isDisplayNameEmpty && !this.isUsernameEmpty) { // submit form } } catch (error) { - this.showError(this.getLocalizedText('Something went wrong.')) + this.showError(this.getLocalizedText('Something went wrong.')); } }, getLocalizedText(text) { @@ -125,7 +161,6 @@ export default { } #fields { - font-size: 0; background-color: white; } @@ -159,6 +194,13 @@ export default { #fields .control { text-align: left; margin-top: 10px; + margin-bottom: 10px; +} + +#fields input#username, +#fields input#new-password, +#fields input#repassword { + width: 50%; } #fields .form-input { @@ -174,11 +216,19 @@ export default { border-radius: 8px; padding: 10px 20px; margin-top: 10px; - margin-bottom: 20px; + margin-bottom: 10px; +} + +.username-group { + display: flex; +} + +#username-domain-div { + display: flex; + align-items: center; } #fields { - font-size: 0; background-color: white; } @@ -222,18 +272,6 @@ export default { font-weight: 900; } -#repassword { - width: 48%; - margin-left: 4%; -} - -#password { - width: 48%; -} - -#username { - width: 70%; -} sup { color: #ff0000; diff --git a/src/create-account.js b/src/create-account.js deleted file mode 100644 index ddfac174..00000000 --- a/src/create-account.js +++ /dev/null @@ -1,8 +0,0 @@ -import Vue from 'vue' -import './common.js' -import Signup from './CreateAccount.vue' - -export default new Vue({ - el: '#ecloud-accounts-create-account', - render: h => h(Signup), -}) diff --git a/templates/create-account.php b/templates/create-account.php deleted file mode 100644 index c5e0eb54..00000000 --- a/templates/create-account.php +++ /dev/null @@ -1,4 +0,0 @@ - -
\ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 5070b126..b6eaacba 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,7 +9,6 @@ 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'), - 'create-account': path.join(__dirname, 'src/create-account.js'), + 'signup': path.join(__dirname, 'src/signup.js') }, } -- GitLab From 1c1923ea2eb56b94beee4c025c2b1a3ad59e0e94 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 21 Aug 2023 10:09:21 -0700 Subject: [PATCH 009/427] LDAP added --- appinfo/routes.php | 1 + lib/Controller/AccountController.php | 122 +++++++++++++++++++++++++- lib/Service/LDAPConnectionService.php | 19 +++- src/Signup.vue | 61 ++++++++----- 4 files changed, 178 insertions(+), 25 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 36ae5574..a2d08a16 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -25,5 +25,6 @@ return ['routes' => [ 'url' => '/issue/submit', 'verb' => 'POST' ], ['name' => 'account#index', 'url' => '/account/signup', 'verb' => 'GET'], + ['name' => 'account#create', 'url' => '/account/create', 'verb' => 'POST'], // ['name' => 'account#recaptcha', 'url' => '/account/recaptcha', 'verb' => 'GET'], ]]; diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 71e2f7d4..8771888f 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -10,23 +10,42 @@ use OCP\AppFramework\Controller; use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; use OCA\EcloudAccounts\AppInfo\Application; +use OCA\EcloudAccounts\Service\LDAPConnectionService; +use OCA\EcloudAccounts\Service\AccountService; use OCP\ISession; +use Psr\Log\LoggerInterface; +use OCA\LdapWriteSupport\Service\Configuration; +use OCP\LDAP\ILDAPProvider; +use Exception; class AccountController extends Controller { protected $appName; protected $request; // private ISession $session; + private $LDAPConnectionService; + private $logger; + private $configuration; + private $ldapProvider; + private $ldapConnect; public function __construct( $AppName, IRequest $request, - ISession $session + // ISession $session, + LDAPConnectionService $LDAPConnectionService, + LoggerInterface $logger, + ILDAPProvider $LDAPProvider, + Configuration $configuration ) { parent::__construct($AppName, $request); $this->appName = $AppName; // $this->session = $session; + $this->LDAPConnectionService = $LDAPConnectionService; + $this->ldapProvider = $LDAPProvider; + $this->configuration = $configuration; + $this->logger = $logger; } /** @@ -44,6 +63,107 @@ class AccountController extends Controller TemplateResponse::RENDER_AS_GUEST ); } + /** + * @NoAdminRequired + * @PublicPage + * @NoCSRFRequired + * + */ + public function create(string $displayname, string $email, string $username, string $password) + { + $connection = $this->LDAPConnectionService->getLDAPConnection(); + // $base = $this->LDAPConnectionService->getLDAPBaseUsers()[0]; + // $displayNameAttribute = $this->LDAPConnectionService->getDisplayNameAttribute(); + $base = ''; + [$newUserDN, $newUserEntry] = $this->buildNewEntry($username, $password, $base); + $newUserDN = $this->ldapProvider->sanitizeDN([$newUserDN])[0]; + // $this->ensureAttribute($newUserEntry, $displayNameAttribute, $username); + + $ret = ldap_add($connection, $newUserDN, $newUserEntry); + + $message = 'Create LDAP user \'{username}\' ({dn})'; + $logMethod = 'info'; + if ($ret === false) { + $message = 'Unable to create LDAP user \'{username}\' ({dn})'; + $logMethod = 'error'; + } + $this->logger->$logMethod($message, [ + 'app' => Application::APP_ID, + 'username' => $username, + 'dn' => $newUserDN, + ]); + + if (!$ret && $this->configuration->isPreventFallback()) { + throw new \Exception('Cannot create user: ' . ldap_error($connection), ldap_errno($connection)); + } + + // Set password through ldap password exop, if supported + try { + $ret = ldap_exop_passwd($connection, $newUserDN, '', $password); + if ($ret === false) { + $message = 'ldap_exop_passwd failed, falling back to ldap_mod_replace to to set password for new user'; + $this->logger->debug($message, ['app' => Application::APP_ID]); + + // Fallback to `userPassword` in case the server does not support exop_passwd + $ret = ldap_mod_replace($connection, $newUserDN, ['userPassword' => $password]); + if ($ret === false) { + $message = 'Failed to set password for new user {dn}'; + $this->logger->error($message, [ + 'app' => Application::APP_ID, + 'dn' => $newUserDN, + ]); + } + } + } catch (\Exception $e) { + $this->logger->error($e->getMessage(), ['exception' => $e, 'app' => Application::APP_ID]); + } + return $ret ? $newUserDN : false; + } + public function buildNewEntry($username, $password, $base): array + { + // Make sure the parameters don't fool the following algorithm + if (strpos($username, PHP_EOL) !== false) { + throw new Exception('Username contains a new line'); + } + if (strpos($password, PHP_EOL) !== false) { + throw new Exception('Password contains a new line'); + } + if (strpos($base, PHP_EOL) !== false) { + throw new Exception('Base DN contains a new line'); + } + + $ldif = $this->configuration->getUserTemplate(); + + $ldif = str_replace('{UID}', $username, $ldif); + $ldif = str_replace('{PWD}', $password, $ldif); + $ldif = str_replace('{BASE}', $base, $ldif); + + $entry = []; + $lines = explode(PHP_EOL, $ldif); + foreach ($lines as $line) { + $split = explode(':', $line, 2); + $key = trim($split[0]); + $value = trim($split[1]); + if (!isset($entry[$key])) { + $entry[$key] = $value; + } else if (is_array($entry[$key])) { + $entry[$key][] = $value; + } else { + $entry[$key] = [$entry[$key], $value]; + } + } + $dn = $entry['dn']; + unset($entry['dn']); + + return [$dn, $entry]; + } + public function ensureAttribute(array &$ldif, string $attribute, string $fallbackValue): void + { + $lowerCasedLDIF = array_change_key_case($ldif, CASE_LOWER); + if (!isset($lowerCasedLDIF[strtolower($attribute)])) { + $ldif[$attribute] = $fallbackValue; + } + } /** * @NoAdminRequired diff --git a/lib/Service/LDAPConnectionService.php b/lib/Service/LDAPConnectionService.php index a45024e6..bba572cb 100644 --- a/lib/Service/LDAPConnectionService.php +++ b/lib/Service/LDAPConnectionService.php @@ -6,6 +6,8 @@ namespace OCA\EcloudAccounts\Service; use Exception; use OCP\IUserManager; +use OCA\User_LDAP\Configuration; +use OCA\User_LDAP\Helper; class LDAPConnectionService { /** @var IUserManager */ @@ -16,10 +18,14 @@ class LDAPConnectionService { private $ldapEnabled; private $access; + private $ldapConfig; - public function __construct(IUserManager $userManager) { + public function __construct(IUserManager $userManager,Helper $ldapBackendHelper) { $this->userManager = $userManager; $this->getConfigurationFromBackend(); + $ldapConfigPrefixes = $ldapBackendHelper->getServerConfigurationPrefixes(true); + $prefix = array_shift($ldapConfigPrefixes); + $this->ldapConfig = new Configuration($prefix); } @@ -93,4 +99,15 @@ class LDAPConnectionService { } return $this->access; } + + public function getLDAPBaseUsers(): array { + $bases = $this->ldapConfig->ldapBaseUsers; + if(empty($bases)) { + $bases = $this->ldapConfig->ldapBase; + } + return $bases; + } + public function getDisplayNameAttribute(): string { + return $this->ldapConfig->ldapUserDisplayName; + } } diff --git a/src/Signup.vue b/src/Signup.vue index 67c00a2d..4ab10ecd 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -6,13 +6,12 @@ {{ getLocalizedText('Create Murena Account') }}
-
+ class="form-input" :placeholder="getLocalizedText('Your name as shown to others')">

{{ getLocalizedText('Display name is required.') }}

@@ -33,15 +32,16 @@
-
- -
@{{ domain }}
+
+ @{{ domain }} +

{{ getLocalizedText('Username is required.') }} @@ -55,9 +55,9 @@

- -

@@ -66,12 +66,16 @@

{{ getLocalizedText('Confirm password is required.') }}

+

+ {{ getLocalizedText('The confirm password does not match the password.') }} +

+
- -
@@ -88,6 +92,9 @@ @@ -272,7 +288,6 @@ export default { font-weight: 900; } - sup { color: #ff0000; font-weight: 500; -- GitLab From b8933d139bba95c163d34abb10439992b40ae304 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 21 Aug 2023 10:16:03 -0700 Subject: [PATCH 010/427] lint and php lint --- lib/Controller/AccountController.php | 20 +++------ lib/Service/LDAPConnectionService.php | 4 +- src/Signup.vue | 62 ++++++++++++++++++--------- 3 files changed, 50 insertions(+), 36 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 8771888f..cec2a051 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -11,15 +11,13 @@ use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; use OCA\EcloudAccounts\AppInfo\Application; use OCA\EcloudAccounts\Service\LDAPConnectionService; -use OCA\EcloudAccounts\Service\AccountService; use OCP\ISession; use Psr\Log\LoggerInterface; use OCA\LdapWriteSupport\Service\Configuration; use OCP\LDAP\ILDAPProvider; use Exception; -class AccountController extends Controller -{ +class AccountController extends Controller { protected $appName; protected $request; // private ISession $session; @@ -41,7 +39,7 @@ class AccountController extends Controller ) { parent::__construct($AppName, $request); $this->appName = $AppName; - // $this->session = $session; + // $this->session = $session; $this->LDAPConnectionService = $LDAPConnectionService; $this->ldapProvider = $LDAPProvider; $this->configuration = $configuration; @@ -54,8 +52,7 @@ class AccountController extends Controller * @NoCSRFRequired * */ - public function index() - { + public function index() { return new TemplateResponse( Application::APP_ID, 'signup', @@ -69,8 +66,7 @@ class AccountController extends Controller * @NoCSRFRequired * */ - public function create(string $displayname, string $email, string $username, string $password) - { + public function create(string $displayname, string $email, string $username, string $password) { $connection = $this->LDAPConnectionService->getLDAPConnection(); // $base = $this->LDAPConnectionService->getLDAPBaseUsers()[0]; // $displayNameAttribute = $this->LDAPConnectionService->getDisplayNameAttribute(); @@ -119,8 +115,7 @@ class AccountController extends Controller } return $ret ? $newUserDN : false; } - public function buildNewEntry($username, $password, $base): array - { + public function buildNewEntry($username, $password, $base): array { // Make sure the parameters don't fool the following algorithm if (strpos($username, PHP_EOL) !== false) { throw new Exception('Username contains a new line'); @@ -146,7 +141,7 @@ class AccountController extends Controller $value = trim($split[1]); if (!isset($entry[$key])) { $entry[$key] = $value; - } else if (is_array($entry[$key])) { + } elseif (is_array($entry[$key])) { $entry[$key][] = $value; } else { $entry[$key] = [$entry[$key], $value]; @@ -157,8 +152,7 @@ class AccountController extends Controller return [$dn, $entry]; } - public function ensureAttribute(array &$ldif, string $attribute, string $fallbackValue): void - { + public function ensureAttribute(array &$ldif, string $attribute, string $fallbackValue): void { $lowerCasedLDIF = array_change_key_case($ldif, CASE_LOWER); if (!isset($lowerCasedLDIF[strtolower($attribute)])) { $ldif[$attribute] = $fallbackValue; diff --git a/lib/Service/LDAPConnectionService.php b/lib/Service/LDAPConnectionService.php index bba572cb..35e80269 100644 --- a/lib/Service/LDAPConnectionService.php +++ b/lib/Service/LDAPConnectionService.php @@ -20,7 +20,7 @@ class LDAPConnectionService { private $access; private $ldapConfig; - public function __construct(IUserManager $userManager,Helper $ldapBackendHelper) { + public function __construct(IUserManager $userManager, Helper $ldapBackendHelper) { $this->userManager = $userManager; $this->getConfigurationFromBackend(); $ldapConfigPrefixes = $ldapBackendHelper->getServerConfigurationPrefixes(true); @@ -102,7 +102,7 @@ class LDAPConnectionService { public function getLDAPBaseUsers(): array { $bases = $this->ldapConfig->ldapBaseUsers; - if(empty($bases)) { + if (empty($bases)) { $bases = $this->ldapConfig->ldapBase; } return $bases; diff --git a/src/Signup.vue b/src/Signup.vue index 4ab10ecd..54b30ea9 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -10,8 +10,12 @@
- +

{{ getLocalizedText('Display name is required.') }}

@@ -23,7 +27,11 @@
-

{{ getLocalizedText('Email is required.') }} @@ -37,8 +45,12 @@

- +
@{{ domain }}
@@ -55,10 +67,18 @@
- - + +

{{ getLocalizedText('Password is required.') }} @@ -69,20 +89,25 @@

{{ getLocalizedText('The confirm password does not match the password.') }}

-
-
- +
@@ -91,7 +116,6 @@ -- GitLab From ca10c024e8aced267a78eca764c7eb1aee898695 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 23 Aug 2023 20:58:45 -0700 Subject: [PATCH 045/427] validation changes --- src/Signup.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Signup.vue b/src/Signup.vue index 7786eaf3..eff615df 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -163,7 +163,6 @@ export default { } catch (error) { const errorMessage = error.response?.data?.message || this.getLocalizedText('Something went wrong.') this.showMessage(errorMessage, 'error') - this.setAllFieldsBlank() } } }, -- GitLab From 3db9a86005c595e5cd8ac67c4d4145bef4343a85 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 23 Aug 2023 21:04:59 -0700 Subject: [PATCH 046/427] width primary added --- src/Signup.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index eff615df..a4f69d27 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -94,9 +94,10 @@
- +
@@ -336,6 +337,9 @@ sup { .validation-error { color: #ff0000; } +.width300{ + width: 300px; +} @media screen and (max-width: 500px) { #main { -- GitLab From f80fbb71475119e1180612b57b661dc86f54e8d4 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 23 Aug 2023 21:21:41 -0700 Subject: [PATCH 047/427] password checked added --- package-lock.json | 33 ++++++++++++++++++++++++++++++++- package.json | 7 ++++--- src/Signup.vue | 25 +++++++++++++++++-------- 3 files changed, 53 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5077e57f..6a1bd3d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,8 @@ "@nextcloud/l10n": "^1.6.0", "@nextcloud/router": "^2.0.0", "@nextcloud/vue": "^5.4.0", - "vue": "^2.7.0" + "vue": "^2.7.0", + "vue-password-strength-meter": "^1.7.2" }, "devDependencies": { "@nextcloud/babel-config": "^1.0.0", @@ -11137,6 +11138,18 @@ "resolved": "https://registry.npmjs.org/vue-observe-visibility/-/vue-observe-visibility-0.4.6.tgz", "integrity": "sha512-xo0CEVdkjSjhJoDdLSvoZoQrw/H2BlzB5jrCBKGZNXN2zdZgMuZ9BKrxXDjNP2AxlcCoKc8OahI3F3r3JGLv2Q==" }, + "node_modules/vue-password-strength-meter": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/vue-password-strength-meter/-/vue-password-strength-meter-1.7.2.tgz", + "integrity": "sha512-S17DsEbXciTcI0fKq1PXia7i3COM/AJOT7os8AVyGxglc5ho1EBssE+ogDa5cFh6Rn8pPgqfVCt/KBcNpgPBiA==", + "engines": { + "node": ">= 4.0.0", + "npm": ">= 3.0.0" + }, + "peerDependencies": { + "zxcvbn": "^4.4.2" + } + }, "node_modules/vue-resize": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-1.0.1.tgz", @@ -11796,6 +11809,12 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zxcvbn": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/zxcvbn/-/zxcvbn-4.4.2.tgz", + "integrity": "sha512-Bq0B+ixT/DMyG8kgX2xWcI5jUvCwqrMxSFam7m0lAf78nf04hv6lNCsyLYdyYTrCVMqNDY/206K7eExYCeSyUQ==", + "peer": true } }, "dependencies": { @@ -20246,6 +20265,12 @@ "resolved": "https://registry.npmjs.org/vue-observe-visibility/-/vue-observe-visibility-0.4.6.tgz", "integrity": "sha512-xo0CEVdkjSjhJoDdLSvoZoQrw/H2BlzB5jrCBKGZNXN2zdZgMuZ9BKrxXDjNP2AxlcCoKc8OahI3F3r3JGLv2Q==" }, + "vue-password-strength-meter": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/vue-password-strength-meter/-/vue-password-strength-meter-1.7.2.tgz", + "integrity": "sha512-S17DsEbXciTcI0fKq1PXia7i3COM/AJOT7os8AVyGxglc5ho1EBssE+ogDa5cFh6Rn8pPgqfVCt/KBcNpgPBiA==", + "requires": {} + }, "vue-resize": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-1.0.1.tgz", @@ -20724,6 +20749,12 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "peer": true + }, + "zxcvbn": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/zxcvbn/-/zxcvbn-4.4.2.tgz", + "integrity": "sha512-Bq0B+ixT/DMyG8kgX2xWcI5jUvCwqrMxSFam7m0lAf78nf04hv6lNCsyLYdyYTrCVMqNDY/206K7eExYCeSyUQ==", + "peer": true } } } diff --git a/package.json b/package.json index 83b8a14f..74dc503c 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "private": true, "scripts": { "build": "NODE_ENV=production webpack --progress", - "dev": "NODE_ENV=development webpack --progress", - "watch": "NODE_ENV=development webpack --progress --watch", + "dev": "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", "stylelint": "stylelint {src,css}/**/{*.scss,*.css} --allow-empty-input", @@ -23,7 +23,8 @@ "@nextcloud/l10n": "^1.6.0", "@nextcloud/router": "^2.0.0", "@nextcloud/vue": "^5.4.0", - "vue": "^2.7.0" + "vue": "^2.7.0", + "vue-password-strength-meter": "^1.7.2" }, "browserslist": [ "extends @nextcloud/browserslist-config" diff --git a/src/Signup.vue b/src/Signup.vue index a4f69d27..c6564d02 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -13,7 +13,7 @@

@@ -67,12 +67,13 @@

- + :placeholder="getLocalizedText('Password')" /> +
- + {{ getLocalizedText('Signup') }} +
@@ -109,11 +112,13 @@ import Axios from '@nextcloud/axios' import { showSuccess, showError } from '@nextcloud/dialogs' import { generateUrl } from '@nextcloud/router' +import Password from 'vue-password-strength-meter' const APPLICATION_NAME = 'ecloud-accounts' export default { name: 'Signup', + components: { Password }, data() { return { appName: APPLICATION_NAME, @@ -337,8 +342,12 @@ sup { .validation-error { color: #ff0000; } -.width300{ + +.btn-primary { width: 300px; + background-color: var(--color-primary); + color: white; + border-color: var(--color-primary); } @media screen and (max-width: 500px) { -- GitLab From 1c2ab09d0a002d7ed0f4279a7347ec849dc7867e Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 23 Aug 2023 21:27:13 -0700 Subject: [PATCH 048/427] password checked added --- src/Signup.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Signup.vue b/src/Signup.vue index c6564d02..226ed617 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -68,7 +68,8 @@
Date: Wed, 23 Aug 2023 21:40:30 -0700 Subject: [PATCH 049/427] defaultClass added --- src/Signup.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Signup.vue b/src/Signup.vue index 226ed617..20a17a4c 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -72,7 +72,7 @@ :badge="false" type="password" name="password" - class="form-input" + :defaultClass="form-input" :placeholder="getLocalizedText('Password')" /> Date: Wed, 23 Aug 2023 21:53:24 -0700 Subject: [PATCH 050/427] lint --- src/Signup.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index 20a17a4c..1032c843 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -72,7 +72,7 @@ :badge="false" type="password" name="password" - :defaultClass="form-input" + :default-class="form-input" :placeholder="getLocalizedText('Password')" /> Date: Wed, 23 Aug 2023 22:29:36 -0700 Subject: [PATCH 051/427] overflow added --- src/Signup.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Signup.vue b/src/Signup.vue index 1032c843..e4ff9491 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -194,6 +194,9 @@ export default { } + +.np-captcha-container { + background: #eee; + width: 300px; + margin: 0 auto; + margin-bottom: 20px; +} + +.np-captcha { + font-size: 24px; +} + +.np-button { + padding: 6px 10px; + background: #fff; + border: 1px solid #eee; + border-radius: 6px; + font-size: 16px; +} + +.np-captcha-character { + display: inline-block; + letter-spacing: 14px; +} -- GitLab From 1bbdbd83b20f8a09bae111e5b0862edd1e0d33ad Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 24 Aug 2023 21:27:48 -0700 Subject: [PATCH 060/427] verifiction code added --- src/Signup.vue | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index ef5cb51a..2964a04e 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -98,7 +98,25 @@
-
+
+
+ +
+ +
+

+ {{ getLocalizedText('Human Verification is required.') }} +

+

+ {{ getLocalizedText('Secure code is not correct!') }} +

+
+
- {{ captchatext }} - +
@@ -153,6 +168,7 @@ export default { username: '', password: '', repassword: '', + humanverification: '', validation: { isEmailEmpty: false, isDisplaynameEmpty: false, @@ -160,6 +176,8 @@ export default { isPasswordEmpty: false, isRepasswordEmpty: false, isRePasswordMatched: false, + isHumanverificationEmpty: false, + isHumanverificationMatched: false, }, captchaLength: 5, captcha: [], @@ -171,11 +189,12 @@ export default { }, methods: { validateForm() { - const fieldsToValidate = ['email', 'displayname', 'username', 'password', 'repassword'] + const fieldsToValidate = ['email', 'displayname', 'username', 'password', 'repassword', 'humanverification'] fieldsToValidate.forEach(field => { this.validation[`is${field.charAt(0).toUpperCase() + field.slice(1)}Empty`] = this[field] === '' }) this.validation.isRePasswordMatched = this.repassword !== this.password + this.validation.isHumanverificationMatched = this.humanverification !== this.captchatext }, async submitSignupForm() { this.validateForm() @@ -406,7 +425,7 @@ sup { } .btn-primary { - width: 20vw; + width: 95%; background-color: var(--color-primary); color: white; border-color: var(--color-primary); @@ -427,10 +446,14 @@ sup { font-size: 10px; } } - +.np-captcha-section +{ + display: flex; + width: fit-content; +} .np-captcha-container { background: #eee; - width: 300px; + width: max-content; margin: 0 auto; margin-bottom: 20px; } -- GitLab From 02cd5bb54f134a1f582d0856f540be156e3062bb Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 24 Aug 2023 21:29:26 -0700 Subject: [PATCH 061/427] verifiction code added --- src/Signup.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Signup.vue b/src/Signup.vue index 2964a04e..1029f903 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -452,10 +452,11 @@ sup { width: fit-content; } .np-captcha-container { - background: #eee; + background: #ffdada; width: max-content; margin: 0 auto; margin-bottom: 20px; + padding: 10px; } .np-captcha { -- GitLab From 5cfd6749a5596bda51b8d2d73e5b98255748a3f9 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 24 Aug 2023 21:33:49 -0700 Subject: [PATCH 062/427] verifiction code added #2 --- src/Signup.vue | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index 1029f903..89f3ca4a 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -98,7 +98,7 @@
-
+
@@ -116,8 +116,12 @@ {{ getLocalizedText('Secure code is not correct!') }}

+
+
-
+
+
+
- +
+
-

+

If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.

@@ -495,7 +497,7 @@ export default { this.$i18n.locale = this.selectedLanguage }, useMyAccount() { - window.location.href = this.domain + window.location.href = window.location.origin }, }, } @@ -758,4 +760,7 @@ sup { margin: 1em 0 0.5em 0; text-align: center; } +.font-16{ + font-size: 16px; +} -- GitLab From 873f0bfad0e83ebec93a30d01f77cb58049a4f0b Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 24 Oct 2023 04:07:14 -0700 Subject: [PATCH 152/427] signup changes --- lib/Controller/AccountController.php | 9 ++++++++- templates/signup.php | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 0ecb0b66..01732aca 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -13,12 +13,14 @@ use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; use OCP\IRequest; +use OCP\L10N\IFactory; class AccountController extends Controller { protected $appName; protected $request; // private ISession $session; private $accountService; + protected $l10nFactory; private $config; public function __construct( @@ -26,11 +28,13 @@ class AccountController extends Controller { IRequest $request, AccountService $accountService, IConfig $config, + IFactory $l10nFactory ) { parent::__construct($AppName, $request); $this->appName = $AppName; $this->accountService = $accountService; $this->config = $config; + $this->l10nFactory = $l10nFactory; } /** @@ -40,10 +44,13 @@ class AccountController extends Controller { * */ public function index() { + $language = 'de'; + $l = $this->l10nFactory->get(Application::APP_ID, $language); + $title = $l->t('Create Murena Account'); return new TemplateResponse( Application::APP_ID, 'signup', - ['appName' => Application::APP_ID], + ['appName' => Application::APP_ID, 'title' => $title], TemplateResponse::RENDER_AS_GUEST ); } diff --git a/templates/signup.php b/templates/signup.php index 95f0ce04..ce9de8b9 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -1,4 +1,5 @@
\ No newline at end of file -- GitLab From 4593490de6fd33182914beceda09cdead92ff82b Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 24 Oct 2023 04:35:29 -0700 Subject: [PATCH 153/427] lang added --- appinfo/routes.php | 1 + lib/Controller/AccountController.php | 28 +++++++++++++++++--- src/Signup.vue | 39 +++++++++++++++++++++------- 3 files changed, 54 insertions(+), 14 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index bfb19664..2e50e310 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -27,6 +27,7 @@ return ['routes' => [ ['name' => 'account#index', 'url' => '/account/signup', 'verb' => 'GET'], ['name' => 'account#create', 'url' => '/account/create', 'verb' => 'POST'], ['name' => 'account#check_username_available', 'url' => '/account/check_username_available', 'verb' => 'POST'], + ['name' => 'account#get_labels', 'url' => '/account/get_labels', 'verb' => 'POST'], // ['name' => 'account#recaptcha', 'url' => '/account/recaptcha', 'verb' => 'GET'], ]]; diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 01732aca..368545ae 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -44,13 +44,10 @@ class AccountController extends Controller { * */ public function index() { - $language = 'de'; - $l = $this->l10nFactory->get(Application::APP_ID, $language); - $title = $l->t('Create Murena Account'); return new TemplateResponse( Application::APP_ID, 'signup', - ['appName' => Application::APP_ID, 'title' => $title], + ['appName' => Application::APP_ID], TemplateResponse::RENDER_AS_GUEST ); } @@ -87,4 +84,27 @@ class AccountController extends Controller { } return $response; } + /** + * @NoAdminRequired + * @PublicPage + * @NoCSRFRequired + * + */ + public function getLabels(string $language) { + if (is_null($language)) { + $language = 'en'; + } + $l = $this->l10nFactory->get(Application::APP_ID, $language); + $response = new DataResponse(); + $response->setStatus(200); + $response->setData([ + 'createMurenaAccount' => $l->t('Create Murena Account'), + 'displayName' => $l->t('Display name'), + 'userName' => $l->t('User name'), + 'enterPassword' => $l->t('Enter Password'), + 'humanVefication' => $l->t('Human Verification'), + 'recoveryEmail' => $l->t('Recovery Email') + ]); + return $response; + } } diff --git a/src/Signup.vue b/src/Signup.vue index 990e5db3..f519ed6d 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -5,7 +5,7 @@

- {{ getLocalizedText('Create Murena Account') }} + {{ labels.createMurenaAccount }}

- +
- +
- +
- + Date: Tue, 24 Oct 2023 04:38:44 -0700 Subject: [PATCH 154/427] lang added --- src/Signup.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Signup.vue b/src/Signup.vue index f519ed6d..a4e9eadb 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -503,7 +503,7 @@ export default { const data = { language: this.selectedLanguage, } - const url = generateUrl(`/apps/${this.appName}/account/get_label`) + const url = generateUrl(`/apps/${this.appName}/account/get_labels`) try { const response = await Axios.post(url, data) if (response.status === 200) { -- GitLab From 50b3e927db698217010198e356f5b35983026129 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 24 Oct 2023 05:38:47 -0700 Subject: [PATCH 155/427] added language --- lib/Controller/AccountController.php | 60 ++++++++++++-- src/Signup.vue | 119 ++++++++++++++++++--------- templates/signup.php | 1 - 3 files changed, 135 insertions(+), 45 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 368545ae..799119b4 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -95,16 +95,64 @@ class AccountController extends Controller { $language = 'en'; } $l = $this->l10nFactory->get(Application::APP_ID, $language); - $response = new DataResponse(); - $response->setStatus(200); - $response->setData([ + + $titles = [ 'createMurenaAccount' => $l->t('Create Murena Account'), + 'captchaVerification' => $l->t('Captcha Verification'), + 'recoveryEmailForm1' => $l->t('For security reasons you need to set a recovery address for your Murena Cloud account.'), + 'recoveryEmailForm2' => $l->t('As long as you don\'t, you\'ll have limited access to your account.'), + ]; + $buttons = [ + 'createMyAccount' => $l->t('Create My Account'), + 'verify' => $l->t('Verify'), + 'later' => $l->t('Later'), + 'setRecoverEmail' => $l->t('Set my recovery email address'), + ]; + $labels = [ 'displayName' => $l->t('Display name'), - 'userName' => $l->t('User name'), + 'userName' => $l->t('Username'), 'enterPassword' => $l->t('Enter Password'), 'humanVefication' => $l->t('Human Verification'), - 'recoveryEmail' => $l->t('Recovery Email') - ]); + 'recoveryEmail' => $l->t('Recovery Email'), + 'newsletter_product' => $l->t('I want to receive news about Murena products and promotions'), + 'newsletter_eos' => $l->t('I want to receive news about /e/OS'), + ]; + $placeholders = [ + 'displayName' => $l->t('Your name as shown to others'), + 'userName' => $l->t('Username'), + 'enterPassword' => $l->t('Password'), + 'confirmPassword' => $l->t('Confirm'), + 'humanVefication' => $l->t('Human Verification'), + 'recoveryEmail' => $l->t('Recovery Email'), + ]; + $errors = [ + 'displayName' => $l->t('Display name is required.'), + 'userName' => $l->t('Username is required.'), + 'userNameInvalid' => $l->t('Username must consist of letters, numbers, hyphens, and underscores only.'), + 'userNameLength' => $l->t('Username must be at least 3 characters long.'), + 'userNameTaken' => $l->t('Username is already taken.'), + 'password' => $l->t('Password is required.'), + 'confirmPassword' => $l->t('Confirm password is required.'), + 'passwordNotMatched' => $l->t('The confirm password does not match the password.'), + 'humanVefication' => $l->t('Human Verification is required.'), + 'humanVeficationNotCorrect' => $l->t('Human Verification code is not correct.'), + 'recoveryEmail' => $l->t('Recovery Email is required.'), + 'acceptTOS' => $l->t('You must read and accept the Terms of Service to create your account.'), + ]; + $others = [ + 'somethingWentWrong' => $l->t('Something went wrong.'), + ]; + $data = [ + 'titles' => $titles, + 'buttons' => $buttons, + 'labels' => $labels, + 'placeholders' => $placeholders, + 'errors' => $errors, + 'others' => $others + ]; + $response = new DataResponse(); + $response->setStatus(200); + $response->setData($data); return $response; } } diff --git a/src/Signup.vue b/src/Signup.vue index a4e9eadb..a23d9993 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -5,7 +5,7 @@

- {{ labels.createMurenaAccount }} + {{ titles.createMurenaAccount }}

- {{ getLocalizedText('Password is required.') }} + {{ errors.password }}

- {{ getLocalizedText('Confirm password is required.') }} + {{ errors.confirmPassword }}

- {{ getLocalizedText('The confirm password does not match the password.') }} + {{ errors.passwordNotMatched }}

@@ -109,7 +109,7 @@

- {{ getLocalizedText('You must read and accept the Terms of Service to create your account.') }} + {{ errors.acceptTOS }}

@@ -124,7 +124,7 @@ type="checkbox" class="checkbox action-checkbox__checkbox focusable">
@@ -140,7 +140,7 @@ type="checkbox" class="checkbox action-checkbox__checkbox focusable">
@@ -152,7 +152,7 @@ class="btn-primary" type="primary" @click="submitSignupForm"> - {{ getLocalizedText('Create My Account') }} + {{ buttons.createMyAccount }}
@@ -161,7 +161,7 @@

- {{ getLocalizedText('Captcha Verification') }} + {{ titles.captchaVerification }}

@@ -173,16 +173,16 @@ v-model="humanverification" name="humanverification" class="form-input" - :placeholder="getLocalizedText('Human verification')" + :placeholder="placeholders.humanVefication" type="text" @input="validateForm(['humanverification'])">

- {{ getLocalizedText('Human Verification is required.') }} + {{ errors.humanVefication }}

- {{ getLocalizedText('Human Verification code is not correct.') }} + {{ errors.humanVeficationNotCorrect }}

@@ -215,7 +215,7 @@ class="btn-primary" type="primary" @click="submitCaptchaForm"> - {{ getLocalizedText('Verify') }} + {{ buttons.verify }}
@@ -223,10 +223,10 @@

- {{ getLocalizedText('For security reasons you need to set a recovery address for your Murena Cloud account.') }} + {{ titles.recoveryEmailForm1 }}

- {{ getLocalizedText('As long as you don\'t, you\'ll have limited access to your account.') }} + {{ titles.recoveryEmailForm2 }}

@@ -239,10 +239,10 @@ name="email" type="email" class="form-input" - :placeholder="getLocalizedText('Enter recovery email address')" + :placeholder="placeholders.recoveryEmail" @input="validateForm(['email'])">

- {{ getLocalizedText('Recovery Email is required.') }} + {{ errors.recoveryEmail }}

@@ -253,13 +253,13 @@ class="btn-default w-50" type="primary" @click="submitRecoveryEmailForm(false)"> - {{ getLocalizedText('Later') }} + {{ buttons.later }}
@@ -342,13 +342,51 @@ export default { { code: 'it', name: 'Italian' }, { code: 'es', name: 'Spanish' }, ], - labels: { + titles: { createMurenaAccount: 'Create Murena Account', + captchaVerification: 'Captcha Verification', + recoveryEmailForm1: 'For security reasons you need to set a recovery address for your Murena Cloud account.', + recoveryEmailForm2: 'As long as you don\'t, you\'ll have limited access to your account.', + }, + buttons: { + createMyAccount: 'Create My Account', + verify: 'Verify', + later: 'Later', + setRecoverEmail: 'Set my recovery email address', + }, + labels: { displayName: 'Display name', - userName: 'User name', + userName: 'Username', enterPassword: 'Enter Password', humanVefication: 'Human Verification', recoveryEmail: 'Recovery Email', + newsletter_product: 'I want to receive news about Murena products and promotions', + newsletter_eos: 'I want to receive news about /e/OS', + }, + placeholders: { + displayName: 'Your name as shown to others', + userName: 'Username', + enterPassword: 'Password', + confirmPassword: 'Confirm', + humanVefication: 'Human Verification', + recoveryEmail: 'Recovery Email', + }, + errors: { + displayName: 'Display name is required.', + userName: 'Username is required.', + userNameInvalid: 'Username must consist of letters, numbers, hyphens, and underscores only.', + userNameLength: 'Username must be at least 3 characters long.', + userNameTaken: 'Username is already taken.', + password: 'Password is required.', + confirmPassword: 'Confirm password is required.', + passwordNotMatched: 'The confirm password does not match the password.', + humanVefication: 'Human Verification is required.', + humanVeficationNotCorrect: 'Human Verification code is not correct.', + recoveryEmail: 'Recovery Email is required.', + acceptTOS: 'You must read and accept the Terms of Service to create your account.', + }, + others: { + somethingWentWrong: 'Something went wrong.', }, } }, @@ -418,9 +456,9 @@ export default { this.validation.isUsernameNotValid = false if (!usernamePattern.test(this.username) || this.username.length < minCharacterCount) { if (!usernamePattern.test(this.username)) { - this.usernameValidationMessage = this.getLocalizedText('Username must consist of letters, numbers, hyphens, and underscores only.') + this.usernameValidationMessage = this.errors.userNameInvalid } else { - this.usernameValidationMessage = this.getLocalizedText('Username must be at least 3 characters long.') + this.usernameValidationMessage = this.errors.userNameLength } this.validation.isUsernameNotValid = true } else { @@ -436,14 +474,14 @@ export default { const response = await Axios.post(url, data) if (response.status === 409) { this.validation.isUsernameNotValid = true - this.usernameValidationMessage = this.getLocalizedText('Username is already taken.') + this.usernameValidationMessage = this.errors.userNameTaken } } catch (error) { this.validation.isUsernameNotValid = true if (error.response && error.response.status === 409) { - this.usernameValidationMessage = this.getLocalizedText('Username is already taken.') + this.usernameValidationMessage = this.errors.userNameTaken } else { - this.usernameValidationMessage = this.getLocalizedText('Something went wrong.') + this.usernameValidationMessage = this.others.somethingWentWrong } } }, @@ -457,14 +495,14 @@ export default { this.showRecoverEmailForm = false this.showSuccessSection = true } else { - this.showMessage(this.getLocalizedText('Something went wrong.'), 'error') + this.showMessage(this.others.somethingWentWrong, 'error') } this.setAllFieldsBlank() } catch (error) { if (error.response && error.response.status === 409) { - this.showMessage(this.getLocalizedText('Username already exists.'), 'error') + this.showMessage(this.errors.userNameTaken, 'error') } else { - this.showMessage(this.getLocalizedText('Something went wrong.'), 'error') + this.showMessage(this.others.somethingWentWrong, 'error') } } }, @@ -507,12 +545,17 @@ export default { try { const response = await Axios.post(url, data) if (response.status === 200) { - this.labels = response.data + this.titles = response.data.titles + this.buttons = response.data.buttons + this.labels = response.data.labels + this.placeholders = response.data.placeholders + this.errors = response.data.errors + this.others = response.data.others } else { - this.showMessage(this.getLocalizedText('Something went wrong.'), 'error') + this.showMessage(this.others.somethingWentWrong, 'error') } } catch (error) { - this.showMessage(this.getLocalizedText('Something went wrong.'), 'error') + this.showMessage(this.others.somethingWentWrong, 'error') } }, useMyAccount() { diff --git a/templates/signup.php b/templates/signup.php index ce9de8b9..95f0ce04 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -1,5 +1,4 @@
\ No newline at end of file -- GitLab From 9d6b8a5805892b38d0e89ee311a803a01919f9d2 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 24 Oct 2023 23:24:32 -0700 Subject: [PATCH 156/427] changes --- l10n/en.js | 30 +++++++++++++++++++----------- l10n/en.json | 30 +++++++++++++++++++----------- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/l10n/en.js b/l10n/en.js index c4f28a57..fba0bc09 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -43,26 +43,34 @@ OC.L10N.register( "Temporary error contacting murena.com; please try again later!": "Temporary error contacting murena.com; please try again later!", "Murena Cloud 2FA": "Murena Cloud 2FA", "Create Murena Account": "Create Murena Account", + "Captcha Verification": "Captcha Verification", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "For security reasons you need to set a recovery address for your Murena Cloud account.", + "As long as you don't, you'll have limited access to your account.": "As long as you don't, you'll have limited access to your account.", + "Create My Account": "Create My Account", + "Verify": "Verify", + "Later": "Later", + "Set my recovery email address": "Set my recovery email address", "Display name": "Display name", - "Your name as shown to others": "Your name as shown to others", - "Display name is required.": "Display name is required.", - "Email": "Email", - "Enter recovery email address": "Enter recovery email address", - "Email is required.": "Email is required.", "Username": "Username", - "Username is required.": "Username is required.", "Enter Password": "Enter Password", + "I want to receive news about Murena products and promotions": "I want to receive news about Murena products and promotions", + "I want to receive news about /e/OS": "I want to receive news about /e/OS", + "Your name as shown to others": "Your name as shown to others", "Password": "Password", "Confirm": "Confirm", + "Human Verification": "Human Verification", + "Recovery Email": "Recovery Email", + "Display name is required.": "Display name is required.", + "Username is required.": "Username is required.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "Username must consist of letters, numbers, hyphens, and underscores only.", + "Username must be at least 3 characters long.": "Username must be at least 3 characters long.", + "Username is already taken.": "Username is already taken.", "Password is required.": "Password is required.", "Confirm password is required.": "Confirm password is required.", "The confirm password does not match the password.": "The confirm password does not match the password.", - "Human verification": "Human verification", "Human Verification is required.": "Human Verification is required.", "Human Verification code is not correct.": "Human Verification code is not correct.", - "Signup": "Signup", - "Username already exists.": "Username already exists.", - "Error while creating Murena account.": "Error while creating Murena account.", - "Congratulations! You've successfully created a Murena account.": "Congratulations! You've successfully created a Murena account." + "Recovery Email is required.": "Recovery Email is required.", + "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account.", }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/en.json b/l10n/en.json index 0c6e5572..e5c32585 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -40,27 +40,35 @@ "Temporary error contacting murena.com; please try again later!": "Temporary error contacting murena.com; please try again later!", "Murena Cloud 2FA": "Murena Cloud 2FA", "Create Murena Account": "Create Murena Account", + "Captcha Verification": "Captcha Verification", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "For security reasons you need to set a recovery address for your Murena Cloud account.", + "As long as you don't, you'll have limited access to your account.": "As long as you don't, you'll have limited access to your account.", + "Create My Account": "Create My Account", + "Verify": "Verify", + "Later": "Later", + "Set my recovery email address": "Set my recovery email address", "Display name": "Display name", - "Your name as shown to others": "Your name as shown to others", - "Display name is required.": "Display name is required.", - "Email": "Email", - "Enter recovery email address": "Enter recovery email address", - "Email is required.": "Email is required.", "Username": "Username", - "Username is required.": "Username is required.", "Enter Password": "Enter Password", + "I want to receive news about Murena products and promotions": "I want to receive news about Murena products and promotions", + "I want to receive news about /e/OS": "I want to receive news about /e/OS", + "Your name as shown to others": "Your name as shown to others", "Password": "Password", "Confirm": "Confirm", + "Human Verification": "Human Verification", + "Recovery Email": "Recovery Email", + "Display name is required.": "Display name is required.", + "Username is required.": "Username is required.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "Username must consist of letters, numbers, hyphens, and underscores only.", + "Username must be at least 3 characters long.": "Username must be at least 3 characters long.", + "Username is already taken.": "Username is already taken.", "Password is required.": "Password is required.", "Confirm password is required.": "Confirm password is required.", "The confirm password does not match the password.": "The confirm password does not match the password.", - "Human verification": "Human verification", "Human Verification is required.": "Human Verification is required.", "Human Verification code is not correct.": "Human Verification code is not correct.", - "Signup": "Signup", - "Username already exists.": "Username already exists.", - "Error while creating Murena account.": "Error while creating Murena account.", - "Congratulations! You've successfully created a Murena account.": "Congratulations! You've successfully created a Murena account." + "Recovery Email is required.": "Recovery Email is required.", + "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account.", }, "pluralForm": "nplurals=2; plural=(n != 1);" } -- GitLab From c038a7affa701996c6ae3cb7e398d7058a01a98f Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 24 Oct 2023 23:40:35 -0700 Subject: [PATCH 157/427] added trabslationa --- l10n/de.js | 36 +++++++++++++++++++++--------------- l10n/de.json | 35 +++++++++++++++++++++-------------- l10n/en.json | 2 +- l10n/es.js | 32 ++++++++++++++++++++------------ l10n/es.json | 35 ++++++++++++++++++++++------------- l10n/fr.js | 32 ++++++++++++++++++++------------ l10n/fr.json | 32 ++++++++++++++++++++------------ l10n/it.js | 32 ++++++++++++++++++++------------ l10n/it.json | 34 +++++++++++++++++++++------------- 9 files changed, 166 insertions(+), 104 deletions(-) diff --git a/l10n/de.js b/l10n/de.js index 72811836..f8842913 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -39,29 +39,35 @@ OC.L10N.register( "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Für dieses Konto ist ein Abonnement aktiv. Bitte kündigen Sie es oder lassen Sie es auslaufen, bevor Sie Ihr Konto löschen.", "Loading...": "Laden...", "Temporary error contacting murena.com; please try again later!": "Vorübergehender Fehler bei der Kontaktaufnahme mit murena.com; bitte versuchen Sie es später noch einmal!", - "Murena Cloud 2FA": "Murena Cloud 2FA", "Create Murena Account": "Murena-Konto erstellen", + "Captcha Verification": "Captcha-Prüfung", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "Aus Sicherheitsgründen müssen Sie eine Wiederherstellungsadresse für Ihr Murena Cloud-Konto festlegen.", + "As long as you don't, you'll have limited access to your account.": "Solange Sie das nicht tun, haben Sie nur eingeschränkten Zugang zu Ihrem Konto.", + "Create My Account": "Mein Konto erstellen", + "Verify": "Überprüfen Sie", + "Later": "Später", + "Set my recovery email address": "Meine Wiederherstellungs-E-Mail-Adresse festlegen", "Display name": "Name anzeigen", - "Your name as shown to others": "Ihr Name, wie er für andere sichtbar ist", - "Display name is required.": "Der Anzeigename ist erforderlich.", - "Email": "E-Mail", - "Enter recovery email address": "E-Mail-Adresse für die Wiederherstellung eingeben", - "Email is required.": "E-Mail ist erforderlich.", "Username": "Benutzername", - "Username is required.": "Der Benutzername ist erforderlich.", "Enter Password": "Passwort eingeben", + "I want to receive news about Murena products and promotions": "Ich möchte Neuigkeiten über Murena-Produkte und Werbeaktionen erhalten", + "I want to receive news about /e/OS": "Ich möchte Nachrichten über /e/OS erhalten.", + "Your name as shown to others": "Ihr Name, wie er für andere sichtbar ist", "Password": "Passwort", "Confirm": "Bestätigen Sie", + "Human Verification": "Menschliche Verifizierung", + "Recovery Email": "Wiederherstellung E-Mail", + "Display name is required.": "Anzeigename ist erforderlich.", + "Username is required.": "Der Benutzername ist erforderlich.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen und Unterstrichen bestehen.", + "Username must be at least 3 characters long.": "Der Benutzername muss mindestens 3 Zeichen lang sein.", + "Username is already taken.": "Benutzername ist bereits vergeben.", "Password is required.": "Passwort ist erforderlich.", "Confirm password is required.": "Passwortbestätigung ist erforderlich.", "The confirm password does not match the password.": "Das Bestätigungskennwort stimmt nicht mit dem Kennwort überein.", - "Human verification": "Menschliche Überprüfung", - "Human Verification is required.": "Menschliche Verifizierung ist erforderlich.", - "Human Verification code is not correct.": "Human Verification Code ist nicht korrekt!", - "Signup": "Anmeldung", - "Username already exists.": "Benutzername existiert bereits.", - "Error while creating Murena account.": "Fehler beim Erstellen eines Murena-Kontos.", - "Congratulations! You've successfully created a Murena account.": "Herzlichen Glückwunsch! Sie haben erfolgreich ein Murena-Konto erstellt." - + "Human Verification is required.": "Eine menschliche Verifizierung ist erforderlich.", + "Human Verification code is not correct.": "Der Human Verification Code ist nicht korrekt.", + "Recovery Email is required.": "Eine Wiederherstellungs-E-Mail ist erforderlich.", + "You must read and accept the Terms of Service to create your account.": "Sie müssen die Allgemeinen Geschäftsbedingungen lesen und akzeptieren, um Ihr Konto zu erstellen.", }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index 0097d908..bf62fe65 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -38,29 +38,36 @@ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Für dieses Konto ist ein Abonnement aktiv. Bitte kündigen Sie es oder lassen Sie es auslaufen, bevor Sie Ihr Konto löschen.", "Loading...": "Laden...", "Temporary error contacting murena.com; please try again later!": "Vorübergehender Fehler bei der Kontaktaufnahme mit murena.com; bitte versuchen Sie es später noch einmal!", - "Murena Cloud 2FA": "Murena Cloud 2FA", "Create Murena Account": "Murena-Konto erstellen", + "Captcha Verification": "Captcha-Prüfung", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "Aus Sicherheitsgründen müssen Sie eine Wiederherstellungsadresse für Ihr Murena Cloud-Konto festlegen.", + "As long as you don't, you'll have limited access to your account.": "Solange Sie das nicht tun, haben Sie nur eingeschränkten Zugang zu Ihrem Konto.", + "Create My Account": "Mein Konto erstellen", + "Verify": "Überprüfen Sie", + "Later": "Später", + "Set my recovery email address": "Meine Wiederherstellungs-E-Mail-Adresse festlegen", "Display name": "Name anzeigen", - "Your name as shown to others": "Ihr Name, wie er für andere sichtbar ist", - "Display name is required.": "Der Anzeigename ist erforderlich.", - "Email": "E-Mail", - "Enter recovery email address": "E-Mail-Adresse für die Wiederherstellung eingeben", - "Email is required.": "E-Mail ist erforderlich.", "Username": "Benutzername", - "Username is required.": "Der Benutzername ist erforderlich.", "Enter Password": "Passwort eingeben", + "I want to receive news about Murena products and promotions": "Ich möchte Neuigkeiten über Murena-Produkte und Werbeaktionen erhalten", + "I want to receive news about /e/OS": "Ich möchte Nachrichten über /e/OS erhalten.", + "Your name as shown to others": "Ihr Name, wie er für andere sichtbar ist", "Password": "Passwort", "Confirm": "Bestätigen Sie", + "Human Verification": "Menschliche Verifizierung", + "Recovery Email": "Wiederherstellung E-Mail", + "Display name is required.": "Anzeigename ist erforderlich.", + "Username is required.": "Der Benutzername ist erforderlich.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen und Unterstrichen bestehen.", + "Username must be at least 3 characters long.": "Der Benutzername muss mindestens 3 Zeichen lang sein.", + "Username is already taken.": "Benutzername ist bereits vergeben.", "Password is required.": "Passwort ist erforderlich.", "Confirm password is required.": "Passwortbestätigung ist erforderlich.", "The confirm password does not match the password.": "Das Bestätigungskennwort stimmt nicht mit dem Kennwort überein.", - "Human verification": "Menschliche Überprüfung", - "Human Verification is required.": "Menschliche Verifizierung ist erforderlich.", - "Human Verification code is not correct.": "Human Verification Code ist nicht korrekt!", - "Signup": "Anmeldung", - "Username already exists.": "Benutzername existiert bereits.", - "Error while creating Murena account.": "Fehler beim Erstellen eines Murena-Kontos.", - "Congratulations! You've successfully created a Murena account.": "Herzlichen Glückwunsch! Sie haben erfolgreich ein Murena-Konto erstellt." + "Human Verification is required.": "Eine menschliche Verifizierung ist erforderlich.", + "Human Verification code is not correct.": "Der Human Verification Code ist nicht korrekt.", + "Recovery Email is required.": "Eine Wiederherstellungs-E-Mail ist erforderlich.", + "You must read and accept the Terms of Service to create your account.": "Sie müssen die Allgemeinen Geschäftsbedingungen lesen und akzeptieren, um Ihr Konto zu erstellen." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/en.json b/l10n/en.json index e5c32585..7f5cb943 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -68,7 +68,7 @@ "Human Verification is required.": "Human Verification is required.", "Human Verification code is not correct.": "Human Verification code is not correct.", "Recovery Email is required.": "Recovery Email is required.", - "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account.", + "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/es.js b/l10n/es.js index 6c9c4131..01856475 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -42,26 +42,34 @@ OC.L10N.register( "Temporary error contacting murena.com; please try again later!": "Error temporal al contactar con murena.com; ¡por favor, inténtalo más tarde!", "Murena Cloud 2FA": "Nube Murena A2F", "Create Murena Account": "Crear cuenta Murena", + "Captcha Verification": "Verificación Captcha", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "Por razones de seguridad, debe establecer una dirección de recuperación para su cuenta de Murena Cloud.", + "As long as you don't, you'll have limited access to your account.": "Mientras no lo hagas, tendrás acceso limitado a tu cuenta.", + "Create My Account": "Crear mi cuenta", + "Verify": "Verifique", + "Later": "Más tarde", + "Set my recovery email address": "Establecer mi dirección de correo electrónico de recuperación", "Display name": "Mostrar nombre", - "Your name as shown to others": "Su nombre ante los demás", - "Display name is required.": "El nombre para mostrar es obligatorio.", - "Email": "Correo electrónico", - "Enter recovery email address": "Introduzca la dirección de correo electrónico de recuperación", - "Email is required.": "Correo electrónico obligatorio.", "Username": "Nombre de usuario", - "Username is required.": "Nombre de usuario obligatorio.", "Enter Password": "Introducir contraseña", + "I want to receive news about Murena products and promotions": "Deseo recibir noticias sobre productos y promociones de Murena", + "I want to receive news about /e/OS": "Quiero recibir noticias sobre /e/OS", + "Your name as shown to others": "Su nombre ante los demás", "Password": "Contraseña", "Confirm": "Confirme", + "Human Verification": "Verificación humana", + "Recovery Email": "Correo electrónico de recuperación", + "Display name is required.": "El nombre para mostrar es obligatorio.", + "Username is required.": "Nombre de usuario obligatorio.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "El nombre de usuario debe estar compuesto únicamente por letras, números, guiones y guiones bajos.", + "Username must be at least 3 characters long.": "El nombre de usuario debe tener al menos 3 caracteres.", + "Username is already taken.": "El nombre de usuario ya está ocupado.", "Password is required.": "Se requiere contraseña.", "Confirm password is required.": "Es necesario confirmar la contraseña.", "The confirm password does not match the password.": "La contraseña confirmada no coincide con la contraseña.", - "Human verification": "Verificación humana", "Human Verification is required.": "Se requiere verificación humana.", - "Human Verification code is not correct.": "El código de verificación humana no es correcto!", - "Signup": "Regístrese en", - "Username already exists.": "El nombre de usuario ya existe.", - "Error while creating Murena account.": "Error al crear una cuenta Murena.", - "Congratulations! You've successfully created a Murena account.": "¡Enhorabuena! Ha creado correctamente una cuenta Murena." + "Human Verification code is not correct.": "El código de verificación humana no es correcto.", + "Recovery Email is required.": "Se requiere correo electrónico de recuperación.", + "You must read and accept the Terms of Service to create your account.": "Debe leer y aceptar las Condiciones del servicio para crear su cuenta.", }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index b574fe4f..9d0eda80 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -2,7 +2,7 @@ "translations": { "Email Address": "Correo electrónico", "Options": "Opciones", - "We are going to proceed with your cloud account suppression.": "Vamos a proceder a la supresión de su cuenta en la nube. ", + "We are going to proceed with your cloud account suppression.": "Vamos a proceder a la supresión de su cuenta en la nube.", "Check the box below if you also want to delete the associated shop account(s).": "Marque la casilla siguiente si también desea eliminar la(s) cuenta(s) de la tienda asociada(s).", "For your information you have %d order(s) in your account.": "Para su información tiene %d orden(es) en su cuenta.", "For your information you have %d order(s) in your accounts: ": "Para su información tiene %d orden(es) en sus cuentas: ", @@ -18,6 +18,7 @@ "Do you want to become a beta user?": "Desea convertirse en usuario beta?", "You want to experiment new features ahead of the others and provide feedback on them before and if they're released? This section is made for you!": "Quieres experimentar las nuevas funciones antes que los demás y dar tu opinión sobre ellas antes y si se publican? Esta sección está hecha para ti.", "To get a preview of our new features you need to become part of our beta users. To do so, simply click on the button below. You can opt out of beta features at anytime.": "Para obtener una vista previa que muestre nuestras nuevas funciones, debe formar parte de nuestros usuarios beta. Para ello, simplemente haga clic en el botón de abajo. Puedes excluirte de las funciones beta en cualquier momento.", + "I agree with terms & conditions.": "Estoy de acuerdo con los términos y condiciones.", "Opt out of beta features": "No participar en las funciones beta", "Become a beta user": "Convertirse en usuario beta", "Are you sure you want to opt out of beta features?": "Estás seguro de que quieres excluir las funciones beta?", @@ -40,27 +41,35 @@ "Temporary error contacting murena.com; please try again later!": "Error temporal al contactar con murena.com; ¡por favor, inténtalo más tarde!", "Murena Cloud 2FA": "Nube Murena A2F", "Create Murena Account": "Crear cuenta Murena", + "Captcha Verification": "Verificación Captcha", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "Por razones de seguridad, debe establecer una dirección de recuperación para su cuenta de Murena Cloud.", + "As long as you don't, you'll have limited access to your account.": "Mientras no lo hagas, tendrás acceso limitado a tu cuenta.", + "Create My Account": "Crear mi cuenta", + "Verify": "Verifique", + "Later": "Más tarde", + "Set my recovery email address": "Establecer mi dirección de correo electrónico de recuperación", "Display name": "Mostrar nombre", - "Your name as shown to others": "Su nombre ante los demás", - "Display name is required.": "El nombre para mostrar es obligatorio.", - "Email": "Correo electrónico", - "Enter recovery email address": "Introduzca la dirección de correo electrónico de recuperación", - "Email is required.": "Correo electrónico obligatorio.", "Username": "Nombre de usuario", - "Username is required.": "Nombre de usuario obligatorio.", "Enter Password": "Introducir contraseña", + "I want to receive news about Murena products and promotions": "Deseo recibir noticias sobre productos y promociones de Murena", + "I want to receive news about /e/OS": "Quiero recibir noticias sobre /e/OS", + "Your name as shown to others": "Su nombre ante los demás", "Password": "Contraseña", "Confirm": "Confirme", + "Human Verification": "Verificación humana", + "Recovery Email": "Correo electrónico de recuperación", + "Display name is required.": "El nombre para mostrar es obligatorio.", + "Username is required.": "Nombre de usuario obligatorio.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "El nombre de usuario debe estar compuesto únicamente por letras, números, guiones y guiones bajos.", + "Username must be at least 3 characters long.": "El nombre de usuario debe tener al menos 3 caracteres.", + "Username is already taken.": "El nombre de usuario ya está ocupado.", "Password is required.": "Se requiere contraseña.", "Confirm password is required.": "Es necesario confirmar la contraseña.", "The confirm password does not match the password.": "La contraseña confirmada no coincide con la contraseña.", - "Human verification": "Verificación humana", "Human Verification is required.": "Se requiere verificación humana.", - "Human Verification code is not correct.": "El código de verificación humana no es correcto!", - "Signup": "Regístrese en", - "Username already exists.": "El nombre de usuario ya existe.", - "Error while creating Murena account.": "Error al crear una cuenta Murena.", - "Congratulations! You've successfully created a Murena account.": "¡Enhorabuena! Ha creado correctamente una cuenta Murena." + "Human Verification code is not correct.": "El código de verificación humana no es correcto.", + "Recovery Email is required.": "Se requiere correo electrónico de recuperación.", + "You must read and accept the Terms of Service to create your account.": "Debe leer y aceptar las Condiciones del servicio para crear su cuenta." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/fr.js b/l10n/fr.js index 9b21410d..b28db04a 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -41,26 +41,34 @@ OC.L10N.register( "Temporary error contacting murena.com; please try again later!": "Erreur temporaire en contactant murena.com ; veuillez réessayer plus tard !", "Murena Cloud 2FA": "Authentification à 2 facteurs Murena Cloud", "Create Murena Account": "Créer un compte Murena", + "Captcha Verification": "Vérification Captcha", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "Pour des raisons de sécurité, vous devez définir une adresse de récupération pour votre compte Murena Cloud.", + "As long as you don't, you'll have limited access to your account.": "Si vous ne le faites pas, vous aurez un accès limité à votre compte.", + "Create My Account": "Créer mon compte", + "Verify": "Vérifier", + "Later": "Plus tard", + "Set my recovery email address": "Définir mon adresse e-mail de récupération", "Display name": "Nom d'affichage", - "Your name as shown to others": "Votre nom tel qu'il est présenté aux autres", - "Display name is required.": "Le nom d'affichage est obligatoire.", - "Email": "Courriel", - "Enter recovery email address": "Saisir l'adresse électronique de récupération", - "Email is required.": "L'adresse électronique est requise.", "Username": "Nom d'utilisateur", - "Username is required.": "Le nom d'utilisateur est requis.", "Enter Password": "Saisir le mot de passe", + "I want to receive news about Murena products and promotions": "Je souhaite recevoir des informations sur les produits et les promotions de Murena.", + "I want to receive news about /e/OS": "Je souhaite recevoir des informations sur /e/OS.", + "Your name as shown to others": "Votre nom tel qu'il est présenté aux autres", "Password": "Mot de passe", "Confirm": "Confirmer", + "Human Verification": "Vérification humaine", + "Recovery Email": "Récupération de l'email", + "Display name is required.": "Le nom d'affichage est obligatoire.", + "Username is required.": "Le nom d'utilisateur est requis.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "Le nom d'utilisateur doit être composé uniquement de lettres, de chiffres, de traits d'union et de traits de soulignement.", + "Username must be at least 3 characters long.": "Le nom d'utilisateur doit comporter au moins 3 caractères.", + "Username is already taken.": "Le nom d'utilisateur est déjà pris.", "Password is required.": "Le mot de passe est requis.", "Confirm password is required.": "La confirmation du mot de passe est requise.", "The confirm password does not match the password.": "Le mot de passe de confirmation ne correspond pas au mot de passe.", - "Human verification": "Vérification humaine", "Human Verification is required.": "Une vérification humaine est nécessaire.", - "Human Verification code is not correct.": "Le code de vérification humain n'est pas correct.", - "Signup": "S'inscrire", - "Username already exists.": "Le nom d'utilisateur existe déjà.", - "Error while creating Murena account.": "Erreur lors de la création du compte Murena.", - "Congratulations! You've successfully created a Murena account.": "Nous vous félicitons ! Vous avez créé avec succès un compte Murena." + "Human Verification code is not correct.": "Le code de vérification humaine n'est pas correct.", + "Recovery Email is required.": "L'e-mail de récupération est requis.", + "You must read and accept the Terms of Service to create your account.": "Vous devez lire et accepter les conditions de service pour créer votre compte.", }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 8ab2ac35..4b0536ba 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -40,27 +40,35 @@ "Temporary error contacting murena.com; please try again later!": "Erreur temporaire en contactant murena.com ; veuillez réessayer plus tard !", "Murena Cloud 2FA": "Authentification à 2 facteurs Murena Cloud", "Create Murena Account": "Créer un compte Murena", + "Captcha Verification": "Vérification Captcha", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "Pour des raisons de sécurité, vous devez définir une adresse de récupération pour votre compte Murena Cloud.", + "As long as you don't, you'll have limited access to your account.": "Si vous ne le faites pas, vous aurez un accès limité à votre compte.", + "Create My Account": "Créer mon compte", + "Verify": "Vérifier", + "Later": "Plus tard", + "Set my recovery email address": "Définir mon adresse e-mail de récupération", "Display name": "Nom d'affichage", - "Your name as shown to others": "Votre nom tel qu'il est présenté aux autres", - "Display name is required.": "Le nom d'affichage est obligatoire.", - "Email": "Courriel", - "Enter recovery email address": "Saisir l'adresse électronique de récupération", - "Email is required.": "L'adresse électronique est requise.", "Username": "Nom d'utilisateur", - "Username is required.": "Le nom d'utilisateur est requis.", "Enter Password": "Saisir le mot de passe", + "I want to receive news about Murena products and promotions": "Je souhaite recevoir des informations sur les produits et les promotions de Murena.", + "I want to receive news about /e/OS": "Je souhaite recevoir des informations sur /e/OS.", + "Your name as shown to others": "Votre nom tel qu'il est présenté aux autres", "Password": "Mot de passe", "Confirm": "Confirmer", + "Human Verification": "Vérification humaine", + "Recovery Email": "Récupération de l'email", + "Display name is required.": "Le nom d'affichage est obligatoire.", + "Username is required.": "Le nom d'utilisateur est requis.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "Le nom d'utilisateur doit être composé uniquement de lettres, de chiffres, de traits d'union et de traits de soulignement.", + "Username must be at least 3 characters long.": "Le nom d'utilisateur doit comporter au moins 3 caractères.", + "Username is already taken.": "Le nom d'utilisateur est déjà pris.", "Password is required.": "Le mot de passe est requis.", "Confirm password is required.": "La confirmation du mot de passe est requise.", "The confirm password does not match the password.": "Le mot de passe de confirmation ne correspond pas au mot de passe.", - "Human verification": "Vérification humaine", "Human Verification is required.": "Une vérification humaine est nécessaire.", - "Human Verification code is not correct.": "Le code de vérification humain n'est pas correct.", - "Signup": "S'inscrire", - "Username already exists.": "Le nom d'utilisateur existe déjà.", - "Error while creating Murena account.": "Erreur lors de la création du compte Murena.", - "Congratulations! You've successfully created a Murena account.": "Nous vous félicitons ! Vous avez créé avec succès un compte Murena." + "Human Verification code is not correct.": "Le code de vérification humaine n'est pas correct.", + "Recovery Email is required.": "L'e-mail de récupération est requis.", + "You must read and accept the Terms of Service to create your account.": "Vous devez lire et accepter les conditions de service pour créer votre compte." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/it.js b/l10n/it.js index f9de51f6..523ce8b4 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -41,26 +41,34 @@ OC.L10N.register( "Temporary error contacting murena.com; please try again later!": "Errore temporaneo nel contattare murena.com; riprova più tardi!", "Murena Cloud 2FA": "Codice di Autenticazione a 2 Fattori Murena Cloud", "Create Murena Account": "Creare un account Murena", + "Captcha Verification": "Verifica Captcha", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "Per motivi di sicurezza è necessario impostare un indirizzo di recupero per il proprio account Murena Cloud.", + "As long as you don't, you'll have limited access to your account.": "Finché non lo farete, avrete un accesso limitato al vostro conto.", + "Create My Account": "Crea il mio account", + "Verify": "Verifica", + "Later": "Più tardi", + "Set my recovery email address": "Impostare l'indirizzo e-mail di recupero", "Display name": "Nome visualizzato", - "Your name as shown to others": "Il vostro nome come mostrato agli altri", - "Display name is required.": "Il nome visualizzato è obbligatorio.", - "Email": "Email", - "Enter recovery email address": "Inserire l'indirizzo e-mail di recupero", - "Email is required.": "L'e-mail è necessaria.", "Username": "Nome utente", - "Username is required.": "Il nome utente è necessario.", "Enter Password": "Inserire la password", + "I want to receive news about Murena products and promotions": "Desidero ricevere notizie sui prodotti e sulle promozioni Murena.", + "I want to receive news about /e/OS": "Voglio ricevere notizie su /e/OS.", + "Your name as shown to others": "Il vostro nome come mostrato agli altri", "Password": "Password", "Confirm": "Confermare", - "Password is required.": "È richiesta la password.", + "Human Verification": "Verifica umana", + "Recovery Email": "Recupero e-mail", + "Display name is required.": "Il nome visualizzato è obbligatorio.", + "Username is required.": "Il nome utente è necessario.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "Il nome utente deve essere composto esclusivamente da lettere, numeri, trattini e trattini bassi.", + "Username must be at least 3 characters long.": "Il nome utente deve essere lungo almeno 3 caratteri.", + "Username is already taken.": "Il nome utente è già stato preso.", + "Password is required.": "La password è necessaria.", "Confirm password is required.": "È necessario confermare la password.", "The confirm password does not match the password.": "La password di conferma non corrisponde alla password.", - "Human verification": "Verifica umana", "Human Verification is required.": "È necessaria la verifica umana.", "Human Verification code is not correct.": "Il codice di verifica umano non è corretto.", - "Signup": "Iscriviti", - "Username already exists.": "Il nome utente esiste già.", - "Error while creating Murena account.": "Errore durante la creazione dell'account Murena.", - "Congratulations! You've successfully created a Murena account.": "Congratulazioni! Avete creato con successo un account Murena." + "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.", }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/it.json b/l10n/it.json index c22d0f5c..2dcaf6c5 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -2,7 +2,7 @@ "translations": { "Email Address": "Indirizzo e-mail", "Options": "Opzioni", - "We are going to proceed with your cloud account suppression.": "Procederemo con la soppressione dell'account cloud. ", + "We are going to proceed with your cloud account suppression.": "Procederemo con la soppressione dell'account cloud.", "Check the box below if you also want to delete the associated shop account(s).": "Selezionare la casella sottostante se si desidera eliminare anche gli account del negozio associati.", "For your information you have %d order(s) in your account.": "Per vostra informazione, avete %d ordini in il tuo account.", "For your information you have %d order(s) in your accounts: ": "Per vostra informazione, avete %d ordini in i vostri conti: ", @@ -40,27 +40,35 @@ "Temporary error contacting murena.com; please try again later!": "Errore temporaneo nel contattare murena.com; riprova più tardi!", "Murena Cloud 2FA": "Codice di Autenticazione a 2 Fattori Murena Cloud", "Create Murena Account": "Creare un account Murena", + "Captcha Verification": "Verifica Captcha", + "For security reasons you need to set a recovery address for your Murena Cloud account.": "Per motivi di sicurezza è necessario impostare un indirizzo di recupero per il proprio account Murena Cloud.", + "As long as you don't, you'll have limited access to your account.": "Finché non lo farete, avrete un accesso limitato al vostro conto.", + "Create My Account": "Crea il mio account", + "Verify": "Verifica", + "Later": "Più tardi", + "Set my recovery email address": "Impostare l'indirizzo e-mail di recupero", "Display name": "Nome visualizzato", - "Your name as shown to others": "Il vostro nome come mostrato agli altri", - "Display name is required.": "Il nome visualizzato è obbligatorio.", - "Email": "Email", - "Enter recovery email address": "Inserire l'indirizzo e-mail di recupero", - "Email is required.": "L'e-mail è necessaria.", "Username": "Nome utente", - "Username is required.": "Il nome utente è necessario.", "Enter Password": "Inserire la password", + "I want to receive news about Murena products and promotions": "Desidero ricevere notizie sui prodotti e sulle promozioni Murena.", + "I want to receive news about /e/OS": "Voglio ricevere notizie su /e/OS.", + "Your name as shown to others": "Il vostro nome come mostrato agli altri", "Password": "Password", "Confirm": "Confermare", - "Password is required.": "È richiesta la password.", + "Human Verification": "Verifica umana", + "Recovery Email": "Recupero e-mail", + "Display name is required.": "Il nome visualizzato è obbligatorio.", + "Username is required.": "Il nome utente è necessario.", + "Username must consist of letters, numbers, hyphens, and underscores only.": "Il nome utente deve essere composto esclusivamente da lettere, numeri, trattini e trattini bassi.", + "Username must be at least 3 characters long.": "Il nome utente deve essere lungo almeno 3 caratteri.", + "Username is already taken.": "Il nome utente è già stato preso.", + "Password is required.": "La password è necessaria.", "Confirm password is required.": "È necessario confermare la password.", "The confirm password does not match the password.": "La password di conferma non corrisponde alla password.", - "Human verification": "Verifica umana", "Human Verification is required.": "È necessaria la verifica umana.", "Human Verification code is not correct.": "Il codice di verifica umano non è corretto.", - "Signup": "Iscriviti", - "Username already exists.": "Il nome utente esiste già.", - "Error while creating Murena account.": "Errore durante la creazione dell'account Murena.", - "Congratulations! You've successfully created a Murena account.": "Congratulazioni! Avete creato con successo un account Murena." + "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." }, "pluralForm": "nplurals=2; plural=(n != 1);" } -- GitLab From e9369163038c63eb23203bb915c3c1081a40b0bc Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 01:04:30 -0700 Subject: [PATCH 158/427] changes in dynamic urls --- l10n/de.js | 5 +++++ l10n/de.json | 6 +++++- l10n/en.js | 5 +++++ l10n/en.json | 7 ++++++- l10n/es.js | 5 +++++ l10n/es.json | 7 ++++++- l10n/fr.js | 5 +++++ l10n/fr.json | 7 ++++++- l10n/it.js | 5 +++++ lib/Controller/AccountController.php | 10 +++++++++- src/Signup.vue | 28 +++++++++++++++++++++------- 11 files changed, 78 insertions(+), 12 deletions(-) diff --git a/l10n/de.js b/l10n/de.js index f8842913..555e6615 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -69,5 +69,10 @@ OC.L10N.register( "Human Verification code is not correct.": "Der Human Verification Code ist nicht korrekt.", "Recovery Email is required.": "Eine Wiederherstellungs-E-Mail ist erforderlich.", "You must read and accept the Terms of Service to create your account.": "Sie müssen die Allgemeinen Geschäftsbedingungen lesen und akzeptieren, um Ihr Konto zu erstellen.", + "Use My Account Now": "Mein Konto jetzt verwenden", + "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 %Benutzername@%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." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index bf62fe65..ec57d3ef 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -67,7 +67,11 @@ "Human Verification is required.": "Eine menschliche Verifizierung ist erforderlich.", "Human Verification code is not correct.": "Der Human Verification Code ist nicht korrekt.", "Recovery Email is required.": "Eine Wiederherstellungs-E-Mail ist erforderlich.", - "You must read and accept the Terms of Service to create your account.": "Sie müssen die Allgemeinen Geschäftsbedingungen lesen und akzeptieren, um Ihr Konto zu erstellen." + "You must read and accept the Terms of Service to create your account.": "Sie müssen die Allgemeinen Geschäftsbedingungen lesen und akzeptieren, um Ihr Konto zu erstellen.", + "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 %Benutzername@%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." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/en.js b/l10n/en.js index fba0bc09..42326842 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -72,5 +72,10 @@ OC.L10N.register( "Human Verification code is not correct.": "Human Verification code is not correct.", "Recovery Email is required.": "Recovery Email is required.", "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account.", + "Use My Account Now": "Use My Account Now", + "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." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/en.json b/l10n/en.json index 7f5cb943..286dcb37 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -68,7 +68,12 @@ "Human Verification is required.": "Human Verification is required.", "Human Verification code is not correct.": "Human Verification code is not correct.", "Recovery Email is required.": "Recovery Email is required.", - "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account." + "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account.", + "Use My Account Now": "Use My Account Now", + "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." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/es.js b/l10n/es.js index 01856475..c9aacb86 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -71,5 +71,10 @@ OC.L10N.register( "Human Verification code is not correct.": "El código de verificación humana no es correcto.", "Recovery Email is required.": "Se requiere correo electrónico de recuperación.", "You must read and accept the Terms of Service to create your account.": "Debe leer y aceptar las Condiciones del servicio para crear su cuenta.", + "Use My Account Now": "Utilizar mi cuenta ahora", + "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 %nombredeusuario@%dominio 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.", }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 9d0eda80..f324d969 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -69,7 +69,12 @@ "Human Verification is required.": "Se requiere verificación humana.", "Human Verification code is not correct.": "El código de verificación humana no es correcto.", "Recovery Email is required.": "Se requiere correo electrónico de recuperación.", - "You must read and accept the Terms of Service to create your account.": "Debe leer y aceptar las Condiciones del servicio para crear su cuenta." + "You must read and accept the Terms of Service to create your account.": "Debe leer y aceptar las Condiciones del servicio para crear su cuenta.", + "Use My Account Now": "Utilizar mi cuenta ahora", + "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 %nombredeusuario@%dominio 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." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/fr.js b/l10n/fr.js index b28db04a..7d5ad552 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -70,5 +70,10 @@ OC.L10N.register( "Human Verification code is not correct.": "Le code de vérification humaine n'est pas correct.", "Recovery Email is required.": "L'e-mail de récupération est requis.", "You must read and accept the Terms of Service to create your account.": "Vous devez lire et accepter les conditions de service pour créer votre compte.", + "Use My Account Now": "Utiliser mon compte maintenant", + "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." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 4b0536ba..8402cc7b 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -68,7 +68,12 @@ "Human Verification is required.": "Une vérification humaine est nécessaire.", "Human Verification code is not correct.": "Le code de vérification humaine n'est pas correct.", "Recovery Email is required.": "L'e-mail de récupération est requis.", - "You must read and accept the Terms of Service to create your account.": "Vous devez lire et accepter les conditions de service pour créer votre compte." + "You must read and accept the Terms of Service to create your account.": "Vous devez lire et accepter les conditions de service pour créer votre compte.", + "Use My Account Now": "Utiliser mon compte maintenant", + "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." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/it.js b/l10n/it.js index 523ce8b4..42105a29 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -70,5 +70,10 @@ OC.L10N.register( "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.", + "Use My Account Now": "Utilizza ora il mio account", + "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." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 799119b4..ab606626 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -101,12 +101,14 @@ class AccountController extends Controller { 'captchaVerification' => $l->t('Captcha Verification'), 'recoveryEmailForm1' => $l->t('For security reasons you need to set a recovery address for your Murena Cloud account.'), 'recoveryEmailForm2' => $l->t('As long as you don\'t, you\'ll have limited access to your account.'), + 'readAndAcceptTOS' => $l->t('I have read and accept the Terms of Service.'), ]; $buttons = [ 'createMyAccount' => $l->t('Create My Account'), 'verify' => $l->t('Verify'), 'later' => $l->t('Later'), 'setRecoverEmail' => $l->t('Set my recovery email address'), + 'useMyAccountNow' => $l->t('Use My Account Now') ]; $labels = [ 'displayName' => $l->t('Display name'), @@ -142,13 +144,19 @@ class AccountController extends Controller { $others = [ 'somethingWentWrong' => $l->t('Something went wrong.'), ]; + $success = [ + 'successMessage' => $l->t('Success!'), + 'accountCreated' => $l->t('Your %username@%domain account was successfully created.'), + 'supportMessage' => $l->t('If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.'), + ]; $data = [ 'titles' => $titles, 'buttons' => $buttons, 'labels' => $labels, 'placeholders' => $placeholders, 'errors' => $errors, - 'others' => $others + 'others' => $others, + 'success' => $success ]; $response = new DataResponse(); $response->setStatus(200); diff --git a/src/Signup.vue b/src/Signup.vue index a23d9993..6a0163ea 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -105,7 +105,7 @@ type="checkbox" class="checkbox action-checkbox__checkbox focusable"> + {{ titles.readAndAcceptTOS }}*

@@ -204,9 +204,9 @@

-
@@ -267,19 +267,19 @@

- Success! + {{ success.successMessage }}

- Your {{ username }}@{{ domain }} account was successfully created. + {{ success.accountCreated }}

- If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page. + {{ success.supportMessage }}

@@ -347,12 +347,14 @@ export default { captchaVerification: 'Captcha Verification', recoveryEmailForm1: 'For security reasons you need to set a recovery address for your Murena Cloud account.', recoveryEmailForm2: 'As long as you don\'t, you\'ll have limited access to your account.', + readAndAcceptTOS: 'I have read and accept the Terms of Service.', }, buttons: { createMyAccount: 'Create My Account', verify: 'Verify', later: 'Later', setRecoverEmail: 'Set my recovery email address', + useMyAccountNow: 'Use My Account Now', }, labels: { displayName: 'Display name', @@ -385,6 +387,11 @@ export default { recoveryEmail: 'Recovery Email is required.', acceptTOS: 'You must read and accept the Terms of Service to create your account.', }, + success: { + successMessage: 'Success!', + accountCreated: 'Your %username@%domain account was successfully created.', + supportMessage: 'If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.', + }, others: { somethingWentWrong: 'Something went wrong.', }, @@ -551,6 +558,13 @@ export default { this.placeholders = response.data.placeholders this.errors = response.data.errors this.others = response.data.others + this.success = response.data.success + + this.titles.readAndAcceptTOS = this.titles.readAndAcceptTOS.replace('%termsURL', this.termsURL) + this.success.accountCreated = this.success.accountCreated.replace('%username', this.username) + this.success.accountCreated = this.success.accountCreated.replace('%domain', this.domain) + this.success.supportMessage = this.success.supportMessage.replace('%supportURL', this.supportURL) + } else { this.showMessage(this.others.somethingWentWrong, 'error') } -- GitLab From d033851e0e214789ac189b3da28f243e977ba96d Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 01:14:02 -0700 Subject: [PATCH 159/427] changes --- lib/Controller/AccountController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index ab606626..299e96b8 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -101,7 +101,7 @@ class AccountController extends Controller { 'captchaVerification' => $l->t('Captcha Verification'), 'recoveryEmailForm1' => $l->t('For security reasons you need to set a recovery address for your Murena Cloud account.'), 'recoveryEmailForm2' => $l->t('As long as you don\'t, you\'ll have limited access to your account.'), - 'readAndAcceptTOS' => $l->t('I have read and accept the Terms of Service.'), + 'readAndAcceptTOS' => $l->t('I have read and accept the Terms of Service.') ]; $buttons = [ 'createMyAccount' => $l->t('Create My Account'), @@ -117,7 +117,7 @@ class AccountController extends Controller { 'humanVefication' => $l->t('Human Verification'), 'recoveryEmail' => $l->t('Recovery Email'), 'newsletter_product' => $l->t('I want to receive news about Murena products and promotions'), - 'newsletter_eos' => $l->t('I want to receive news about /e/OS'), + 'newsletter_eos' => $l->t('I want to receive news about /e/OS') ]; $placeholders = [ 'displayName' => $l->t('Your name as shown to others'), @@ -125,7 +125,7 @@ class AccountController extends Controller { 'enterPassword' => $l->t('Password'), 'confirmPassword' => $l->t('Confirm'), 'humanVefication' => $l->t('Human Verification'), - 'recoveryEmail' => $l->t('Recovery Email'), + 'recoveryEmail' => $l->t('Recovery Email') ]; $errors = [ 'displayName' => $l->t('Display name is required.'), @@ -139,7 +139,7 @@ class AccountController extends Controller { 'humanVefication' => $l->t('Human Verification is required.'), 'humanVeficationNotCorrect' => $l->t('Human Verification code is not correct.'), 'recoveryEmail' => $l->t('Recovery Email is required.'), - 'acceptTOS' => $l->t('You must read and accept the Terms of Service to create your account.'), + 'acceptTOS' => $l->t('You must read and accept the Terms of Service to create your account.') ]; $others = [ 'somethingWentWrong' => $l->t('Something went wrong.'), @@ -147,7 +147,7 @@ class AccountController extends Controller { $success = [ 'successMessage' => $l->t('Success!'), 'accountCreated' => $l->t('Your %username@%domain account was successfully created.'), - 'supportMessage' => $l->t('If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.'), + 'supportMessage' => $l->t('If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.') ]; $data = [ 'titles' => $titles, -- GitLab From 93e239bf8ae5c2b063357936b4e83e586fd43c9d Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 01:18:36 -0700 Subject: [PATCH 160/427] Changed in quote --- lib/Controller/AccountController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 299e96b8..60af3d5f 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -100,8 +100,8 @@ class AccountController extends Controller { 'createMurenaAccount' => $l->t('Create Murena Account'), 'captchaVerification' => $l->t('Captcha Verification'), 'recoveryEmailForm1' => $l->t('For security reasons you need to set a recovery address for your Murena Cloud account.'), - 'recoveryEmailForm2' => $l->t('As long as you don\'t, you\'ll have limited access to your account.'), - 'readAndAcceptTOS' => $l->t('I have read and accept the Terms of Service.') + 'recoveryEmailForm2' => $l->t("As long as you don't, you'll have limited access to your account."), + 'readAndAcceptTOS' => $l->t("I have read and accept the Terms of Service.") ]; $buttons = [ 'createMyAccount' => $l->t('Create My Account'), @@ -147,7 +147,7 @@ class AccountController extends Controller { $success = [ 'successMessage' => $l->t('Success!'), 'accountCreated' => $l->t('Your %username@%domain account was successfully created.'), - 'supportMessage' => $l->t('If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.') + 'supportMessage' => $l->t("If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.") ]; $data = [ 'titles' => $titles, -- GitLab From 7034321ad9966dbf25bbe23fd3637e5d5a1a59ba Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 01:37:56 -0700 Subject: [PATCH 161/427] added underscore instead --- l10n/de.js | 6 +++--- l10n/de.json | 6 +++--- l10n/en.js | 6 +++--- l10n/en.json | 6 +++--- l10n/es.js | 6 +++--- l10n/es.json | 6 +++--- l10n/fr.js | 6 +++--- l10n/fr.json | 6 +++--- l10n/it.js | 6 +++--- lib/Controller/AccountController.php | 6 +++--- src/Signup.vue | 14 +++++++------- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/l10n/de.js b/l10n/de.js index 555e6615..c7bd4c06 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -70,9 +70,9 @@ OC.L10N.register( "Recovery Email is required.": "Eine Wiederherstellungs-E-Mail ist erforderlich.", "You must read and accept the Terms of Service to create your account.": "Sie müssen die Allgemeinen Geschäftsbedingungen lesen und akzeptieren, um Ihr Konto zu erstellen.", "Use My Account Now": "Mein Konto jetzt verwenden", - "I have read and accept the Terms of Service.": "Ich habe die Nutzungsbedingungen gelesen und akzeptiere diese.", + "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 %Benutzername@%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." + "Your __username__@__domain__ account was successfully created.": "Ihr %Benutzername@__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." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index ec57d3ef..45dd39d6 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -68,10 +68,10 @@ "Human Verification code is not correct.": "Der Human Verification Code ist nicht korrekt.", "Recovery Email is required.": "Eine Wiederherstellungs-E-Mail ist erforderlich.", "You must read and accept the Terms of Service to create your account.": "Sie müssen die Allgemeinen Geschäftsbedingungen lesen und akzeptieren, um Ihr Konto zu erstellen.", - "I have read and accept the Terms of Service.": "Ich habe die Nutzungsbedingungen gelesen und akzeptiere diese.", + "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 %Benutzername@%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." + "Your __username__@__domain__ account was successfully created.": "Ihr %Benutzername@__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." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/en.js b/l10n/en.js index 42326842..81ff9ce3 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -73,9 +73,9 @@ OC.L10N.register( "Recovery Email is required.": "Recovery Email is required.", "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account.", "Use My Account Now": "Use My Account Now", - "I have read and accept the Terms of Service.": "I have read and accept the Terms of Service.", + "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." + "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." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/en.json b/l10n/en.json index 286dcb37..5a2d28d5 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -70,10 +70,10 @@ "Recovery Email is required.": "Recovery Email is required.", "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account.", "Use My Account Now": "Use My Account Now", - "I have read and accept the Terms of Service.": "I have read and accept the Terms of Service.", + "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." + "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." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/es.js b/l10n/es.js index c9aacb86..237827ce 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -72,9 +72,9 @@ OC.L10N.register( "Recovery Email is required.": "Se requiere correo electrónico de recuperación.", "You must read and accept the Terms of Service to create your account.": "Debe leer y aceptar las Condiciones del servicio para crear su cuenta.", "Use My Account Now": "Utilizar mi cuenta ahora", - "I have read and accept the Terms of Service.": "He leído y acepto las Condiciones del servicio.", + "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 %nombredeusuario@%dominio 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.", + "Your __username__@__domain__ account was successfully created.": "Su cuenta %nombredeusuario@%dominio 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.", }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index f324d969..e2c477c5 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -71,10 +71,10 @@ "Recovery Email is required.": "Se requiere correo electrónico de recuperación.", "You must read and accept the Terms of Service to create your account.": "Debe leer y aceptar las Condiciones del servicio para crear su cuenta.", "Use My Account Now": "Utilizar mi cuenta ahora", - "I have read and accept the Terms of Service.": "He leído y acepto las Condiciones del servicio.", + "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 %nombredeusuario@%dominio 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." + "Your __username__@__domain__ account was successfully created.": "Su cuenta %nombredeusuario@%dominio 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." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/fr.js b/l10n/fr.js index 7d5ad552..0111d615 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -71,9 +71,9 @@ OC.L10N.register( "Recovery Email is required.": "L'e-mail de récupération est requis.", "You must read and accept the Terms of Service to create your account.": "Vous devez lire et accepter les conditions de service pour créer votre compte.", "Use My Account Now": "Utiliser mon compte maintenant", - "I have read and accept the Terms of Service.": "J'ai lu et j'accepte les Termes de service.", + "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." + "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." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 8402cc7b..0bfb9bf3 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -70,10 +70,10 @@ "Recovery Email is required.": "L'e-mail de récupération est requis.", "You must read and accept the Terms of Service to create your account.": "Vous devez lire et accepter les conditions de service pour créer votre compte.", "Use My Account Now": "Utiliser mon compte maintenant", - "I have read and accept the Terms of Service.": "J'ai lu et j'accepte les Termes de service.", + "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." + "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." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/it.js b/l10n/it.js index 42105a29..2b4482d3 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -71,9 +71,9 @@ OC.L10N.register( "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.", "Use My Account Now": "Utilizza ora il mio account", - "I have read and accept the Terms of Service.": "Ho letto e accetto i Termini di servizio.", + "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." + "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." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 60af3d5f..8e925d4e 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -101,7 +101,7 @@ class AccountController extends Controller { 'captchaVerification' => $l->t('Captcha Verification'), 'recoveryEmailForm1' => $l->t('For security reasons you need to set a recovery address for your Murena Cloud account.'), 'recoveryEmailForm2' => $l->t("As long as you don't, you'll have limited access to your account."), - 'readAndAcceptTOS' => $l->t("I have read and accept the Terms of Service.") + 'readAndAcceptTOS' => $l->t("I have read and accept the Terms of Service.") ]; $buttons = [ 'createMyAccount' => $l->t('Create My Account'), @@ -146,8 +146,8 @@ class AccountController extends Controller { ]; $success = [ 'successMessage' => $l->t('Success!'), - 'accountCreated' => $l->t('Your %username@%domain account was successfully created.'), - 'supportMessage' => $l->t("If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.") + 'accountCreated' => $l->t('Your __username__@__domain__ account was successfully created.'), + 'supportMessage' => $l->t("If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.") ]; $data = [ 'titles' => $titles, diff --git a/src/Signup.vue b/src/Signup.vue index 6a0163ea..0920a39a 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -347,7 +347,7 @@ export default { captchaVerification: 'Captcha Verification', recoveryEmailForm1: 'For security reasons you need to set a recovery address for your Murena Cloud account.', recoveryEmailForm2: 'As long as you don\'t, you\'ll have limited access to your account.', - readAndAcceptTOS: 'I have read and accept the Terms of Service.', + readAndAcceptTOS: 'I have read and accept the Terms of Service.', }, buttons: { createMyAccount: 'Create My Account', @@ -389,8 +389,8 @@ export default { }, success: { successMessage: 'Success!', - accountCreated: 'Your %username@%domain account was successfully created.', - supportMessage: 'If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.', + accountCreated: 'Your __username__@__domain__ account was successfully created.', + supportMessage: 'If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.', }, others: { somethingWentWrong: 'Something went wrong.', @@ -560,10 +560,10 @@ export default { this.others = response.data.others this.success = response.data.success - this.titles.readAndAcceptTOS = this.titles.readAndAcceptTOS.replace('%termsURL', this.termsURL) - this.success.accountCreated = this.success.accountCreated.replace('%username', this.username) - this.success.accountCreated = this.success.accountCreated.replace('%domain', this.domain) - this.success.supportMessage = this.success.supportMessage.replace('%supportURL', this.supportURL) + this.titles.readAndAcceptTOS = this.titles.readAndAcceptTOS.replace('__termsURL__', this.termsURL) + this.success.accountCreated = this.success.accountCreated.replace('__username__', this.username) + this.success.accountCreated = this.success.accountCreated.replace('__domain__', this.domain) + this.success.supportMessage = this.success.supportMessage.replace('__supportURL__', this.supportURL) } else { this.showMessage(this.others.somethingWentWrong, 'error') -- GitLab From d76bd8ac26ab23dcbd6e772d3bdf867ca63b156c Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 01:38:58 -0700 Subject: [PATCH 162/427] change in human character --- src/Signup.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index 0920a39a..2053f1d4 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -174,8 +174,7 @@ name="humanverification" class="form-input" :placeholder="placeholders.humanVefication" - type="text" - @input="validateForm(['humanverification'])"> + type="text">

{{ errors.humanVefication }} -- GitLab From 7c4baafade6b2ed20670cb67a51a2971a65b7ecb Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 01:44:10 -0700 Subject: [PATCH 163/427] change in quote --- lib/Controller/AccountController.php | 72 ++++++++++++++-------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 8e925d4e..8869e75e 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -97,56 +97,56 @@ class AccountController extends Controller { $l = $this->l10nFactory->get(Application::APP_ID, $language); $titles = [ - 'createMurenaAccount' => $l->t('Create Murena Account'), - 'captchaVerification' => $l->t('Captcha Verification'), - 'recoveryEmailForm1' => $l->t('For security reasons you need to set a recovery address for your Murena Cloud account.'), + 'createMurenaAccount' => $l->t("Create Murena Account"), + 'captchaVerification' => $l->t("Captcha Verification"), + 'recoveryEmailForm1' => $l->t("For security reasons you need to set a recovery address for your Murena Cloud account."), 'recoveryEmailForm2' => $l->t("As long as you don't, you'll have limited access to your account."), 'readAndAcceptTOS' => $l->t("I have read and accept the Terms of Service.") ]; $buttons = [ - 'createMyAccount' => $l->t('Create My Account'), - 'verify' => $l->t('Verify'), - 'later' => $l->t('Later'), - 'setRecoverEmail' => $l->t('Set my recovery email address'), - 'useMyAccountNow' => $l->t('Use My Account Now') + 'createMyAccount' => $l->t("Create My Account"), + 'verify' => $l->t("Verify"), + 'later' => $l->t("Later"), + 'setRecoverEmail' => $l->t("Set my recovery email address"), + 'useMyAccountNow' => $l->t("Use My Account Now") ]; $labels = [ - 'displayName' => $l->t('Display name'), - 'userName' => $l->t('Username'), - 'enterPassword' => $l->t('Enter Password'), - 'humanVefication' => $l->t('Human Verification'), - 'recoveryEmail' => $l->t('Recovery Email'), - 'newsletter_product' => $l->t('I want to receive news about Murena products and promotions'), - 'newsletter_eos' => $l->t('I want to receive news about /e/OS') + 'displayName' => $l->t("Display name"), + 'userName' => $l->t("Username"), + 'enterPassword' => $l->t("Enter Password"), + 'humanVefication' => $l->t("Human Verification"), + 'recoveryEmail' => $l->t("Recovery Email"), + 'newsletter_product' => $l->t("I want to receive news about Murena products and promotions"), + 'newsletter_eos' => $l->t("I want to receive news about /e/OS") ]; $placeholders = [ - 'displayName' => $l->t('Your name as shown to others'), - 'userName' => $l->t('Username'), - 'enterPassword' => $l->t('Password'), - 'confirmPassword' => $l->t('Confirm'), - 'humanVefication' => $l->t('Human Verification'), - 'recoveryEmail' => $l->t('Recovery Email') + 'displayName' => $l->t("Your name as shown to others"), + 'userName' => $l->t("Username"), + 'enterPassword' => $l->t("Password"), + 'confirmPassword' => $l->t("Confirm"), + 'humanVefication' => $l->t("Human Verification"), + 'recoveryEmail' => $l->t("Recovery Email") ]; $errors = [ - 'displayName' => $l->t('Display name is required.'), - 'userName' => $l->t('Username is required.'), - 'userNameInvalid' => $l->t('Username must consist of letters, numbers, hyphens, and underscores only.'), - 'userNameLength' => $l->t('Username must be at least 3 characters long.'), - 'userNameTaken' => $l->t('Username is already taken.'), - 'password' => $l->t('Password is required.'), - 'confirmPassword' => $l->t('Confirm password is required.'), - 'passwordNotMatched' => $l->t('The confirm password does not match the password.'), - 'humanVefication' => $l->t('Human Verification is required.'), - 'humanVeficationNotCorrect' => $l->t('Human Verification code is not correct.'), - 'recoveryEmail' => $l->t('Recovery Email is required.'), - 'acceptTOS' => $l->t('You must read and accept the Terms of Service to create your account.') + 'displayName' => $l->t("Display name is required."), + 'userName' => $l->t("Username is required."), + 'userNameInvalid' => $l->t("Username must consist of letters, numbers, hyphens, and underscores only."), + 'userNameLength' => $l->t("Username must be at least 3 characters long."), + 'userNameTaken' => $l->t("Username is already taken."), + 'password' => $l->t("Password is required."), + 'confirmPassword' => $l->t("Confirm password is required."), + 'passwordNotMatched' => $l->t("The confirm password does not match the password."), + 'humanVefication' => $l->t("Human Verification is required."), + 'humanVeficationNotCorrect' => $l->t("Human Verification code is not correct."), + 'recoveryEmail' => $l->t("Recovery Email is required."), + 'acceptTOS' => $l->t("You must read and accept the Terms of Service to create your account.") ]; $others = [ - 'somethingWentWrong' => $l->t('Something went wrong.'), + 'somethingWentWrong' => $l->t("Something went wrong."), ]; $success = [ - 'successMessage' => $l->t('Success!'), - 'accountCreated' => $l->t('Your __username__@__domain__ account was successfully created.'), + 'successMessage' => $l->t("Success!"), + 'accountCreated' => $l->t("Your __username__@__domain__ account was successfully created."), 'supportMessage' => $l->t("If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.") ]; $data = [ -- GitLab From 1d631699992a4b4ed983ffb73fd672f5728b02ed Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 01:46:43 -0700 Subject: [PATCH 164/427] changes --- lib/Controller/AccountController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 8869e75e..26648be5 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -146,7 +146,7 @@ class AccountController extends Controller { ]; $success = [ 'successMessage' => $l->t("Success!"), - 'accountCreated' => $l->t("Your __username__@__domain__ account was successfully created."), + 'accountCreated' => $l->t("Your __username__@__domain__ account was successfully created."), 'supportMessage' => $l->t("If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.") ]; $data = [ -- GitLab From 304b75235ae9bdbe140faf2ee448c1502ef36a63 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 06:45:54 -0700 Subject: [PATCH 165/427] trying --- lib/Controller/AccountController.php | 4 ++++ src/Signup.vue | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 26648be5..310f789a 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -14,6 +14,7 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; use OCP\IRequest; use OCP\L10N\IFactory; +use OCP\Util; class AccountController extends Controller { protected $appName; @@ -44,6 +45,9 @@ class AccountController extends Controller { * */ public function index() { + + Util::addTranslations(Application::APP_ID, 'de'); + return new TemplateResponse( Application::APP_ID, 'signup', diff --git a/src/Signup.vue b/src/Signup.vue index 2053f1d4..7a0b6406 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -5,6 +5,7 @@

+ {{ getLocalizedText('Create Murena Account') }} {{ titles.createMurenaAccount }}

-- GitLab From 7812ab75acc5341a0b3e491b475a4d1ccdb21123 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 06:51:53 -0700 Subject: [PATCH 166/427] trying --- templates/signup.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/signup.php b/templates/signup.php index 95f0ce04..5834da26 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -1,4 +1,7 @@
\ No newline at end of file -- GitLab From b90a41b9068e04133408091d1c3e80f22bace227 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 07:01:26 -0700 Subject: [PATCH 167/427] changes --- lib/Controller/AccountController.php | 2 +- templates/signup.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 310f789a..060c8852 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -47,7 +47,7 @@ class AccountController extends Controller { public function index() { Util::addTranslations(Application::APP_ID, 'de'); - + Util::addScript(Application::APP_ID, 'l10n/de.js'); return new TemplateResponse( Application::APP_ID, 'signup', diff --git a/templates/signup.php b/templates/signup.php index 5834da26..36726a0f 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -1,7 +1,5 @@
\ No newline at end of file -- GitLab From e64744359565f7b47ca198ad86a60b2175c18321 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 07:08:10 -0700 Subject: [PATCH 168/427] changes --- templates/signup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/signup.php b/templates/signup.php index 36726a0f..285417bf 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -1,5 +1,5 @@
\ No newline at end of file -- GitLab From 33cd8d9842948c18eba6f9b17851cb7e7052915a Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 07:37:14 -0700 Subject: [PATCH 169/427] change to fr --- lib/Controller/AccountController.php | 3 --- templates/signup.php | 7 +++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 060c8852..7941f176 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -14,7 +14,6 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; use OCP\IRequest; use OCP\L10N\IFactory; -use OCP\Util; class AccountController extends Controller { protected $appName; @@ -46,8 +45,6 @@ class AccountController extends Controller { */ public function index() { - Util::addTranslations(Application::APP_ID, 'de'); - Util::addScript(Application::APP_ID, 'l10n/de.js'); return new TemplateResponse( Application::APP_ID, 'signup', diff --git a/templates/signup.php b/templates/signup.php index 285417bf..413eb187 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -1,5 +1,8 @@ -
\ No newline at end of file +
+ + \ No newline at end of file -- GitLab From 412cce4837d33b5ae0a45e87c8d2640050b01f4b Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 12:28:29 -0700 Subject: [PATCH 170/427] change --- lib/Controller/AccountController.php | 3 ++- templates/signup.php | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 7941f176..bf25c0c3 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -14,6 +14,7 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; use OCP\IRequest; use OCP\L10N\IFactory; +use OCP\Util; class AccountController extends Controller { protected $appName; @@ -44,7 +45,7 @@ class AccountController extends Controller { * */ public function index() { - + Util::addTranslations(Application::APP_ID, 'fr'); return new TemplateResponse( Application::APP_ID, 'signup', diff --git a/templates/signup.php b/templates/signup.php index 413eb187..95f0ce04 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -1,8 +1,4 @@ -
- - \ No newline at end of file +
\ No newline at end of file -- GitLab From 71b2b0604aa1e7dc392b745b9fa03e15a9bfa46a Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 12:31:22 -0700 Subject: [PATCH 171/427] change --- lib/Controller/AccountController.php | 3 +-- templates/signup.php | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index bf25c0c3..7941f176 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -14,7 +14,6 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; use OCP\IRequest; use OCP\L10N\IFactory; -use OCP\Util; class AccountController extends Controller { protected $appName; @@ -45,7 +44,7 @@ class AccountController extends Controller { * */ public function index() { - Util::addTranslations(Application::APP_ID, 'fr'); + return new TemplateResponse( Application::APP_ID, 'signup', diff --git a/templates/signup.php b/templates/signup.php index 95f0ce04..646c7240 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -1,4 +1,5 @@
\ No newline at end of file -- GitLab From 5b55afeec755abed42d8a05fdae160f3c8f9b846 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 12:34:26 -0700 Subject: [PATCH 172/427] change --- templates/signup.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/signup.php b/templates/signup.php index 646c7240..1dbe6ff5 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -1,5 +1,7 @@ -
\ No newline at end of file +
+ \ No newline at end of file -- GitLab From f4b781128ce95c44ea2c8b138ed69fb404c62db9 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 12:42:40 -0700 Subject: [PATCH 173/427] change in url --- appinfo/routes.php | 3 ++- lib/Controller/AccountController.php | 8 +++++--- templates/signup.php | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 2e50e310..d261c767 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -24,7 +24,8 @@ return ['routes' => [ 'name' => 'beta_user#submit_issue', 'url' => '/issue/submit', 'verb' => 'POST' ], - ['name' => 'account#index', 'url' => '/account/signup', 'verb' => 'GET'], + + ['name' => 'account#index', 'url' => '/account/{lang}/signup', 'verb' => 'GET'], ['name' => 'account#create', 'url' => '/account/create', 'verb' => 'POST'], ['name' => 'account#check_username_available', 'url' => '/account/check_username_available', 'verb' => 'POST'], ['name' => 'account#get_labels', 'url' => '/account/get_labels', 'verb' => 'POST'], diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 7941f176..6e47b941 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -43,12 +43,14 @@ class AccountController extends Controller { * @NoCSRFRequired * */ - public function index() { - + public function index(string $lang = 'en') { + if(!$lang) { + $lang = 'en'; + } return new TemplateResponse( Application::APP_ID, 'signup', - ['appName' => Application::APP_ID], + ['appName' => Application::APP_ID, 'lang' => $lang], TemplateResponse::RENDER_AS_GUEST ); } diff --git a/templates/signup.php b/templates/signup.php index 1dbe6ff5..bf13e893 100644 --- a/templates/signup.php +++ b/templates/signup.php @@ -3,5 +3,5 @@ script("ecloud-accounts", $appName . '-signup'); ?>
\ No newline at end of file -- GitLab From 811d6cd02186ed86eb55b3e9f0439ca08601f480 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 13:12:39 -0700 Subject: [PATCH 174/427] added localizedtext --- src/Signup.vue | 103 +++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 59 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index 7a0b6406..509c387a 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -5,13 +5,12 @@

- {{ getLocalizedText('Create Murena Account') }} - {{ titles.createMurenaAccount }} + {{ getLocalizedText(titles.createMurenaAccount) }}

@@ -19,16 +18,16 @@
- +

- {{ errors.displayName }} + {{ getLocalizedText(errors.displayName) }}

@@ -37,13 +36,13 @@
- +
@@ -51,10 +50,10 @@

- {{ errors.userName }} + {{ getLocalizedText(errors.userName) }}

- {{ usernameValidationMessage }} + {{ getLocalizedText(usernameValidationMessage) }}

@@ -63,7 +62,7 @@
- +

- {{ errors.password }} + {{ getLocalizedText(errors.password) }}

- {{ errors.confirmPassword }} + {{ getLocalizedText(errors.confirmPassword) }}

- {{ errors.passwordNotMatched }} + {{ getLocalizedText(errors.passwordNotMatched) }}

@@ -106,11 +105,11 @@ type="checkbox" class="checkbox action-checkbox__checkbox focusable"> + {{ getLocalizedText(titles.readAndAcceptTOS) }}*

- {{ errors.acceptTOS }} + {{ getLocalizedText(errors.acceptTOS) }}

@@ -125,7 +124,7 @@ type="checkbox" class="checkbox action-checkbox__checkbox focusable">
@@ -141,7 +140,7 @@ type="checkbox" class="checkbox action-checkbox__checkbox focusable">
@@ -153,7 +152,7 @@ class="btn-primary" type="primary" @click="submitSignupForm"> - {{ buttons.createMyAccount }} + {{ getLocalizedText(buttons.createMyAccount) }}
@@ -162,27 +161,27 @@

- {{ titles.captchaVerification }} + {{ getLocalizedText(titles.captchaVerification) }}

- +

- {{ errors.humanVefication }} + {{ getLocalizedText(errors.humanVefication) }}

- {{ errors.humanVeficationNotCorrect }} + {{ getLocalizedText(errors.humanVeficationNotCorrect) }}

@@ -215,7 +214,7 @@ class="btn-primary" type="primary" @click="submitCaptchaForm"> - {{ buttons.verify }} + {{ getLocalizedText(buttons.verify) }}
@@ -233,16 +232,16 @@
- +

- {{ errors.recoveryEmail }} + {{ getLocalizedText(errors.recoveryEmail) }}

@@ -253,13 +252,13 @@ class="btn-default w-50" type="primary" @click="submitRecoveryEmailForm(false)"> - {{ buttons.later }} + {{ getLocalizedText(buttons.later) }}
@@ -276,7 +275,7 @@ class="btn-primary w-50" type="primary" @click="useMyAccount"> - {{ buttons.useMyAccountNow }} + {{ getLocalizedText(buttons.useMyAccountNow) }}

{{ success.supportMessage }} @@ -500,6 +499,17 @@ export default { this.showRegistrationForm = false this.showCaptchaForm = false this.showRecoverEmailForm = false + + const readAndAcceptTOS = this.getLocalizedText(this.titles.readAndAcceptTOS) + this.titles.readAndAcceptTOS = readAndAcceptTOS.replace('__termsURL__', this.termsURL) + + let accountCreated = this.getLocalizedText(this.titles.accountCreated) + accountCreated = accountCreated.replace('__username__', this.username) + this.success.accountCreated = accountCreated.replace('__domain__', this.domain) + + const supportMessage = this.getLocalizedText(this.titles.supportMessage) + this.success.supportMessage = supportMessage.replace('__supportURL__', this.supportURL) + this.showSuccessSection = true } else { this.showMessage(this.others.somethingWentWrong, 'error') @@ -545,32 +555,7 @@ export default { return rotationVariations[Math.floor(Math.random() * rotationVariations.length)] }, async onLanguageChange() { - const data = { - language: this.selectedLanguage, - } - const url = generateUrl(`/apps/${this.appName}/account/get_labels`) - try { - const response = await Axios.post(url, data) - if (response.status === 200) { - this.titles = response.data.titles - this.buttons = response.data.buttons - this.labels = response.data.labels - this.placeholders = response.data.placeholders - this.errors = response.data.errors - this.others = response.data.others - this.success = response.data.success - - this.titles.readAndAcceptTOS = this.titles.readAndAcceptTOS.replace('__termsURL__', this.termsURL) - this.success.accountCreated = this.success.accountCreated.replace('__username__', this.username) - this.success.accountCreated = this.success.accountCreated.replace('__domain__', this.domain) - this.success.supportMessage = this.success.supportMessage.replace('__supportURL__', this.supportURL) - - } else { - this.showMessage(this.others.somethingWentWrong, 'error') - } - } catch (error) { - this.showMessage(this.others.somethingWentWrong, 'error') - } + window.location.href = window.location.origin + 'apps/ecloud-accounts/account/' + this.selectedLanguage + '/signup' }, useMyAccount() { window.location.href = window.location.origin -- GitLab From 947df56de72f9c79c8d4bae2d310e85eee8225dd Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 13:14:55 -0700 Subject: [PATCH 175/427] minor changes --- src/Signup.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Signup.vue b/src/Signup.vue index 509c387a..0fd3d4b1 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -555,7 +555,7 @@ export default { return rotationVariations[Math.floor(Math.random() * rotationVariations.length)] }, async onLanguageChange() { - window.location.href = window.location.origin + 'apps/ecloud-accounts/account/' + this.selectedLanguage + '/signup' + window.location.href = window.location.origin + '/apps/ecloud-accounts/account/' + this.selectedLanguage + '/signup' }, useMyAccount() { window.location.href = window.location.origin -- GitLab From faeb97013fe1a766d5e90d190b03d2a21c4221ec Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 25 Oct 2023 22:44:39 -0700 Subject: [PATCH 176/427] added html --- src/Signup.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Signup.vue b/src/Signup.vue index 0fd3d4b1..12a4c026 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -564,6 +564,9 @@ export default { } diff --git a/src/signup/RecoveryEmailForm.vue b/src/signup/RecoveryEmailForm.vue index 5d8488a4..d3f6ff43 100644 --- a/src/signup/RecoveryEmailForm.vue +++ b/src/signup/RecoveryEmailForm.vue @@ -67,3 +67,205 @@ export default { }, } + diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 2fce76cb..39394758 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -277,3 +277,238 @@ export default { }, } + + diff --git a/src/signup/SuccessSection.vue b/src/signup/SuccessSection.vue index 204aecaa..0233a5f3 100644 --- a/src/signup/SuccessSection.vue +++ b/src/signup/SuccessSection.vue @@ -45,3 +45,134 @@ export default { }, } + + -- GitLab From 73e47516385981eb038ea231d54bf0e7d5cb21e5 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 03:12:56 -0700 Subject: [PATCH 239/427] changes --- src/Signup.vue | 34 --------------------------------- src/signup/RegistrationForm.vue | 5 +++-- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index 05a35573..41ed245b 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -89,36 +89,8 @@ export default { { code: 'es', name: 'Spanish' }, ], titles: { - createMurenaAccount: 'Create Murena Account', - captchaVerification: 'Captcha Verification', - recoveryEmailForm1: 'For security reasons you need to set a recovery address for your Murena Cloud account.', - recoveryEmailForm2: 'As long as you don\'t, you\'ll have limited access to your account.', readAndAcceptTOS: 'I have read and accept the Terms of Service.', }, - buttons: { - createMyAccount: 'Create My Account', - verify: 'Verify', - later: 'Later', - setRecoverEmail: 'Set my recovery email address', - useMyAccountNow: 'Use My Account Now', - }, - labels: { - displayName: 'Display name', - userName: 'Username', - enterPassword: 'Enter Password', - humanVefication: 'Human Verification', - recoveryEmail: 'Recovery Email', - newsletter_product: 'I want to receive news about Murena products and promotions', - newsletter_eos: 'I want to receive news about /e/OS', - }, - placeholders: { - displayName: 'Your name as shown to others', - userName: 'Username', - enterPassword: 'Password', - confirmPassword: 'Confirm', - humanVefication: 'Human Verification', - recoveryEmail: 'Recovery Email', - }, errors: { displayName: 'Display name is required.', userName: 'Username is required.', @@ -134,12 +106,6 @@ export default { recoveryEmailTaken: 'An account with the recovery address already exists.', acceptTOS: 'You must read and accept the Terms of Service to create your account.', }, - success: { - usernameAvailable: 'Available!', - successMessage: 'Success!', - accountCreated: 'Your __username__@__domain__ account was successfully created.', - supportMessage: 'If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.', - }, others: { somethingWentWrong: 'Something went wrong.', }, diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 39394758..79888d22 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -178,6 +178,7 @@ export default { email: '', password: '', usernameValidationMessage: '', + domain: window.location.host, validation: { isDisplaynameEmpty: false, isUsernameEmpty: false, @@ -250,9 +251,9 @@ export default { this.validation.isUsernameNotValid = false if (!usernamePattern.test(this.username) || this.username.length < minCharacterCount) { if (!usernamePattern.test(this.username)) { - this.usernameValidationMessage = this.errors.userNameInvalid + this.usernameValidationMessage = this.getLocalizedText('Username must consist of letters, numbers, hyphens, and underscores only.') } else { - this.usernameValidationMessage = this.errors.userNameLength + this.usernameValidationMessage = this.getLocalizedText('Username must be at least 3 characters long.') } this.validation.isUsernameNotValid = true } else { -- GitLab From fb37743120d1cd67ebe38457b2b1d0bcddb5502c Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 03:16:38 -0700 Subject: [PATCH 240/427] change in tns --- src/signup/RegistrationForm.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 79888d22..8b0dcd22 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -107,9 +107,7 @@ v-model="formData.accepttns" type="checkbox" class="checkbox action-checkbox__checkbox focusable"> - +

-- GitLab From 5e691e08715ea12ff03ee755f8be60767d59af1e Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 03:17:01 -0700 Subject: [PATCH 241/427] change in tns --- src/signup/RegistrationForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 8b0dcd22..c08c72f8 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -126,7 +126,7 @@ type="checkbox" class="checkbox action-checkbox__checkbox focusable">

-- GitLab From f9b2cad03f9d88efef25a17d8da472046c8d87c5 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 03:28:45 -0700 Subject: [PATCH 242/427] validation changes --- src/signup/CaptchaForm.vue | 21 ++++++++++++++++++++- src/signup/RecoveryEmailForm.vue | 6 +++++- src/signup/RegistrationForm.vue | 17 ++++++++++------- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index 98679bf1..dd3d3be9 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -78,7 +78,26 @@ export default { }, }, methods: { - + validateForm(fieldsToValidate) { + fieldsToValidate.forEach(field => { + this.validation[`is${field.charAt(0).toUpperCase() + field.slice(1)}Empty`] = this.formData[field] === '' + }) + if (fieldsToValidate.includes('password')) { + this.passwordValidation() + } + if (fieldsToValidate.includes('repassword')) { + this.validation.isRePasswordMatched = this.formData.repassword !== this.formData.password + } + if (fieldsToValidate.includes('humanverification')) { + this.checkAnswer() + } + if (fieldsToValidate.includes('termsandservices')) { + this.validation.isAccepttnsEmpty = !this.formData.accepttns + } + if (fieldsToValidate.includes('username')) { + this.validateUsername() + } + }, getLocalizedText(text) { return t('ecloud-accounts', text) }, diff --git a/src/signup/RecoveryEmailForm.vue b/src/signup/RecoveryEmailForm.vue index d3f6ff43..119c13a6 100644 --- a/src/signup/RecoveryEmailForm.vue +++ b/src/signup/RecoveryEmailForm.vue @@ -60,7 +60,11 @@ export default { }, }, methods: { - + validateForm(fieldsToValidate) { + fieldsToValidate.forEach(field => { + this.validation[`is${field.charAt(0).toUpperCase() + field.slice(1)}Empty`] = this.formData[field] === '' + }) + }, getLocalizedText(text) { return t('ecloud-accounts', text) }, diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index c08c72f8..08f00480 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -148,7 +148,7 @@
- + {{ validation }}
- {{ validation }}
@@ -296,7 +294,10 @@ export default { } }, getLocalizedText(text) { - return t('ecloud-accounts', text) + return t(this.appName, text) + }, + onLanguageChange() { + window.location.href = window.location.origin + '/apps/' + APPLICATION_NAME + '/accounts/' + this.formData.selectedLanguage + '/signup' }, }, } diff --git a/src/signup/SuccessSection.vue b/src/signup/SuccessSection.vue index 0233a5f3..2de2c119 100644 --- a/src/signup/SuccessSection.vue +++ b/src/signup/SuccessSection.vue @@ -3,22 +3,20 @@

- Success! + {{ getLocalizedText('Success!') }}

- Your __username__@__domain__ account was successfully created. + Your {{ formData.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. -

+

@@ -28,6 +26,11 @@ export default { props: { value: Object, }, + data() { + return { + domain: window.location.host, + } + }, computed: { formData: { get() { @@ -40,8 +43,12 @@ export default { }, methods: { getLocalizedText(text) { - return t('ecloud-accounts', text) + return t(this.appName, text) }, + useMyAccount() { + window.location.href = window.location.origin + }, + }, } -- GitLab From c4a1fee96e60559d9ca60a92b955894a9f750fce Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 06:17:05 -0700 Subject: [PATCH 248/427] removed space --- src/signup/RegistrationForm.vue | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index c1b6dde1..29bf0edc 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -125,9 +125,7 @@ v-model="formData.newsletter_eos" type="checkbox" class="checkbox action-checkbox__checkbox focusable"> - + @@ -141,9 +139,7 @@ v-model="formData.newsletter_product" type="checkbox" class="checkbox action-checkbox__checkbox focusable"> - + -- GitLab From 265bee781cb59bf3d61dead3cc6cddad7e1db427 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 06:21:50 -0700 Subject: [PATCH 249/427] margin --- src/signup/RegistrationForm.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 29bf0edc..ebe60081 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -316,6 +316,7 @@ section#main { #fields input[type='checkbox'].checkbox + label:before{ height: 15px; width: 15px; + margin-right: 10px; } /** mobile font sizes **/ @media screen and (max-width: 650px) { -- GitLab From a1973dcc1511e039a96b5e00fc1a99785c57eef2 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 06:24:24 -0700 Subject: [PATCH 250/427] language dropdwon --- src/Signup.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Signup.vue b/src/Signup.vue index 44c358ae..938ead71 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -114,7 +114,7 @@ export default { this.titles.readAndAcceptTOS = readAndAcceptTOS.replace('__termsURL__', this.termsURL) const currentURL = window.location.href const urlSegments = currentURL.split('/') - this.selectedLanguage = urlSegments[urlSegments.length - 2] + this.formData.selectedLanguage = urlSegments[urlSegments.length - 2] }, methods: { -- GitLab From 14d6a247eb65495b9acc7a0f9c948b47e2796382 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 06:33:54 -0700 Subject: [PATCH 251/427] refactored code for signup.vue --- l10n/de.js | 2 +- l10n/de.json | 2 +- l10n/en.js | 2 +- l10n/en.json | 2 +- l10n/es.js | 2 +- l10n/es.json | 2 +- l10n/fr.js | 2 +- l10n/fr.json | 2 +- l10n/it.js | 2 +- src/Signup.vue | 357 +------------------------------------------------ 10 files changed, 13 insertions(+), 362 deletions(-) diff --git a/l10n/de.js b/l10n/de.js index 8d8ae706..a205f974 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -70,7 +70,7 @@ OC.L10N.register( "Recovery Email is required.": "Eine Wiederherstellungs-E-Mail ist erforderlich.", "You must read and accept the Terms of Service to create your account.": "Sie müssen die Allgemeinen Geschäftsbedingungen lesen und akzeptieren, um Ihr Konto zu erstellen.", "Use My Account Now": "Mein Konto jetzt verwenden", - "I have read and accept the Terms of Service.": "Ich habe die Nutzungsbedingungen gelesen und akzeptiere diese.", + "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." diff --git a/l10n/de.json b/l10n/de.json index d6db9b2d..54c2e888 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -68,7 +68,7 @@ "Human Verification code is not correct.": "Der Human Verification Code ist nicht korrekt.", "Recovery Email is required.": "Eine Wiederherstellungs-E-Mail ist erforderlich.", "You must read and accept the Terms of Service to create your account.": "Sie müssen die Allgemeinen Geschäftsbedingungen lesen und akzeptieren, um Ihr Konto zu erstellen.", - "I have read and accept the Terms of Service.": "Ich habe die Nutzungsbedingungen gelesen und akzeptiere diese.", + "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." diff --git a/l10n/en.js b/l10n/en.js index f54990a4..3a55d272 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -73,7 +73,7 @@ OC.L10N.register( "Recovery Email is required.": "Recovery Email is required.", "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account.", "Use My Account Now": "Use My Account Now", - "I have read and accept the Terms of Service.": "I have read and accept the Terms of Service.", + "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.", diff --git a/l10n/en.json b/l10n/en.json index 5a2d28d5..5d15841a 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -70,7 +70,7 @@ "Recovery Email is required.": "Recovery Email is required.", "You must read and accept the Terms of Service to create your account.": "You must read and accept the Terms of Service to create your account.", "Use My Account Now": "Use My Account Now", - "I have read and accept the Terms of Service.": "I have read and accept the Terms of Service.", + "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." diff --git a/l10n/es.js b/l10n/es.js index 2f50c154..ea832b36 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -72,7 +72,7 @@ OC.L10N.register( "Recovery Email is required.": "Se requiere correo electrónico de recuperación.", "You must read and accept the Terms of Service to create your account.": "Debe leer y aceptar las Condiciones del servicio para crear su cuenta.", "Use My Account Now": "Utilizar mi cuenta ahora", - "I have read and accept the Terms of Service.": "He leído y acepto las Condiciones del servicio.", + "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.", diff --git a/l10n/es.json b/l10n/es.json index 360fef49..e5c3daa6 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -71,7 +71,7 @@ "Recovery Email is required.": "Se requiere correo electrónico de recuperación.", "You must read and accept the Terms of Service to create your account.": "Debe leer y aceptar las Condiciones del servicio para crear su cuenta.", "Use My Account Now": "Utilizar mi cuenta ahora", - "I have read and accept the Terms of Service.": "He leído y acepto las Condiciones del servicio.", + "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." diff --git a/l10n/fr.js b/l10n/fr.js index 0111d615..81fb0b81 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -71,7 +71,7 @@ OC.L10N.register( "Recovery Email is required.": "L'e-mail de récupération est requis.", "You must read and accept the Terms of Service to create your account.": "Vous devez lire et accepter les conditions de service pour créer votre compte.", "Use My Account Now": "Utiliser mon compte maintenant", - "I have read and accept the Terms of Service.": "J'ai lu et j'accepte les Termes de service.", + "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." diff --git a/l10n/fr.json b/l10n/fr.json index 0bfb9bf3..a371d46d 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -70,7 +70,7 @@ "Recovery Email is required.": "L'e-mail de récupération est requis.", "You must read and accept the Terms of Service to create your account.": "Vous devez lire et accepter les conditions de service pour créer votre compte.", "Use My Account Now": "Utiliser mon compte maintenant", - "I have read and accept the Terms of Service.": "J'ai lu et j'accepte les Termes de service.", + "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." diff --git a/l10n/it.js b/l10n/it.js index 2b4482d3..008a8d01 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -71,7 +71,7 @@ OC.L10N.register( "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.", "Use My Account Now": "Utilizza ora il mio account", - "I have read and accept the Terms of Service.": "Ho letto e accetto i Termini di servizio.", + "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." diff --git a/src/Signup.vue b/src/Signup.vue index 938ead71..128cc6a1 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -50,74 +50,15 @@ export default { showCaptchaForm: false, showRecoverEmailForm: false, showSuccessSection: false, - validation: { - isDisplaynameEmpty: false, - isUsernameEmpty: false, - isUsernameNotValid: false, - isPasswordEmpty: false, - isPasswordNotValid: false, - isRepasswordEmpty: false, - isRePasswordMatched: false, - isHumanverificationEmpty: false, - isHumanverificationNotMatched: false, - isAccepttnsEmpty: false, - isEmailEmpty: false, - }, - passworderrors: [], - passwordrules: [ - { message: 'At least 6 characters.', regex: /.{6,}/ }, - { message: 'Lowercase letters: a-z.', regex: /[a-z]+/ }, - { message: 'Uppercase letters: a-z.', regex: /[A-Z]+/ }, - { message: 'One number required.', regex: /[0-9]+/ }, - ], - isUsernameAvailable: false, - usernameValidationMessage: '', - captcha: [], - num1: '', - num2: '', - operator: '', - captchaResult: '', - operators: ['+', '-'], - languages: [ - { code: 'en', name: 'English' }, - { code: 'de', name: 'German' }, - { code: 'fr', name: 'French' }, - { code: 'it', name: 'Italian' }, - { code: 'es', name: 'Spanish' }, - ], - titles: { - readAndAcceptTOS: 'I have read and accept the Terms of Service.', - }, - errors: { - displayName: 'Display name is required.', - userName: 'Username is required.', - userNameInvalid: 'Username must consist of letters, numbers, hyphens, and underscores only.', - userNameLength: 'Username must be at least 3 characters long.', - userNameTaken: 'Username is already taken.', - password: 'Password is required.', - confirmPassword: 'Confirm password is required.', - passwordNotMatched: 'The confirm password does not match the password.', - humanVefication: 'Human Verification is required.', - humanVeficationNotCorrect: 'Human Verification code is not correct.', - recoveryEmail: 'Recovery Email is required.', - recoveryEmailTaken: 'An account with the recovery address already exists.', - acceptTOS: 'You must read and accept the Terms of Service to create your account.', - }, - others: { - somethingWentWrong: 'Something went wrong.', - }, } }, created() { this.createCaptcha() - const readAndAcceptTOS = this.getLocalizedText(this.titles.readAndAcceptTOS) - this.titles.readAndAcceptTOS = readAndAcceptTOS.replace('__termsURL__', this.termsURL) const currentURL = window.location.href const urlSegments = currentURL.split('/') this.formData.selectedLanguage = urlSegments[urlSegments.length - 2] }, methods: { - submitRegistrationForm(data) { if (data.isFormValid) { this.showRegistrationForm = false @@ -156,16 +97,16 @@ export default { this.showRecoverEmailForm = false this.showSuccessSection = true } else if (response.status === 409) { - this.showMessage(response.data.message, 'error') + this.showMessage(this.getLocalizedText(response.data.message), 'error') } else { - this.showMessage(this.others.somethingWentWrong, 'error') + this.showMessage(this.getLocalizedText('Something went wrong.'), 'error') } this.setAllFieldsBlank() } catch (error) { if (error.response && error.response.status === 409) { - this.showMessage(error.response.data.message, 'error') + this.showMessage(this.getLocalizedText(error.response.data.message), 'error') } else { - this.showMessage(this.others.somethingWentWrong, 'error') + this.showMessage(this.getLocalizedText('Something went wrong.'), 'error') } } }, @@ -179,302 +120,12 @@ export default { } -- GitLab From 4658ff56ea973d8260daf8c98bf7a417e479bdd7 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 06:35:55 -0700 Subject: [PATCH 252/427] removed other comments --- src/Signup.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index 128cc6a1..663200cc 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -6,7 +6,6 @@ -
{{ formData }}
@@ -53,7 +52,6 @@ export default { } }, created() { - this.createCaptcha() const currentURL = window.location.href const urlSegments = currentURL.split('/') this.formData.selectedLanguage = urlSegments[urlSegments.length - 2] -- GitLab From 8323e30ab1c4b60cb4c79ffe31a707718c57a342 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 06:37:51 -0700 Subject: [PATCH 253/427] created --- src/Signup.vue | 5 ----- src/signup/RegistrationForm.vue | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index 663200cc..229f1cbb 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -51,11 +51,6 @@ export default { showSuccessSection: false, } }, - created() { - const currentURL = window.location.href - const urlSegments = currentURL.split('/') - this.formData.selectedLanguage = urlSegments[urlSegments.length - 2] - }, methods: { submitRegistrationForm(data) { if (data.isFormValid) { diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index ebe60081..cfffe47e 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -211,6 +211,11 @@ export default { }, }, }, + created() { + const currentURL = window.location.href + const urlSegments = currentURL.split('/') + this.formData.selectedLanguage = urlSegments[urlSegments.length - 2] + }, methods: { validateForm(fieldsToValidate) { fieldsToValidate.forEach(field => { -- GitLab From d7737ab4808f89689bacbd4ebeae8431299559b4 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 06:52:59 -0700 Subject: [PATCH 254/427] created --- src/signup/CaptchaForm.vue | 65 +-------------------- src/signup/RecoveryEmailForm.vue | 17 ------ src/signup/RegistrationForm.vue | 9 --- src/signup/SuccessSection.vue | 97 -------------------------------- 4 files changed, 2 insertions(+), 186 deletions(-) diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index 116c0d6d..972e16dc 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -170,10 +170,6 @@ export default { justify-content: space-between; } -section#main { - overflow-x: hidden; -} - /** mobile font sizes **/ @media screen and (max-width: 650px) { #fields .field .control input { @@ -183,65 +179,40 @@ section#main { } @media screen and (max-width: 768px) { - #successMessages { - margin-left: 5%; - margin-right: 5%; - } - - #success h1 { - font-size: 1.5em; - } - - #inviteHeader, #registerHeading { font-size: 1.5em; } - #fields { background-color: white; } - #fields .field { font-size: 1.0em; } - #fields .field .control { text-align: left; } - #fields .field .control input { font-size: 1.0em; line-height: 1.0em; } - #fields p { font-size: 1.0em; } - input { font-size: 1.0em; line-height: 1.0em; } } - #fields { margin: 10px; + background-color: white; } - #fields .control { text-align: left; margin-top: 10px; margin-bottom: 10px; } - -#fields input#username, -#fields input#new-password, -#fields input#repassword { - width: 50%; -} - -#fields input, -#fields input[type="password"] { +#fields input { background-color: var(--color-secondary-element); margin-bottom: 0; color: rgba(0, 0, 0, 0.8); @@ -256,37 +227,22 @@ section#main { margin-top: 10px; margin-bottom: 10px; } - -#username-domain-div { - display: flex; - align-items: center; -} - -#fields { - background-color: white; -} - #fields .field { font-size: 1.3em; } - #fields p { font-size: 15px; } - #captcha_img { font-size: 12px; width: 100%; } - -#inviteHeader, #registerHeading { margin-bottom: 10%; font-size: 24px; text-align: left !important; font-weight: 500; } - #currentLangImg { border-radius: 50%; margin: 0 auto; @@ -295,28 +251,20 @@ section#main { width: 24px; max-width: none; } - #submitButton:hover { opacity: 0.9; } - #fields label { color: #333333; font-size: 16px; font-weight: 900; } - sup { color: #ff0000; font-weight: 500; font-size: 14px; padding-left: 3px; } - -#tos_div label { - line-height: 1.5rem; -} - .validation-warning{ color: #ff0000; padding-left: 5px; @@ -331,7 +279,6 @@ p.validation-warning:before { margin: 0; padding-right: 5px; } - .btn-primary { width: 95%; background-color: var(--color-primary); @@ -339,22 +286,14 @@ p.validation-warning:before { border-color: var(--color-primary); font-size: large; } - @media screen and (max-width: 500px) { #main { padding: 0 1.5rem; } - - #inviteHeader, #registerHeading { font-size: 18px; } - - footer p { - font-size: 10px; - } } - .np-captcha-section { display: flex; width: fit-content; diff --git a/src/signup/RecoveryEmailForm.vue b/src/signup/RecoveryEmailForm.vue index b5e28ec6..a1e91612 100644 --- a/src/signup/RecoveryEmailForm.vue +++ b/src/signup/RecoveryEmailForm.vue @@ -104,10 +104,6 @@ export default { justify-content: space-between; } -section#main { - overflow-x: hidden; -} - /** mobile font sizes **/ @media screen and (max-width: 650px) { #fields .field .control input { @@ -191,15 +187,6 @@ section#main { margin-bottom: 10px; } -.username-group { - display: flex; -} - -#username-domain-div { - display: flex; - align-items: center; -} - #fields { background-color: white; } @@ -294,9 +281,5 @@ p.validation-warning:before { #registerHeading { font-size: 18px; } - - footer p { - font-size: 10px; - } } diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index cfffe47e..4a184c46 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -314,10 +314,6 @@ export default { padding: 0; } -section#main { - overflow-x: hidden; -} - #fields input[type='checkbox'].checkbox + label:before{ height: 15px; width: 15px; @@ -527,15 +523,10 @@ p.validation-success:before { #main { padding: 0 1.5rem; } - #inviteHeader, #registerHeading { font-size: 18px; } - - footer p { - font-size: 10px; - } } diff --git a/src/signup/SuccessSection.vue b/src/signup/SuccessSection.vue index 2de2c119..499d68e4 100644 --- a/src/signup/SuccessSection.vue +++ b/src/signup/SuccessSection.vue @@ -64,89 +64,7 @@ export default { #success h1 { font-size: 1.5em; } - - #inviteHeader, - #registerHeading { - font-size: 1.5em; - } - - #fields { - background-color: white; - } - - #fields .field { - font-size: 1.0em; - } - - #fields .field .control { - text-align: left; - } - - #fields .field .control input { - font-size: 1.0em; - line-height: 1.0em; - } - - #fields p { - font-size: 1.0em; - } - - input { - font-size: 1.0em; - line-height: 1.0em; - } -} - -#fields { - margin: 10px; -} - -#fields { - background-color: white; -} - -#fields p { - font-size: 15px; } - -#inviteHeader, -#registerHeading { - margin-bottom: 10%; - font-size: 24px; - text-align: left !important; - font-weight: 500; -} - -#currentLangImg { - border-radius: 50%; - margin: 0 auto; - border: 0.1em transparent black; - height: 24px; - width: 24px; - max-width: none; -} - -#submitButton:hover { - opacity: 0.9; -} - -#fields label { - color: #333333; - font-size: 16px; - font-weight: 900; -} - -sup { - color: #ff0000; - font-weight: 500; - font-size: 14px; - padding-left: 3px; -} - -#tos_div label { - line-height: 1.5rem; -} - .btn-primary { width: 95%; background-color: var(--color-primary); @@ -155,21 +73,6 @@ sup { font-size: large; } -@media screen and (max-width: 500px) { - #main { - padding: 0 1.5rem; - } - - #inviteHeader, - #registerHeading { - font-size: 18px; - } - - footer p { - font-size: 10px; - } -} - .success__title { font-family: 'Montserrat'; font-style: normal; -- GitLab From 8af331c85f325f36c2b14869ac5ff4102aa1cd36 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 2 Nov 2023 07:08:17 -0700 Subject: [PATCH 255/427] change in message --- src/Signup.vue | 2 +- src/signup/SuccessSection.vue | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index 229f1cbb..7e36a9f0 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -5,7 +5,7 @@ - + diff --git a/src/signup/SuccessSection.vue b/src/signup/SuccessSection.vue index 499d68e4..f1e0f397 100644 --- a/src/signup/SuccessSection.vue +++ b/src/signup/SuccessSection.vue @@ -1,14 +1,12 @@ -- GitLab From bc617b32ed75569c48d4417b3a9669c281d782bc Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 13 Nov 2023 03:05:56 -0800 Subject: [PATCH 367/427] isformvalid --- src/signup/CaptchaForm.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index ae6ef1d8..95241c24 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -137,6 +137,7 @@ export default { console.error('isHumanverificationNotMatched:', this.validation.isHumanverificationNotMatched) } } catch (error) { + this.validation.isHumanverificationNotMatched = true console.error('An error occurred while checking captcha:', error) this.showMessage('An error occurred while checking captcha.', 'error') } -- GitLab From c7a0f2672d59ce9235f2a08bb083d2245f167b76 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 13 Nov 2023 03:10:47 -0800 Subject: [PATCH 368/427] emit position changed --- src/signup/CaptchaForm.vue | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index 95241c24..fd14253a 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -132,14 +132,14 @@ export default { const url = generateUrl(`/apps/${this.appName}/accounts/verify_captcha`) const response = await Axios.post(url, data) console.error('response.status:', response.status) - if (response.status !== 200) { + if (response.status === 200) { + const isFormValid = true + this.$emit('form-submitted', { isFormValid }) + } else { this.validation.isHumanverificationNotMatched = true - console.error('isHumanverificationNotMatched:', this.validation.isHumanverificationNotMatched) } } catch (error) { this.validation.isHumanverificationNotMatched = true - console.error('An error occurred while checking captcha:', error) - this.showMessage('An error occurred while checking captcha.', 'error') } }, getFontSize() { @@ -155,12 +155,6 @@ export default { if (!this.validation.isHumanverificationEmpty) { console.error('isHumanverificationEmpty:', this.validation.isHumanverificationEmpty) this.checkAnswer() - const isFormValid = this.validation.isHumanverificationNotMatched - console.error('out isFormValid:', isFormValid) - if (isFormValid) { - console.error('isFormValid:', isFormValid) - this.$emit('form-submitted', { isFormValid }) - } } }, getLocalizedText(text) { -- GitLab From cd3050943ee00c7b623e90b862f2bcbcb95802a3 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 13 Nov 2023 03:17:44 -0800 Subject: [PATCH 369/427] emit position changed --- lib/Controller/AccountController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 4faeda54..4601cee9 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -72,7 +72,7 @@ class AccountController extends Controller { } } - if(!$this->session->set('captcha_verified')) { + if(!$this->session->get('captcha_verified')) { $response->setData(['message' => 'Captcha is not verified!', 'success' => false]); $response->setStatus(400); return $response; -- GitLab From 5b6ce93c104d21669ecab5aae8c614d8253c1121 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 13 Nov 2023 03:34:43 -0800 Subject: [PATCH 370/427] console --- src/Signup.vue | 3 --- src/signup/CaptchaForm.vue | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/Signup.vue b/src/Signup.vue index b3cf758d..4a37f5ac 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -91,9 +91,6 @@ export default { this.showMessage(this.getLocalizedText(response.data.message), 'error') } } catch (error) { - // Handle the error here - console.error('An error occurred during form submission:', error) - // You can also display an error message to the user if needed this.showMessage(error.response.data.message, 'error') } }, diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index fd14253a..3b4fe00e 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -118,7 +118,6 @@ export default { this.showMessage('An error occurred while creating captcha.', 'error') } } catch (error) { - console.error('An error occurred while creating captcha:', error) this.showMessage('An error occurred while creating captcha.', 'error') } @@ -131,7 +130,6 @@ export default { } const url = generateUrl(`/apps/${this.appName}/accounts/verify_captcha`) const response = await Axios.post(url, data) - console.error('response.status:', response.status) if (response.status === 200) { const isFormValid = true this.$emit('form-submitted', { isFormValid }) @@ -153,7 +151,6 @@ export default { submitCaptchaForm() { this.validation.isHumanverificationEmpty = this.formData.humanverification === '' if (!this.validation.isHumanverificationEmpty) { - console.error('isHumanverificationEmpty:', this.validation.isHumanverificationEmpty) this.checkAnswer() } }, -- GitLab From 48d105575a3ea230805c753e951e2e1af09a6595 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 13 Nov 2023 03:42:57 -0800 Subject: [PATCH 371/427] operand1 --- lib/Controller/AccountController.php | 18 +++++++++--------- lib/Service/UserService.php | 14 +++++++------- src/signup/CaptchaForm.vue | 12 ++++++------ src/signup/RecoveryEmailForm.vue | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 4601cee9..1a46c324 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -128,16 +128,16 @@ class AccountController extends Controller { */ public function captcha() : DataResponse { $response = new DataResponse(); - $num1 = $this->userService->getRandomCharacter(); - $num2 = $this->userService->getRandomCharacter(); + $operand1 = $this->userService->getRandomCharacter(); + $operand2 = $this->userService->getRandomCharacter(); $operator = $this->userService->getOperator(); - $this->session->set('num1', $num1); - $this->session->set('num2', $num2); + $this->session->set('operand1', $operand1); + $this->session->set('operand2', $operand2); $this->session->set('operator', $operator); $this->session->set('captcha_verified', false); - $response->setData(['num1' => $num1, 'num2' => $num2, 'operator' => $operator]); + $response->setData(['operand1' => $operand1, 'operand2' => $operand2, 'operator' => $operator]); $response->setStatus(200); return $response; } @@ -149,17 +149,17 @@ class AccountController extends Controller { public function verifyCaptcha(string $humanverification = '') : DataResponse { $response = new DataResponse(); - $num1 = $this->session->get('num1'); - $num2 = $this->session->get('num2'); + $operand1 = $this->session->get('operand1'); + $operand2 = $this->session->get('operand2'); $operator = $this->session->get('operator'); - if (!$humanverification || !$num1 || !$num2 || !$operator) { + if (!$humanverification || !$operand1 || !$operand2 || !$operator) { $response->setStatus(400); return $response; } $this->session->set('captcha_verified', false); $response->setStatus(400); - if (!$this->userService->checkAnswer($num1, $num2, $operator, $humanverification)) { + if (!$this->userService->checkAnswer($operand1, $operand2, $operator, $humanverification)) { $this->session->set('captcha_verified', true); $response->setStatus(200); } diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index 258a54cd..31c35c1f 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -384,22 +384,22 @@ class UserService { return $operator[$operatorNumber]; } - public function calculateResult($num1, $num2, $operator): mixed { - $num1 = floatval($num1); - $num2 = floatval($num2); + public function calculateResult($operand1, $operand2, $operator): mixed { + $operand1 = floatval($operand1); + $operand2 = floatval($operand2); switch ($operator) { case '+': - return $num1 + $num2; + return $operand1 + $operand2; case '-': - return $num1 - $num2; + return $operand1 - $operand2; default: return null; } } - public function checkAnswer($num1, $num2, $operator, $humanverificationCode): bool { - $result = $this->calculateResult($num1, $num2, $operator); + public function checkAnswer($operand1, $operand2, $operator, $humanverificationCode): bool { + $result = $this->calculateResult($operand1, $operand2, $operator); $captchaResult = intval($result, 10); if (intval($humanverificationCode, 10) !== $captchaResult) { diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index 3b4fe00e..57034797 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -82,8 +82,8 @@ export default { isHumanverificationNotMatched: false, }, captcha: [], - num1: '', - num2: '', + operand1: '', + operand2: '', operator: '', captchaResult: '', operators: ['+', '-'], @@ -108,12 +108,12 @@ export default { const url = generateUrl(`/apps/${this.appName}/accounts/captcha`) const response = await Axios.get(url) if (response.status === 200) { - this.num1 = response.data.num1 - this.num2 = response.data.num2 + this.operand1 = response.data.operand1 + this.operand2 = response.data.operand2 this.operator = response.data.operator - this.captcha.push(this.num1) + this.captcha.push(this.operand1) this.captcha.push(this.operator) - this.captcha.push(this.num2) + this.captcha.push(this.operand2) } else { this.showMessage('An error occurred while creating captcha.', 'error') } diff --git a/src/signup/RecoveryEmailForm.vue b/src/signup/RecoveryEmailForm.vue index a1e91612..f344f431 100644 --- a/src/signup/RecoveryEmailForm.vue +++ b/src/signup/RecoveryEmailForm.vue @@ -57,8 +57,8 @@ export default { isEmailEmpty: false, }, captcha: [], - num1: '', - num2: '', + operand1: '', + operand2: '', operator: '', captchaResult: '', operators: ['+', '-'], -- GitLab From 40d762737ffb1eea143b0b9164d02ff968ac5ee0 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Mon, 13 Nov 2023 03:56:12 -0800 Subject: [PATCH 372/427] registeremail --- lib/Controller/AccountController.php | 13 +++++++------ lib/Service/UserService.php | 5 ++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 1a46c324..fc3e29e3 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -95,7 +95,7 @@ class AccountController extends Controller { return $response; } - public function validateInput($inputName, $value, $maxLength = null) { + public function validateInput($inputName, $value, $maxLength = null) : mixed { if ($value === '') { return "$inputName is missing."; } @@ -147,18 +147,19 @@ class AccountController extends Controller { * @NoCSRFRequired */ public function verifyCaptcha(string $humanverification = '') : DataResponse { - $response = new DataResponse(); + + $this->session->set('captcha_verified', false); $operand1 = $this->session->get('operand1'); $operand2 = $this->session->get('operand2'); $operator = $this->session->get('operator'); - + + $response = new DataResponse(); + $response->setStatus(400); if (!$humanverification || !$operand1 || !$operand2 || !$operator) { - $response->setStatus(400); return $response; } - $this->session->set('captcha_verified', false); - $response->setStatus(400); + if (!$this->userService->checkAnswer($operand1, $operand2, $operator, $humanverification)) { $this->session->set('captcha_verified', true); $response->setStatus(200); diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index 31c35c1f..7261079a 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -187,7 +187,7 @@ class UserService { $fromName = $this->defaults->getName(); try { - $email = $this->createSendGridEmail($fromEmail, $fromName, $username, $displayname, $templateID); + $email = $this->createSendGridEmail($fromEmail, $fromName, $username, $displayname, $userEmail, $templateID); $this->sendEmailWithSendGrid($email, $sendgridAPIkey); } catch (Throwable $e) { $this->logger->error('Error sending username: ' . $username . ': ' . $e->getMessage()); @@ -205,9 +205,8 @@ class UserService { private function setUserLanguage(string $username, string $language) { $this->config->setUserValue($username, 'core', 'lang', $language); } - private function createSendGridEmail(string $fromEmail, string $fromName, string $username, string $displayname, string $templateID) : \SendGrid\Mail\Mail { + private function createSendGridEmail(string $fromEmail, string $fromName, string $username, string $displayname, string $userEmail, string $templateID) : \SendGrid\Mail\Mail { $mainDomain = $this->getMainDomain(); - $userEmail = $username.'@'.$mainDomain; $email = new \SendGrid\Mail\Mail(); $email->setFrom($fromEmail, $fromName); -- GitLab From 44aadae57acfb0a7d189ac6e371bd182b4352269 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 14 Nov 2023 05:56:15 -0800 Subject: [PATCH 373/427] temp changes --- lib/Service/UserService.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index 7261079a..5044f0eb 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -282,23 +282,14 @@ class UserService { } public function checkRecoveryEmailAvailable(string $recoveryEmail): bool { - $connection = $this->LDAPConnectionService->getLDAPConnection(); - $base = $this->LDAPConnectionService->getLDAPBaseUsers()[0]; - - // Check if the recoveryMailAddress already exists - $filter = "(recoveryMailAddress=$recoveryEmail)"; - $searchResult = ldap_search($connection, $base, $filter); - - if (!$searchResult) { - throw new Exception("Error while searching Murena recovery email address."); - } - - $entries = ldap_get_entries($connection, $searchResult); - if ($entries['count'] > 0) { - return true; - } - return false; + $users = []; + $this->userManager->callForSeenUsers(function (IUser $user) use (&$users) { + $users[] = $user->getUID(); + }); + $userValues = $this->config->getUserValueForUsers('email-recovery', 'recovery-email', $users); + print_r($userValues); + die; } private function createHMEAlias(string $username, string $resultmail): void { -- GitLab From 27ce85aa805b517af9dc6007ce0d8f8d1b768733 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 14 Nov 2023 06:14:22 -0800 Subject: [PATCH 374/427] temp changes --- lib/Service/UserService.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index 5044f0eb..7261079a 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -282,14 +282,23 @@ class UserService { } public function checkRecoveryEmailAvailable(string $recoveryEmail): bool { + $connection = $this->LDAPConnectionService->getLDAPConnection(); + $base = $this->LDAPConnectionService->getLDAPBaseUsers()[0]; + + // Check if the recoveryMailAddress already exists + $filter = "(recoveryMailAddress=$recoveryEmail)"; + $searchResult = ldap_search($connection, $base, $filter); + + if (!$searchResult) { + throw new Exception("Error while searching Murena recovery email address."); + } + + $entries = ldap_get_entries($connection, $searchResult); + if ($entries['count'] > 0) { + return true; + } + return false; - $users = []; - $this->userManager->callForSeenUsers(function (IUser $user) use (&$users) { - $users[] = $user->getUID(); - }); - $userValues = $this->config->getUserValueForUsers('email-recovery', 'recovery-email', $users); - print_r($userValues); - die; } private function createHMEAlias(string $username, string $resultmail): void { -- GitLab From b48b786c4c4c689c1c5643cff577c02e8f03b285 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 14 Nov 2023 06:38:43 -0800 Subject: [PATCH 375/427] method moved at controllers --- lib/Controller/AccountController.php | 14 ++++++++++- lib/Service/UserService.php | 35 +++++++--------------------- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index fc3e29e3..c76e1bfc 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -82,7 +82,19 @@ class AccountController extends Controller { $mainDomain = $this->userService->getMainDomain(); $userEmail = $username.'@'.$mainDomain; - $this->userService->registerUser($displayname, $recoveryEmail, $username, $userEmail, $password, $language); + $newUserEntry = $this->userService->registerUser($displayname, $recoveryEmail, $username, $userEmail, $password); + + $this->userService->createHMEAlias($username, $userEmail); + $this->userService->createNewDomainAlias($username, $userEmail); + + $this->userService->setTOS($username, true); + $this->userService->setUserLanguage($username, $language); + + if($recoveryEmail !== '') { + $this->userService->setRecoveryEmail($username, $recoveryEmail); + } + $this->userService->setAccountDataLocally($username, $userEmail, $newUserEntry['quota']); + $this->userService->sendWelcomeEmail($displayname, $username, $userEmail, $language); $response->setStatus(200); diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index 7261079a..975b973f 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -202,7 +202,7 @@ class UserService { public function getMainDomain() : string { return $this->config->getSystemValue('main_domain', ''); } - private function setUserLanguage(string $username, string $language) { + public function setUserLanguage(string $username, string $language) { $this->config->setUserValue($username, 'core', 'lang', $language); } private function createSendGridEmail(string $fromEmail, string $fromName, string $username, string $displayname, string $userEmail, string $templateID) : \SendGrid\Mail\Mail { @@ -228,7 +228,7 @@ class UserService { } } - public function registerUser(string $displayname, string $recoveryemail, string $username, string $userEmail, string $password, string $userlanguage = 'en'): void { + public function registerUser(string $displayname, string $recoveryemail, string $username, string $userEmail, string $password): array { $userExists = $this->userExists($username); if ($userExists) { @@ -240,18 +240,8 @@ class UserService { throw new Exception("Recovery email address is already taken."); } } + return $this->addNewUserToLDAP($displayname, $recoveryemail, $username, $userEmail, $password); - $newUserEntry = $this->addNewUserToLDAP($displayname, $recoveryemail, $username, $userEmail, $password); - - $this->createHMEAlias($username, $userEmail); - $this->createNewDomainAlias($username, $userEmail); - - $newUserEntry['userlanguage'] = $userlanguage; - $newUserEntry['tosAccepted'] = true; - $newUserEntry['quota'] = strval($newUserEntry['quota']) . ' MB'; - $this->setAccountDataLocally($newUserEntry); - - $this->setUserLanguage($username, $userlanguage); } private function addNewUserToLDAP(string $displayname, string $recoveryEmail, string $username, string $userEmail, string $password): array { $connection = $this->LDAPConnectionService->getLDAPConnection(); @@ -301,7 +291,7 @@ class UserService { } - private function createHMEAlias(string $username, string $resultmail): void { + public function createHMEAlias(string $username, string $resultmail): void { $commonApiUrl = $this->apiConfig['commonApiUrl']; $aliasDomain = $this->apiConfig['aliasDomain']; $token = $this->apiConfig['common_service_token']; @@ -327,7 +317,7 @@ class UserService { } } - private function createNewDomainAlias(string $username, string $userEmail): mixed { + public function createNewDomainAlias(string $username, string $userEmail): mixed { $commonApiUrl = $this->apiConfig['commonApiUrl']; $commonApiVersion = $this->config->getSystemValue('commonApiVersion', ''); $domain = $this->apiConfig['mainDomain']; @@ -349,27 +339,18 @@ class UserService { $result = json_decode($result, true); return $result; } - private function setAccountDataLocally(array $userData): void { - $uid = $userData['username']; + public function setAccountDataLocally(string $uid, string $mailAddress, string $quota): void { + $user = $this->getUser($uid); if (is_null($user)) { $this->logger->error('User not found'); return; } - $mailAddress = $userData['mailAddress']; $user->setEMailAddress($mailAddress); - $recoveryEmail = $userData['recoveryMailAddress']; - if($recoveryEmail !== '') { - $this->setRecoveryEmail($uid, $recoveryEmail); - } - - $quota = $userData['quota']; + $quota = strval($quota) . ' MB'; $user->setQuota($quota); - - $tosAccepted = $userData['tosAccepted']; - $this->setTOS($uid, $tosAccepted); } public function getRandomCharacter(): string { -- GitLab From 108877b36a3b4cf125554e0616c5209962aa6256 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 14 Nov 2023 08:32:02 -0800 Subject: [PATCH 376/427] user available --- lib/Service/UserService.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index 975b973f..b0db0821 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -272,23 +272,11 @@ class UserService { } public function checkRecoveryEmailAvailable(string $recoveryEmail): bool { - $connection = $this->LDAPConnectionService->getLDAPConnection(); - $base = $this->LDAPConnectionService->getLDAPBaseUsers()[0]; - - // Check if the recoveryMailAddress already exists - $filter = "(recoveryMailAddress=$recoveryEmail)"; - $searchResult = ldap_search($connection, $base, $filter); - - if (!$searchResult) { - throw new Exception("Error while searching Murena recovery email address."); - } - - $entries = ldap_get_entries($connection, $searchResult); - if ($entries['count'] > 0) { + $users = $this->config->getUsersForUserValue('email-recovery', 'recovery-email', $recoveryEmail); + if(count($users)) { return true; } return false; - } public function createHMEAlias(string $username, string $resultmail): void { -- GitLab From 407f92caa05b0b55307be0e05a59e2ee877200d9 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 14 Nov 2023 08:43:38 -0800 Subject: [PATCH 377/427] user available --- lib/Service/UserService.php | 51 ++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index b0db0821..151d5283 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -244,31 +244,36 @@ class UserService { } private function addNewUserToLDAP(string $displayname, string $recoveryEmail, string $username, string $userEmail, string $password): array { - $connection = $this->LDAPConnectionService->getLDAPConnection(); - $base = $this->LDAPConnectionService->getLDAPBaseUsers()[0]; - - $newUserDN = "username=$username," . $base; - - $newUserEntry = [ - 'mailAddress' => $userEmail, - 'username' => $username, - 'usernameWithoutDomain' => $username, - 'userPassword' => $password, - 'displayName' => $displayname, - 'quota' => $this->LDAPConnectionService->getLdapQuota(), - 'recoveryMailAddress' => $recoveryEmail, - 'active' => 'TRUE', - 'mailActive' => 'TRUE', - 'userClusterID' => $this->apiConfig['userCluserId'], - 'objectClass' => $this->apiConfig['objectClass'] - ]; + try { + $connection = $this->LDAPConnectionService->getLDAPConnection(); + $base = $this->LDAPConnectionService->getLDAPBaseUsers()[0]; + + $newUserDN = "username=$username," . $base; + + $newUserEntry = [ + 'mailAddress' => $userEmail, + 'username' => $username, + 'usernameWithoutDomain' => $username, + 'userPassword' => $password, + 'displayName' => $displayname, + 'quota' => $this->LDAPConnectionService->getLdapQuota(), + 'recoveryMailAddress' => $recoveryEmail, + 'active' => 'TRUE', + 'mailActive' => 'TRUE', + 'userClusterID' => $this->apiConfig['userCluserId'], + 'objectClass' => $this->apiConfig['objectClass'] + ]; - $ret = ldap_add($connection, $newUserDN, $newUserEntry); - - if (!$ret) { - throw new Exception("Error while creating Murena account."); + $ret = ldap_add($connection, $newUserDN, $newUserEntry); + + if (!$ret) { + throw new Exception("Error while creating Murena account."); + } + return $newUserEntry; + } catch (Exception $e) { + $this->logger->error('Error adding adding new user to LDAP: ' . $username . ': ' . $e->getMessage()); + return ['error' => 'Error while creating Murena account.']; } - return $newUserEntry; } public function checkRecoveryEmailAvailable(string $recoveryEmail): bool { -- GitLab From 02cc35d4651315591224a38938a54f513ef4fb3c Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 14 Nov 2023 23:31:31 -0800 Subject: [PATCH 378/427] added new service of captcha --- appinfo/routes.php | 2 + lib/Controller/AccountController.php | 14 +++- lib/Service/CaptchaService.php | 102 +++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 lib/Service/CaptchaService.php diff --git a/appinfo/routes.php b/appinfo/routes.php index 5058df9d..c339b898 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -30,4 +30,6 @@ return ['routes' => [ ['name' => 'account#captcha', 'url' => '/accounts/captcha', 'verb' => 'GET'], ['name' => 'account#verify_captcha', 'url' => '/accounts/verify_captcha', 'verb' => 'POST'], ['name' => 'account#check_username_available', 'url' => '/accounts/check_username_available', 'verb' => 'POST'], + ['name' => 'account#captcha_generate', 'url' => '/captcha_generate', 'verb' => 'GET'], + ]]; diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index c76e1bfc..70f05a47 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -8,6 +8,7 @@ namespace OCA\EcloudAccounts\Controller; use Exception; use OCA\EcloudAccounts\AppInfo\Application; +use OCA\EcloudAccounts\Service\CaptchaService; use OCA\EcloudAccounts\Service\UserService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; @@ -20,18 +21,21 @@ class AccountController extends Controller { protected $appName; protected $request; private $userService; + private $captchaService; protected $l10nFactory; private $session; public function __construct( $AppName, IRequest $request, UserService $userService, + CaptchaService $captchaService, IFactory $l10nFactory, ISession $session ) { parent::__construct($AppName, $request); $this->appName = $AppName; $this->userService = $userService; + $this->captchaService = $captchaService; $this->l10nFactory = $l10nFactory; $this->session = $session; } @@ -178,5 +182,13 @@ class AccountController extends Controller { } return $response; } - + /** + * @NoAdminRequired + * @PublicPage + * @NoCSRFRequired + */ + public function captchaGenerate() { + $imageData = $this->captchaService->generateCaptcha(); + return new DataResponse($imageData, 200, ['Content-Type' => 'image/png']); + } } diff --git a/lib/Service/CaptchaService.php b/lib/Service/CaptchaService.php new file mode 100644 index 00000000..301f36e1 --- /dev/null +++ b/lib/Service/CaptchaService.php @@ -0,0 +1,102 @@ +session = $session; + } + + public function generateCaptcha() { + $width = 80; + $height = 40; + $numbers = '123456789'; + $symbols = '+-'; + $code = ''; + $im = imagecreatetruecolor($width, $height); + $ns = imagecolorallocate($im, 200, 200, 200); // noise color + // amount of background noise to add in captcha image + $noise_level = 13; + + $image = imagecreate($width, $height) or die('Unable to initialize GD'); + + for ($i = 0; $i < 10; $i++) { + imageline( + $image, + mt_rand(0, $width), + mt_rand(0, $height), + mt_rand(0, $width), + mt_rand(0, $height), + imagecolorallocate( + $image, + mt_rand(200, 255), + mt_rand(200, 255), + mt_rand(200, 255) + ) + ); + } + + function updateImage(&$image, $x, $num) { + imagechar( + $image, + mt_rand(4, 5), + $x, + mt_rand(5, 20), + $num, + imagecolorallocate($image, mt_rand(0, 155), mt_rand(0, 155), mt_rand(0, 155)) + ); + } + + $x = 10 + mt_rand(0, 10); + $num1 = substr($numbers, rand(0, strlen($numbers) - 1), 1); + updateImage($image, $x, $num1); + + $x += 10 + mt_rand(0, 10); + $sym = substr($symbols, rand(0, strlen($symbols) - 1), 1); + updateImage($image, $x, $sym); + + $x += 10 + mt_rand(0, 10); + $num2 = substr($numbers, rand(0, strlen($numbers) - 1), 1); + updateImage($image, $x, $num2); + + // Rotate numbers randomly -15 to +15 degrees + $image = imagerotate($image, mt_rand(-15, 15), 0); + + $x += 10 + mt_rand(0, 10); + updateImage($image, $x, "="); + + $code = $num1 . $sym . $num2; + + eval("\$code = $code;"); + + // Add some noise to the image. + for ($i = 0; $i < $noise_level; $i++) { + for ($j = 0; $j < $noise_level; $j++) { + imagesetpixel( + $image, + rand(0, $width), + rand(0, $height), // make sure the pixels are random and don't overflow out of the image + $ns + ); + } + } + + ob_start(); + imagepng($image); + $imageData = ob_get_clean(); + + imagedestroy($image); + + $this->session->set('operand1', $num1); + $this->session->set('operand2', $num2); + $this->session->set('operator', $sym); + $this->session->set('captcha_verified', false); + + return $imageData; + } +} -- GitLab From e9d68ca9bd1cbc984050cd73c0059d26a560845e Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 14 Nov 2023 23:35:32 -0800 Subject: [PATCH 379/427] captachs service updated --- lib/Service/CaptchaService.php | 82 +++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/lib/Service/CaptchaService.php b/lib/Service/CaptchaService.php index 301f36e1..98bcdaf1 100644 --- a/lib/Service/CaptchaService.php +++ b/lib/Service/CaptchaService.php @@ -8,23 +8,32 @@ use OCP\ISession; class CaptchaService { private $session; + public const WIDTH = 80; + public const HEIGHT = 40; + public const NUMBERS = '123456789'; + public const SYMBOLS = '+-'; + public const NOISE_LEVEL = 13; + public function __construct(ISession $session) { $this->session = $session; } - - public function generateCaptcha() { - $width = 80; - $height = 40; - $numbers = '123456789'; - $symbols = '+-'; + + + public function generateCaptcha(): string { + $width = self::WIDTH; + $height = self::HEIGHT; + $numbers = self::NUMBERS; + $symbols = self::SYMBOLS; + $noise_level = self::NOISE_LEVEL; $code = ''; + $im = imagecreatetruecolor($width, $height); $ns = imagecolorallocate($im, 200, 200, 200); // noise color // amount of background noise to add in captcha image - $noise_level = 13; - + + $image = imagecreate($width, $height) or die('Unable to initialize GD'); - + for ($i = 0; $i < 10; $i++) { imageline( $image, @@ -40,40 +49,29 @@ class CaptchaService { ) ); } - - function updateImage(&$image, $x, $num) { - imagechar( - $image, - mt_rand(4, 5), - $x, - mt_rand(5, 20), - $num, - imagecolorallocate($image, mt_rand(0, 155), mt_rand(0, 155), mt_rand(0, 155)) - ); - } - + $x = 10 + mt_rand(0, 10); $num1 = substr($numbers, rand(0, strlen($numbers) - 1), 1); - updateImage($image, $x, $num1); - + $this->updateImage($image, $x, $num1); + $x += 10 + mt_rand(0, 10); $sym = substr($symbols, rand(0, strlen($symbols) - 1), 1); - updateImage($image, $x, $sym); - + $this->updateImage($image, $x, $sym); + $x += 10 + mt_rand(0, 10); $num2 = substr($numbers, rand(0, strlen($numbers) - 1), 1); - updateImage($image, $x, $num2); - + $this->updateImage($image, $x, $num2); + // Rotate numbers randomly -15 to +15 degrees $image = imagerotate($image, mt_rand(-15, 15), 0); - + $x += 10 + mt_rand(0, 10); - updateImage($image, $x, "="); - + $this->updateImage($image, $x, "="); + $code = $num1 . $sym . $num2; - + eval("\$code = $code;"); - + // Add some noise to the image. for ($i = 0; $i < $noise_level; $i++) { for ($j = 0; $j < $noise_level; $j++) { @@ -85,18 +83,30 @@ class CaptchaService { ); } } - + ob_start(); imagepng($image); $imageData = ob_get_clean(); - + imagedestroy($image); - + $this->session->set('operand1', $num1); $this->session->set('operand2', $num2); $this->session->set('operator', $sym); $this->session->set('captcha_verified', false); - + return $imageData; } + + public function updateImage(&$image, $x, $num) { + imagechar( + $image, + mt_rand(4, 5), + $x, + mt_rand(5, 20), + $num, + imagecolorallocate($image, mt_rand(0, 155), mt_rand(0, 155), mt_rand(0, 155)) + ); + } + } -- GitLab From 94de01d53a417f700bf61759b99c4d0dce1334e0 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 14 Nov 2023 23:41:57 -0800 Subject: [PATCH 380/427] captachs service updated --- appinfo/routes.php | 2 +- lib/Service/CaptchaService.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index c339b898..ab938cc3 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -30,6 +30,6 @@ return ['routes' => [ ['name' => 'account#captcha', 'url' => '/accounts/captcha', 'verb' => 'GET'], ['name' => 'account#verify_captcha', 'url' => '/accounts/verify_captcha', 'verb' => 'POST'], ['name' => 'account#check_username_available', 'url' => '/accounts/check_username_available', 'verb' => 'POST'], - ['name' => 'account#captcha_generate', 'url' => '/captcha_generate', 'verb' => 'GET'], + ['name' => 'account#captcha_generate', 'url' => '/accounts/captcha_generate', 'verb' => 'GET'], ]]; diff --git a/lib/Service/CaptchaService.php b/lib/Service/CaptchaService.php index 98bcdaf1..8b3027c9 100644 --- a/lib/Service/CaptchaService.php +++ b/lib/Service/CaptchaService.php @@ -85,6 +85,7 @@ class CaptchaService { } ob_start(); + header('Content-Type: image/png'); imagepng($image); $imageData = ob_get_clean(); -- GitLab From 74f359c6b77764f8dc160fbdcb6614be3eb06cf9 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 14 Nov 2023 23:59:24 -0800 Subject: [PATCH 381/427] echo change --- lib/Controller/AccountController.php | 3 +-- lib/Service/CaptchaService.php | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 70f05a47..8ff038e0 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -188,7 +188,6 @@ class AccountController extends Controller { * @NoCSRFRequired */ public function captchaGenerate() { - $imageData = $this->captchaService->generateCaptcha(); - return new DataResponse($imageData, 200, ['Content-Type' => 'image/png']); + echo $this->captchaService->generateCaptcha(); } } diff --git a/lib/Service/CaptchaService.php b/lib/Service/CaptchaService.php index 8b3027c9..fe327dbe 100644 --- a/lib/Service/CaptchaService.php +++ b/lib/Service/CaptchaService.php @@ -29,8 +29,6 @@ class CaptchaService { $im = imagecreatetruecolor($width, $height); $ns = imagecolorallocate($im, 200, 200, 200); // noise color - // amount of background noise to add in captcha image - $image = imagecreate($width, $height) or die('Unable to initialize GD'); -- GitLab From 7f373b78a305443d4acd9d7e53d8ceb815f1182c Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 15 Nov 2023 00:01:17 -0800 Subject: [PATCH 382/427] captcha changes --- appinfo/routes.php | 1 - lib/Controller/AccountController.php | 25 +++---------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index ab938cc3..5eab965e 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -30,6 +30,5 @@ return ['routes' => [ ['name' => 'account#captcha', 'url' => '/accounts/captcha', 'verb' => 'GET'], ['name' => 'account#verify_captcha', 'url' => '/accounts/verify_captcha', 'verb' => 'POST'], ['name' => 'account#check_username_available', 'url' => '/accounts/check_username_available', 'verb' => 'POST'], - ['name' => 'account#captcha_generate', 'url' => '/accounts/captcha_generate', 'verb' => 'GET'], ]]; diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 8ff038e0..a1759adb 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -142,20 +142,8 @@ class AccountController extends Controller { * @PublicPage * @NoCSRFRequired */ - public function captcha() : DataResponse { - $response = new DataResponse(); - $operand1 = $this->userService->getRandomCharacter(); - $operand2 = $this->userService->getRandomCharacter(); - $operator = $this->userService->getOperator(); - - $this->session->set('operand1', $operand1); - $this->session->set('operand2', $operand2); - $this->session->set('operator', $operator); - $this->session->set('captcha_verified', false); - - $response->setData(['operand1' => $operand1, 'operand2' => $operand2, 'operator' => $operator]); - $response->setStatus(200); - return $response; + public function captcha():void { + echo $this->captchaService->generateCaptcha(); } /** * @NoAdminRequired @@ -182,12 +170,5 @@ class AccountController extends Controller { } return $response; } - /** - * @NoAdminRequired - * @PublicPage - * @NoCSRFRequired - */ - public function captchaGenerate() { - echo $this->captchaService->generateCaptcha(); - } + } -- GitLab From 6de8ec0c768727192ac19a075f6cd00d7d6ca59d Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 15 Nov 2023 00:05:16 -0800 Subject: [PATCH 383/427] captcha changes --- src/signup/CaptchaForm.vue | 52 ++------------------------------------ 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index 57034797..a76f9d66 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -33,22 +33,8 @@
-
-
- {{ c }} -
-
+ Captcha Image
-
@@ -82,11 +68,7 @@ export default { isHumanverificationNotMatched: false, }, captcha: [], - operand1: '', - operand2: '', - operator: '', - captchaResult: '', - operators: ['+', '-'], + captchaImageUrl: generateUrl(`/apps/${APPLICATION_NAME}/accounts/captcha`), } }, computed: { @@ -99,29 +81,7 @@ export default { }, }, }, - created() { - this.createCaptcha() - }, methods: { - async createCaptcha() { - try { - const url = generateUrl(`/apps/${this.appName}/accounts/captcha`) - const response = await Axios.get(url) - if (response.status === 200) { - this.operand1 = response.data.operand1 - this.operand2 = response.data.operand2 - this.operator = response.data.operator - this.captcha.push(this.operand1) - this.captcha.push(this.operator) - this.captcha.push(this.operand2) - } else { - this.showMessage('An error occurred while creating captcha.', 'error') - } - } catch (error) { - this.showMessage('An error occurred while creating captcha.', 'error') - } - - }, async checkAnswer() { this.validation.isHumanverificationNotMatched = false try { @@ -140,14 +100,6 @@ export default { this.validation.isHumanverificationNotMatched = true } }, - getFontSize() { - const fontVariations = [14, 16, 18, 20] - return fontVariations[Math.floor(Math.random() * fontVariations.length)] - }, - getRotationAngle() { - const rotationVariations = [10, 5, -5, -10] - return rotationVariations[Math.floor(Math.random() * rotationVariations.length)] - }, submitCaptchaForm() { this.validation.isHumanverificationEmpty = this.formData.humanverification === '' if (!this.validation.isHumanverificationEmpty) { -- GitLab From 0c790d15ba7e85bb9f04c822d51a73e5f56a9bdc Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 15 Nov 2023 00:09:04 -0800 Subject: [PATCH 384/427] changes in captcha --- src/signup/CaptchaForm.vue | 1 - src/signup/RecoveryEmailForm.vue | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index a76f9d66..5a5749c7 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -67,7 +67,6 @@ export default { isHumanverificationEmpty: false, isHumanverificationNotMatched: false, }, - captcha: [], captchaImageUrl: generateUrl(`/apps/${APPLICATION_NAME}/accounts/captcha`), } }, diff --git a/src/signup/RecoveryEmailForm.vue b/src/signup/RecoveryEmailForm.vue index f344f431..f19a9ab2 100644 --- a/src/signup/RecoveryEmailForm.vue +++ b/src/signup/RecoveryEmailForm.vue @@ -56,12 +56,6 @@ export default { validation: { isEmailEmpty: false, }, - captcha: [], - operand1: '', - operand2: '', - operator: '', - captchaResult: '', - operators: ['+', '-'], } }, computed: { @@ -199,11 +193,6 @@ export default { font-size: 15px; } -#captcha_img { - font-size: 12px; - width: 100%; -} - #inviteHeader, #registerHeading { margin-bottom: 10%; -- GitLab From 289390f784c67a4ed6a079d33760a57d23d03b7b Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 15 Nov 2023 00:13:16 -0800 Subject: [PATCH 385/427] captchaform --- src/signup/CaptchaForm.vue | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/signup/CaptchaForm.vue b/src/signup/CaptchaForm.vue index 5a5749c7..4d22d18d 100644 --- a/src/signup/CaptchaForm.vue +++ b/src/signup/CaptchaForm.vue @@ -249,34 +249,4 @@ p.validation-warning:before { width: fit-content; } -.np-captcha-container { - background: #ffdada; - width: max-content; - height: 30px; - margin: 0 auto; - margin-bottom: 20px; - padding: 10px; -} - -.np-captcha { - font-size: 24px; - width: 200px; - text-align: center; -} - -.np-button { - padding: 5px; - background: #fff; - border: 1px solid #eee; - border-radius: 6px; - font-size: 16px; - margin: auto; - min-width: 30px; -} - -.np-captcha-character { - display: inline-block; - letter-spacing: 14px; -} - -- GitLab From 0a2975ab8bdc70ee3b93536700a5ce5558e02384 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 15 Nov 2023 00:20:46 -0800 Subject: [PATCH 386/427] added return types --- lib/Service/CaptchaService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Service/CaptchaService.php b/lib/Service/CaptchaService.php index fe327dbe..93343156 100644 --- a/lib/Service/CaptchaService.php +++ b/lib/Service/CaptchaService.php @@ -97,7 +97,7 @@ class CaptchaService { return $imageData; } - public function updateImage(&$image, $x, $num) { + public function updateImage(&$image, int $x, string $num) : void { imagechar( $image, mt_rand(4, 5), -- GitLab From 6384119740ae4fb9e9dc3131eabdec64e74127a3 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 15 Nov 2023 21:50:08 -0800 Subject: [PATCH 387/427] form changed, removed null class --- src/signup/RecoveryEmailForm.vue | 2 +- src/signup/RegistrationForm.vue | 48 ++++++++++++++++---------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/signup/RecoveryEmailForm.vue b/src/signup/RecoveryEmailForm.vue index f19a9ab2..f6397516 100644 --- a/src/signup/RecoveryEmailForm.vue +++ b/src/signup/RecoveryEmailForm.vue @@ -1,6 +1,6 @@