diff --git a/Core/Documents/Install.class.php b/Core/Documents/Install.class.php
index e6f45b5..ac0d2c1 100644
--- a/Core/Documents/Install.class.php
+++ b/Core/Documents/Install.class.php
@@ -106,6 +106,28 @@ namespace Documents\Install {
return NULL;
}
+ private function yarnInstall(string $reactDir): array {
+ $fds = [
+ "1" => ["pipe", "w"],
+ "2" => ["pipe", "w"],
+ ];
+ $proc = proc_open("yarn install --frozen-lockfile --non-interactive", $fds, $pipes, $reactDir);
+ $output = stream_get_contents($pipes[1]) . stream_get_contents($pipes[2]);
+ $status = proc_close($proc);
+ return [$status, $output];
+ }
+
+ private function yarnBuild(string $reactDir): array {
+ $fds = [
+ "1" => ["pipe", "w"],
+ "2" => ["pipe", "w"],
+ ];
+ $proc = proc_open("yarn run build", $fds, $pipes, $reactDir);
+ $output = stream_get_contents($pipes[1]) . stream_get_contents($pipes[2]);
+ $status = proc_close($proc);
+ return [$status, $output];
+ }
+
private function composerInstall(bool $dryRun = false): array {
$command = "composer install";
if ($dryRun) {
@@ -159,6 +181,8 @@ namespace Documents\Install {
}
}
+ // TODO: check
+
$context = $this->getDocument()->getContext();
$config = $context->getConfig();
@@ -248,6 +272,11 @@ namespace Documents\Install {
$success = false;
}
+ if (!$this->command_exist("yarn")) {
+ $failedRequirements[] = "Yarn is not installed or cannot be found.";
+ $success = false;
+ }
+
if (!$success) {
$msg = "The following requirements failed the check:
" .
$this->createUnorderedList($failedRequirements);
@@ -259,6 +288,14 @@ namespace Documents\Install {
private function installDependencies(): array {
list ($status, $output) = $this->composerInstall();
+ if ($status === 0) {
+ $reactDir = implode(DIRECTORY_SEPARATOR, [WEBROOT, "react"]);
+ list ($status, $output) = $this->yarnInstall($reactDir);
+ if ($status === 0) {
+ list ($status, $output) = $this->yarnBuild($reactDir);
+ }
+ }
+
return ["success" => $status === 0, "msg" => $output];
}
diff --git a/Core/Localization/de_DE/account.php b/Core/Localization/de_DE/account.php
index e2d2071..4f39612 100644
--- a/Core/Localization/de_DE/account.php
+++ b/Core/Localization/de_DE/account.php
@@ -1,19 +1,32 @@
"Account",
"login_title" => "Einloggen",
"login_description" => "Loggen Sie sich in Ihren Account ein",
+ "accept_invite_title" => "Einladung",
+ "accept_invite_description" => "Schließen Sie die Registrierung ab indem Sie ein Passwort wählen",
+ "confirm_email_title" => "E-Mail Adresse bestätigen",
+ "confirm_email_description" => "Schließen Sie die Registrierung ab indem Sie Ihre E-Mail Adresse bestätigen",
"form_title" => "Bitte geben Sie ihre Daten ein",
"username" => "Benutzername",
"username_or_email" => "Benutzername oder E-Mail",
+ "email" => "E-Mail Adresse",
"password" => "Passwort",
+ "password_confirm" => "Passwort bestätigen",
"remember_me" => "Eingeloggt bleiben",
"signing_in" => "Einloggen",
"sign_in" => "Einloggen",
"forgot_password" => "Passwort vergessen?",
"passwords_do_not_match" => "Die Passwörter stimmen nicht überein",
+ "back_to_login" => "Zurück zum Login",
"register_text" => "Noch keinen Account? Jetzt registrieren",
"6_digit_code" => "6-stelliger Code",
"2fa_title" => "Es werden weitere Informationen zum Einloggen benötigt",
"2fa_text" => "Stecke dein 2FA-Gerät ein. Möglicherweise wird noch eine Interaktion benötigt, z.B. durch Eingabe einer PIN oder durch Berühren des Geräts",
+ "confirming_email" => "Bestätige E-Mail Adresse",
+ "proceed_to_login" => "Weiter zum Login",
+ "invalid_link" => "Den Link den Sie besucht haben ist nicht länger gültig",
+ "confirm_success" => "Ihre E-Mail Adresse wurde erfolgreich bestätigt, Sie können sich jetzt einloggen",
+ "confirm_error" => "Fehler beim Bestätigen der E-Mail Adresse",
];
\ No newline at end of file
diff --git a/Core/Localization/de_DE/admin.php b/Core/Localization/de_DE/admin.php
index d74f434..3fb5441 100644
--- a/Core/Localization/de_DE/admin.php
+++ b/Core/Localization/de_DE/admin.php
@@ -1,6 +1,7 @@
"Administration",
"dashboard" => "Dashboard",
"visitor_statistics" => "Besucherstatistiken",
"user_groups" => "Benutzer & Gruppen",
diff --git a/Core/Localization/de_DE/general.php b/Core/Localization/de_DE/general.php
index 921ae22..39fb684 100644
--- a/Core/Localization/de_DE/general.php
+++ b/Core/Localization/de_DE/general.php
@@ -10,4 +10,5 @@ return [
"language" => "Sprache",
"loading" => "Laden",
"logout" => "Ausloggen",
+ "noscript" => "Sie müssen Javascript aktivieren um diese Anwendung zu benutzen",
];
\ No newline at end of file
diff --git a/Core/Localization/en_US/account.php b/Core/Localization/en_US/account.php
index 18f9779..3020a26 100644
--- a/Core/Localization/en_US/account.php
+++ b/Core/Localization/en_US/account.php
@@ -1,19 +1,32 @@
"Sign In",
- "description" => "Sign In into your account",
+ "title" => "Account",
+ "login_title" => "Sign In",
+ "login_description" => "Sign In into your account",
+ "accept_invite_title" => "Invitation",
+ "accept_invite_description" => "Complete your account registration by choosing a password",
+ "confirm_email_title" => "Confirm Email",
+ "confirm_email_description" => "Complete your registration by confirming the e-mail address",
"form_title" => "Please fill with your details",
"username" => "Username",
"username_or_email" => "Username or E-Mail",
+ "email" => "E-Mail Address",
"password" => "Password",
+ "password_confirm" => "Confirm Password",
"remember_me" => "Remember Me",
"signing_in" => "Signing in",
"sign_in" => "Sign In",
"forgot_password" => "Forgot password?",
"register_text" => "Don't have an account? Sign Up",
"passwords_do_not_match" => "Your passwords did not match",
+ "back_to_login" => "Back to Login",
"6_digit_code" => "6-Digit Code",
"2fa_title" => "Additional information is required for logging in",
- "2fa_text" => "Plugin your 2FA-Device. Interaction might be required, e.g. typing in a PIN or touching it."
+ "2fa_text" => "Plugin your 2FA-Device. Interaction might be required, e.g. typing in a PIN or touching it.",
+ "confirming_email" => "Confirming email",
+ "proceed_to_login" => "Proceed to Login",
+ "invalid_link" => "The link you visited is no longer valid",
+ "confirm_success" => "Your e-mail address was successfully confirmed, you may now log in",
+ "confirm_error" => "Error confirming e-mail address",
];
\ No newline at end of file
diff --git a/Core/Localization/en_US/admin.php b/Core/Localization/en_US/admin.php
index 2fccbc4..3e822b6 100644
--- a/Core/Localization/en_US/admin.php
+++ b/Core/Localization/en_US/admin.php
@@ -1,6 +1,7 @@
"Administration",
"dashboard" => "Dashboard",
"visitor_statistics" => "Visitor Statistics",
"user_groups" => "User & Groups",
diff --git a/Core/Localization/en_US/general.php b/Core/Localization/en_US/general.php
index 9609d28..35381b6 100644
--- a/Core/Localization/en_US/general.php
+++ b/Core/Localization/en_US/general.php
@@ -10,4 +10,5 @@ return [
"language" => "Language",
"loading" => "Loading",
"logout" => "Logout",
+ "noscript" => "You need Javascript enabled to run this app",
];
\ No newline at end of file
diff --git a/Core/Templates/account/accept_invite.twig b/Core/Templates/account/accept_invite.twig
index 5dc2f64..ca62496 100644
--- a/Core/Templates/account/accept_invite.twig
+++ b/Core/Templates/account/accept_invite.twig
@@ -1,44 +1,48 @@
{% extends "account/account_base.twig" %}
-{% set view_title = 'Invitation' %}
+{% set view_title = 'account.accept_invite_title' %}
{% set view_icon = 'user-check' %}
-{% set view_description = 'Finnish your account registration by choosing a password.' %}
+{% set view_description = 'account.accept_invite_description' %}
{% block view_content %}
{% if not view.success %}