From 99a0ae2826d8f20c625500d7abcc7339208fb224 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Thu, 9 Sep 2021 20:57:06 +0200 Subject: [PATCH 01/74] refactor(system): refactor Theme class --- automad/src/System/Theme.php | 88 ++++++++++++++++++++++++++---------- 1 file changed, 64 insertions(+), 24 deletions(-) diff --git a/automad/src/System/Theme.php b/automad/src/System/Theme.php index e4e3dccc7..b493e3a56 100644 --- a/automad/src/System/Theme.php +++ b/automad/src/System/Theme.php @@ -50,9 +50,54 @@ */ class Theme { /** - * Theme data. + * The theme author. */ - public $data = array(); + public $author; + + /** + * The theme description. + */ + public $description = ''; + + /** + * The theme license. + */ + public $license = ''; + + /** + * A multidimensional mask array. + */ + public $masks = array(); + + /** + * The theme name. + */ + public $name; + + /** + * The theme path. + */ + public $path; + + /** + * The theme readme path. + */ + public $readme = ''; + + /** + * The templates array. + */ + public $templates = array(); + + /** + * The tooltips array. + */ + public $tooltips = array(); + + /** + * The theme version. + */ + public $version = ''; /** * The constructor. @@ -63,6 +108,7 @@ class Theme { public function __construct(string $themeJSON, array $composerInstalled) { $json = false; $path = Str::stripStart(dirname($themeJSON), AM_BASE_DIR . AM_DIR_PACKAGES . '/'); + $defaults = array( 'name' => $path, 'description' => false, @@ -108,28 +154,22 @@ public function __construct(string $themeJSON, array $composerInstalled) { return false === in_array(basename($file), array(AM_PAGE_NOT_FOUND_TEMPLATE . '.php')); }); - $this->data = array_merge( + $data = array_merge( $defaults, $json, - $package, - array( - 'path' => $path, - 'templates' => $templates, - 'readme' => $readme - ) + $package ); - } - /** - * Make theme data accessible as page properties. - * - * @param string $key The property name - * @return string The returned value from the data array - */ - public function __get(string $key) { - if (array_key_exists($key, $this->data)) { - return $this->data[$key]; - } + $this->author = $data['author']; + $this->description = $data['description']; + $this->license = $data['license']; + $this->masks = $data['masks']; + $this->name = $data['name']; + $this->path = $path; + $this->readme = $readme; + $this->templates = $templates; + $this->tooltips = $data['tooltips']; + $this->version = $data['version']; } /** @@ -139,8 +179,8 @@ public function __get(string $key) { * @return array The mask array */ public function getMask(string $mask) { - if (array_key_exists($mask, $this->data['masks'])) { - return $this->data['masks'][$mask]; + if (array_key_exists($mask, $this->masks)) { + return $this->masks[$mask]; } return array(); @@ -153,8 +193,8 @@ public function getMask(string $mask) { * @return string The tooltip text */ public function getTooltip(string $key) { - if (array_key_exists($key, $this->data['tooltips'])) { - return $this->data['tooltips'][$key]; + if (array_key_exists($key, $this->tooltips)) { + return $this->tooltips[$key]; } } } From d00cf30bc5edfc96d1e3f6e1372b2afc93e99d5b Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Thu, 9 Sep 2021 22:48:31 +0200 Subject: [PATCH 02/74] move Theme class to Types namespace --- automad/src/System/Themelist.php | 1 + automad/src/{System => Types}/Theme.php | 4 ++-- automad/src/UI/Components/Accordion/Variables.php | 2 +- automad/src/UI/Components/Alert/ThemeReadme.php | 2 +- automad/src/UI/Components/Card/Theme.php | 8 ++++---- automad/src/UI/Components/Form/Field.php | 2 +- automad/src/UI/Components/Form/Group.php | 2 +- automad/src/UI/Utils/Keys.php | 2 +- 8 files changed, 12 insertions(+), 11 deletions(-) rename automad/src/{System => Types}/Theme.php (97%) diff --git a/automad/src/System/Themelist.php b/automad/src/System/Themelist.php index f94eb55cb..a561a20b3 100644 --- a/automad/src/System/Themelist.php +++ b/automad/src/System/Themelist.php @@ -39,6 +39,7 @@ use Automad\Core\Debug; use Automad\Core\FileSystem; use Automad\Core\Str; +use Automad\Types\Theme; defined('AUTOMAD') or die('Direct access not permitted!'); diff --git a/automad/src/System/Theme.php b/automad/src/Types/Theme.php similarity index 97% rename from automad/src/System/Theme.php rename to automad/src/Types/Theme.php index b493e3a56..d4bc75052 100644 --- a/automad/src/System/Theme.php +++ b/automad/src/Types/Theme.php @@ -34,7 +34,7 @@ * https://automad.org/license */ -namespace Automad\System; +namespace Automad\Types; use Automad\Core\FileSystem; use Automad\Core\Str; @@ -42,7 +42,7 @@ defined('AUTOMAD') or die('Direct access not permitted!'); /** - * The Theme class stores all meta data of an installed theme. + * The Theme type is a custom data type that stores all meta data of an installed theme. * * @author Marc Anton Dahmen * @copyright Copyright (c) 2018-2021 Marc Anton Dahmen - https://marcdahmen.de diff --git a/automad/src/UI/Components/Accordion/Variables.php b/automad/src/UI/Components/Accordion/Variables.php index b15bc9c18..be26b518f 100644 --- a/automad/src/UI/Components/Accordion/Variables.php +++ b/automad/src/UI/Components/Accordion/Variables.php @@ -37,7 +37,7 @@ namespace Automad\UI\Components\Accordion; use Automad\Core\Automad; -use Automad\System\Theme; +use Automad\Types\Theme; use Automad\UI\Components\Form\Group; defined('AUTOMAD') or die('Direct access not permitted!'); diff --git a/automad/src/UI/Components/Alert/ThemeReadme.php b/automad/src/UI/Components/Alert/ThemeReadme.php index 9735cf3ac..ebbc7f57a 100644 --- a/automad/src/UI/Components/Alert/ThemeReadme.php +++ b/automad/src/UI/Components/Alert/ThemeReadme.php @@ -36,7 +36,7 @@ namespace Automad\UI\Components\Alert; -use Automad\System\Theme; +use Automad\Types\Theme; use Automad\UI\Components\Modal\Readme; use Automad\UI\Utils\Text; diff --git a/automad/src/UI/Components/Card/Theme.php b/automad/src/UI/Components/Card/Theme.php index 2d320b6a6..104209480 100644 --- a/automad/src/UI/Components/Card/Theme.php +++ b/automad/src/UI/Components/Card/Theme.php @@ -37,7 +37,7 @@ namespace Automad\UI\Components\Card; use Automad\Core\Image; -use Automad\System\Theme as SystemTheme; +use Automad\Types\Theme as TypesTheme; use Automad\UI\Components\Modal\Readme; use Automad\UI\Utils\FileSystem; use Automad\UI\Utils\Text; @@ -55,12 +55,12 @@ class Theme { /** * Render a theme card. * - * @param SystemTheme $Theme - * @param SystemTheme $activeTheme + * @param TypesTheme $Theme + * @param TypesTheme $activeTheme * @param string $id * @return string The HTML of the card */ - public static function render(?SystemTheme $Theme, ?SystemTheme $activeTheme, string $id) { + public static function render(?TypesTheme $Theme, ?TypesTheme $activeTheme, string $id) { $Text = Text::getObject(); $path = AM_BASE_DIR . AM_DIR_PACKAGES . '/' . $Theme->path; $files = FileSystem::glob($path . '/*'); diff --git a/automad/src/UI/Components/Form/Field.php b/automad/src/UI/Components/Form/Field.php index 8c9e318b6..636be85aa 100644 --- a/automad/src/UI/Components/Form/Field.php +++ b/automad/src/UI/Components/Form/Field.php @@ -39,7 +39,7 @@ use Automad\Core\Automad; use Automad\Core\Request; use Automad\Core\Str; -use Automad\System\Theme; +use Automad\Types\Theme; use Automad\UI\Components\Fullscreen\Bar; use Automad\UI\Utils\Text; diff --git a/automad/src/UI/Components/Form/Group.php b/automad/src/UI/Components/Form/Group.php index 65fa6f423..0bfdd72aa 100644 --- a/automad/src/UI/Components/Form/Group.php +++ b/automad/src/UI/Components/Form/Group.php @@ -37,7 +37,7 @@ namespace Automad\UI\Components\Form; use Automad\Core\Automad; -use Automad\System\Theme; +use Automad\Types\Theme; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); diff --git a/automad/src/UI/Utils/Keys.php b/automad/src/UI/Utils/Keys.php index ccc006041..7da5ba2c2 100644 --- a/automad/src/UI/Utils/Keys.php +++ b/automad/src/UI/Utils/Keys.php @@ -38,7 +38,7 @@ use Automad\Core\Page; use Automad\Engine\PatternAssembly; -use Automad\System\Theme; +use Automad\Types\Theme; defined('AUTOMAD') or die('Direct access not permitted!'); From eda07bf55d90737faaaf79844a5692fe5019aee9 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Thu, 9 Sep 2021 23:07:26 +0200 Subject: [PATCH 03/74] refactor(system): rename Themelist class into ThemeCollection --- .../System/{Themelist.php => ThemeCollection.php} | 4 ++-- automad/src/UI/Components/Form/SelectTemplate.php | 10 +++++----- automad/src/UI/Components/Layout/PageData.php | 14 +++++++------- automad/src/UI/Components/Layout/SharedData.php | 8 ++++---- automad/src/UI/Components/Modal/AddPage.php | 14 +++++++------- automad/src/UI/Views/AbstractView.php | 8 ++++---- 6 files changed, 29 insertions(+), 29 deletions(-) rename automad/src/System/{Themelist.php => ThemeCollection.php} (98%) diff --git a/automad/src/System/Themelist.php b/automad/src/System/ThemeCollection.php similarity index 98% rename from automad/src/System/Themelist.php rename to automad/src/System/ThemeCollection.php index a561a20b3..256b06898 100644 --- a/automad/src/System/Themelist.php +++ b/automad/src/System/ThemeCollection.php @@ -44,13 +44,13 @@ defined('AUTOMAD') or die('Direct access not permitted!'); /** - * The Themelist utility class. + * The theme collection system class. * * @author Marc Anton Dahmen * @copyright Copyright (c) 2018-2019 Marc Anton Dahmen - https://marcdahmen.de * @license MIT license - https://automad.org/license */ -class Themelist { +class ThemeCollection { /** * An array of installed Composer packages. */ diff --git a/automad/src/UI/Components/Form/SelectTemplate.php b/automad/src/UI/Components/Form/SelectTemplate.php index 033525115..9705a0e01 100644 --- a/automad/src/UI/Components/Form/SelectTemplate.php +++ b/automad/src/UI/Components/Form/SelectTemplate.php @@ -37,7 +37,7 @@ namespace Automad\UI\Components\Form; use Automad\Core\Automad; -use Automad\System\Themelist; +use Automad\System\ThemeCollection; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -54,15 +54,15 @@ class SelectTemplate { * Create a select box containing all installed themes/templates to be included in a HTML form. * * @param Automad $Automad - * @param Themelist $Themelist + * @param ThemeCollection $ThemeCollection * @param string $name * @param string|null $selectedTheme * @param string|null $selectedTemplate * @return string The HTML for the select box including a label and a wrapping div. */ - public static function render(Automad $Automad, Themelist $Themelist, string $name = '', ?string $selectedTheme = null, ?string $selectedTemplate = null) { - $themes = $Themelist->getThemes(); - $mainTheme = $Themelist->getThemeByKey($Automad->Shared->get(AM_KEY_THEME)); + public static function render(Automad $Automad, ThemeCollection $ThemeCollection, string $name = '', ?string $selectedTheme = null, ?string $selectedTemplate = null) { + $themes = $ThemeCollection->getThemes(); + $mainTheme = $ThemeCollection->getThemeByKey($Automad->Shared->get(AM_KEY_THEME)); // Create HTML. $html = <<< HTML diff --git a/automad/src/UI/Components/Layout/PageData.php b/automad/src/UI/Components/Layout/PageData.php index 9a392ba8a..ed1dd7918 100644 --- a/automad/src/UI/Components/Layout/PageData.php +++ b/automad/src/UI/Components/Layout/PageData.php @@ -40,7 +40,7 @@ use Automad\Core\Page; use Automad\Core\Parse; use Automad\Engine\Headless; -use Automad\System\Themelist; +use Automad\System\ThemeCollection; use Automad\UI\Components\Accordion\UnusedVariables; use Automad\UI\Components\Accordion\Variables; use Automad\UI\Components\Alert\ThemeReadme; @@ -110,7 +110,7 @@ class PageData { /** * The themelist object. */ - private $Themelist = null; + private $ThemeCollection = null; /** * All unused variable keys. @@ -133,7 +133,7 @@ public function __construct(Automad $Automad, Page $Page) { $this->Page = $Page; $this->data = Parse::dataFile(PageModel::getPageFilePath($Page)); $this->url = $Page->get(AM_KEY_URL); - $this->Themelist = new Themelist(); + $this->ThemeCollection = new ThemeCollection(); $this->fn = function ($expression) { return $expression; @@ -163,7 +163,7 @@ public function __construct(Automad $Automad, Page $Page) { // All other fields. if (!AM_HEADLESS_ENABLED) { - $keys = Keys::inCurrentTemplate($Page, $this->Themelist->getThemeByKey($Page->get(AM_KEY_THEME))); + $keys = Keys::inCurrentTemplate($Page, $this->ThemeCollection->getThemeByKey($Page->get(AM_KEY_THEME))); } else { $keys = Keys::inTemplate(Headless::getTemplate()); } @@ -181,7 +181,7 @@ public function __construct(Automad $Automad, Page $Page) { */ public function render() { $fn = $this->fn; - $Theme = $this->Themelist->getThemeByKey($this->Page->get(AM_KEY_THEME)); + $Theme = $this->ThemeCollection->getThemeByKey($this->Page->get(AM_KEY_THEME)); return <<< HTML {$fn($this->title())} @@ -308,7 +308,7 @@ private function selectTemplate() { if ($this->data[AM_KEY_THEME]) { $themePath = $this->data[AM_KEY_THEME]; - if ($Theme = $this->Themelist->getThemeByKey($this->data[AM_KEY_THEME])) { + if ($Theme = $this->ThemeCollection->getThemeByKey($this->data[AM_KEY_THEME])) { $themeName = $Theme->name . ' / '; } } @@ -332,7 +332,7 @@ private function selectTemplate() { {$fn(Text::get('page_theme_template'))} - {$fn(SelectTemplate::render($this->Automad, $this->Themelist, 'theme_template', $this->data[AM_KEY_THEME], $this->Page->template))} + {$fn(SelectTemplate::render($this->Automad, $this->ThemeCollection, 'theme_template', $this->data[AM_KEY_THEME], $this->Page->template))} {$fn(CheckboxPrivate::render('subpage[private]'))}
- {$fn(self::template($Automad, $Themelist))} + {$fn(self::template($Automad, $ThemeCollection))}
{$fn(SelectTemplate::render( $Automad, - $Themelist, + $ThemeCollection, 'subpage[theme_template]' ))}
diff --git a/automad/src/UI/Views/AbstractView.php b/automad/src/UI/Views/AbstractView.php index 9ee1e10b3..f86d0d56c 100644 --- a/automad/src/UI/Views/AbstractView.php +++ b/automad/src/UI/Views/AbstractView.php @@ -37,7 +37,7 @@ namespace Automad\UI\Views; use Automad\Core\Str; -use Automad\System\Themelist; +use Automad\System\ThemeCollection; use Automad\UI\Components\Header\BlockSnippetArrays; use Automad\UI\Components\Header\EditorTextModules; use Automad\UI\Components\Modal\About; @@ -75,14 +75,14 @@ abstract class AbstractView { /** * The Automad object. */ - protected $Themelist = null; + protected $ThemeCollection = null; /** * The page constructor. */ public function __construct() { $this->Automad = UICache::get(); - $this->Themelist = new Themelist(); + $this->ThemeCollection = new ThemeCollection(); $this->fn = function ($expression) { return $expression; }; @@ -203,7 +203,7 @@ class="uk-button uk-button-mini uk-text-muted" {$fn(About::render('am-about-modal'))} - {$fn(AddPage::render($this->Automad, $this->Themelist))} + {$fn(AddPage::render($this->Automad, $this->ThemeCollection))} HTML; } } From 907cf94e9c7ca0cface1caa4340507e7b9e573e1 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Thu, 9 Sep 2021 23:36:48 +0200 Subject: [PATCH 04/74] refactor(ui): refactor user model and controller --- automad/src/Core/Automad.php | 4 +- automad/src/Core/Cache.php | 4 +- automad/src/Core/Sitemap.php | 4 +- automad/src/Types/User.php | 76 ++++++++++++++++++ automad/src/UI/Components/Card/User.php | 4 +- automad/src/UI/Components/System/Users.php | 2 +- .../src/UI/Controllers/SessionController.php | 78 +++++++++++++++++++ automad/src/UI/Controllers/UserController.php | 32 +------- automad/src/UI/Dashboard.php | 4 +- automad/src/UI/InPage.php | 8 +- .../UserModel.php => Utils/Session.php} | 10 ++- automad/src/UI/Views/Elements/Navbar.php | 6 +- automad/src/UI/Views/Elements/Sidebar.php | 6 +- automad/src/UI/Views/Login.php | 4 +- automad/src/UI/Views/Logout.php | 4 +- 15 files changed, 188 insertions(+), 58 deletions(-) create mode 100644 automad/src/Types/User.php create mode 100644 automad/src/UI/Controllers/SessionController.php rename automad/src/UI/{Models/UserModel.php => Utils/Session.php} (92%) diff --git a/automad/src/Core/Automad.php b/automad/src/Core/Automad.php index 1ff8d7506..c74ac27db 100644 --- a/automad/src/Core/Automad.php +++ b/automad/src/Core/Automad.php @@ -36,7 +36,7 @@ namespace Automad\Core; -use Automad\UI\Models\UserModel; +use Automad\UI\Utils\Session; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -100,7 +100,7 @@ class Automad { public function __construct() { $this->getReservedUrls(); $this->Shared = new Shared(); - $this->user = UserModel::getName(); + $this->user = Session::getUsername(); $this->collectPages(); Debug::log(array('Shared' => $this->Shared, 'Collection' => $this->collection), 'New instance created'); diff --git a/automad/src/Core/Cache.php b/automad/src/Core/Cache.php index c51d3c21b..01f0d2602 100644 --- a/automad/src/Core/Cache.php +++ b/automad/src/Core/Cache.php @@ -36,7 +36,7 @@ namespace Automad\Core; -use Automad\UI\Models\UserModel; +use Automad\UI\Utils\Session; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -133,7 +133,7 @@ public function __construct() { $this->objectCacheFile = AM_FILE_OBJECT_CACHE; // Disable page caching for in-page edit mode and define ui cache file. - if (UserModel::getName()) { + if (Session::getUsername()) { $this->pageCachingIsEnabled = false; Debug::log('Page cache is disabled during editing.'); $this->objectCacheFile = AM_FILE_OBJECT_USER_CACHE; diff --git a/automad/src/Core/Sitemap.php b/automad/src/Core/Sitemap.php index d1ad3650e..6f9cd3d27 100644 --- a/automad/src/Core/Sitemap.php +++ b/automad/src/Core/Sitemap.php @@ -36,7 +36,7 @@ namespace Automad\Core; -use Automad\UI\Models\UserModel; +use Automad\UI\Utils\Session; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -54,7 +54,7 @@ class Sitemap { * @param array $collection */ public function __construct(array $collection) { - if (!UserModel::getName()) { + if (!Session::getUsername()) { $sitemap = AM_BASE_DIR . '/sitemap.xml'; // If the base dir is writable without having a sitemap.xml or if sitemap.xml exists and is writable itself. diff --git a/automad/src/Types/User.php b/automad/src/Types/User.php new file mode 100644 index 000000000..1ead3a378 --- /dev/null +++ b/automad/src/Types/User.php @@ -0,0 +1,76 @@ +name = $name; + $this->passwordEncrypted = $passwordEncrypted; + $this->email = $email; + } +} diff --git a/automad/src/UI/Components/Card/User.php b/automad/src/UI/Components/Card/User.php index 29b2c4500..0833c2c26 100644 --- a/automad/src/UI/Components/Card/User.php +++ b/automad/src/UI/Components/Card/User.php @@ -37,7 +37,7 @@ namespace Automad\UI\Components\Card; use Automad\Core\Str; -use Automad\UI\Models\UserModel; +use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -93,7 +93,7 @@ private static function checkbox(string $user, string $id) { return $expression; }; - if ($user == UserModel::getName()) { + if ($user == Session::getUsername()) { return <<< HTML - + HTML; } } diff --git a/automad/src/UI/Controllers/SessionController.php b/automad/src/UI/Controllers/SessionController.php new file mode 100644 index 000000000..1cc74d09d --- /dev/null +++ b/automad/src/UI/Controllers/SessionController.php @@ -0,0 +1,78 @@ +injectAssets($str); $str = $this->injectMarkup($str); $str = $this->processTemporaryEditButtons($str); @@ -93,7 +93,7 @@ public function createUI(string $str) { */ public function injectTemporaryEditButton(?string $value, string $key, Context $Context) { // Only inject button if $key is no runtime var and a user is logged in. - if (preg_match('/^(\+|\w)/', $key) && UserModel::getName()) { + if (preg_match('/^(\+|\w)/', $key) && Session::getUsername()) { $value .= AM_DEL_INPAGE_BUTTON_OPEN . json_encode(array( 'context' => $Context->get()->origUrl, diff --git a/automad/src/UI/Models/UserModel.php b/automad/src/UI/Utils/Session.php similarity index 92% rename from automad/src/UI/Models/UserModel.php rename to automad/src/UI/Utils/Session.php index 1fb31ce09..e8fee9d02 100644 --- a/automad/src/UI/Models/UserModel.php +++ b/automad/src/UI/Utils/Session.php @@ -34,24 +34,26 @@ * https://automad.org/license */ -namespace Automad\UI\Models; +namespace Automad\UI\Utils; + +use Automad\UI\Models\AccountsModel; defined('AUTOMAD') or die('Direct access not permitted!'); /** - * The User class provides all methods related to a user account. + * The Session model class provides all methods related to a user session. * * @author Marc Anton Dahmen * @copyright Copyright (c) 2016-2021 by Marc Anton Dahmen - https://marcdahmen.de * @license MIT license - https://automad.org/license */ -class UserModel { +class Session { /** * Return the currently logged in user. * * @return string Username */ - public static function getName() { + public static function getUsername() { if (isset($_SESSION['username'])) { return $_SESSION['username']; } diff --git a/automad/src/UI/Views/Elements/Navbar.php b/automad/src/UI/Views/Elements/Navbar.php index e8010a0e1..76d844ba8 100644 --- a/automad/src/UI/Views/Elements/Navbar.php +++ b/automad/src/UI/Views/Elements/Navbar.php @@ -40,7 +40,7 @@ use Automad\Core\Str; use Automad\UI\Components\Logo; use Automad\UI\Components\Nav\Jumpbar; -use Automad\UI\Models\UserModel; +use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -59,7 +59,7 @@ class Navbar { * @return string the rendered dashboard navbar */ public static function render() { - if (!UserModel::getName()) { + if (!Session::getUsername()) { return false; } @@ -105,7 +105,7 @@ class="uk-position-relative uk-visible-large"   {$fn(Text::get('btn_log_out'))} - {$fn(ucwords(UserModel::getName()))} + {$fn(ucwords(Session::getUsername()))} diff --git a/automad/src/UI/Views/Elements/Sidebar.php b/automad/src/UI/Views/Elements/Sidebar.php index fb879f450..29b0ce5a4 100644 --- a/automad/src/UI/Views/Elements/Sidebar.php +++ b/automad/src/UI/Views/Elements/Sidebar.php @@ -42,7 +42,7 @@ use Automad\UI\Components\Nav\Jumpbar; use Automad\UI\Components\Nav\SiteTree; use Automad\UI\Components\Status\Span; -use Automad\UI\Models\UserModel; +use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -62,7 +62,7 @@ class Sidebar { * @return string the rendered dashboard sidebar */ public static function render(Automad $Automad) { - if (!UserModel::getName()) { + if (!Session::getUsername()) { return false; } @@ -139,7 +139,7 @@ class="am-sidebar-logo"   {$fn(Text::get('btn_log_out'))} - {$fn(ucwords(UserModel::getName()))} + {$fn(ucwords(Session::getUsername()))} diff --git a/automad/src/UI/Views/Login.php b/automad/src/UI/Views/Login.php index da011f5e3..62c88b833 100644 --- a/automad/src/UI/Views/Login.php +++ b/automad/src/UI/Views/Login.php @@ -36,7 +36,7 @@ namespace Automad\UI\Views; -use Automad\UI\Controllers\UserController; +use Automad\UI\Controllers\SessionController; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -60,7 +60,7 @@ class Login extends AbstractView { * @return string the rendered items */ protected function body() { - $error = UserController::login(); + $error = SessionController::login(); $fn = $this->fn; return <<< HTML diff --git a/automad/src/UI/Views/Logout.php b/automad/src/UI/Views/Logout.php index b0daa1dcd..62a02f20d 100644 --- a/automad/src/UI/Views/Logout.php +++ b/automad/src/UI/Views/Logout.php @@ -38,7 +38,7 @@ use Automad\UI\Components\Alert\Danger; use Automad\UI\Components\Alert\Success; -use Automad\UI\Controllers\UserController; +use Automad\UI\Controllers\SessionController; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -62,7 +62,7 @@ class Logout extends AbstractView { * @return string the rendered items */ protected function body() { - $isLoggedOut = UserController::logout(); + $isLoggedOut = SessionController::logout(); $fn = $this->fn; return <<< HTML From 39190d7e400588b2d7bb8cb218f41a44e99fcf71 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Fri, 10 Sep 2021 20:30:51 +0200 Subject: [PATCH 05/74] make AccountsModel non-static and move more responsibility to User class --- automad/src/Types/User.php | 50 ++++++- automad/src/UI/Commands/CreateUser.php | 13 +- automad/src/UI/Components/Status/Response.php | 6 +- automad/src/UI/Components/System/Users.php | 16 ++- .../src/UI/Controllers/AccountsController.php | 66 ++++----- automad/src/UI/Controllers/UserController.php | 14 +- automad/src/UI/Models/AccountsModel.php | 136 ++++++++---------- automad/src/UI/Utils/Session.php | 11 +- automad/src/UI/Views/CreateUser.php | 6 + automad/ui/lang/english.txt | 4 + 10 files changed, 189 insertions(+), 133 deletions(-) diff --git a/automad/src/Types/User.php b/automad/src/Types/User.php index 1ead3a378..c8007cdf5 100644 --- a/automad/src/Types/User.php +++ b/automad/src/Types/User.php @@ -59,18 +59,60 @@ class User { /** * The encrypted password. */ - public $passwordEncrypted; + private $passwordHash; /** * The constructor. * * @param string $name - * @param string $passwordEncrypted + * @param string $password * @param string|null $email */ - public function __construct(string $name, string $passwordEncrypted, ?string $email = null) { + public function __construct(string $name, string $password, ?string $email = null) { $this->name = $name; - $this->passwordEncrypted = $passwordEncrypted; $this->email = $email; + $this->setPasswordHash($password); + } + + /** + * Get a hashed version of a user password. + * + * @return string the hashed password + */ + public function getPasswordHash() { + return $this->passwordHash; + } + + /** + * Store a hashed version of a given clear text password. + * + * @param string $password + */ + public function setPasswordHash(string $password) { + $this->passwordHash = $this->hash($password); + } + + /** + * Verify if a password matches its saved hashed version. + * + * @param string $password + * @return bool true if the password is verified + */ + public function verifyPassword(string $password) { + $hash = $this->passwordHash; + + return ($hash === crypt($password, $hash)); + } + + /** + * Create hash from password to store in accounts.txt. + * + * @param string $password + * @return string Hashed/salted password + */ + private function hash(string $password) { + $salt = '$2y$10$' . substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'), 0, 22); + + return crypt($password, $salt); } } diff --git a/automad/src/UI/Commands/CreateUser.php b/automad/src/UI/Commands/CreateUser.php index 8a3be1ba8..36ab19fe7 100644 --- a/automad/src/UI/Commands/CreateUser.php +++ b/automad/src/UI/Commands/CreateUser.php @@ -36,6 +36,7 @@ namespace Automad\UI\Commands; +use Automad\Types\User; use Automad\UI\Models\AccountsModel; defined('AUTOMAD_CONSOLE') or die('Console only!' . PHP_EOL); @@ -72,17 +73,15 @@ public static function name() { public static function run() { echo 'Creating new user account for the Automad dashboard ...' . PHP_EOL . PHP_EOL; - if (is_readable(AM_FILE_ACCOUNTS)) { - $accounts = AccountsModel::get(); - } else { - $accounts = array(); - } + $AccountsModel = new AccountsModel(); $name = 'user_' . substr(str_shuffle(MD5(microtime())), 0, 5); $password = substr(str_shuffle(MD5(microtime())), 0, 10); - $accounts[$name] = AccountsModel::passwordHash($password); - if (AccountsModel::write($accounts)) { + $AccountsModel->createUser($name, $password, $password); + $error = $AccountsModel->save(); + + if (!$error) { echo '--------------------' . PHP_EOL; echo 'Name: ' . $name . PHP_EOL; echo 'Password: ' . $password . PHP_EOL; diff --git a/automad/src/UI/Components/Status/Response.php b/automad/src/UI/Components/Status/Response.php index 398112797..a6db237c3 100644 --- a/automad/src/UI/Components/Status/Response.php +++ b/automad/src/UI/Components/Status/Response.php @@ -39,11 +39,11 @@ use Automad\Core\Debug; use Automad\Core\Str; use Automad\System\Update; -use Automad\UI\Utils\Text; use Automad\UI\Controllers\HeadlessController; use Automad\UI\Controllers\PackageManagerController; use Automad\UI\Models\AccountsModel; use Automad\UI\Response as UIResponse; +use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -143,10 +143,12 @@ class="am-u-button am-u-button-danger" } if ($item == 'users') { + $AccountsModel = new AccountsModel(); + $Response->setStatus( '  ' . Text::get('sys_user_registered') . - '  ' . count(AccountsModel::get()) . '' + '  ' . count($AccountsModel->users) . '' ); } diff --git a/automad/src/UI/Components/System/Users.php b/automad/src/UI/Components/System/Users.php index 7df5227b6..2cebc7f24 100644 --- a/automad/src/UI/Components/System/Users.php +++ b/automad/src/UI/Components/System/Users.php @@ -105,7 +105,7 @@ class="uk-form" class="uk-form" data-am-controller="Accounts::add" data-am-close-on-success="#am-add-user-modal" - > + > + /> + - + createUser($username, $password1, $password2, $email)) { + $Response->setError($error); + + return $Response; + } + + if ($error = $AccountsModel->save()) { $Response->setError($error); return $Response; @@ -87,12 +96,17 @@ public static function add() { */ public static function edit() { $Response = new Response(); + $AccountsModel = new AccountsModel(); if ($users = Request::post('delete')) { - $Response = self::delete($users); + $Response->setError($AccountsModel->delete($users)); + + if (!$Response->getError()) { + $Response->setSuccess(Text::get('success_remove') . ' "' . implode('", "', $users) . '"'); + } } - $Response->setHtml(Users::render(AccountsModel::get())); + $Response->setHtml(Users::render($AccountsModel->users)); return $Response; } @@ -110,41 +124,27 @@ public static function install() { return $Response->getError(); } - return AccountsModel::install( + $AccountsModel = new AccountsModel(); + + if ($error = $AccountsModel->createUser( Request::post('username'), Request::post('password1'), - Request::post('password2') - ); - } - } - - /** - * Verify if a password matches its hashed version. - * - * @param string $password (clear text) - * @param string $hash (hashed password) - * @return bool true/false - */ - public static function passwordVerified(string $password, string $hash) { - return AccountsModel::passwordVerified($password, $hash); - } - - /** - * Delete one ore more user accounts. - * - * @param array $users - * @return Response the response object - */ - private static function delete(array $users) { - $Response = new Response(); + Request::post('password2'), + Request::post('email') + )) { + return $error; + } - $Response->setError(AccountsModel::delete($users)); + header('Expires: -1'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + header('Content-Type: application/octet-stream'); + header('Content-Transfer-Encoding: binary'); + header('Content-Disposition: attachment; filename=' . basename(AM_FILE_ACCOUNTS)); + ob_end_flush(); - if (!$Response->getError()) { - $Response->setSuccess(Text::get('success_remove') . ' "' . implode('", "', $users) . '"'); + exit($AccountsModel->generatePHP()); } - - return $Response; } /** diff --git a/automad/src/UI/Controllers/UserController.php b/automad/src/UI/Controllers/UserController.php index 327b534d8..cf734dfca 100644 --- a/automad/src/UI/Controllers/UserController.php +++ b/automad/src/UI/Controllers/UserController.php @@ -67,17 +67,17 @@ public static function changePassword() { if ($newPassword1 == $newPassword2) { if ($currentPassword != $newPassword1) { // Get all accounts from file. - $accounts = AccountsModel::get(); + $AccountsModel = new AccountsModel(); + $User = $AccountsModel->getUser(Session::getUsername()); - if (AccountsModel::passwordVerified($currentPassword, $accounts[Session::getUsername()])) { + if ($User->verifyPassword($currentPassword)) { // Change entry for current user with accounts array. - $accounts[Session::getUsername()] = AccountsModel::passwordHash($newPassword1); + $User->setPasswordHash($newPassword1); + $AccountsModel->updateUser($User); + $Response->setError($AccountsModel->save()); - // Write array with all accounts back to file. - if (AccountsModel::write($accounts)) { + if (!$Response->getError()) { $Response->setSuccess(Text::get('success_password_changed')); - } else { - $Response->setError(Text::get('error_permission') . '

' . AM_FILE_ACCOUNTS . '

'); } } else { $Response->setError(Text::get('error_password_current')); diff --git a/automad/src/UI/Models/AccountsModel.php b/automad/src/UI/Models/AccountsModel.php index 481bed09d..edb4bc8a9 100644 --- a/automad/src/UI/Models/AccountsModel.php +++ b/automad/src/UI/Models/AccountsModel.php @@ -36,6 +36,7 @@ namespace Automad\UI\Models; +use Automad\Types\User; use Automad\UI\Utils\FileSystem; use Automad\UI\Utils\Text; @@ -49,31 +50,35 @@ * @license MIT license - https://automad.org/license */ class AccountsModel { + /** + * The collection of existing user objects. + */ + public $users; + + /** + * The constructor. + */ + public function __construct() { + $this->users = $this->loadUsers(); + } + /** * Add user account. * * @param string $username * @param string $password1 * @param string $password2 + * @param string|null $email * @return string an error message or false on success. */ - public static function add(string $username, string $password1, string $password2) { + public function createUser(string $username, string $password1, string $password2, ?string $email = null) { if ($username && $password1 && $password2) { // Check if password1 equals password2. if ($password1 == $password2) { - // Get all accounts from file. - $accounts = self::get(); - // Check, if user exists already. - if (!isset($accounts[$username])) { + if (!isset($this->users[$username])) { // Add user to accounts array. - $accounts[$username] = self::passwordHash($password1); - ksort($accounts); - - // Write array with all accounts back to file. - if (!self::write($accounts)) { - return Text::get('error_permission') . '

' . AM_FILE_ACCOUNTS . '

'; - } + $this->users[$username] = new User($username, $password1, $email); } else { return '"' . $username . '" ' . Text::get('error_existing'); } @@ -93,22 +98,20 @@ public static function add(string $username, string $password1, string $password * @param array $users * @return string an error message or false on success. */ - public static function delete(array $users) { + public function delete(array $users) { if (is_array($users)) { // Only delete users from list, if accounts.txt is writable. // It is important, to verify write access here, to make sure that all accounts stored in account.txt are also returned in the HTML. // Otherwise, they would be deleted from the array without actually being deleted from the file, in case accounts.txt is write protected. // So it is not enough to just check, if file_put_contents was successful, because that would be simply too late. if (is_writable(AM_FILE_ACCOUNTS)) { - $accounts = self::get(); - foreach ($users as $userToDelete) { - if (isset($accounts[$userToDelete])) { - unset($accounts[$userToDelete]); + if (isset($this->users[$userToDelete])) { + unset($this->users[$userToDelete]); } } - self::write($accounts); + $this->save(); } else { return Text::get('error_permission') . '

' . AM_FILE_ACCOUNTS . '

'; } @@ -123,87 +126,74 @@ public static function delete(array $users) { * The accounts file has to be a PHP file for security reasons. When trying to access the file directly via the browser, * it gets executed instead of revealing any user names. * - * @param array $accounts - * @return string The PHP code + * @return string the PHP code */ - public static function generatePHP(array $accounts) { - return ""; + public function generatePHP() { + return "users) . "');"; } /** - * Get the accounts array by including the accounts PHP file. + * Return a user. * - * @return array The registered accounts + * @param string $name + * @return User the requested user account */ - public static function get() { - return (include AM_FILE_ACCOUNTS); + public function getUser(string $name) { + if (array_key_exists($name, $this->users)) { + return $this->users[$name]; + } + + return null; } /** - * Install the first user account. + * Save the accounts array as PHP to AM_FILE_ACCOUNTS. * - * @param string $username - * @param string $password1 - * @param string $password2 - * @return string Error message in case of an error. + * @return bool|string False on success or an error message */ - public static function install(string $username, string $password1, string $password2) { - if ($username && $password1 && ($password1 === $password2)) { - $accounts = array(); - $accounts[$username] = self::passwordHash($password1); - - // Download accounts.php - header('Expires: -1'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - header('Content-Type: application/octet-stream'); - header('Content-Transfer-Encoding: binary'); - header('Content-Disposition: attachment; filename=' . basename(AM_FILE_ACCOUNTS)); - ob_end_flush(); - echo self::generatePHP($accounts); - exit(); - } else { - return Text::get('error_form'); + public function save() { + ksort($this->users); + + if (!FileSystem::write(AM_FILE_ACCOUNTS, $this->generatePHP())) { + return Text::get('error_permission') . '

' . AM_FILE_ACCOUNTS . '

'; } - } - /** - * Create hash from password to store in accounts.txt. - * - * @param string $password - * @return string Hashed/salted password - */ - public static function passwordHash(string $password) { - $salt = '$2y$10$' . substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'), 0, 22); + if (function_exists('opcache_invalidate')) { + opcache_invalidate(AM_FILE_ACCOUNTS, true); + } - return crypt($password, $salt); + return false; } /** - * Verify if a password matches its hashed version. + * Update or add a single user object. * - * @param string $password (clear text) - * @param string $hash (hashed password) - * @return bool true if the password is verified + * @param User $User */ - public static function passwordVerified(string $password, string $hash) { - return ($hash === crypt($password, $hash)); + public function updateUser(User $User) { + $this->users[$User->name] = $User; } /** - * Save the accounts array as PHP to AM_FILE_ACCOUNTS. + * Get the accounts array by including the accounts PHP file. * - * @param array $accounts - * @return bool Success (true/false) + * @see User + * @return array The registered accounts */ - public static function write(array $accounts) { - $success = FileSystem::write(AM_FILE_ACCOUNTS, self::generatePHP($accounts)); + private function loadUsers() { + if (!is_readable(AM_FILE_ACCOUNTS)) { + return array(); + } - if ($success && function_exists('opcache_invalidate')) { - opcache_invalidate(AM_FILE_ACCOUNTS, true); + $accounts = (include AM_FILE_ACCOUNTS); + + // Check for legacy accounts format and convert it to the new one. + foreach ($accounts as $name => $data) { + if (is_string($data)) { + $accounts[$name] = new User($name, $data); + } } - return $success; + return $accounts; } } diff --git a/automad/src/UI/Utils/Session.php b/automad/src/UI/Utils/Session.php index e8fee9d02..1828cda64 100644 --- a/automad/src/UI/Utils/Session.php +++ b/automad/src/UI/Utils/Session.php @@ -67,9 +67,14 @@ public static function getUsername() { * @return bool false on error */ public static function login(string $username, string $password) { - $accounts = AccountsModel::get(); + $AccountsModel = new AccountsModel(); + $User = $AccountsModel->getUser($username); - if (isset($accounts[$username]) && AccountsModel::passwordVerified($password, $accounts[$username])) { + if (empty($User)) { + return false; + } + + if ($User->verifyPassword($password)) { session_regenerate_id(true); $_SESSION['username'] = $username; @@ -77,7 +82,7 @@ public static function login(string $username, string $password) { // it is safer to just refresh the current page instead of rebuilding the currently requested URL. header('Refresh:0'); - die; + exit(); } return false; diff --git a/automad/src/UI/Views/CreateUser.php b/automad/src/UI/Views/CreateUser.php index e7ef75c2e..3007027ca 100644 --- a/automad/src/UI/Views/CreateUser.php +++ b/automad/src/UI/Views/CreateUser.php @@ -84,6 +84,12 @@ class="uk-form-controls uk-form-large uk-width-1-1" /> + Date: Fri, 10 Sep 2021 23:03:26 +0200 Subject: [PATCH 06/74] rename AccountsModel into UserCollectionModel and AccountsController into UserCollectionController --- automad/src/UI/Commands/CreateUser.php | 8 +++---- automad/src/UI/Components/Status/Response.php | 6 ++--- ...oller.php => UserCollectionController.php} | 24 +++++++++---------- automad/src/UI/Controllers/UserController.php | 10 ++++---- ...ountsModel.php => UserCollectionModel.php} | 2 +- automad/src/UI/Utils/Session.php | 6 ++--- automad/src/UI/Views/CreateUser.php | 4 ++-- automad/ui/js/Status.js | 4 ++-- 8 files changed, 32 insertions(+), 32 deletions(-) rename automad/src/UI/Controllers/{AccountsController.php => UserCollectionController.php} (86%) rename automad/src/UI/Models/{AccountsModel.php => UserCollectionModel.php} (99%) diff --git a/automad/src/UI/Commands/CreateUser.php b/automad/src/UI/Commands/CreateUser.php index 36ab19fe7..150538982 100644 --- a/automad/src/UI/Commands/CreateUser.php +++ b/automad/src/UI/Commands/CreateUser.php @@ -37,7 +37,7 @@ namespace Automad\UI\Commands; use Automad\Types\User; -use Automad\UI\Models\AccountsModel; +use Automad\UI\Models\UserCollectionModel; defined('AUTOMAD_CONSOLE') or die('Console only!' . PHP_EOL); @@ -73,13 +73,13 @@ public static function name() { public static function run() { echo 'Creating new user account for the Automad dashboard ...' . PHP_EOL . PHP_EOL; - $AccountsModel = new AccountsModel(); + $UserCollectionModel = new UserCollectionModel(); $name = 'user_' . substr(str_shuffle(MD5(microtime())), 0, 5); $password = substr(str_shuffle(MD5(microtime())), 0, 10); - $AccountsModel->createUser($name, $password, $password); - $error = $AccountsModel->save(); + $UserCollectionModel->createUser($name, $password, $password); + $error = $UserCollectionModel->save(); if (!$error) { echo '--------------------' . PHP_EOL; diff --git a/automad/src/UI/Components/Status/Response.php b/automad/src/UI/Components/Status/Response.php index a6db237c3..5dc2608a6 100644 --- a/automad/src/UI/Components/Status/Response.php +++ b/automad/src/UI/Components/Status/Response.php @@ -41,7 +41,7 @@ use Automad\System\Update; use Automad\UI\Controllers\HeadlessController; use Automad\UI\Controllers\PackageManagerController; -use Automad\UI\Models\AccountsModel; +use Automad\UI\Models\UserCollectionModel; use Automad\UI\Response as UIResponse; use Automad\UI\Utils\Text; @@ -143,12 +143,12 @@ class="am-u-button am-u-button-danger" } if ($item == 'users') { - $AccountsModel = new AccountsModel(); + $UserCollectionModel = new UserCollectionModel(); $Response->setStatus( '  ' . Text::get('sys_user_registered') . - '  ' . count($AccountsModel->users) . '' + '  ' . count($UserCollectionModel->users) . '' ); } diff --git a/automad/src/UI/Controllers/AccountsController.php b/automad/src/UI/Controllers/UserCollectionController.php similarity index 86% rename from automad/src/UI/Controllers/AccountsController.php rename to automad/src/UI/Controllers/UserCollectionController.php index a9b6c340c..f102d82ee 100644 --- a/automad/src/UI/Controllers/AccountsController.php +++ b/automad/src/UI/Controllers/UserCollectionController.php @@ -38,7 +38,7 @@ use Automad\Core\Request; use Automad\UI\Components\Grid\Users; -use Automad\UI\Models\AccountsModel; +use Automad\UI\Models\UserCollectionModel; use Automad\UI\Response; use Automad\UI\Utils\Text; @@ -51,13 +51,13 @@ * @copyright Copyright (c) 2016-2021 by Marc Anton Dahmen - https://marcdahmen.de * @license MIT license - https://automad.org/license */ -class AccountsController { +class UserCollectionController { /** * Add user account based on $_POST. * * @return Response the response object */ - public static function add() { + public static function createUser() { $Response = new Response(); $username = Request::post('username'); @@ -69,15 +69,15 @@ public static function add() { return self::invalidUsernameResponse(); } - $AccountsModel = new AccountsModel(); + $UserCollectionModel = new UserCollectionModel(); - if ($error = $AccountsModel->createUser($username, $password1, $password2, $email)) { + if ($error = $UserCollectionModel->createUser($username, $password1, $password2, $email)) { $Response->setError($error); return $Response; } - if ($error = $AccountsModel->save()) { + if ($error = $UserCollectionModel->save()) { $Response->setError($error); return $Response; @@ -96,17 +96,17 @@ public static function add() { */ public static function edit() { $Response = new Response(); - $AccountsModel = new AccountsModel(); + $UserCollectionModel = new UserCollectionModel(); if ($users = Request::post('delete')) { - $Response->setError($AccountsModel->delete($users)); + $Response->setError($UserCollectionModel->delete($users)); if (!$Response->getError()) { $Response->setSuccess(Text::get('success_remove') . ' "' . implode('", "', $users) . '"'); } } - $Response->setHtml(Users::render($AccountsModel->users)); + $Response->setHtml(Users::render($UserCollectionModel->users)); return $Response; } @@ -124,9 +124,9 @@ public static function install() { return $Response->getError(); } - $AccountsModel = new AccountsModel(); + $UserCollectionModel = new UserCollectionModel(); - if ($error = $AccountsModel->createUser( + if ($error = $UserCollectionModel->createUser( Request::post('username'), Request::post('password1'), Request::post('password2'), @@ -143,7 +143,7 @@ public static function install() { header('Content-Disposition: attachment; filename=' . basename(AM_FILE_ACCOUNTS)); ob_end_flush(); - exit($AccountsModel->generatePHP()); + exit($UserCollectionModel->generatePHP()); } } diff --git a/automad/src/UI/Controllers/UserController.php b/automad/src/UI/Controllers/UserController.php index cf734dfca..b8421c4c6 100644 --- a/automad/src/UI/Controllers/UserController.php +++ b/automad/src/UI/Controllers/UserController.php @@ -37,7 +37,7 @@ namespace Automad\UI\Controllers; use Automad\Core\Request; -use Automad\UI\Models\AccountsModel; +use Automad\UI\Models\UserCollectionModel; use Automad\UI\Response; use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; @@ -67,14 +67,14 @@ public static function changePassword() { if ($newPassword1 == $newPassword2) { if ($currentPassword != $newPassword1) { // Get all accounts from file. - $AccountsModel = new AccountsModel(); - $User = $AccountsModel->getUser(Session::getUsername()); + $UserCollectionModel = new UserCollectionModel(); + $User = $UserCollectionModel->getUser(Session::getUsername()); if ($User->verifyPassword($currentPassword)) { // Change entry for current user with accounts array. $User->setPasswordHash($newPassword1); - $AccountsModel->updateUser($User); - $Response->setError($AccountsModel->save()); + $UserCollectionModel->updateUser($User); + $Response->setError($UserCollectionModel->save()); if (!$Response->getError()) { $Response->setSuccess(Text::get('success_password_changed')); diff --git a/automad/src/UI/Models/AccountsModel.php b/automad/src/UI/Models/UserCollectionModel.php similarity index 99% rename from automad/src/UI/Models/AccountsModel.php rename to automad/src/UI/Models/UserCollectionModel.php index edb4bc8a9..06edfdeb7 100644 --- a/automad/src/UI/Models/AccountsModel.php +++ b/automad/src/UI/Models/UserCollectionModel.php @@ -49,7 +49,7 @@ * @copyright Copyright (c) 2021 by Marc Anton Dahmen - https://marcdahmen.de * @license MIT license - https://automad.org/license */ -class AccountsModel { +class UserCollectionModel { /** * The collection of existing user objects. */ diff --git a/automad/src/UI/Utils/Session.php b/automad/src/UI/Utils/Session.php index 1828cda64..bc9c96d06 100644 --- a/automad/src/UI/Utils/Session.php +++ b/automad/src/UI/Utils/Session.php @@ -36,7 +36,7 @@ namespace Automad\UI\Utils; -use Automad\UI\Models\AccountsModel; +use Automad\UI\Models\UserCollectionModel; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -67,8 +67,8 @@ public static function getUsername() { * @return bool false on error */ public static function login(string $username, string $password) { - $AccountsModel = new AccountsModel(); - $User = $AccountsModel->getUser($username); + $UserCollectionModel = new UserCollectionModel(); + $User = $UserCollectionModel->getUser($username); if (empty($User)) { return false; diff --git a/automad/src/UI/Views/CreateUser.php b/automad/src/UI/Views/CreateUser.php index 3007027ca..8e862fa75 100644 --- a/automad/src/UI/Views/CreateUser.php +++ b/automad/src/UI/Views/CreateUser.php @@ -36,7 +36,7 @@ namespace Automad\UI\Views; -use Automad\UI\Controllers\AccountsController; +use Automad\UI\Controllers\UserCollectionController; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -60,7 +60,7 @@ class CreateUser extends AbstractView { * @return string the rendered items */ protected function body() { - $error = AccountsController::install(); + $error = UserCollectionController::install(); $fn = $this->fn; diff --git a/automad/ui/js/Status.js b/automad/ui/js/Status.js index c3013d635..1ffc5bfb5 100644 --- a/automad/ui/js/Status.js +++ b/automad/ui/js/Status.js @@ -77,8 +77,8 @@ $doc.ajaxComplete( UIkit.Utils.debounce(function (e, xhr, settings) { var triggers = [ - '?controller=Accounts::edit', - '?controller=Accounts::add', + '?controller=UserCollection::edit', + '?controller=UserCollection::createUser', '?controller=Headless::editTemplate', '?controller=Headless::resetTemplate', '?controller=Config::update', From 47cff9bfc1ebb90e780a31d7f3843501002a6665 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Fri, 10 Sep 2021 23:04:38 +0200 Subject: [PATCH 07/74] fix doc blocks --- automad/src/UI/Controllers/UserCollectionController.php | 2 +- automad/src/UI/Models/UserCollectionModel.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/automad/src/UI/Controllers/UserCollectionController.php b/automad/src/UI/Controllers/UserCollectionController.php index f102d82ee..67c8969bf 100644 --- a/automad/src/UI/Controllers/UserCollectionController.php +++ b/automad/src/UI/Controllers/UserCollectionController.php @@ -45,7 +45,7 @@ defined('AUTOMAD') or die('Direct access not permitted!'); /** - * The Accounts class provides all methods for creating and loading user accounts. + * The user collection class provides all methods for creating and loading user accounts. * * @author Marc Anton Dahmen * @copyright Copyright (c) 2016-2021 by Marc Anton Dahmen - https://marcdahmen.de diff --git a/automad/src/UI/Models/UserCollectionModel.php b/automad/src/UI/Models/UserCollectionModel.php index 06edfdeb7..d1065781d 100644 --- a/automad/src/UI/Models/UserCollectionModel.php +++ b/automad/src/UI/Models/UserCollectionModel.php @@ -43,7 +43,7 @@ defined('AUTOMAD') or die('Direct access not permitted!'); /** - * The Accounts model. + * The user collection model. * * @author Marc Anton Dahmen * @copyright Copyright (c) 2021 by Marc Anton Dahmen - https://marcdahmen.de From c360d9d57ae78b7634b533be383347252c88fc25 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Fri, 10 Sep 2021 23:25:23 +0200 Subject: [PATCH 08/74] improve serialization of User objects --- automad/src/Types/User.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/automad/src/Types/User.php b/automad/src/Types/User.php index c8007cdf5..00a926070 100644 --- a/automad/src/Types/User.php +++ b/automad/src/Types/User.php @@ -74,6 +74,30 @@ public function __construct(string $name, string $password, ?string $email = nul $this->setPasswordHash($password); } + /** + * Serialize object. + * + * @return array the associative array of properties + */ + public function __serialize() { + return array( + 'name' => $this->name, + 'email' => $this->email, + 'passwordHash' => $this->passwordHash + ); + } + + /** + * Unserialize object. + * + * @param array $properties + */ + public function __unserialize(array $properties) { + $this->name = $properties['name']; + $this->email = $properties['email']; + $this->passwordHash = $properties['passwordHash']; + } + /** * Get a hashed version of a user password. * From 0ed244f308340f685b17c4cfe305dae802d298e7 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Fri, 10 Sep 2021 23:29:04 +0200 Subject: [PATCH 09/74] feat: set required PHP version to 7.4+ BREAKING CHANGE: PHP 7.4+ is now required --- automad/src/App.php | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/automad/src/App.php b/automad/src/App.php index d5f25255d..da532afea 100644 --- a/automad/src/App.php +++ b/automad/src/App.php @@ -60,7 +60,7 @@ class App { /** * Required PHP version. */ - private $requiredVersion = '7.2.0'; + private $requiredVersion = '7.4.0'; /** * The main app constructor takes care of running all required startup tests, diff --git a/composer.json b/composer.json index 0547e7507..16674dc5a 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "post-create-project-cmd": "@php automad/console createuser" }, "require": { - "php": ">=7.2", + "php": ">=7.4", "automad/package-installer": "^1.1" } } From 7aa6f3d9ff3b944ae682517afe7a84c4a24c269d Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sat, 11 Sep 2021 22:50:28 +0200 Subject: [PATCH 10/74] fix support for legacy accounts files --- automad/src/Types/User.php | 11 ++++++++++- automad/src/UI/Models/UserCollectionModel.php | 14 +++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/automad/src/Types/User.php b/automad/src/Types/User.php index 00a926070..dd3fdc2a1 100644 --- a/automad/src/Types/User.php +++ b/automad/src/Types/User.php @@ -67,11 +67,20 @@ class User { * @param string $name * @param string $password * @param string|null $email + * @param bool $convertLegacy */ - public function __construct(string $name, string $password, ?string $email = null) { + public function __construct(string $name, string $password, ?string $email = null, ?bool $convertLegacy = false) { $this->name = $name; $this->email = $email; $this->setPasswordHash($password); + + // Legacy account files (pre version 1.9) can't be unserialized to User objects. + // In case of reading such a legacy file, User objects have to be constructed. + // Since in such case there is no clear password but only an already hashed one instead, + // The password hash property has to be overwritten with that already existing hash. + if ($convertLegacy && strpos($password, '$2y$') === 0) { + $this->passwordHash = $password; + } } /** diff --git a/automad/src/UI/Models/UserCollectionModel.php b/automad/src/UI/Models/UserCollectionModel.php index d1065781d..2660ffb57 100644 --- a/automad/src/UI/Models/UserCollectionModel.php +++ b/automad/src/UI/Models/UserCollectionModel.php @@ -129,7 +129,7 @@ public function delete(array $users) { * @return string the PHP code */ public function generatePHP() { - return "users) . "');"; + return "users) . "';"; } /** @@ -188,12 +188,16 @@ private function loadUsers() { $accounts = (include AM_FILE_ACCOUNTS); // Check for legacy accounts format and convert it to the new one. - foreach ($accounts as $name => $data) { - if (is_string($data)) { - $accounts[$name] = new User($name, $data); + if (is_array($accounts)) { + foreach ($accounts as $name => $data) { + if (is_string($data)) { + $accounts[$name] = new User($name, $data, null, true); + } } + + return $accounts; } - return $accounts; + return unserialize($accounts); } } From 62a4e219bb677ea37ac164a25c6207798ee34ee8 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sun, 12 Sep 2021 15:40:58 +0200 Subject: [PATCH 11/74] feat(ui): add option to change username and add email --- automad/src/UI/Components/System/Users.php | 168 +++++++++++------- .../Controllers/UserCollectionController.php | 34 ---- automad/src/UI/Controllers/UserController.php | 24 +++ automad/src/UI/Models/UserCollectionModel.php | 92 ++++++++++ automad/src/UI/Views/CreateUser.php | 6 +- automad/ui/lang/english.txt | 28 +-- automad/ui/less/panel.less | 2 +- 7 files changed, 238 insertions(+), 116 deletions(-) diff --git a/automad/src/UI/Components/System/Users.php b/automad/src/UI/Components/System/Users.php index 2cebc7f24..8454c3b86 100644 --- a/automad/src/UI/Components/System/Users.php +++ b/automad/src/UI/Components/System/Users.php @@ -36,6 +36,8 @@ namespace Automad\UI\Components\System; +use Automad\UI\Models\UserCollectionModel; +use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -55,16 +57,105 @@ class Users { */ public static function render() { $Text = Text::getObject(); + $UserCollectionModel = new UserCollectionModel(); + $username = Session::getUsername(); + $User = $UserCollectionModel->getUser($username); + $email = $User->email; return <<< HTML

$Text->sys_user_info

+
+ +
+
+
+ + +
+
+ + +
+
+ +
+
+ + +   + $Text->sys_user_change_password + +
+
+
+ $Text->sys_user_change_password + +
+
+ + + + +
+
+
+
+

$Text->sys_user_registered_info

+ > 
@@ -73,7 +164,7 @@ class="uk-button uk-button-large uk-button-success"
@@ -82,7 +173,7 @@ class="uk-form"   $Text->btn_close - @@ -90,8 +181,7 @@ class="uk-form"
-
- +   $Text->sys_user_add @@ -103,14 +193,14 @@ class="uk-form"
@@ -126,7 +216,7 @@ class="uk-form-controls uk-width-1-1 uk-margin-small-top" class="uk-form-controls uk-width-1-1 uk-margin-small-top" type="password" name="password1" - placeholder="$Text->sys_user_add_password" + placeholder="$Text->sys_user_password" autocomplete="new-password" data-am-enter="#am-add-user-submit" required @@ -135,7 +225,7 @@ class="uk-form-controls uk-width-1-1 uk-margin-small-top" class="uk-form-controls uk-width-1-1" type="password" name="password2" - placeholder="$Text->sys_user_add_repeat" + placeholder="$Text->sys_user_repeat_password" autocomplete="new-password" data-am-enter="#am-add-user-submit" required @@ -153,64 +243,6 @@ class="uk-form-controls uk-width-1-1"
- -
- -   - $Text->sys_user_change_password - -
-
-
- $Text->sys_user_change_password - -
-
- - - - -
-
-
HTML; } } diff --git a/automad/src/UI/Controllers/UserCollectionController.php b/automad/src/UI/Controllers/UserCollectionController.php index 67c8969bf..35d795e0e 100644 --- a/automad/src/UI/Controllers/UserCollectionController.php +++ b/automad/src/UI/Controllers/UserCollectionController.php @@ -65,10 +65,6 @@ public static function createUser() { $password2 = Request::post('password2'); $email = Request::post('email'); - if (!self::validUsername($username)) { - return self::invalidUsernameResponse(); - } - $UserCollectionModel = new UserCollectionModel(); if ($error = $UserCollectionModel->createUser($username, $password1, $password2, $email)) { @@ -118,12 +114,6 @@ public static function edit() { */ public static function install() { if (!empty($_POST)) { - if (!self::validUsername(Request::post('username'))) { - $Response = self::invalidUsernameResponse(); - - return $Response->getError(); - } - $UserCollectionModel = new UserCollectionModel(); if ($error = $UserCollectionModel->createUser( @@ -146,28 +136,4 @@ public static function install() { exit($UserCollectionModel->generatePHP()); } } - - /** - * A response containing the invalid username error message. - * - * @return Response the response object - */ - private static function invalidUsernameResponse() { - $Response = new Response(); - $Response->setError(Text::get('error_invalid_username') . ' "a-z", "A-Z", ".", "-", "_", "@"'); - - return $Response; - } - - /** - * Verify if a given username is valid. - * - * @param string $username - * @return bool true in case the username is valid - */ - private static function validUsername(string $username) { - preg_match('/[^@\w\.\-]/', $username, $matches); - - return empty($matches); - } } diff --git a/automad/src/UI/Controllers/UserController.php b/automad/src/UI/Controllers/UserController.php index b8421c4c6..c280db190 100644 --- a/automad/src/UI/Controllers/UserController.php +++ b/automad/src/UI/Controllers/UserController.php @@ -94,4 +94,28 @@ public static function changePassword() { return $Response; } + + /** + * Edit user account info such as username and email. + * + * @return Response the response + */ + public static function edit() { + $Response = new Response(); + $username = Request::post('username'); + $email = Request::post('email'); + + $UserCollectionModel = new UserCollectionModel(); + $Response->setError($UserCollectionModel->editCurrentUserInfo($username, $email)); + + if (empty($Response->getError())) { + $Response->setError($UserCollectionModel->save()); + + if (empty($Response->getError())) { + $Response->setReload(true); + } + } + + return $Response; + } } diff --git a/automad/src/UI/Models/UserCollectionModel.php b/automad/src/UI/Models/UserCollectionModel.php index 2660ffb57..a1aa06a9b 100644 --- a/automad/src/UI/Models/UserCollectionModel.php +++ b/automad/src/UI/Models/UserCollectionModel.php @@ -38,6 +38,7 @@ use Automad\Types\User; use Automad\UI\Utils\FileSystem; +use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -72,6 +73,14 @@ public function __construct() { * @return string an error message or false on success. */ public function createUser(string $username, string $password1, string $password2, ?string $email = null) { + if (!$this->validUsername($username)) { + return $this->invalidUsernameError(); + } + + if (!$this->validEmail($email)) { + return $this->invalidEmailError(); + } + if ($username && $password1 && $password2) { // Check if password1 equals password2. if ($password1 == $password2) { @@ -120,6 +129,47 @@ public function delete(array $users) { return false; } + /** + * Edit info of the currently logged in user. + * + * @param string $username + * @param string $email + * @return string an error message in case of error or false in case of success + */ + public function editCurrentUserInfo(string $username, string $email) { + $User = $this->getUser(Session::getUsername()); + + if (!$User) { + return Text::get('error_form'); + } + + $username = trim($username); + $email = trim($email); + + if (!$this->validUsername($username)) { + return $this->invalidUsernameError(); + } + + if (!$this->validEmail($email)) { + return $this->invalidEmailError(); + } + + if ($User->name != $username) { + if (!array_key_exists($username, $this->users)) { + unset($this->users[$User->name]); + $User->name = $username; + $_SESSION['username'] = $username; + } else { + return '"' . $username . '" ' . Text::get('error_existing'); + } + } + + $User->email = $email; + $this->updateUser($User); + + return false; + } + /** * Generate the PHP code for the accounts file. Basically the code returns the unserialized serialized array with all users. * That way, the accounts array can be stored as PHP. @@ -174,6 +224,24 @@ public function updateUser(User $User) { $this->users[$User->name] = $User; } + /** + * The invalid email error message. + * + * @return string the error message + */ + private function invalidEmailError() { + return Text::get('error_invalid_email'); + } + + /** + * The invalid username error message. + * + * @return string the error message + */ + private function invalidUsernameError() { + return Text::get('error_invalid_username') . ' "a-z", "A-Z", ".", "-", "_", "@"'; + } + /** * Get the accounts array by including the accounts PHP file. * @@ -200,4 +268,28 @@ private function loadUsers() { return unserialize($accounts); } + + /** + * Verify if a given email address is valid. + * + * @param string $email + * @return bool true in case the username is valid + */ + private function validEmail(string $email) { + preg_match('/^[a-zA-Z0-9]+[\w\.\-\_]*@[\w\.\-\_]+\.[a-zA-Z]+$/', $email, $matches); + + return $matches; + } + + /** + * Verify if a given username is valid. + * + * @param string $username + * @return bool true in case the username is valid + */ + private function validUsername(string $username) { + preg_match('/[^@\w\.\-]/', $username, $matches); + + return empty($matches); + } } diff --git a/automad/src/UI/Views/CreateUser.php b/automad/src/UI/Views/CreateUser.php index 8e862fa75..0c75bd194 100644 --- a/automad/src/UI/Views/CreateUser.php +++ b/automad/src/UI/Views/CreateUser.php @@ -80,7 +80,7 @@ protected function body() { class="uk-form-controls uk-form-large uk-width-1-1" type="text" name="username" - placeholder="{$fn(Text::get('sys_user_add_name'))}" + placeholder="{$fn(Text::get('sys_user_name'))}" />
+
+HTML; + } +} diff --git a/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php b/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php new file mode 100644 index 000000000..034a34f98 --- /dev/null +++ b/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php @@ -0,0 +1,78 @@ + + +   + {$fn(Text::get('btn_home'))} + + + {$fn(Text::get('btn_login'))} + + +HTML; + } +} diff --git a/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php new file mode 100644 index 000000000..cde360efd --- /dev/null +++ b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php @@ -0,0 +1,93 @@ + + {$fn(Text::get('reset_password_enter_username'))} +

+ +
+ +   + {$fn(Text::get('btn_cancel'))} + + +
+HTML; + } +} diff --git a/automad/src/UI/Components/System/Users.php b/automad/src/UI/Components/System/Users.php index b81bf405d..f88c15f00 100644 --- a/automad/src/UI/Components/System/Users.php +++ b/automad/src/UI/Components/System/Users.php @@ -93,7 +93,7 @@ class="uk-button"   diff --git a/automad/src/UI/Controllers/UserController.php b/automad/src/UI/Controllers/UserController.php index c280db190..a70c29221 100644 --- a/automad/src/UI/Controllers/UserController.php +++ b/automad/src/UI/Controllers/UserController.php @@ -37,7 +37,12 @@ namespace Automad\UI\Controllers; use Automad\Core\Request; +use Automad\UI\Components\Alert\Danger; +use Automad\UI\Components\Layout\PasswordReset\ResetForm; +use Automad\UI\Components\Layout\PasswordReset\ResetSuccess; +use Automad\UI\Components\Layout\PasswordReset\TokenRequestForm; use Automad\UI\Models\UserCollectionModel; +use Automad\UI\Models\UserModel; use Automad\UI\Response; use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; @@ -66,22 +71,12 @@ public static function changePassword() { if ($currentPassword && $newPassword1 && $newPassword2) { if ($newPassword1 == $newPassword2) { if ($currentPassword != $newPassword1) { - // Get all accounts from file. - $UserCollectionModel = new UserCollectionModel(); - $User = $UserCollectionModel->getUser(Session::getUsername()); - - if ($User->verifyPassword($currentPassword)) { - // Change entry for current user with accounts array. - $User->setPasswordHash($newPassword1); - $UserCollectionModel->updateUser($User); - $Response->setError($UserCollectionModel->save()); - - if (!$Response->getError()) { - $Response->setSuccess(Text::get('success_password_changed')); - } - } else { - $Response->setError(Text::get('error_password_current')); - } + $UserModel = new UserModel(); + $Response = $UserModel->changePassword( + Session::getUsername(), + $currentPassword, + $newPassword1 + ); } else { $Response->setError(Text::get('error_password_reuse')); } @@ -118,4 +113,47 @@ public static function edit() { return $Response; } + + /** + * Reset a user password by email. + * + * @return string the form HTML + */ + public static function resetPassword() { + $UserModel = new UserModel(); + $UserCollectionModel = new UserCollectionModel(); + + $username = trim(Request::post('username')); + $token = Request::post('token'); + $newPassword1 = Request::post('password1'); + $newPassword2 = Request::post('password2'); + + $User = $UserCollectionModel->getUser($username); + + if ($username && !$User) { + return TokenRequestForm::render(Text::get('error_user_not_found')); + } + + if ($User && $token && $newPassword1 && $newPassword2) { + if ($UserModel->verifyPasswordResetToken($User->name, $token)) { + if ($error = $UserModel->resetPassword($User, $newPassword1, $newPassword2)) { + return ResetForm::render($User->name, $error); + } else { + return ResetSuccess::render(); + } + } else { + return ResetForm::render($User->name, Text::get('error_password_reset_verification')); + } + } + + if ($User) { + if ($error = $UserModel->sendPasswordResetToken($User)) { + return TokenRequestForm::render($error); + } + + return ResetForm::render($User->name); + } + + return TokenRequestForm::render(); + } } diff --git a/automad/src/UI/Dashboard.php b/automad/src/UI/Dashboard.php index 813079e50..a7748c178 100644 --- a/automad/src/UI/Dashboard.php +++ b/automad/src/UI/Dashboard.php @@ -116,12 +116,18 @@ public function __construct() { exit($Response->json()); } - $view = 'CreateUser'; + $requestedView = Request::query('view'); - if (file_exists(AM_FILE_ACCOUNTS)) { + if ($requestedView == 'ResetPassword') { + $view = $requestedView; + } else { $view = 'Login'; } + if (!file_exists(AM_FILE_ACCOUNTS)) { + $view = 'CreateUser'; + } + $class = "{$namespaceViews}{$view}"; $object = new $class; $this->output = $object->render(); diff --git a/automad/src/UI/Models/UserCollectionModel.php b/automad/src/UI/Models/UserCollectionModel.php index a1aa06a9b..dd673ffc7 100644 --- a/automad/src/UI/Models/UserCollectionModel.php +++ b/automad/src/UI/Models/UserCollectionModel.php @@ -77,7 +77,7 @@ public function createUser(string $username, string $password1, string $password return $this->invalidUsernameError(); } - if (!$this->validEmail($email)) { + if ($email && !$this->validEmail($email)) { return $this->invalidEmailError(); } @@ -186,7 +186,7 @@ public function generatePHP() { * Return a user. * * @param string $name - * @return User the requested user account + * @return User|null the requested user account */ public function getUser(string $name) { if (array_key_exists($name, $this->users)) { @@ -199,7 +199,7 @@ public function getUser(string $name) { /** * Save the accounts array as PHP to AM_FILE_ACCOUNTS. * - * @return bool|string False on success or an error message + * @return string|null Null on success or an error message */ public function save() { ksort($this->users); @@ -212,7 +212,7 @@ public function save() { opcache_invalidate(AM_FILE_ACCOUNTS, true); } - return false; + return null; } /** @@ -275,7 +275,7 @@ private function loadUsers() { * @param string $email * @return bool true in case the username is valid */ - private function validEmail(string $email) { + private function validEmail(?string $email = null) { preg_match('/^[a-zA-Z0-9]+[\w\.\-\_]*@[\w\.\-\_]+\.[a-zA-Z]+$/', $email, $matches); return $matches; diff --git a/automad/src/UI/Models/UserModel.php b/automad/src/UI/Models/UserModel.php new file mode 100644 index 000000000..22e68ea18 --- /dev/null +++ b/automad/src/UI/Models/UserModel.php @@ -0,0 +1,150 @@ +getUser($username); + + if ($User->verifyPassword($currentPassword)) { + $User->setPasswordHash($newPassword); + $UserCollectionModel->updateUser($User); + $Response->setError($UserCollectionModel->save()); + + if (!$Response->getError()) { + $Response->setSuccess(Text::get('success_password_changed')); + } + } else { + $Response->setError(Text::get('error_password_current')); + } + + return $Response; + } + + /** + * Handle password resetting. + * + * @param User $User + * @param string $newPassword1 + * @param string $newPassword2 + * @return string|null an error message or null + */ + public function resetPassword(User $User, string $newPassword1, string $newPassword2) { + $UserCollectionModel = new UserCollectionModel(); + + if ($newPassword1 === $newPassword2) { + $User->setPasswordHash($newPassword1); + $UserCollectionModel->updateUser($User); + + if ($error = $UserCollectionModel->save()) { + return $error; + } else { + Session::clearResetTokenHash(); + + return null; + } + } else { + return Text::get('error_password_repeat'); + } + } + + /** + * Send password reset token and store it in session. + * + * @param User $User + * @return string|null an error message or null + */ + public function sendPasswordResetToken(User $User) { + if ($email = $User->email) { + $token = strtoupper(substr(hash('sha256', microtime() . $User->getPasswordHash()), 0, 16)); + $tokenHash = password_hash($token, PASSWORD_DEFAULT); + Session::setResetTokenHash($User->name, $tokenHash); + + $domain = $_SERVER['SERVER_NAME'] . AM_BASE_URL; + + $subject = "Automad: Password Reset on $domain"; + $message = "Dear $User->name,\r\n\r\na password reset has been requested for your account on $domain.\r\n" . + "The following token can be used to reset your password:\r\n\r\n$token\r\n\r\n" . + "In case you did not request the reset yourself, you can ignore this message.\r\n\r\n" . + 'Automad'; + + if (!mail($email, $subject, $message)) { + return Text::get('error_send_email'); + } + } else { + return Text::get('error_user_no_email'); + } + } + + /** + * Verify if the passed username/toke combination matches a token hash in the session data array. + * + * @param string $username + * @param string $token + * @return bool true if verified + */ + public function verifyPasswordResetToken(string $username, string $token) { + $tokenHash = Session::getResetTokenHash($username); + + if ($tokenHash) { + return password_verify($token, $tokenHash); + } + } +} diff --git a/automad/src/UI/Utils/Session.php b/automad/src/UI/Utils/Session.php index bc9c96d06..53b358f51 100644 --- a/automad/src/UI/Utils/Session.php +++ b/automad/src/UI/Utils/Session.php @@ -48,6 +48,29 @@ * @license MIT license - https://automad.org/license */ class Session { + /** + * Clears the reset token hash + */ + public static function clearResetTokenHash() { + unset($_SESSION['reset']); + } + + /** + * Return the reset token hash for a given user. + * + * @param string $username + * @return string the token hash + */ + public static function getResetTokenHash(string $username) { + if (isset($_SESSION['reset'])) { + if (isset($_SESSION['reset'][$username])) { + return $_SESSION['reset'][$username]; + } + } + + return false; + } + /** * Return the currently logged in user. * @@ -103,4 +126,14 @@ public static function logout() { return false; } } + + /** + * Set the reset token hash for a given user. + * + * @param string $username + * @param string $tokenHash + */ + public static function setResetTokenHash(string $username, string $tokenHash) { + $_SESSION['reset'] = array($username => $tokenHash); + } } diff --git a/automad/src/UI/Views/Login.php b/automad/src/UI/Views/Login.php index 62c88b833..289c7431d 100644 --- a/automad/src/UI/Views/Login.php +++ b/automad/src/UI/Views/Login.php @@ -68,7 +68,7 @@ protected function body() {

{$fn($this->Automad->Shared->get(AM_KEY_SITENAME))}

-
+ -
diff --git a/automad/src/UI/Views/Logout.php b/automad/src/UI/Views/Logout.php index 62a02f20d..61526c695 100644 --- a/automad/src/UI/Views/Logout.php +++ b/automad/src/UI/Views/Logout.php @@ -103,6 +103,7 @@ private function alert(bool $isLoggedOut) { href="{$fn(AM_BASE_INDEX . '/')}" class="uk-button uk-button-link" > +   {$fn(Text::get('btn_home'))} fn; + + return <<< HTML +
+

+ {$fn($this->Automad->Shared->get(AM_KEY_SITENAME))} +

+
+ {$fn(UserController::resetPassword())} +
+
+HTML; + } + + /** + * Get the title for the dashboard view. + * + * @return string the rendered items + */ + protected function title() { + $title = Text::get('reset_password_title'); + + return "$title — Automad"; + } +} diff --git a/automad/ui/lang/english.txt b/automad/ui/lang/english.txt index 480312978..0e5ff6c8a 100644 --- a/automad/ui/lang/english.txt +++ b/automad/ui/lang/english.txt @@ -26,6 +26,10 @@ btn_browse: Browse Files - +btn_cancel: Cancel + +- + btn_close: Close - @@ -158,6 +162,10 @@ btn_reset: Reset - +btn_reset_password: Reset Password + +- + btn_save: Save Changes - @@ -793,10 +801,18 @@ error_password_reuse: Don't reuse your old password! - +error_password_reset_verification: The provided password reset token is invalid or has expired already! + +- + error_permission: Permissions denied: - +error_send_email: Error sending email! + +- + error_template_missing: Template missing - @@ -829,6 +845,14 @@ error_update_permission: Can't run update! Permissions denied! - +error_user_not_found: Invalid username. The user is not registered. + +- + +error_user_no_email: There is no email address stored for the requested user account. + +- + error_var_exists: There is already a variable with that name! - @@ -1085,6 +1109,29 @@ page_private: private +reset_password_title: Reset Password + +- + +reset_password_enter_username: Please enter your username in order to request a password reset token. + +- + +reset_password_enter_new_password: Please enter now the token that you have received by email along with a new password. + +- + +reset_password_token: Token + +- + + + + + + + + sidebar_header_global: Global - @@ -1206,7 +1253,7 @@ success_installed: Successfully installed - -success_password_changed: Your password got changed successfully! +success_password_changed: Your password has been changed successfully! - @@ -1393,7 +1440,7 @@ sys_user: Users - -sys_user_info: Below you can find all information related to your account. You can change your username, password or email here. In order to enable password resets, make sure you have entered a vaild and active email address. +sys_user_info: Here you can find all information related to your account and change your username, password or email. In order to be able to reset your password by email, please make sure that you have entered a vaild and active email address below. - @@ -1437,7 +1484,7 @@ sys_user_registered: Registered Users - -sys_user_registered_info: Here you can add or remove other users. +sys_user_registered_info: It is also possible to register other users in order to allow them to edit content. - From a8a10aafd8c8349afd2b35cabe305bd9ca8c0daf Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sun, 19 Sep 2021 23:30:07 +0200 Subject: [PATCH 14/74] refactor(ui): decouple model return values from error messages --- automad/src/UI/Commands/CreateUser.php | 8 +- .../Controllers/FileCollectionController.php | 5 +- automad/src/UI/Controllers/FileController.php | 27 ++- .../Controllers/UserCollectionController.php | 27 ++- automad/src/UI/Controllers/UserController.php | 28 +-- automad/src/UI/Models/FileCollectionModel.php | 24 ++- automad/src/UI/Models/FileModel.php | 198 +++++++++--------- automad/src/UI/Models/ImageModel.php | 7 +- automad/src/UI/Models/UserCollectionModel.php | 96 +++++---- automad/src/UI/Models/UserModel.php | 76 ++++--- automad/src/UI/Utils/FileSystem.php | 119 ++++++----- automad/src/UI/Utils/Messenger.php | 77 +++++++ 12 files changed, 432 insertions(+), 260 deletions(-) create mode 100644 automad/src/UI/Utils/Messenger.php diff --git a/automad/src/UI/Commands/CreateUser.php b/automad/src/UI/Commands/CreateUser.php index 150538982..63430bd68 100644 --- a/automad/src/UI/Commands/CreateUser.php +++ b/automad/src/UI/Commands/CreateUser.php @@ -38,6 +38,7 @@ use Automad\Types\User; use Automad\UI\Models\UserCollectionModel; +use Automad\UI\Utils\Messenger; defined('AUTOMAD_CONSOLE') or die('Console only!' . PHP_EOL); @@ -74,14 +75,15 @@ public static function run() { echo 'Creating new user account for the Automad dashboard ...' . PHP_EOL . PHP_EOL; $UserCollectionModel = new UserCollectionModel(); + $Messenger = new Messenger(); $name = 'user_' . substr(str_shuffle(MD5(microtime())), 0, 5); $password = substr(str_shuffle(MD5(microtime())), 0, 10); - $UserCollectionModel->createUser($name, $password, $password); - $error = $UserCollectionModel->save(); + $UserCollectionModel->createUser($name, $password, $password, null, $Messenger); + $UserCollectionModel->save($Messenger); - if (!$error) { + if (!$Messenger->getError()) { echo '--------------------' . PHP_EOL; echo 'Name: ' . $name . PHP_EOL; echo 'Password: ' . $password . PHP_EOL; diff --git a/automad/src/UI/Controllers/FileCollectionController.php b/automad/src/UI/Controllers/FileCollectionController.php index 69b5e4445..2472d42cf 100644 --- a/automad/src/UI/Controllers/FileCollectionController.php +++ b/automad/src/UI/Controllers/FileCollectionController.php @@ -107,9 +107,6 @@ public static function upload() { // If an URL is also posted, use that URL's page path. Without any URL, the /shared path is used. $path = FileSystem::getPathByPostUrl($Automad); - $Response = new Response(); - $Response->setError(FileCollectionModel::upload($_FILES, $path)); - - return $Response; + return FileCollectionModel::upload($_FILES, $path); } } diff --git a/automad/src/UI/Controllers/FileController.php b/automad/src/UI/Controllers/FileController.php index 2a59c6462..ecbc536a9 100644 --- a/automad/src/UI/Controllers/FileController.php +++ b/automad/src/UI/Controllers/FileController.php @@ -39,6 +39,7 @@ use Automad\Core\Request; use Automad\UI\Models\FileModel; use Automad\UI\Response; +use Automad\UI\Utils\Messenger; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -57,15 +58,17 @@ class FileController { */ public static function editInfo() { $Response = new Response(); + $Messenger = new Messenger(); - $Response->setError( - FileModel::editInfo( - Request::post('new-name'), - Request::post('old-name'), - Request::post('caption') - ) + FileModel::editInfo( + Request::post('new-name'), + Request::post('old-name'), + Request::post('caption'), + $Messenger ); + $Response->setError($Messenger->getError()); + return $Response; } @@ -76,14 +79,16 @@ public static function editInfo() { */ public static function import() { $Response = new Response(); + $Messenger = new Messenger(); - $Response->setError( - FileModel::import( - Request::post('importUrl'), - Request::post('url') - ) + FileModel::import( + Request::post('importUrl'), + Request::post('url'), + $Messenger ); + $Response->setError($Messenger->getError()); + return $Response; } } diff --git a/automad/src/UI/Controllers/UserCollectionController.php b/automad/src/UI/Controllers/UserCollectionController.php index 35d795e0e..0ea22e271 100644 --- a/automad/src/UI/Controllers/UserCollectionController.php +++ b/automad/src/UI/Controllers/UserCollectionController.php @@ -40,6 +40,7 @@ use Automad\UI\Components\Grid\Users; use Automad\UI\Models\UserCollectionModel; use Automad\UI\Response; +use Automad\UI\Utils\Messenger; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -59,6 +60,7 @@ class UserCollectionController { */ public static function createUser() { $Response = new Response(); + $Messenger = new Messenger(); $username = Request::post('username'); $password1 = Request::post('password1'); @@ -67,14 +69,14 @@ public static function createUser() { $UserCollectionModel = new UserCollectionModel(); - if ($error = $UserCollectionModel->createUser($username, $password1, $password2, $email)) { - $Response->setError($error); + if (!$UserCollectionModel->createUser($username, $password1, $password2, $email, $Messenger)) { + $Response->setError($Messenger->getError()); return $Response; } - if ($error = $UserCollectionModel->save()) { - $Response->setError($error); + if (!$UserCollectionModel->save($Messenger)) { + $Response->setError($Messenger->getError()); return $Response; } @@ -92,13 +94,14 @@ public static function createUser() { */ public static function edit() { $Response = new Response(); + $Messenger = new Messenger(); $UserCollectionModel = new UserCollectionModel(); if ($users = Request::post('delete')) { - $Response->setError($UserCollectionModel->delete($users)); - - if (!$Response->getError()) { + if ($UserCollectionModel->delete($users, $Messenger)) { $Response->setSuccess(Text::get('success_remove') . ' "' . implode('", "', $users) . '"'); + } else { + $Response->setError($Messenger->getError()); } } @@ -110,19 +113,21 @@ public static function edit() { /** * Install the first user account. * - * @return string Error message in case of an error. + * @return string|null Error message in case of an error */ public static function install() { if (!empty($_POST)) { $UserCollectionModel = new UserCollectionModel(); + $Messenger = new Messenger(); - if ($error = $UserCollectionModel->createUser( + if (!$UserCollectionModel->createUser( Request::post('username'), Request::post('password1'), Request::post('password2'), - Request::post('email') + Request::post('email'), + $Messenger )) { - return $error; + return $Messenger->getError(); } header('Expires: -1'); diff --git a/automad/src/UI/Controllers/UserController.php b/automad/src/UI/Controllers/UserController.php index a70c29221..524ed6aa7 100644 --- a/automad/src/UI/Controllers/UserController.php +++ b/automad/src/UI/Controllers/UserController.php @@ -44,6 +44,7 @@ use Automad\UI\Models\UserCollectionModel; use Automad\UI\Models\UserModel; use Automad\UI\Response; +use Automad\UI\Utils\Messenger; use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; @@ -97,20 +98,20 @@ public static function changePassword() { */ public static function edit() { $Response = new Response(); - $username = Request::post('username'); - $email = Request::post('email'); - + $Messenger = new Messenger(); $UserCollectionModel = new UserCollectionModel(); - $Response->setError($UserCollectionModel->editCurrentUserInfo($username, $email)); - if (empty($Response->getError())) { - $Response->setError($UserCollectionModel->save()); + $username = Request::post('username'); + $email = Request::post('email'); - if (empty($Response->getError())) { + if ($UserCollectionModel->editCurrentUserInfo($username, $email, $Messenger)) { + if ($UserCollectionModel->save($Messenger)) { $Response->setReload(true); } } + $Response->setError($Messenger->getError()); + return $Response; } @@ -122,6 +123,7 @@ public static function edit() { public static function resetPassword() { $UserModel = new UserModel(); $UserCollectionModel = new UserCollectionModel(); + $Messenger = new Messenger(); $username = trim(Request::post('username')); $token = Request::post('token'); @@ -136,10 +138,10 @@ public static function resetPassword() { if ($User && $token && $newPassword1 && $newPassword2) { if ($UserModel->verifyPasswordResetToken($User->name, $token)) { - if ($error = $UserModel->resetPassword($User, $newPassword1, $newPassword2)) { - return ResetForm::render($User->name, $error); - } else { + if ($UserModel->resetPassword($User, $newPassword1, $newPassword2, $Messenger)) { return ResetSuccess::render(); + } else { + return ResetForm::render($User->name, $Messenger->getError()); } } else { return ResetForm::render($User->name, Text::get('error_password_reset_verification')); @@ -147,11 +149,11 @@ public static function resetPassword() { } if ($User) { - if ($error = $UserModel->sendPasswordResetToken($User)) { - return TokenRequestForm::render($error); + if ($UserModel->sendPasswordResetToken($User, $Messenger)) { + return ResetForm::render($User->name); } - return ResetForm::render($User->name); + return TokenRequestForm::render($Messenger->getError()); } return TokenRequestForm::render(); diff --git a/automad/src/UI/Models/FileCollectionModel.php b/automad/src/UI/Models/FileCollectionModel.php index a73f8b85e..ae31ceded 100644 --- a/automad/src/UI/Models/FileCollectionModel.php +++ b/automad/src/UI/Models/FileCollectionModel.php @@ -40,6 +40,7 @@ use Automad\Core\Str; use Automad\UI\Response; use Automad\UI\Utils\FileSystem; +use Automad\UI\Utils\Messenger; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -68,19 +69,24 @@ public static function deleteFiles(array $files, string $path) { $errors = array(); foreach ($files as $f) { + $Messenger = new Messenger(); + // Make sure submitted filename has no '../' (basename). $file = $path . basename($f); - if ($error = FileSystem::deleteMedia($file)) { - $errors[] = $error; - } else { + if (FileSystem::deleteMedia($file, $Messenger)) { $success[] = '"' . basename($file) . '"'; + } else { + $errors[] = $Messenger->getError(); } } Cache::clear(); - $Response->setSuccess(Text::get('success_remove') . '
' . implode('
', $success)); + if (!empty($success)) { + $Response->setSuccess(Text::get('success_remove') . '
' . implode('
', $success)); + } + $Response->setError(implode('
', $errors)); } else { $Response->setError(Text::get('error_permission') . ' "' . basename($path) . '"'); @@ -94,10 +100,10 @@ public static function deleteFiles(array $files, string $path) { * * @param array $files * @param string $path - * @return string an error message or false on success + * @return Response a response object */ public static function upload(array $files, string $path) { - $error = ''; + $Response = new Response(); // Move uploaded files if (isset($files['files']['name'])) { @@ -120,13 +126,13 @@ public static function upload(array $files, string $path) { Cache::clear(); if ($errors) { - $error = implode('
', $errors); + $Response->setError(implode('
', $errors)); } } else { - $error = Text::get('error_permission') . ' "' . basename($path) . '"'; + $Response->setError(Text::get('error_permission') . ' "' . basename($path) . '"'); } } - return $error; + return $Response; } } diff --git a/automad/src/UI/Models/FileModel.php b/automad/src/UI/Models/FileModel.php index 9eccdd163..7957a46ea 100644 --- a/automad/src/UI/Models/FileModel.php +++ b/automad/src/UI/Models/FileModel.php @@ -41,6 +41,7 @@ use Automad\Core\Request; use Automad\Core\Str; use Automad\UI\Utils\FileSystem; +use Automad\UI\Utils\Messenger; use Automad\UI\Utils\Text; use Automad\UI\Utils\UICache; @@ -60,66 +61,67 @@ class FileModel { * @param string $newName * @param string $oldName * @param string $caption - * @return string an error message or false on success + * @param Messenger $Messenger + * @return bool true on success */ - public static function editInfo(string $newName, string $oldName, string $caption) { - $error = ''; + public static function editInfo(string $newName, string $oldName, string $caption, Messenger $Messenger) { + if (!$oldName || !$newName) { + $Messenger->setError(Text::get('error_form')); - if ($oldName && $newName) { - $Automad = UICache::get(); - $path = FileSystem::getPathByPostUrl($Automad); - $oldFile = $path . basename($oldName); - $extension = FileSystem::getExtension($oldFile); - $newFile = $path . Str::slug(basename(preg_replace('/\.' . $extension . '$/i', '', $newName))) . '.' . $extension; - - if (FileSystem::isAllowedFileType($newFile)) { - // Rename file and caption if needed and update all file links. - if ($newFile != $oldFile) { - $error = FileSystem::renameMedia($oldFile, $newFile); - - if (!$error) { - LinksModel::update( - $Automad, - Str::stripStart($oldFile, AM_BASE_DIR), - Str::stripStart($newFile, AM_BASE_DIR) - ); - - if ($Page = $Automad->getPage(Request::post('url'))) { - // In case there is a posted URL, also rename files that have been added with only - // basename since they belong to the same page. - $file = AM_DIR_PAGES . $Page->path . $Page->template . '.' . AM_FILE_EXT_DATA; - - LinksModel::update( - $Automad, - basename($oldFile), - basename($newFile), - $file - ); - } - } - } + return false; + } + + $Automad = UICache::get(); + $path = FileSystem::getPathByPostUrl($Automad); + $oldFile = $path . basename($oldName); + $extension = FileSystem::getExtension($oldFile); + $newFile = $path . Str::slug(basename(preg_replace('/\.' . $extension . '$/i', '', $newName))) . '.' . $extension; - // Write caption. - if (!$error) { - $newCaptionFile = $newFile . '.' . AM_FILE_EXT_CAPTION; + if (!FileSystem::isAllowedFileType($newFile)) { + $Messenger->setError(Text::get('error_file_format') . ' "' . FileSystem::getExtension($newFile) . '"'); - // Only if file exists already or $caption is empty. - if (is_writable($newCaptionFile) || !file_exists($newCaptionFile)) { - FileSystem::write($newCaptionFile, $caption); - } else { - $error = Text::get('error_file_save') . ' "' . basename($newCaptionFile) . '"'; - } + return false; + } + + // Rename file and caption if needed and update all file links. + if ($newFile != $oldFile) { + if (FileSystem::renameMedia($oldFile, $newFile, $Messenger)) { + LinksModel::update( + $Automad, + Str::stripStart($oldFile, AM_BASE_DIR), + Str::stripStart($newFile, AM_BASE_DIR) + ); + + if ($Page = $Automad->getPage(Request::post('url'))) { + // In case there is a posted URL, also rename files that have been added with only + // basename since they belong to the same page. + $file = AM_DIR_PAGES . $Page->path . $Page->template . '.' . AM_FILE_EXT_DATA; + + LinksModel::update( + $Automad, + basename($oldFile), + basename($newFile), + $file + ); } + } + } - Cache::clear(); + // Write caption. + if (!$Messenger->getError()) { + $newCaptionFile = $newFile . '.' . AM_FILE_EXT_CAPTION; + + // Only if file exists already or $caption is empty. + if (is_writable($newCaptionFile) || !file_exists($newCaptionFile)) { + FileSystem::write($newCaptionFile, $caption); } else { - $error = Text::get('error_file_format') . ' "' . FileSystem::getExtension($newFile) . '"'; + $Messenger->setError(Text::get('error_file_save') . ' "' . basename($newCaptionFile) . '"'); } - } else { - $error = Text::get('error_form'); } - return $error; + Cache::clear(); + + return true; } /** @@ -127,65 +129,73 @@ public static function editInfo(string $newName, string $oldName, string $captio * * @param string $importUrl * @param string|null $pageUrl - * @return array an error message or false on success + * @param Messenger $Messenger + * @return bool true on success */ - public static function import(string $importUrl, ?string $pageUrl = null) { - $error = ''; - - if ($importUrl) { - // Resolve local URLs. - if (strpos($importUrl, '/') === 0) { - if (getenv('HTTPS') && getenv('HTTPS') !== 'off' && getenv('HTTP_HOST')) { - $protocol = 'https://'; - } else { - $protocol = 'http://'; - } + public static function import(string $importUrl, ?string $pageUrl = null, Messenger $Messenger) { + if (!$importUrl) { + $Messenger->setError(Text::get('error_no_url')); - $importUrl = $protocol . getenv('HTTP_HOST') . AM_BASE_URL . $importUrl; - Debug::log($importUrl, 'Local URL'); + return false; + } + + // Resolve local URLs. + if (strpos($importUrl, '/') === 0) { + if (getenv('HTTPS') && getenv('HTTPS') !== 'off' && getenv('HTTP_HOST')) { + $protocol = 'https://'; + } else { + $protocol = 'http://'; } - $curl = curl_init(); + $importUrl = $protocol . getenv('HTTP_HOST') . AM_BASE_URL . $importUrl; + Debug::log($importUrl, 'Local URL'); + } - curl_setopt($curl, CURLOPT_HEADER, 0); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curl, CURLOPT_URL, $importUrl); + $curl = curl_init(); - $data = curl_exec($curl); + curl_setopt($curl, CURLOPT_HEADER, 0); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_URL, $importUrl); - if (curl_getinfo($curl, CURLINFO_HTTP_CODE) != 200 || curl_errno($curl)) { - $error = Text::get('error_import'); - } else { - $fileName = Str::slug(preg_replace('/\?.*/', '', basename($importUrl))); - - if ($pageUrl) { - $Automad = UICache::get(); - $Page = $Automad->getPage($pageUrl); - $path = AM_BASE_DIR . AM_DIR_PAGES . $Page->path . $fileName; - } else { - $path = AM_BASE_DIR . AM_DIR_SHARED . '/' . $fileName; - } + $data = curl_exec($curl); - FileSystem::write($path, $data); - Cache::clear(); - } + if (curl_getinfo($curl, CURLINFO_HTTP_CODE) != 200 || curl_errno($curl)) { + $Messenger->setError(Text::get('error_import')); + curl_close($curl); + return false; + } else { curl_close($curl); + } - if (!FileSystem::isAllowedFileType($path)) { - $newPath = $path . FileSystem::getImageExtensionFromMimeType($path); + $fileName = Str::slug(preg_replace('/\?.*/', '', basename($importUrl))); - if (FileSystem::isAllowedFileType($newPath)) { - FileSystem::renameMedia($path, $newPath); - } else { - unlink($path); - $error = Text::get('error_file_format'); + if ($pageUrl) { + $Automad = UICache::get(); + $Page = $Automad->getPage($pageUrl); + $path = AM_BASE_DIR . AM_DIR_PAGES . $Page->path . $fileName; + } else { + $path = AM_BASE_DIR . AM_DIR_SHARED . '/' . $fileName; + } + + FileSystem::write($path, $data); + Cache::clear(); + + if (!FileSystem::isAllowedFileType($path)) { + $newPath = $path . FileSystem::getImageExtensionFromMimeType($path); + + if (FileSystem::isAllowedFileType($newPath)) { + if (!FileSystem::renameMedia($path, $newPath, $Messenger)) { + return false; } + } else { + unlink($path); + $Messenger->setError(Text::get('error_file_format')); + + return false; } - } else { - $error = Text::get('error_no_url'); } - return $error; + return true; } } diff --git a/automad/src/UI/Models/ImageModel.php b/automad/src/UI/Models/ImageModel.php index 25cb39bf9..a365863d4 100644 --- a/automad/src/UI/Models/ImageModel.php +++ b/automad/src/UI/Models/ImageModel.php @@ -42,6 +42,7 @@ use Automad\UI\Components\Layout\SelectImage; use Automad\UI\Response; use Automad\UI\Utils\FileSystem; +use Automad\UI\Utils\Messenger; use Automad\UI\Utils\Text; use Automad\UI\Utils\UICache; @@ -104,11 +105,13 @@ public static function copyResized(string $filename, string $url, $width, $heigh $file ); - if (!$error = FileSystem::renameMedia($cachedFile, $resizedFile)) { + $Messenger = new Messenger(); + + if (FileSystem::renameMedia($cachedFile, $resizedFile, $Messenger)) { $Response->setSuccess(Text::get('success_created') . ' "' . basename($resizedFile) . '"'); Cache::clear(); } else { - $Response->setError($error); + $Response->setError($Messenger->getError()); } } else { $Response->setError(Text::get('error_permission') . ' "' . $directory . '"'); diff --git a/automad/src/UI/Models/UserCollectionModel.php b/automad/src/UI/Models/UserCollectionModel.php index dd673ffc7..c2acc87fd 100644 --- a/automad/src/UI/Models/UserCollectionModel.php +++ b/automad/src/UI/Models/UserCollectionModel.php @@ -38,6 +38,7 @@ use Automad\Types\User; use Automad\UI\Utils\FileSystem; +use Automad\UI\Utils\Messenger; use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; @@ -70,44 +71,53 @@ public function __construct() { * @param string $password1 * @param string $password2 * @param string|null $email - * @return string an error message or false on success. + * @param Messenger $Messenger + * @return bool true on success */ - public function createUser(string $username, string $password1, string $password2, ?string $email = null) { + public function createUser(string $username, string $password1, string $password2, ?string $email = null, Messenger $Messenger) { if (!$this->validUsername($username)) { - return $this->invalidUsernameError(); + $Messenger->setError($this->invalidUsernameError()); + + return false; } if ($email && !$this->validEmail($email)) { - return $this->invalidEmailError(); + $Messenger->setError($this->invalidEmailError()); + + return false; } - if ($username && $password1 && $password2) { - // Check if password1 equals password2. - if ($password1 == $password2) { - // Check, if user exists already. - if (!isset($this->users[$username])) { - // Add user to accounts array. - $this->users[$username] = new User($username, $password1, $email); - } else { - return '"' . $username . '" ' . Text::get('error_existing'); - } - } else { - return Text::get('error_password_repeat'); - } - } else { - return Text::get('error_form'); + if (!$username || !$password1 || !$password2) { + $Messenger->setError(Text::get('error_form')); + + return false; } - return false; + if ($password1 != $password2) { + $Messenger->setError(Text::get('error_password_repeat')); + + return false; + } + + if (isset($this->users[$username])) { + $Messenger->setError('"' . $username . '" ' . Text::get('error_existing')); + + return false; + } + + $this->users[$username] = new User($username, $password1, $email); + + return true; } /** * Delete one ore more user accounts. * * @param array $users - * @return string an error message or false on success. + * @param Messenger $Messenger + * @return bool true on success */ - public function delete(array $users) { + public function delete(array $users, Messenger $Messenger) { if (is_array($users)) { // Only delete users from list, if accounts.txt is writable. // It is important, to verify write access here, to make sure that all accounts stored in account.txt are also returned in the HTML. @@ -120,9 +130,11 @@ public function delete(array $users) { } } - $this->save(); + return $this->save($Messenger); } else { - return Text::get('error_permission') . '

' . AM_FILE_ACCOUNTS . '

'; + $Messenger->setError(Text::get('error_permission') . '

' . AM_FILE_ACCOUNTS . '

'); + + return false; } } @@ -134,24 +146,31 @@ public function delete(array $users) { * * @param string $username * @param string $email - * @return string an error message in case of error or false in case of success + * @param Messenger $Messenger + * @return bool true on success */ - public function editCurrentUserInfo(string $username, string $email) { + public function editCurrentUserInfo(string $username, string $email, Messenger $Messenger) { $User = $this->getUser(Session::getUsername()); - if (!$User) { - return Text::get('error_form'); + if (!$User || !$username) { + $Messenger->setError(Text::get('error_form')); + + return false; } $username = trim($username); $email = trim($email); if (!$this->validUsername($username)) { - return $this->invalidUsernameError(); + $Messenger->setError($this->invalidUsernameError()); + + return false; } if (!$this->validEmail($email)) { - return $this->invalidEmailError(); + $Messenger->setError($this->invalidEmailError()); + + return false; } if ($User->name != $username) { @@ -160,14 +179,16 @@ public function editCurrentUserInfo(string $username, string $email) { $User->name = $username; $_SESSION['username'] = $username; } else { - return '"' . $username . '" ' . Text::get('error_existing'); + $Messenger->setError('"' . $username . '" ' . Text::get('error_existing')); + + return false; } } $User->email = $email; $this->updateUser($User); - return false; + return true; } /** @@ -199,20 +220,23 @@ public function getUser(string $name) { /** * Save the accounts array as PHP to AM_FILE_ACCOUNTS. * - * @return string|null Null on success or an error message + * @param Messenger $Messenger + * @return bool true on success */ - public function save() { + public function save(Messenger $Messenger) { ksort($this->users); if (!FileSystem::write(AM_FILE_ACCOUNTS, $this->generatePHP())) { - return Text::get('error_permission') . '

' . AM_FILE_ACCOUNTS . '

'; + $Messenger->setError(Text::get('error_permission') . '

' . AM_FILE_ACCOUNTS . '

'); + + return false; } if (function_exists('opcache_invalidate')) { opcache_invalidate(AM_FILE_ACCOUNTS, true); } - return null; + return true; } /** diff --git a/automad/src/UI/Models/UserModel.php b/automad/src/UI/Models/UserModel.php index 22e68ea18..8c8f8bf73 100644 --- a/automad/src/UI/Models/UserModel.php +++ b/automad/src/UI/Models/UserModel.php @@ -38,6 +38,7 @@ use Automad\Types\User; use Automad\UI\Response; +use Automad\UI\Utils\Messenger; use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; @@ -57,19 +58,22 @@ class UserModel { * @param string $username * @param string $currentPassword * @param string $newPassword + * @return Response the response object */ public function changePassword(string $username, string $currentPassword, string $newPassword) { $Response = new Response(); + $Messenger = new Messenger(); $UserCollectionModel = new UserCollectionModel(); $User = $UserCollectionModel->getUser($username); if ($User->verifyPassword($currentPassword)) { $User->setPasswordHash($newPassword); $UserCollectionModel->updateUser($User); - $Response->setError($UserCollectionModel->save()); - if (!$Response->getError()) { + if ($UserCollectionModel->save($Messenger)) { $Response->setSuccess(Text::get('success_password_changed')); + } else { + $Response->setError($Messenger->getError()); } } else { $Response->setError(Text::get('error_password_current')); @@ -84,53 +88,65 @@ public function changePassword(string $username, string $currentPassword, string * @param User $User * @param string $newPassword1 * @param string $newPassword2 - * @return string|null an error message or null + * @param Messenger $Messenger + * @return bool true on success */ - public function resetPassword(User $User, string $newPassword1, string $newPassword2) { - $UserCollectionModel = new UserCollectionModel(); + public function resetPassword(User $User, string $newPassword1, string $newPassword2, Messenger $Messenger) { + if ($newPassword1 !== $newPassword2) { + $Messenger->setError(Text::get('error_password_repeat')); - if ($newPassword1 === $newPassword2) { - $User->setPasswordHash($newPassword1); - $UserCollectionModel->updateUser($User); + return false; + } - if ($error = $UserCollectionModel->save()) { - return $error; - } else { - Session::clearResetTokenHash(); + $User->setPasswordHash($newPassword1); - return null; - } - } else { - return Text::get('error_password_repeat'); + $UserCollectionModel = new UserCollectionModel(); + $UserCollectionModel->updateUser($User); + + if (!$UserCollectionModel->save($Messenger)) { + return false; } + + Session::clearResetTokenHash(); + + return true; } /** * Send password reset token and store it in session. * * @param User $User - * @return string|null an error message or null + * @param Messenger $Messenger + * @return bool true on success */ - public function sendPasswordResetToken(User $User) { - if ($email = $User->email) { - $token = strtoupper(substr(hash('sha256', microtime() . $User->getPasswordHash()), 0, 16)); - $tokenHash = password_hash($token, PASSWORD_DEFAULT); - Session::setResetTokenHash($User->name, $tokenHash); + public function sendPasswordResetToken(User $User, Messenger $Messenger) { + $email = $User->email; + + if (!$email) { + $Messenger->setError(Text::get('error_user_no_email')); + + return false; + } + + $token = strtoupper(substr(hash('sha256', microtime() . $User->getPasswordHash()), 0, 16)); + $tokenHash = password_hash($token, PASSWORD_DEFAULT); + Session::setResetTokenHash($User->name, $tokenHash); - $domain = $_SERVER['SERVER_NAME'] . AM_BASE_URL; + $domain = $_SERVER['SERVER_NAME'] . AM_BASE_URL; - $subject = "Automad: Password Reset on $domain"; - $message = "Dear $User->name,\r\n\r\na password reset has been requested for your account on $domain.\r\n" . + $subject = "Automad: Password Reset on $domain"; + $message = "Dear $User->name,\r\n\r\na password reset has been requested for your account on $domain.\r\n" . "The following token can be used to reset your password:\r\n\r\n$token\r\n\r\n" . "In case you did not request the reset yourself, you can ignore this message.\r\n\r\n" . 'Automad'; - if (!mail($email, $subject, $message)) { - return Text::get('error_send_email'); - } - } else { - return Text::get('error_user_no_email'); + if (!mail($email, $subject, $message)) { + $Messenger->setError(Text::get('error_send_email')); + + return false; } + + return true; } /** diff --git a/automad/src/UI/Utils/FileSystem.php b/automad/src/UI/Utils/FileSystem.php index c6672c0fb..8e3fb9a29 100644 --- a/automad/src/UI/Utils/FileSystem.php +++ b/automad/src/UI/Utils/FileSystem.php @@ -120,28 +120,42 @@ public static function copyPageFiles(string $source, string $dest) { * Deletes a file and its caption (if existing). * * @param string $file - * @return string Only error messages - false in case no errors occured! + * @param Messenger $Messenger + * @return bool true on success */ - public static function deleteMedia(string $file) { - if (is_writable($file)) { - if (unlink($file)) { - $captionFile = $file . '.' . AM_FILE_EXT_CAPTION; - - if (file_exists($captionFile)) { - if (is_writable($captionFile)) { - if (!unlink($captionFile)) { - return Text::get('error_permission') . ' "' . basename($captionFile) . '"'; - } - } else { - return Text::get('error_permission') . ' "' . basename($captionFile) . '"'; - } - } - } else { - return Text::get('error_permission') . ' "' . basename($file) . '"'; + public static function deleteMedia(string $file, Messenger $Messenger) { + $fileError = Text::get('error_permission') . ' "' . basename($file) . '"'; + + if (!is_writable($file)) { + $Messenger->setError($fileError); + + return false; + } + + if (!unlink($file)) { + $Messenger->setError($fileError); + + return false; + } + + $captionFile = $file . '.' . AM_FILE_EXT_CAPTION; + $captionError = Text::get('error_permission') . ' "' . basename($captionFile) . '"'; + + if (file_exists($captionFile)) { + if (!is_writable($captionFile)) { + $Messenger->setError($captionError); + + return false; + } + + if (!unlink($captionFile)) { + $Messenger->setError($captionError); + + return false; } - } else { - return Text::get('error_permission') . ' "' . basename($file) . '"'; } + + return true; } /** @@ -303,38 +317,49 @@ public static function purgeCache() { * * @param string $oldFile * @param string $newFile - * @return string Only error messages - false in case no errors occured! + * @param Messenger $Messenger + * @return bool true on success */ - public static function renameMedia(string $oldFile, string $newFile) { - if (is_writable(dirname($oldFile))) { - if (is_writable($oldFile)) { - if (!file_exists($newFile)) { - if (rename($oldFile, $newFile)) { - // Set new mtime to force refresh of page cache in case the new name was belonging to a delete file before. - touch($newFile); - - $oldCaptionFile = $oldFile . '.' . AM_FILE_EXT_CAPTION; - $newCaptionFile = $newFile . '.' . AM_FILE_EXT_CAPTION; - - if (file_exists($oldCaptionFile)) { - if (is_writable($oldCaptionFile) && (is_writable($newCaptionFile) || !file_exists($newCaptionFile))) { - rename($oldCaptionFile, $newCaptionFile); - } else { - return Text::get('error_permission') . ' "' . basename($newCaptionFile) . '"'; - } - } - } else { - return Text::get('error_permission') . ' "' . basename($oldFile) . '"'; - } - } else { - return '"' . $newFile . '" ' . Text::get('error_existing'); - } + public static function renameMedia(string $oldFile, string $newFile, Messenger $Messenger) { + if (!is_writable(dirname($oldFile))) { + $Messenger->setError(Text::get('error_permission') . ' "' . basename(dirname($oldFile)) . '"'); + + return false; + } + + if (!is_writable($oldFile)) { + $Messenger->setError(Text::get('error_permission') . ' "' . basename($oldFile) . '"'); + + return false; + } + + if (file_exists($newFile)) { + $Messenger->setError('"' . $newFile . '" ' . Text::get('error_existing')); + + return false; + } + + if (!rename($oldFile, $newFile)) { + $Messenger->setError(Text::get('error_permission') . ' "' . basename($oldFile) . '"'); + } + + // Set new mtime to force refresh of page cache in case the new name was belonging to a delete file before. + touch($newFile); + + $oldCaptionFile = $oldFile . '.' . AM_FILE_EXT_CAPTION; + $newCaptionFile = $newFile . '.' . AM_FILE_EXT_CAPTION; + + if (file_exists($oldCaptionFile)) { + if (is_writable($oldCaptionFile) && (is_writable($newCaptionFile) || !file_exists($newCaptionFile))) { + rename($oldCaptionFile, $newCaptionFile); } else { - return Text::get('error_permission') . ' "' . basename($oldFile) . '"'; + $Messenger->setError(Text::get('error_permission') . ' "' . basename($newCaptionFile) . '"'); + + return false; } - } else { - return Text::get('error_permission') . ' "' . basename(dirname($oldFile)) . '"'; } + + return true; } /** diff --git a/automad/src/UI/Utils/Messenger.php b/automad/src/UI/Utils/Messenger.php new file mode 100644 index 000000000..be546fd65 --- /dev/null +++ b/automad/src/UI/Utils/Messenger.php @@ -0,0 +1,77 @@ +error; + } + + /** + * Set the last error. + * + * @param string $message + */ + public function setError(string $message) { + $this->error = $message; + } +} From 5e50e306f3cbe178161eb578b57391fa6d76eafd Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Mon, 20 Sep 2021 22:41:49 +0200 Subject: [PATCH 15/74] add missing email warning alert --- automad/src/UI/Views/Home.php | 24 ++++++++++++++++++++++++ automad/ui/lang/english.txt | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/automad/src/UI/Views/Home.php b/automad/src/UI/Views/Home.php index 0792373fe..f7ee2b4e3 100644 --- a/automad/src/UI/Views/Home.php +++ b/automad/src/UI/Views/Home.php @@ -39,8 +39,11 @@ use Automad\Core\Cache; use Automad\Core\Selection; use Automad\Core\Str; +use Automad\UI\Components\Alert\Danger; use Automad\UI\Components\Grid\Pages; use Automad\UI\Components\Status\Button; +use Automad\UI\Models\UserCollectionModel; +use Automad\UI\Utils\Session; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -93,6 +96,7 @@ class="uk-button uk-button-mini uk-margin-small-top"  

+ {$fn($this->missingEmailAlert())}
    {$fn($this->editButton())}
  • @@ -186,6 +190,26 @@ class="uk-button uk-button-primary uk-button-large uk-width-1-1 uk-text-left uk- {$fn(Text::get('btn_inpage_edit'))}
  • +HTML; + } + } + + /** + * Render an alert box in case a user has no email added. + * + * @return string the rendered alert box + */ + private function missingEmailAlert() { + $UserCollectionModel = new UserCollectionModel(); + $User = $UserCollectionModel->getUser(Session::getUsername()); + + if (!$User->email) { + $fn = $this->fn; + + return <<< HTML + + {$fn(Danger::render(Text::get('sys_user_alert_no_email')))} + HTML; } } diff --git a/automad/ui/lang/english.txt b/automad/ui/lang/english.txt index 0e5ff6c8a..736fdbd4a 100644 --- a/automad/ui/lang/english.txt +++ b/automad/ui/lang/english.txt @@ -1464,7 +1464,7 @@ sys_user_email: Email - -sys_user_send_test_email: Send Test Email +sys_user_alert_no_email: You have not yet added a valid email address to your account. Note that a valid email address is required in order to be able to reset your password. Click here to add an email now. - From b95b3744de78a4f0c6191fc021fd6e79a116c1fa Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Tue, 21 Sep 2021 19:20:32 +0200 Subject: [PATCH 16/74] send html email for tokens --- .../Components/Email/PasswordResetEmail.php | 96 +++++++++++++++++++ automad/src/UI/Models/UserModel.php | 15 ++- 2 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 automad/src/UI/Components/Email/PasswordResetEmail.php diff --git a/automad/src/UI/Components/Email/PasswordResetEmail.php b/automad/src/UI/Components/Email/PasswordResetEmail.php new file mode 100644 index 000000000..dc542b404 --- /dev/null +++ b/automad/src/UI/Components/Email/PasswordResetEmail.php @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + +
    +

    Dear $username,

    +

    + a password reset has been requested for your account on "$website". + The following token can be used to reset your password: +

    +

    + $token +

    +

    + In case you did not request the password reset yourself, you can ignore this message. +

    +

    + Automad +

    +
    + + + HTML; + } +} diff --git a/automad/src/UI/Models/UserModel.php b/automad/src/UI/Models/UserModel.php index 8c8f8bf73..6f3d863be 100644 --- a/automad/src/UI/Models/UserModel.php +++ b/automad/src/UI/Models/UserModel.php @@ -37,6 +37,7 @@ namespace Automad\UI\Models; use Automad\Types\User; +use Automad\UI\Components\Email\PasswordResetEmail; use Automad\UI\Response; use Automad\UI\Utils\Messenger; use Automad\UI\Utils\Session; @@ -132,15 +133,13 @@ public function sendPasswordResetToken(User $User, Messenger $Messenger) { $tokenHash = password_hash($token, PASSWORD_DEFAULT); Session::setResetTokenHash($User->name, $tokenHash); - $domain = $_SERVER['SERVER_NAME'] . AM_BASE_URL; + $website = $_SERVER['SERVER_NAME'] . AM_BASE_URL; + $subject = 'Automad: Your Password Reset Token'; + $message = PasswordResetEmail::render($website, $User->name, $token); + $headers = "MIME-Version: 1.0\r\n"; + $headers .= 'Content-type: text/html; charset=UTF-8'; - $subject = "Automad: Password Reset on $domain"; - $message = "Dear $User->name,\r\n\r\na password reset has been requested for your account on $domain.\r\n" . - "The following token can be used to reset your password:\r\n\r\n$token\r\n\r\n" . - "In case you did not request the reset yourself, you can ignore this message.\r\n\r\n" . - 'Automad'; - - if (!mail($email, $subject, $message)) { + if (!mail($email, $subject, $message, $headers)) { $Messenger->setError(Text::get('error_send_email')); return false; From e42becefeeb758845b209599f691ae8d05d4e3e2 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Tue, 21 Sep 2021 19:41:23 +0200 Subject: [PATCH 17/74] improve form and button text modules for password resets --- .../Layout/PasswordReset/ResetForm.php | 2 +- .../Layout/PasswordReset/TokenRequestForm.php | 3 +-- automad/src/UI/Views/Login.php | 2 +- automad/ui/lang/english.txt | 18 +++++++++++++----- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php b/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php index d3f1a8cae..d8d63beac 100644 --- a/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php +++ b/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php @@ -100,7 +100,7 @@ class="uk-form-controls uk-width-1-1 uk-margin-small-bottom" {$fn(Text::get('btn_cancel'))} HTML; diff --git a/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php index cde360efd..f01788b23 100644 --- a/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php +++ b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php @@ -84,8 +84,7 @@ class="uk-form-controls uk-width-1-1 uk-margin-small-bottom" {$fn(Text::get('btn_cancel'))} HTML; diff --git a/automad/src/UI/Views/Login.php b/automad/src/UI/Views/Login.php index 289c7431d..87218c114 100644 --- a/automad/src/UI/Views/Login.php +++ b/automad/src/UI/Views/Login.php @@ -90,7 +90,7 @@ class="uk-form-controls uk-width-1-1 uk-margin-small-bottom" - {$fn(Text::get('btn_reset_password'))} + {$fn(Text::get('btn_forgot_password'))} + + + + + +
    - +   $Text->sys_user_add diff --git a/automad/src/UI/Controllers/UserCollectionController.php b/automad/src/UI/Controllers/UserCollectionController.php index 0ea22e271..56ced2dc6 100644 --- a/automad/src/UI/Controllers/UserCollectionController.php +++ b/automad/src/UI/Controllers/UserCollectionController.php @@ -141,4 +141,41 @@ public static function install() { exit($UserCollectionModel->generatePHP()); } } + + /** + * Invite a new user by email. + * + * @return Response a response object + */ + public static function inviteUser() { + $Response = new Response(); + $UserCollectionModel = new UserCollectionModel(); + $Messenger = new Messenger(); + + $username = trim(Request::post('username')); + $email = trim(Request::post('email')); + $password = str_shuffle(sha1(microtime())); + + if (!$UserCollectionModel->createUser($username, $password, $password, $email, $Messenger)) { + $Response->setError($Messenger->getError()); + + return $Response; + } + + if (!$UserCollectionModel->save($Messenger)) { + $Response->setError($Messenger->getError()); + + return $Response; + } + + if (!$UserCollectionModel->sendInvitation($username, $email, $Messenger)) { + $Response->setError($Messenger->getError()); + + return $Response; + } + + $Response->setSuccess(Text::get('success_user_invite')); + + return $Response; + } } diff --git a/automad/src/UI/Models/UserCollectionModel.php b/automad/src/UI/Models/UserCollectionModel.php index c2acc87fd..332309721 100644 --- a/automad/src/UI/Models/UserCollectionModel.php +++ b/automad/src/UI/Models/UserCollectionModel.php @@ -37,6 +37,7 @@ namespace Automad\UI\Models; use Automad\Types\User; +use Automad\UI\Components\Email\InvitationEmail; use Automad\UI\Utils\FileSystem; use Automad\UI\Utils\Messenger; use Automad\UI\Utils\Session; @@ -75,6 +76,9 @@ public function __construct() { * @return bool true on success */ public function createUser(string $username, string $password1, string $password2, ?string $email = null, Messenger $Messenger) { + $username = trim($username); + $email = trim($email); + if (!$this->validUsername($username)) { $Messenger->setError($this->invalidUsernameError()); @@ -239,6 +243,44 @@ public function save(Messenger $Messenger) { return true; } + /** + * Send invitation email. + * + * @param string $username + * @param string $email + * @param Messenger $Messenger + * @return bool true on success + */ + public function sendInvitation(string $username, string $email, Messenger $Messenger) { + $protocol = 'http'; + $port = ''; + + if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') { + $protocol = 'https'; + } + + if (!in_array($_SERVER['SERVER_PORT'], array(80, 443))) { + $port = ":$_SERVER[SERVER_PORT]"; + } + + $website = $_SERVER['SERVER_NAME'] . AM_BASE_URL; + $link = $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . + AM_BASE_INDEX . AM_PAGE_DASHBOARD . + '?view=ResetPassword&username=' . urlencode($username); + $subject = 'Automad: You have been added as a new user'; + $message = InvitationEmail::render($website, $username, $link); + $headers = "MIME-Version: 1.0\r\n"; + $headers .= 'Content-type: text/html; charset=UTF-8'; + + if (!mail($email, $subject, $message, $headers)) { + $Messenger->setError(Text::get('error_send_email')); + + return false; + } + + return true; + } + /** * Update or add a single user object. * diff --git a/automad/ui/js/Status.js b/automad/ui/js/Status.js index 1ffc5bfb5..f334916ed 100644 --- a/automad/ui/js/Status.js +++ b/automad/ui/js/Status.js @@ -79,6 +79,7 @@ var triggers = [ '?controller=UserCollection::edit', '?controller=UserCollection::createUser', + '?controller=UserCollection::inviteUser', '?controller=Headless::editTemplate', '?controller=Headless::resetTemplate', '?controller=Config::update', diff --git a/automad/ui/lang/english.txt b/automad/ui/lang/english.txt index 57016bd23..4b31131a8 100644 --- a/automad/ui/lang/english.txt +++ b/automad/ui/lang/english.txt @@ -106,6 +106,10 @@ btn_inpage_edit: In-Page Edit Mode - +btn_invite: Send Invitation + +- + btn_install: Install - @@ -809,7 +813,7 @@ error_password_reuse: Don't reuse your old password! - -error_password_reset_verification: The provided password reset token is invalid or has expired already! +error_password_reset_verification: The authentication token is invalid or has expired already! - @@ -1117,7 +1121,7 @@ page_private: private -reset_password_title: Create a New Password +reset_password_title: Create Password - @@ -1125,7 +1129,7 @@ reset_password_enter_username: Please enter your username in order to request an - -reset_password_enter_new_password: Please enter now the authentication token that you have received by email along with a new password. +reset_password_enter_new_password: An email including an authentication token just has been send to you. Please enter that token now below along with a new password. - @@ -1285,6 +1289,10 @@ success_update: Successfully updated Automad! - +success_user_invite: The invitation has been sent successfully. + +- + success_packages_updated_all: Successfully updated all packages - @@ -1456,6 +1464,10 @@ sys_user_add: Add User - +sys_user_invite: Invite User by Email + +- + sys_user_name: Username - From ac67e79ea7eb35bca6a79aec2781cb73dde43c69 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Thu, 23 Sep 2021 00:24:40 +0200 Subject: [PATCH 19/74] add email translations --- .../UI/Components/Email/InvitationEmail.php | 11 +++--- .../Components/Email/PasswordResetEmail.php | 11 +++--- automad/src/UI/Models/UserCollectionModel.php | 2 +- automad/src/UI/Models/UserModel.php | 2 +- automad/ui/lang/english.txt | 35 +++++++++++++++++++ 5 files changed, 51 insertions(+), 10 deletions(-) diff --git a/automad/src/UI/Components/Email/InvitationEmail.php b/automad/src/UI/Components/Email/InvitationEmail.php index ae916f7bc..21686cb6c 100644 --- a/automad/src/UI/Components/Email/InvitationEmail.php +++ b/automad/src/UI/Components/Email/InvitationEmail.php @@ -36,6 +36,8 @@ namespace Automad\UI\Components\Email; +use Automad\UI\Utils\Text; + defined('AUTOMAD') or die('Direct access not permitted!'); /** @@ -57,12 +59,13 @@ class InvitationEmail extends AbstractEmailBody { public static function render(string $website, string $username, string $link) { $h1Style = self::$h1Style; $pStyle = self::$paragraphStyle; + $Text = Text::getObject(); + $inviteText = str_replace('{}', "$website", Text::get('email_invite_text')); $content = <<< HTML -

    Welcome $username,

    +

    $Text->email_hello $username,

    - a new user account on $website has been created for you. - You can use the following link in order to create a password and finish your account setup. + $inviteText

    - Create Password + $Text->email_invite_button

    HTML; diff --git a/automad/src/UI/Components/Email/PasswordResetEmail.php b/automad/src/UI/Components/Email/PasswordResetEmail.php index 25555403a..8395d0752 100644 --- a/automad/src/UI/Components/Email/PasswordResetEmail.php +++ b/automad/src/UI/Components/Email/PasswordResetEmail.php @@ -36,6 +36,8 @@ namespace Automad\UI\Components\Email; +use Automad\UI\Utils\Text; + defined('AUTOMAD') or die('Direct access not permitted!'); /** @@ -57,12 +59,13 @@ class PasswordResetEmail extends AbstractEmailBody { public static function render(string $website, string $username, string $token) { $h1Style = self::$h1Style; $pStyle = self::$paragraphStyle; + $Text = Text::getObject(); + $textTop = str_replace('{}', "$website", Text::get('email_reset_password_text_top')); $content = <<< HTML -

    Dear $username,

    +

    $Text->email_hello $username,

    - an authentication token for your account on $website has been requested and can be found below. - You can use that token in order to create a new password for you now. + $textTop

    name, $tokenHash); $website = $_SERVER['SERVER_NAME'] . AM_BASE_URL; - $subject = 'Automad: Your Password Reset Token'; + $subject = 'Automad: ' . Text::get('email_reset_password_subject'); $message = PasswordResetEmail::render($website, $User->name, $token); $headers = "MIME-Version: 1.0\r\n"; $headers .= 'Content-type: text/html; charset=UTF-8'; diff --git a/automad/ui/lang/english.txt b/automad/ui/lang/english.txt index 4b31131a8..e0baef82b 100644 --- a/automad/ui/lang/english.txt +++ b/automad/ui/lang/english.txt @@ -721,6 +721,41 @@ editor_ui_browse: Browse Files +email_hello: Hello + +- + +email_invite_subject: You have been added as a new user! + +- + +email_invite_text: a new user account on {} has been created for you. You can use the following link in order to create a password. + +- + +email_invite_button: Create Password Now + +- + +email_reset_password_subject: Your authentication token + +- + +email_reset_password_text_top: the requested authentication token for your account on {} can be found below. You can use that token in order to create a new password for you now. + +- + +email_reset_password_text_bottom: In case you did not initiate this request yourself, you can safely ignore this message. + +- + + + + + + + + error_cache_purged: The cache directory could not be purged! - From fa506917ca8295207481b04831b39eff2cf4a0ff Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sat, 2 Oct 2021 20:32:58 +0200 Subject: [PATCH 20/74] implement user identification by email and improve legacy accounts support --- automad/src/Types/User.php | 13 +- automad/src/UI/Components/Grid/Users.php | 6 +- .../Layout/PasswordReset/TokenRequestForm.php | 6 +- automad/src/UI/Components/Status/Response.php | 3 +- .../src/UI/Controllers/SessionController.php | 4 +- .../Controllers/UserCollectionController.php | 2 +- automad/src/UI/Controllers/UserController.php | 10 +- automad/src/UI/Models/UserCollectionModel.php | 160 +++++++++++++----- automad/src/UI/Models/UserModel.php | 10 +- automad/src/UI/Utils/Session.php | 8 +- automad/src/UI/Views/Login.php | 4 +- automad/ui/lang/english.txt | 6 +- 12 files changed, 149 insertions(+), 83 deletions(-) diff --git a/automad/src/Types/User.php b/automad/src/Types/User.php index dd3fdc2a1..203d6d764 100644 --- a/automad/src/Types/User.php +++ b/automad/src/Types/User.php @@ -67,20 +67,11 @@ class User { * @param string $name * @param string $password * @param string|null $email - * @param bool $convertLegacy */ - public function __construct(string $name, string $password, ?string $email = null, ?bool $convertLegacy = false) { + public function __construct(string $name, string $password, ?string $email = null) { $this->name = $name; $this->email = $email; $this->setPasswordHash($password); - - // Legacy account files (pre version 1.9) can't be unserialized to User objects. - // In case of reading such a legacy file, User objects have to be constructed. - // Since in such case there is no clear password but only an already hashed one instead, - // The password hash property has to be overwritten with that already existing hash. - if ($convertLegacy && strpos($password, '$2y$') === 0) { - $this->passwordHash = $password; - } } /** @@ -102,6 +93,8 @@ public function __serialize() { * @param array $properties */ public function __unserialize(array $properties) { + $properties = array_merge(array('email' => null), $properties); + $this->name = $properties['name']; $this->email = $properties['email']; $this->passwordHash = $properties['passwordHash']; diff --git a/automad/src/UI/Components/Grid/Users.php b/automad/src/UI/Components/Grid/Users.php index 7d256c643..74fb0e2f7 100644 --- a/automad/src/UI/Components/Grid/Users.php +++ b/automad/src/UI/Components/Grid/Users.php @@ -36,6 +36,7 @@ namespace Automad\UI\Components\Grid; +use Automad\Types\User as TypesUser; use Automad\UI\Components\Card\User; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -51,14 +52,15 @@ class Users { /** * Create a grid based user list for the given array of users. * + * @see TypesUser * @param array $users * @return string The HTML for the grid */ public static function render(array $users) { $cards = ''; - foreach ($users as $user => $hash) { - $cards .= User::render($user); + foreach ($users as $User) { + $cards .= User::render($User->name); } return <<< HTML diff --git a/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php index f140f487c..c09f6574e 100644 --- a/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php +++ b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php @@ -70,13 +70,13 @@ public static function render(?string $error = null) { return <<< HTML $alert

    - {$fn(Text::get('reset_password_enter_username'))} + {$fn(Text::get('reset_password_enter_name_or_email'))}

    diff --git a/automad/src/UI/Components/Status/Response.php b/automad/src/UI/Components/Status/Response.php index 5dc2608a6..1e981450a 100644 --- a/automad/src/UI/Components/Status/Response.php +++ b/automad/src/UI/Components/Status/Response.php @@ -146,9 +146,8 @@ class="am-u-button am-u-button-danger" $UserCollectionModel = new UserCollectionModel(); $Response->setStatus( - '  ' . Text::get('sys_user_registered') . - '  ' . count($UserCollectionModel->users) . '' + '  ' . count($UserCollectionModel->getCollection()) . '' ); } diff --git a/automad/src/UI/Controllers/SessionController.php b/automad/src/UI/Controllers/SessionController.php index 1cc74d09d..535e25659 100644 --- a/automad/src/UI/Controllers/SessionController.php +++ b/automad/src/UI/Controllers/SessionController.php @@ -57,8 +57,8 @@ class SessionController { */ public static function login() { if (!empty($_POST)) { - if (($username = Request::post('username')) && ($password = Request::post('password'))) { - if (!Session::login($username, $password)) { + if (($nameOrEmail = Request::post('name-or-email')) && ($password = Request::post('password'))) { + if (!Session::login($nameOrEmail, $password)) { return Text::get('error_login'); } } else { diff --git a/automad/src/UI/Controllers/UserCollectionController.php b/automad/src/UI/Controllers/UserCollectionController.php index 56ced2dc6..f49ab0051 100644 --- a/automad/src/UI/Controllers/UserCollectionController.php +++ b/automad/src/UI/Controllers/UserCollectionController.php @@ -105,7 +105,7 @@ public static function edit() { } } - $Response->setHtml(Users::render($UserCollectionModel->users)); + $Response->setHtml(Users::render($UserCollectionModel->getCollection())); return $Response; } diff --git a/automad/src/UI/Controllers/UserController.php b/automad/src/UI/Controllers/UserController.php index 524ed6aa7..3b912285e 100644 --- a/automad/src/UI/Controllers/UserController.php +++ b/automad/src/UI/Controllers/UserController.php @@ -125,20 +125,22 @@ public static function resetPassword() { $UserCollectionModel = new UserCollectionModel(); $Messenger = new Messenger(); - $username = trim(Request::post('username')); + // Only one field will be defined, so they can just be concatenated here. + $nameOrEmail = trim(Request::post('name-or-email') . Request::post('username')); + $token = Request::post('token'); $newPassword1 = Request::post('password1'); $newPassword2 = Request::post('password2'); - $User = $UserCollectionModel->getUser($username); + $User = $UserCollectionModel->getUser($nameOrEmail); - if ($username && !$User) { + if ($nameOrEmail && !$User) { return TokenRequestForm::render(Text::get('error_user_not_found')); } if ($User && $token && $newPassword1 && $newPassword2) { if ($UserModel->verifyPasswordResetToken($User->name, $token)) { - if ($UserModel->resetPassword($User, $newPassword1, $newPassword2, $Messenger)) { + if ($UserModel->resetPassword($User->name, $newPassword1, $newPassword2, $Messenger)) { return ResetSuccess::render(); } else { return ResetForm::render($User->name, $Messenger->getError()); diff --git a/automad/src/UI/Models/UserCollectionModel.php b/automad/src/UI/Models/UserCollectionModel.php index 304f2e9ab..c00505021 100644 --- a/automad/src/UI/Models/UserCollectionModel.php +++ b/automad/src/UI/Models/UserCollectionModel.php @@ -56,13 +56,23 @@ class UserCollectionModel { /** * The collection of existing user objects. */ - public $users; + private $users; + + /** + * The class name of the user type. + */ + private $userType = 'Automad\Types\User'; + + /** + * The replacement for the user type class in a serialized string. + */ + private $userTypeSerialized = 'O:*:"~"'; /** * The constructor. */ public function __construct() { - $this->users = $this->loadUsers(); + $this->users = $this->load(); } /** @@ -103,13 +113,19 @@ public function createUser(string $username, string $password1, string $password return false; } - if (isset($this->users[$username])) { + if ($this->getUser($username)) { $Messenger->setError('"' . $username . '" ' . Text::get('error_existing')); return false; } - $this->users[$username] = new User($username, $password1, $email); + if ($this->getUser($email)) { + $Messenger->setError('"' . $email . '" ' . Text::get('error_existing')); + + return false; + } + + $this->users[] = new User($username, $password1, $email); return true; } @@ -123,15 +139,13 @@ public function createUser(string $username, string $password1, string $password */ public function delete(array $users, Messenger $Messenger) { if (is_array($users)) { - // Only delete users from list, if accounts.txt is writable. + // Only delete users from list, if accounts.php is writable. // It is important, to verify write access here, to make sure that all accounts stored in account.txt are also returned in the HTML. // Otherwise, they would be deleted from the array without actually being deleted from the file, in case accounts.txt is write protected. // So it is not enough to just check, if file_put_contents was successful, because that would be simply too late. if (is_writable(AM_FILE_ACCOUNTS)) { - foreach ($users as $userToDelete) { - if (isset($this->users[$userToDelete])) { - unset($this->users[$userToDelete]); - } + foreach ($users as $username) { + unset($this->users[$this->getUserId($username)]); } return $this->save($Messenger); @@ -154,7 +168,11 @@ public function delete(array $users, Messenger $Messenger) { * @return bool true on success */ public function editCurrentUserInfo(string $username, string $email, Messenger $Messenger) { - $User = $this->getUser(Session::getUsername()); + $id = $this->getUserId(Session::getUsername()); + $User = $this->users[$id]; + + // Unset temporary the array item here in order to check easily for duplicate eamils or names. + unset($this->users[$id]); if (!$User || !$username) { $Messenger->setError(Text::get('error_form')); @@ -177,20 +195,24 @@ public function editCurrentUserInfo(string $username, string $email, Messenger $ return false; } - if ($User->name != $username) { - if (!array_key_exists($username, $this->users)) { - unset($this->users[$User->name]); - $User->name = $username; - $_SESSION['username'] = $username; - } else { - $Messenger->setError('"' . $username . '" ' . Text::get('error_existing')); + if ($this->getUser($username)) { + $Messenger->setError('"' . $username . '" ' . Text::get('error_existing')); - return false; - } + return false; + } + + if ($this->getUser($email)) { + $Messenger->setError('"' . $email . '" ' . Text::get('error_existing')); + + return false; } + $User->name = $username; + $_SESSION['username'] = $username; + $User->email = $email; - $this->updateUser($User); + + $this->users[$id] = $User; return true; } @@ -204,18 +226,43 @@ public function editCurrentUserInfo(string $username, string $email, Messenger $ * @return string the PHP code */ public function generatePHP() { - return "users) . "';"; + ksort($this->users); + + // The actual class name is replaced with a placeholder in order + // to be able to refactor the type class in the future easily. + $serialized = str_replace( + 'O:' . strlen($this->userType) . ':"' . $this->userType . '"', + $this->userTypeSerialized, + serialize($this->users) + ); + + return "users; + } + + /** + * Return a user by name or email address. + * + * @param string $nameOrEmail * @return User|null the requested user account */ - public function getUser(string $name) { - if (array_key_exists($name, $this->users)) { - return $this->users[$name]; + public function getUser(string $nameOrEmail) { + if (empty($nameOrEmail)) { + return null; + } + + foreach ($this->users as $User) { + if ($nameOrEmail === $User->name || $nameOrEmail === $User->email) { + return $User; + } } return null; @@ -228,8 +275,6 @@ public function getUser(string $name) { * @return bool true on success */ public function save(Messenger $Messenger) { - ksort($this->users); - if (!FileSystem::write(AM_FILE_ACCOUNTS, $this->generatePHP())) { $Messenger->setError(Text::get('error_permission') . '

    ' . AM_FILE_ACCOUNTS . '

    '); @@ -282,12 +327,39 @@ public function sendInvitation(string $username, string $email, Messenger $Messe } /** - * Update or add a single user object. + * Convert legacy accounts file content. * - * @param User $User + * @param array $contents + * @return string the serialized accounts */ - public function updateUser(User $User) { - $this->users[$User->name] = $User; + private function convertLegacyAccountsFile(array $contents) { + $accounts = array(); + + foreach ($contents as $name => $passwordHash) { + $accounts[] = (object) array('name' => $name, 'passwordHash' => $passwordHash); + } + + return str_replace( + 'O:8:"stdClass"', + $this->userTypeSerialized, + serialize($accounts) + ); + } + + /** + * Return a user id by name or email address. + * + * @param string $nameOrEmail + * @return int|null the requested user id + */ + private function getUserId(string $nameOrEmail) { + foreach ($this->users as $id => $User) { + if ($nameOrEmail === $User->name || $nameOrEmail === $User->email) { + return $id; + } + } + + return null; } /** @@ -314,25 +386,25 @@ private function invalidUsernameError() { * @see User * @return array The registered accounts */ - private function loadUsers() { + private function load() { if (!is_readable(AM_FILE_ACCOUNTS)) { return array(); } - $accounts = (include AM_FILE_ACCOUNTS); - - // Check for legacy accounts format and convert it to the new one. - if (is_array($accounts)) { - foreach ($accounts as $name => $data) { - if (is_string($data)) { - $accounts[$name] = new User($name, $data, null, true); - } - } + $contents = include AM_FILE_ACCOUNTS; - return $accounts; + // Lagacy support. + if (is_array($contents)) { + $contents = $this->convertLegacyAccountsFile($contents); } - return unserialize($accounts); + $serialized = str_replace( + $this->userTypeSerialized, + 'O:' . strlen($this->userType) . ':"' . $this->userType . '"', + $contents + ); + + return unserialize($serialized); } /** diff --git a/automad/src/UI/Models/UserModel.php b/automad/src/UI/Models/UserModel.php index c08168ea1..341351dbe 100644 --- a/automad/src/UI/Models/UserModel.php +++ b/automad/src/UI/Models/UserModel.php @@ -69,7 +69,6 @@ public function changePassword(string $username, string $currentPassword, string if ($User->verifyPassword($currentPassword)) { $User->setPasswordHash($newPassword); - $UserCollectionModel->updateUser($User); if ($UserCollectionModel->save($Messenger)) { $Response->setSuccess(Text::get('success_password_changed')); @@ -86,23 +85,22 @@ public function changePassword(string $username, string $currentPassword, string /** * Handle password resetting. * - * @param User $User + * @param string $username * @param string $newPassword1 * @param string $newPassword2 * @param Messenger $Messenger * @return bool true on success */ - public function resetPassword(User $User, string $newPassword1, string $newPassword2, Messenger $Messenger) { + public function resetPassword(string $username, string $newPassword1, string $newPassword2, Messenger $Messenger) { if ($newPassword1 !== $newPassword2) { $Messenger->setError(Text::get('error_password_repeat')); return false; } - $User->setPasswordHash($newPassword1); - $UserCollectionModel = new UserCollectionModel(); - $UserCollectionModel->updateUser($User); + $User = $UserCollectionModel->getUser($username); + $User->setPasswordHash($newPassword1); if (!$UserCollectionModel->save($Messenger)) { return false; diff --git a/automad/src/UI/Utils/Session.php b/automad/src/UI/Utils/Session.php index 53b358f51..70a3702e1 100644 --- a/automad/src/UI/Utils/Session.php +++ b/automad/src/UI/Utils/Session.php @@ -85,13 +85,13 @@ public static function getUsername() { /** * Verify login information based on $_POST. * - * @param string $username + * @param string $nameOrEmail * @param string $password * @return bool false on error */ - public static function login(string $username, string $password) { + public static function login(string $nameOrEmail, string $password) { $UserCollectionModel = new UserCollectionModel(); - $User = $UserCollectionModel->getUser($username); + $User = $UserCollectionModel->getUser($nameOrEmail); if (empty($User)) { return false; @@ -99,7 +99,7 @@ public static function login(string $username, string $password) { if ($User->verifyPassword($password)) { session_regenerate_id(true); - $_SESSION['username'] = $username; + $_SESSION['username'] = $User->name; // In case of using a proxy, // it is safer to just refresh the current page instead of rebuilding the currently requested URL. diff --git a/automad/src/UI/Views/Login.php b/automad/src/UI/Views/Login.php index 87218c114..b9af3c13c 100644 --- a/automad/src/UI/Views/Login.php +++ b/automad/src/UI/Views/Login.php @@ -72,8 +72,8 @@ protected function body() { Date: Sat, 2 Oct 2021 20:33:31 +0200 Subject: [PATCH 21/74] minor ui changes --- automad/src/UI/Components/System/Users.php | 180 ++++++++++----------- automad/src/UI/Views/Elements/Navbar.php | 2 +- automad/src/UI/Views/Elements/Sidebar.php | 2 +- automad/ui/less/subnav.less | 5 +- 4 files changed, 95 insertions(+), 94 deletions(-) diff --git a/automad/src/UI/Components/System/Users.php b/automad/src/UI/Components/System/Users.php index 094a7b3ee..3b13ddd25 100644 --- a/automad/src/UI/Components/System/Users.php +++ b/automad/src/UI/Components/System/Users.php @@ -64,99 +64,95 @@ public static function render() { return <<< HTML

    $Text->sys_user_info

    -
    - -
    +
    +
    + + +
    +
    + + +
    +
    + +
    + + +   + $Text->sys_user_change_password + +
    +
    +
    + $Text->sys_user_change_password +
    - - -
    - - -   - $Text->sys_user_change_password - -
    -
    -
    - $Text->sys_user_change_password - + + + + -
    - - - - -
    -
    +
    +

    $Text->sys_user_registered_info

    -   $Text->sys_user_registered      @@ -185,11 +181,18 @@ class="uk-form"

    - - -   - $Text->sys_user_invite - + + +
    @@ -230,12 +233,7 @@ class="uk-form-controls uk-width-1-1 uk-margin-small-top"
    -
    - - -   - $Text->sys_user_add - +
    diff --git a/automad/src/UI/Views/Elements/Navbar.php b/automad/src/UI/Views/Elements/Navbar.php index 76d844ba8..4d9dfcfbd 100644 --- a/automad/src/UI/Views/Elements/Navbar.php +++ b/automad/src/UI/Views/Elements/Navbar.php @@ -105,7 +105,7 @@ class="uk-position-relative uk-visible-large"   {$fn(Text::get('btn_log_out'))} - {$fn(ucwords(Session::getUsername()))} + {$fn(Session::getUsername())} diff --git a/automad/src/UI/Views/Elements/Sidebar.php b/automad/src/UI/Views/Elements/Sidebar.php index 29b0ce5a4..0e89a6918 100644 --- a/automad/src/UI/Views/Elements/Sidebar.php +++ b/automad/src/UI/Views/Elements/Sidebar.php @@ -139,7 +139,7 @@ class="am-sidebar-logo"   {$fn(Text::get('btn_log_out'))} - {$fn(ucwords(Session::getUsername()))} + {$fn(Session::getUsername())} diff --git a/automad/ui/less/subnav.less b/automad/ui/less/subnav.less index f7ff4b74c..3d22f0e25 100644 --- a/automad/ui/less/subnav.less +++ b/automad/ui/less/subnav.less @@ -48,8 +48,10 @@ @subnav-pill-active-color: @subnav-active-color; .hook-subnav-pill() { + display: inline-block !important; font-size: @text-small-font-size; font-weight: @am-nav-font-weight; + line-height: 1.2rem; border-radius: @am-radius-small; white-space: nowrap; overflow: hidden; @@ -81,7 +83,8 @@ align-items: center; position: relative; margin: 0 - (@subnav-pill-padding-horizontal + @subnav-margin-horizontal); - min-height: 2.14rem; + margin-top: 1.85rem !important; + min-height: 2.75rem; & > li { display: flex; From 9b57af0593942de3d6446e16e45bebe29d910efb Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sat, 2 Oct 2021 22:43:16 +0200 Subject: [PATCH 22/74] improve ui for log in, log out and password reset --- .../Layout/PasswordReset/ResetForm.php | 71 ++++++-------- .../Layout/PasswordReset/ResetSuccess.php | 22 ++--- .../Layout/PasswordReset/TokenRequestForm.php | 42 +++----- .../src/UI/Components/Nav/NoUserNavbar.php | 71 ++++++++++++++ automad/src/UI/Components/Notify/Error.php | 66 +++++++++++++ automad/src/UI/Views/Login.php | 95 +++++++++---------- automad/src/UI/Views/Logout.php | 43 +++++---- automad/src/UI/Views/ResetPassword.php | 11 ++- automad/ui/lang/english.txt | 8 +- 9 files changed, 265 insertions(+), 164 deletions(-) create mode 100644 automad/src/UI/Components/Nav/NoUserNavbar.php create mode 100644 automad/src/UI/Components/Notify/Error.php diff --git a/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php b/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php index d8d63beac..d25ac75f2 100644 --- a/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php +++ b/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php @@ -36,7 +36,7 @@ namespace Automad\UI\Components\Layout\PasswordReset; -use Automad\UI\Components\Alert\Danger; +use Automad\UI\Components\Notify\Error; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -61,48 +61,35 @@ public static function render(string $username, ?string $error = null) { return $expression; }; - $alert = ''; - - if ($error) { - $alert = Danger::render($error); - } - return <<< HTML - $alert -

    - {$fn(Text::get('reset_password_enter_new_password'))} -

    - - - - -
    - -   - {$fn(Text::get('btn_cancel'))} - - -
    + {$fn(Error::render($error))} + {$fn(Text::get('reset_password_enter_new_password'))} +
    + + + + + HTML; } } diff --git a/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php b/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php index 034a34f98..3e6972d70 100644 --- a/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php +++ b/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php @@ -36,7 +36,6 @@ namespace Automad\UI\Components\Layout\PasswordReset; -use Automad\UI\Components\Alert\Success; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -60,19 +59,14 @@ public static function render() { }; return <<< HTML - {$fn(Success::render(Text::get('success_password_changed')))} - + {$fn(Text::get('success_password_changed'))} +
    + + {$fn(Text::get('btn_login'))} + HTML; } } diff --git a/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php index c09f6574e..ba0bebd69 100644 --- a/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php +++ b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php @@ -38,6 +38,7 @@ use Automad\Core\Request; use Automad\UI\Components\Alert\Danger; +use Automad\UI\Components\Notify\Error; use Automad\UI\Utils\Text; defined('AUTOMAD') or die('Direct access not permitted!'); @@ -61,34 +62,21 @@ public static function render(?string $error = null) { return $expression; }; - $alert = ''; - - if ($error) { - $alert = Danger::render($error); - } - return <<< HTML - $alert -

    - {$fn(Text::get('reset_password_enter_name_or_email'))} -

    - -
    - -   - {$fn(Text::get('btn_cancel'))} - - -
    + {$fn(Error::render($error))} + {$fn(Text::get('reset_password_enter_name_or_email'))} +
    + + HTML; } } diff --git a/automad/src/UI/Components/Nav/NoUserNavbar.php b/automad/src/UI/Components/Nav/NoUserNavbar.php new file mode 100644 index 000000000..f54fdab5b --- /dev/null +++ b/automad/src/UI/Components/Nav/NoUserNavbar.php @@ -0,0 +1,71 @@ + +
    +
    + $sitename +
    + + + +
    +
    +HTML; + } +} diff --git a/automad/src/UI/Components/Notify/Error.php b/automad/src/UI/Components/Notify/Error.php new file mode 100644 index 000000000..0ecb4c9cb --- /dev/null +++ b/automad/src/UI/Components/Notify/Error.php @@ -0,0 +1,66 @@ + + Automad.Notify.error('$error'); + +HTML; + } +} diff --git a/automad/src/UI/Views/Login.php b/automad/src/UI/Views/Login.php index b9af3c13c..9f36c951b 100644 --- a/automad/src/UI/Views/Login.php +++ b/automad/src/UI/Views/Login.php @@ -36,6 +36,8 @@ namespace Automad\UI\Views; +use Automad\UI\Components\Nav\NoUserNavbar; +use Automad\UI\Components\Notify\Error; use Automad\UI\Controllers\SessionController; use Automad\UI\Utils\Text; @@ -61,45 +63,52 @@ class Login extends AbstractView { */ protected function body() { $error = SessionController::login(); + $sitename = $this->Automad->Shared->get(AM_KEY_SITENAME); $fn = $this->fn; return <<< HTML -
    -

    - {$fn($this->Automad->Shared->get(AM_KEY_SITENAME))} -

    -
    - - - -
    + {$fn(NoUserNavbar::render($sitename))} +
    +
    + {$fn(Text::get('dashboard_title'))} +
    +
    + + +
    + +
    + +
    +
    +
    +
    - {$fn($this->error($error))} + {$fn(Error::render($error))} HTML; } @@ -113,20 +122,4 @@ protected function title() { return "$title — Automad"; } - - /** - * Render the error notification in case there is one. - * - * @param string|null $error - * @return string the rendered notification - */ - private function error(?string $error = null) { - if (!empty($error)) { - return <<< HTML - -HTML; - } - } } diff --git a/automad/src/UI/Views/Logout.php b/automad/src/UI/Views/Logout.php index 61526c695..6b30eb418 100644 --- a/automad/src/UI/Views/Logout.php +++ b/automad/src/UI/Views/Logout.php @@ -38,6 +38,7 @@ use Automad\UI\Components\Alert\Danger; use Automad\UI\Components\Alert\Success; +use Automad\UI\Components\Nav\NoUserNavbar; use Automad\UI\Controllers\SessionController; use Automad\UI\Utils\Text; @@ -66,10 +67,8 @@ protected function body() { $fn = $this->fn; return <<< HTML -
    -

    - {$fn($this->Automad->Shared->get(AM_KEY_SITENAME))} -

    + {$fn(NoUserNavbar::render($this->Automad->Shared->get(AM_KEY_SITENAME)))} +
    {$fn($this->alert($isLoggedOut))}
    HTML; @@ -97,21 +96,27 @@ private function alert(bool $isLoggedOut) { if ($isLoggedOut) { return <<< HTML - {$fn(Success::render(Text::get('success_log_out')))} -
    - -   - {$fn(Text::get('btn_home'))} - - - {$fn(Text::get('btn_login'))} - +
    + {$fn(Text::get('success_log_out'))} +
    +
    HTML; } else { diff --git a/automad/src/UI/Views/ResetPassword.php b/automad/src/UI/Views/ResetPassword.php index 1a4a6cfe2..bc5446934 100644 --- a/automad/src/UI/Views/ResetPassword.php +++ b/automad/src/UI/Views/ResetPassword.php @@ -36,6 +36,7 @@ namespace Automad\UI\Views; +use Automad\UI\Components\Nav\NoUserNavbar; use Automad\UI\Controllers\UserController; use Automad\UI\Utils\Text; @@ -63,12 +64,12 @@ protected function body() { $fn = $this->fn; return <<< HTML -
    -

    - {$fn($this->Automad->Shared->get(AM_KEY_SITENAME))} -

    + {$fn(NoUserNavbar::render($this->Automad->Shared->get(AM_KEY_SITENAME)))} +
    - {$fn(UserController::resetPassword())} +
    + {$fn(UserController::resetPassword())} +
    HTML; diff --git a/automad/ui/lang/english.txt b/automad/ui/lang/english.txt index 39ebdfbb2..96652a79e 100644 --- a/automad/ui/lang/english.txt +++ b/automad/ui/lang/english.txt @@ -26,10 +26,6 @@ btn_browse: Browse Files - -btn_cancel: Cancel - -- - btn_close: Close - @@ -1160,7 +1156,7 @@ reset_password_title: Create Password - -reset_password_enter_name_or_email: Please enter your username or email address in order to request an authentication token by to create a new password for your account. +reset_password_enter_name_or_email: Please enter your username or email address in order to request an authentication token to create a new password for your account. - @@ -1304,7 +1300,7 @@ success_password_changed: Your password has been changed successfully! - -success_log_out: Logged Out Successfully +success_log_out: You have successfully logged out! - From cc73977b286ca5bf44a41637f8eb742110d196e8 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sat, 2 Oct 2021 23:05:32 +0200 Subject: [PATCH 23/74] improve email design --- .../UI/Components/Email/AbstractEmailBody.php | 25 +++++++++++++++++-- .../UI/Components/Email/InvitationEmail.php | 8 ++++-- .../Components/Email/PasswordResetEmail.php | 11 ++------ automad/ui/lang/english.txt | 6 ++++- 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/automad/src/UI/Components/Email/AbstractEmailBody.php b/automad/src/UI/Components/Email/AbstractEmailBody.php index e24dbe0f3..ddf04722b 100644 --- a/automad/src/UI/Components/Email/AbstractEmailBody.php +++ b/automad/src/UI/Components/Email/AbstractEmailBody.php @@ -36,6 +36,8 @@ namespace Automad\UI\Components\Email; +use Automad\UI\Utils\Text; + defined('AUTOMAD') or die('Direct access not permitted!'); /** @@ -46,6 +48,21 @@ * @license MIT license - https://automad.org/license */ abstract class AbstractEmailBody { + /** + * The code paragraph style. + */ + protected static $codeStyle = <<< HTML + style=" + text-align: center; + margin: 20px 0; + border: 1px solid #e5e5e5; + border-radius: 6px; + font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; + font-size: 18px; + line-height: 48px; + " +HTML; + /** * The basic h1 style. */ @@ -64,6 +81,7 @@ abstract class AbstractEmailBody { */ protected static function body(string $content) { $pStyle = self::$paragraphStyle; + $Text = Text::getObject(); return <<< HTML @@ -81,14 +99,17 @@ protected static function body(string $content) { - + - +
    $content

    + $Text->email_automatic +
    +
    Automad

    diff --git a/automad/src/UI/Components/Email/InvitationEmail.php b/automad/src/UI/Components/Email/InvitationEmail.php index 21686cb6c..0d93ce80a 100644 --- a/automad/src/UI/Components/Email/InvitationEmail.php +++ b/automad/src/UI/Components/Email/InvitationEmail.php @@ -59,6 +59,7 @@ class InvitationEmail extends AbstractEmailBody { public static function render(string $website, string $username, string $link) { $h1Style = self::$h1Style; $pStyle = self::$paragraphStyle; + $codeStyle = self::$codeStyle; $Text = Text::getObject(); $inviteText = str_replace('{}', "$website", Text::get('email_invite_text')); @@ -67,15 +68,18 @@ public static function render(string $website, string $username, string $link) {

    $inviteText

    +

    + $Text->sys_user_name: $username +

    $website", Text::get('email_reset_password_text_top')); @@ -67,15 +68,7 @@ public static function render(string $website, string $username, string $token)

    $textTop

    -

    +

    $token

    diff --git a/automad/ui/lang/english.txt b/automad/ui/lang/english.txt index 96652a79e..5fe60f063 100644 --- a/automad/ui/lang/english.txt +++ b/automad/ui/lang/english.txt @@ -721,11 +721,15 @@ email_hello: Hello - +email_automatic: This email has been sent automatically. Please do not reply to this email. + +- + email_invite_subject: You have been added as a new user! - -email_invite_text: a new user account on {} has been created for you. You can use the following link in order to create a password. +email_invite_text: a new user account on {} has been created for you. You can use the button below to create your password. - From b55a0fb0080f6b101aac8a6d1f4d6c788288edfe Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sun, 3 Oct 2021 13:23:27 +0200 Subject: [PATCH 24/74] fix minor ui issues --- .../Layout/PasswordReset/ResetForm.php | 2 +- .../Layout/PasswordReset/ResetSuccess.php | 2 +- .../Layout/PasswordReset/TokenRequestForm.php | 2 +- automad/src/UI/Components/Nav/NoUserNavbar.php | 4 +++- automad/src/UI/Views/Login.php | 10 +++++----- automad/src/UI/Views/Logout.php | 6 +++--- automad/src/UI/Views/ResetPassword.php | 2 +- automad/ui/js/Jumpbar.js | 16 ++++++++-------- automad/ui/lang/english.txt | 14 +++++++------- automad/ui/less/sidebar.less | 6 +++++- 10 files changed, 35 insertions(+), 29 deletions(-) diff --git a/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php b/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php index d25ac75f2..806fbbc99 100644 --- a/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php +++ b/automad/src/UI/Components/Layout/PasswordReset/ResetForm.php @@ -87,7 +87,7 @@ class="uk-form-controls uk-width-1-1 uk-margin-small-bottom" placeholder="{$fn(Text::get('sys_user_repeat_password'))}" required /> - HTML; diff --git a/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php b/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php index 3e6972d70..94b1306c8 100644 --- a/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php +++ b/automad/src/UI/Components/Layout/PasswordReset/ResetSuccess.php @@ -63,7 +63,7 @@ public static function render() {


    {$fn(Text::get('btn_login'))} diff --git a/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php index ba0bebd69..00befcf8e 100644 --- a/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php +++ b/automad/src/UI/Components/Layout/PasswordReset/TokenRequestForm.php @@ -74,7 +74,7 @@ class="uk-form-controls uk-width-1-1 uk-margin-small-bottom" value="{$fn(Request::query('username'))}" required /> - HTML; diff --git a/automad/src/UI/Components/Nav/NoUserNavbar.php b/automad/src/UI/Components/Nav/NoUserNavbar.php index f54fdab5b..7b34fe8ea 100644 --- a/automad/src/UI/Components/Nav/NoUserNavbar.php +++ b/automad/src/UI/Components/Nav/NoUserNavbar.php @@ -50,9 +50,10 @@ class NoUserNavbar { * Create a no user navbar. * * @param string $sitename + * @param string $title * @return string The HTML for no user navbar */ - public static function render(string $sitename) { + public static function render(string $sitename, string $title) { $home = AM_BASE_INDEX . '/'; return <<< HTML @@ -60,6 +61,7 @@ public static function render(string $sitename) {
    $sitename + — $title
    diff --git a/automad/src/UI/Views/Login.php b/automad/src/UI/Views/Login.php index 9f36c951b..1251ac452 100644 --- a/automad/src/UI/Views/Login.php +++ b/automad/src/UI/Views/Login.php @@ -67,10 +67,10 @@ protected function body() { $fn = $this->fn; return <<< HTML - {$fn(NoUserNavbar::render($sitename))} + {$fn(NoUserNavbar::render($sitename, Text::get('btn_login')))}
    - {$fn(Text::get('dashboard_title'))} + {$fn(Text::get('login_title'))}
    {$fn(Text::get('btn_forgot_password'))} @@ -99,7 +99,7 @@ class="uk-button uk-width-1-1"
    diff --git a/automad/src/UI/Views/Logout.php b/automad/src/UI/Views/Logout.php index 6b30eb418..a422fa22d 100644 --- a/automad/src/UI/Views/Logout.php +++ b/automad/src/UI/Views/Logout.php @@ -67,7 +67,7 @@ protected function body() { $fn = $this->fn; return <<< HTML - {$fn(NoUserNavbar::render($this->Automad->Shared->get(AM_KEY_SITENAME)))} + {$fn(NoUserNavbar::render($this->Automad->Shared->get(AM_KEY_SITENAME), Text::get('log_out_title')))}
    {$fn($this->alert($isLoggedOut))}
    @@ -99,7 +99,7 @@ private function alert(bool $isLoggedOut) {
    {$fn(Text::get('success_log_out'))}
    -
    +
    {$fn(Text::get('btn_login'))} diff --git a/automad/src/UI/Views/ResetPassword.php b/automad/src/UI/Views/ResetPassword.php index bc5446934..969f0d0c5 100644 --- a/automad/src/UI/Views/ResetPassword.php +++ b/automad/src/UI/Views/ResetPassword.php @@ -64,7 +64,7 @@ protected function body() { $fn = $this->fn; return <<< HTML - {$fn(NoUserNavbar::render($this->Automad->Shared->get(AM_KEY_SITENAME)))} + {$fn(NoUserNavbar::render($this->Automad->Shared->get(AM_KEY_SITENAME), Text::get('reset_password_title')))}
    diff --git a/automad/ui/js/Jumpbar.js b/automad/ui/js/Jumpbar.js index d3f5d7806..93af1ac93 100644 --- a/automad/ui/js/Jumpbar.js +++ b/automad/ui/js/Jumpbar.js @@ -42,17 +42,15 @@ selector: '[data-am-jumpbar]', init: function () { - const dashboard = document.querySelector('.am-dashboard'); + const jumpBarForms = Array.from( + document.querySelectorAll(`${this.selector}`) + ); // Get autocomplete data. // Note that to prevent getting data when being in page editing context, // the AJAX request is only submitted in case there is an actual autocomplete - // element on the page, meaning the current context is the dashboard. - if (dashboard) { - const jumpBarForms = Array.from( - document.querySelectorAll(`${Automad.Jumpbar.selector}`) - ); - + // element on the page, meaning the current context has a jumpbar. + if (jumpBarForms.length > 0) { // Initially disable the input field in order to prevent normal search request before // autocomplete has been initialized. jumpBarForms.forEach((form) => { @@ -145,5 +143,7 @@ }, }; - $(document).on('ready', Automad.Jumpbar.init); + $(document).on('ready', () => { + Automad.Jumpbar.init(); + }); })((window.Automad = window.Automad || {}), jQuery, UIkit); diff --git a/automad/ui/lang/english.txt b/automad/ui/lang/english.txt index 5fe60f063..633c2bcff 100644 --- a/automad/ui/lang/english.txt +++ b/automad/ui/lang/english.txt @@ -114,11 +114,11 @@ btn_link: Link - -btn_log_out: Log out +btn_log_out: Sign out - -btn_login: Log in +btn_login: Sign in - @@ -788,7 +788,7 @@ error_login: Invalid username or password - -error_log_out: Log out failed! +error_log_out: Sign out failed! - @@ -978,7 +978,7 @@ Other users can be added later via the system preferences. - install_login: ### Move Account File -Please move now the downloaded file to your "/config" directory. After you have successfully finished this installation process, you can login to the dashboard. +Please move now the downloaded file to your "/config" directory. After you have successfully finished this installation process, you can sign in to the dashboard. - @@ -1019,7 +1019,7 @@ link_title: Add Link -login_title: Login +login_title: Sign in to the dashboard - @@ -1031,7 +1031,7 @@ login_password: Password - -log_out_title: Logged Out +log_out_title: Signed Out - @@ -1304,7 +1304,7 @@ success_password_changed: Your password has been changed successfully! - -success_log_out: You have successfully logged out! +success_log_out: You have successfully signed out! - diff --git a/automad/ui/less/sidebar.less b/automad/ui/less/sidebar.less index 0d68f6354..270f42c26 100644 --- a/automad/ui/less/sidebar.less +++ b/automad/ui/less/sidebar.less @@ -56,7 +56,11 @@ width: @am-sidebar-width; // Always keep 4.25rem free space at right to close sidebar. max-width: ~'calc(100vw - 4.25rem)'; - border-right: @am-hairline; + + & > [data-am-scroll-box] { + background-color: @am-bg; + border-right: @am-hairline; + } @media (max-width: @breakpoint-medium-max) { height: 100vh; From 30a38ecb2a8705ad3395130b924186c27e230843 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sun, 3 Oct 2021 13:24:25 +0200 Subject: [PATCH 25/74] update translations --- automad/ui/lang/bosnian.txt | 130 ++++++++++++++++++++--- automad/ui/lang/bulgarian.txt | 134 +++++++++++++++++++++--- automad/ui/lang/chinese_simplified.txt | 130 ++++++++++++++++++++--- automad/ui/lang/chinese_traditional.txt | 130 ++++++++++++++++++++--- automad/ui/lang/czech.txt | 128 +++++++++++++++++++--- automad/ui/lang/danish.txt | 130 ++++++++++++++++++++--- automad/ui/lang/dutch.txt | 130 ++++++++++++++++++++--- automad/ui/lang/estonian.txt | 130 ++++++++++++++++++++--- automad/ui/lang/finnish.txt | 132 ++++++++++++++++++++--- automad/ui/lang/french.txt | 130 ++++++++++++++++++++--- automad/ui/lang/german.txt | 126 +++++++++++++++++++--- automad/ui/lang/greek.txt | 132 ++++++++++++++++++++--- automad/ui/lang/icelandic.txt | 134 +++++++++++++++++++++--- automad/ui/lang/irish.txt | 130 ++++++++++++++++++++--- automad/ui/lang/italian.txt | 132 ++++++++++++++++++++--- automad/ui/lang/japanese.txt | 132 ++++++++++++++++++++--- automad/ui/lang/korean.txt | 130 ++++++++++++++++++++--- automad/ui/lang/latvian.txt | 134 +++++++++++++++++++++--- automad/ui/lang/lithuanian.txt | 130 ++++++++++++++++++++--- automad/ui/lang/norwegian.txt | 130 ++++++++++++++++++++--- automad/ui/lang/polish.txt | 134 +++++++++++++++++++++--- automad/ui/lang/portuguese.txt | 130 ++++++++++++++++++++--- automad/ui/lang/romanian.txt | 134 +++++++++++++++++++++--- automad/ui/lang/russian.txt | 134 +++++++++++++++++++++--- automad/ui/lang/serbian.txt | 130 ++++++++++++++++++++--- automad/ui/lang/slovak.txt | 130 ++++++++++++++++++++--- automad/ui/lang/slovenian.txt | 128 +++++++++++++++++++--- automad/ui/lang/spanish.txt | 134 +++++++++++++++++++++--- automad/ui/lang/swedish.txt | 124 +++++++++++++++++++--- automad/ui/lang/ukrainian.txt | 134 +++++++++++++++++++++--- 30 files changed, 3463 insertions(+), 463 deletions(-) diff --git a/automad/ui/lang/bosnian.txt b/automad/ui/lang/bosnian.txt index 1d43f7b8d..63eb12403 100644 --- a/automad/ui/lang/bosnian.txt +++ b/automad/ui/lang/bosnian.txt @@ -66,6 +66,10 @@ btn_files: Otpremljene datoteke - +btn_forgot_password: Zaboravili ste lozinku + +- + btn_get_themes: Nabavite još tema - @@ -94,6 +98,10 @@ btn_inpage_edit: Način uređivanja na stranici - +btn_invite: Pošalji pozivnicu + +- + btn_install: Instalirajte - @@ -106,7 +114,7 @@ btn_log_out: Odjaviti se - -btn_login: Ulogovati se +btn_login: Prijaviti se - @@ -154,10 +162,18 @@ btn_reset: Resetovati - +btn_save_password: Spremi lozinku + +- + btn_save: Sačuvaj promjene - +btn_submit: Predati + +- + btn_update: Ažuriraj - @@ -654,6 +670,38 @@ editor_ui_browse: Pregledajte datoteke - +email_hello: zdravo + +- + +email_automatic: Ovaj je e-mail automatski poslan. Molimo ne odgovarajte na ovaj e-mail. + +- + +email_invite_subject: Dodani ste kao novi korisnik! + +- + +email_invite_text: Za vas je stvoren novi korisnički račun na {}. Možete koristiti donji gumb za kreiranje lozinke. + +- + +email_invite_button: Kreirajte lozinku sada + +- + +email_reset_password_subject: Vaš token za autentifikaciju + +- + +email_reset_password_text_top: Traženi token za provjeru autentičnosti za vaš račun na {} možete pronaći u nastavku. Možete koristiti taj token da biste sada stvorili novu lozinku za vas. + +- + +email_reset_password_text_bottom: U slučaju da niste pokrenuli ovaj zahtjev, možete sigurno zanemariti ovu poruku. + +- + error_cache_purged: Nije moguće očistiti direktorij predmemorije! - @@ -686,7 +734,7 @@ error_login: Nevažeće korisničko ime ili lozinka - -error_log_out: Odjava nije uspjela! +error_log_out: Odjava nije uspjelo! - @@ -714,6 +762,10 @@ error_invalid_username: Nevažeće korisničko ime! Korisničko ime može sadrž - +error_invalid_email: Nevažeći email! Adresa e-pošte može sadržavati samo sljedeće znakove: + +- + error_json: Nevažeći JSON! Sadržaj konfiguracijske datoteke nije pravilno formatiran. - @@ -742,10 +794,18 @@ error_password_reuse: Ne koristite ponovo staru lozinku! - +error_password_reset_verification: Token za provjeru autentičnosti nije važeći ili je već istekao! + +- + error_permission: Odbijene dozvole: - +error_send_email: Pogreška prilikom slanja e-pošte! + +- + error_template_missing: Predložak nedostaje - @@ -778,6 +838,14 @@ error_update_permission: Nije moguće pokrenuti ažuriranje! Dozvole odbijene! - +error_user_not_found: Nevažeće korisničko ime ili adresu e-pošte. + +- + +error_user_no_email: Ne postoji adresa e-pošte pohranjena za traženi korisnički račun. + +- + error_var_exists: Već postoji varijabla s tim imenom! - @@ -834,11 +902,11 @@ link_title: Dodaj vezu - -login_title: Ulogovati se +login_title: Prijavite se na nadzornu ploču - -login_username: Korisničko ime +login_name_or_email: Korisničko ime ili e-mail - @@ -846,7 +914,7 @@ login_password: Lozinka - -log_out_title: Odjavljeni +log_out_title: Odjavio se - @@ -950,6 +1018,22 @@ page_private: Privatno - +reset_password_title: Napravi sifru + +- + +reset_password_enter_name_or_email: Unesite svoje korisničko ime ili adresu e-pošte kako biste zatražili token za provjeru autentičnosti da biste stvorili novu lozinku za svoj račun. + +- + +reset_password_enter_new_password: E-mail, uključujući token za autentifikaciju, samo vam je poslao. Molimo unesite taj token sada dolje zajedno sa novom lozinkom. + +- + +reset_password_token: Token za provjeru autentičnosti + +- + sidebar_header_global: Globalno - @@ -1054,7 +1138,7 @@ success_password_changed: Vaša lozinka je uspješno promijenjena! - -success_log_out: Odjava uspješna +success_log_out: Uspješno ste se odjavili! - @@ -1074,6 +1158,10 @@ success_update: Uspješno ažuriran Automad! - +success_user_invite: Poziv je uspješno poslan. + +- + success_packages_updated_all: Uspješno ažurirani svi paketi - @@ -1206,39 +1294,47 @@ sys_user: Korisnici - -sys_user_info: Ovdje možete dodati ili ukloniti više korisnika ili promijeniti lozinku. +sys_user_info: Ovdje možete pronaći sve informacije vezane za vaš račun i promijeniti svoje korisničko ime, lozinku ili e-poštu. Da biste mogli resetirati lozinku putem e-maila, provjerite jeste li ušli u vaild i aktivnu adresu e-pošte u nastavku. - -sys_user_change_password: Promijenite lozinku +sys_user_add: Dodaj korisnika - -sys_user_change_password_current: Trenutna šifra +sys_user_invite: Pozovite korisnika putem e-maila - -sys_user_change_password_new: Nova šifra +sys_user_name: Korisničko ime - -sys_user_change_password_repeat: Ponovi lozinku +sys_user_password: Lozinka - -sys_user_add: Dodaj korisnika +sys_user_repeat_password: Ponovi lozinku - -sys_user_add_name: Korisničko ime +sys_user_email: E-pošta - -sys_user_add_password: Lozinka +sys_user_alert_no_email: Još niste dodali valjanu adresu e-pošte na vaš račun. Imajte na umu da je potrebna valjana adresa e-pošte kako biste mogli resetirati lozinku. Kliknite ovdje da biste dodali e-poštu sada. - -sys_user_add_repeat: Ponovi lozinku +sys_user_change_password: Promijenite lozinku + +- + +sys_user_current_password: trenutna šifra + +- + +sys_user_new_password: Nova šifra - @@ -1246,6 +1342,10 @@ sys_user_registered: Registrirani korisnici - +sys_user_registered_info: Također je moguće registrirati ostale korisnike kako bi im omogućili uređivanje sadržaja. + +- + sys_user_you: Ti - diff --git a/automad/ui/lang/bulgarian.txt b/automad/ui/lang/bulgarian.txt index ccde100c3..389ce867f 100644 --- a/automad/ui/lang/bulgarian.txt +++ b/automad/ui/lang/bulgarian.txt @@ -66,6 +66,10 @@ btn_files: Качени файлове - +btn_forgot_password: Забравена парола + +- + btn_get_themes: Вземете още теми - @@ -94,6 +98,10 @@ btn_inpage_edit: Режим за редактиране на страница - +btn_invite: Изпрати покана + +- + btn_install: Инсталирай - @@ -102,11 +110,11 @@ btn_link: Връзка - -btn_log_out: Излез от профила си +btn_log_out: Отписване - -btn_login: Влизам +btn_login: Впиши се - @@ -154,10 +162,18 @@ btn_reset: Нулиране - +btn_save_password: Запази паролата + +- + btn_save: Запазите промените - +btn_submit: Изпращане + +- + btn_update: Актуализиране - @@ -654,6 +670,38 @@ editor_ui_browse: Преглед на файлове - +email_hello: Здравейте + +- + +email_automatic: Този имейл е изпратен автоматично. Моля, не отговаряйте на този имейл. + +- + +email_invite_subject: Вие сте добавени като нов потребител! + +- + +email_invite_text: За вас е създаден нов потребителски акаунт на {}. Можете да използвате бутона по-долу, за да създадете паролата си. + +- + +email_invite_button: Създайте парола сега + +- + +email_reset_password_subject: Вашето удостоверяване знак + +- + +email_reset_password_text_top: Заявеният знак за удостоверяване за вашия профил в {} може да бъде намерен по-долу. Можете да използвате този маркер, за да създадете нова парола за вас сега. + +- + +email_reset_password_text_bottom: В случай, че не сте инициирали това заявка, можете спокойно да игнорирате това съобщение. + +- + error_cache_purged: Директорията на кеша не може да бъде изчистена! - @@ -686,7 +734,7 @@ error_login: Невалидно потребителско име или пар - -error_log_out: Излизането не бе успешно! +error_log_out: Излизане! - @@ -714,6 +762,10 @@ error_invalid_username: Невалидно потребителско име! П - +error_invalid_email: Грешен имейл! Имейл адресът може да съдържа само следните знаци: + +- + error_json: Невалиден JSON! Съдържанието на конфигурационния файл не е форматирано правилно. - @@ -742,10 +794,18 @@ error_password_reuse: Не използвайте повторно старат - +error_password_reset_verification: Токенът за удостоверяване е невалиден или е изтекъл вече! + +- + error_permission: Отказани разрешения: - +error_send_email: Грешка при изпращане на имейл! + +- + error_template_missing: Липсва шаблон - @@ -778,6 +838,14 @@ error_update_permission: Не може да стартира актуализа - +error_user_not_found: Невалидно потребителско име или имейл адрес. + +- + +error_user_no_email: Няма имейл адрес, съхранен за заявената потребителска сметка. + +- + error_var_exists: Вече има променлива с това име! - @@ -834,11 +902,11 @@ link_title: Добавяне на връзка - -login_title: Влизам +login_title: Влезте в таблото - -login_username: Потребителско име +login_name_or_email: Потребителско име или имейл - @@ -846,7 +914,7 @@ login_password: Парола - -log_out_title: Излезли +log_out_title: Отписан - @@ -950,6 +1018,22 @@ page_private: частни - +reset_password_title: Създай парола + +- + +reset_password_enter_name_or_email: Моля, въведете потребителското си име или имейл адрес, за да поискате токен за удостоверяване, за да създадете нова парола за профила си. + +- + +reset_password_enter_new_password: Имейл, включващ знак за удостоверяване, просто ви е изпратен. Моля, въведете този маркер сега по-долу заедно с нова парола. + +- + +reset_password_token: Токен за удостоверяване + +- + sidebar_header_global: Глобален - @@ -1050,11 +1134,11 @@ success_installed: Успешно инсталиран - -success_password_changed: Паролата ви е променена успешно! +success_password_changed: Вашата парола е променена успешно! - -success_log_out: Излязохте успешно +success_log_out: Успешно сте излезли! - @@ -1074,6 +1158,10 @@ success_update: Успешно актуализиран Automad! - +success_user_invite: Поканата е изпратена успешно. + +- + success_packages_updated_all: Успешно актуализирани всички пакети - @@ -1206,39 +1294,47 @@ sys_user: Потребители - -sys_user_info: Можете да добавите или премахнете повече потребители или да промените паролата си тук. +sys_user_info: Тук можете да намерите цялата информация, свързана с профила ви и да промените потребителското си име, парола или имейл. За да можете да възстановите паролата си по имейл, моля, уверете се, че сте въвели талон и активен имейл адрес по-долу. - -sys_user_change_password: Променете паролата си +sys_user_add: Добавяне на потребител - -sys_user_change_password_current: Настояща парола +sys_user_invite: Поканете потребител по имейл - -sys_user_change_password_new: нова парола +sys_user_name: Потребителско име - -sys_user_change_password_repeat: Повтори паролата +sys_user_password: Парола - -sys_user_add: Добавяне на потребител +sys_user_repeat_password: Повтори паролата - -sys_user_add_name: Потребителско име +sys_user_email: електронна поща - -sys_user_add_password: Парола +sys_user_alert_no_email: Все още не сте добавили валиден имейл адрес в профила си. Обърнете внимание, че е необходим валиден имейл адрес, за да можете да възстановите паролата си. Кликнете тук, за да добавите имейл сега. - -sys_user_add_repeat: Повтори паролата +sys_user_change_password: Променете паролата си + +- + +sys_user_current_password: Настояща парола + +- + +sys_user_new_password: нова парола - @@ -1246,6 +1342,10 @@ sys_user_registered: Регистрирани потребители - +sys_user_registered_info: Възможно е също така да се регистрират други потребители, за да им се даде възможност да редактират съдържание. + +- + sys_user_you: Ти - diff --git a/automad/ui/lang/chinese_simplified.txt b/automad/ui/lang/chinese_simplified.txt index aacfd82cc..c79782574 100644 --- a/automad/ui/lang/chinese_simplified.txt +++ b/automad/ui/lang/chinese_simplified.txt @@ -66,6 +66,10 @@ btn_files: 上传的文件 - +btn_forgot_password: 忘记密码 + +- + btn_get_themes: 获得更多主题 - @@ -94,6 +98,10 @@ btn_inpage_edit: 在页面编辑模式 - +btn_invite: 发送邀请 + +- + btn_install: 安装 - @@ -106,7 +114,7 @@ btn_log_out: 登出 - -btn_login: 登录 +btn_login: 登入 - @@ -154,10 +162,18 @@ btn_reset: 重置 - +btn_save_password: 保存密码 + +- + btn_save: 保存更改 - +btn_submit: 提交 + +- + btn_update: 更新 - @@ -654,6 +670,38 @@ editor_ui_browse: 浏览文件 - +email_hello: 你好 + +- + +email_automatic: 此电子邮件已自动发送。 请不要回复这封邮件。 + +- + +email_invite_subject: 您已被添加为新用户! + +- + +email_invite_text: {}上的新用户帐户已为您创建。 您可以使用下面的按钮创建密码。 + +- + +email_invite_button: 立即创建密码 + +- + +email_reset_password_subject: 您的身份验证令牌 + +- + +email_reset_password_text_top: 下面可以在{}上找到所请求的身份验证令牌。 您可以使用该令牌,以便现在为您创建新密码。 + +- + +email_reset_password_text_bottom: 如果您自己未启动此请求,您可以安全地忽略此消息。 + +- + error_cache_purged: 缓存目录无法清除! - @@ -714,6 +762,10 @@ error_invalid_username: 无效的用户名! 用户名只能包含以下字符 - +error_invalid_email: 不合规电邮! 电子邮件地址只能包含以下字符: + +- + error_json: json无效! 配置文件的内容未正确格式化。 - @@ -742,10 +794,18 @@ error_password_reuse: 不要重复使用您的旧密码! - +error_password_reset_verification: 身份验证令牌无效或已过期! + +- + error_permission: 拒绝权限: - +error_send_email: 发送电子邮件错误! + +- + error_template_missing: 模板失踪 - @@ -778,6 +838,14 @@ error_update_permission: 无法运行更新! 权限被拒绝! - +error_user_not_found: 用户名或电子邮件地址无效。 + +- + +error_user_no_email: 没有为请求的用户帐户存储的电子邮件地址。 + +- + error_var_exists: 已经有一个名称有一个变量! - @@ -834,11 +902,11 @@ link_title: 添加链接 - -login_title: 登录 +login_title: 登录仪表板 - -login_username: 用户名 +login_name_or_email: 用户名或电子邮件 - @@ -846,7 +914,7 @@ login_password: 密码 - -log_out_title: 登出 +log_out_title: 退出 - @@ -950,6 +1018,22 @@ page_private: 私人的 - +reset_password_title: 创建密码 + +- + +reset_password_enter_name_or_email: 请输入您的用户名或电子邮件地址,以请求身份验证令牌以为您的帐户创建新密码。 + +- + +reset_password_enter_new_password: 包括身份验证令牌的电子邮件只是发送给您。 请在下面输入该令牌以及新密码。 + +- + +reset_password_token: 身份验证令牌 + +- + sidebar_header_global: 全球的 - @@ -1050,11 +1134,11 @@ success_installed: 成功安装 - -success_password_changed: 您的密码已成功更改! +success_password_changed: 你已经成功更改密码! - -success_log_out: 成功退出 +success_log_out: 您已成功退出! - @@ -1074,6 +1158,10 @@ success_update: 成功更新了自动机构! - +success_user_invite: 邀请已成功发送。 + +- + success_packages_updated_all: 成功更新了所有包 - @@ -1206,39 +1294,47 @@ sys_user: 用户 - -sys_user_info: 您可以在此添加或删除更多用户或更改密码。 +sys_user_info: 在这里,您可以找到与您的帐户相关的所有信息,并更改您的用户名,密码或电子邮件。 为了能够通过电子邮件重置密码,请确保您已输入下面的Vaild和活动电子邮件地址。 - -sys_user_change_password: 更改您的密码 +sys_user_add: 添加用户 - -sys_user_change_password_current: 当前密码 +sys_user_invite: 通过电子邮件邀请用户 - -sys_user_change_password_new: 新密码 +sys_user_name: 用户名 - -sys_user_change_password_repeat: 重复输入密码 +sys_user_password: 密码 - -sys_user_add: 添加用户 +sys_user_repeat_password: 重复输入密码 - -sys_user_add_name: 用户名 +sys_user_email: 电子邮件 - -sys_user_add_password: 密码 +sys_user_alert_no_email: 您还没有为您的帐户添加有效的电子邮件地址。 请注意,需要有效的电子邮件地址才能重置密码。 点击此处立即添加电子邮件。 - -sys_user_add_repeat: 重复输入密码 +sys_user_change_password: 更改您的密码 + +- + +sys_user_current_password: 当前密码 + +- + +sys_user_new_password: 新密码 - @@ -1246,6 +1342,10 @@ sys_user_registered: 注册用户 - +sys_user_registered_info: 还可以注册其他用户,以便允许它们编辑内容。 + +- + sys_user_you: 你 - diff --git a/automad/ui/lang/chinese_traditional.txt b/automad/ui/lang/chinese_traditional.txt index ab52178b5..53334cb1a 100644 --- a/automad/ui/lang/chinese_traditional.txt +++ b/automad/ui/lang/chinese_traditional.txt @@ -66,6 +66,10 @@ btn_files: 上傳的文件 - +btn_forgot_password: 忘記密碼 + +- + btn_get_themes: 獲得更多主題 - @@ -94,6 +98,10 @@ btn_inpage_edit: 在頁面編輯模式 - +btn_invite: 發送邀請 + +- + btn_install: 安裝 - @@ -106,7 +114,7 @@ btn_log_out: 登出 - -btn_login: 登錄 +btn_login: 登入 - @@ -154,10 +162,18 @@ btn_reset: 重置 - +btn_save_password: 保存密碼 + +- + btn_save: 保存更改 - +btn_submit: 提交 + +- + btn_update: 更新 - @@ -654,6 +670,38 @@ editor_ui_browse: 瀏覽文件 - +email_hello: 你好 + +- + +email_automatic: 此電子郵件已自動發送。 請不要回复這封郵件。 + +- + +email_invite_subject: 您已被添加為新用戶! + +- + +email_invite_text: {}上的新用戶帳戶已為您創建。 您可以使用下面的按鈕創建密碼。 + +- + +email_invite_button: 立即創建密碼 + +- + +email_reset_password_subject: 您的身份驗證令牌 + +- + +email_reset_password_text_top: 下面可以在{}上找到所請求的身份驗證令牌。 您可以使用該令牌,以便現在為您創建新密碼。 + +- + +email_reset_password_text_bottom: 如果您自己未啟動此請求,您可以安全地忽略此消息。 + +- + error_cache_purged: 緩存目錄無法清除! - @@ -714,6 +762,10 @@ error_invalid_username: 無效的用戶名! 用戶名只能包含以下字符 - +error_invalid_email: 不合規電郵! 電子郵件地址只能包含以下字符: + +- + error_json: json無效! 配置文件的內容未正確格式化。 - @@ -742,10 +794,18 @@ error_password_reuse: 不要重複使用您的舊密碼! - +error_password_reset_verification: 身份驗證令牌無效或已過期! + +- + error_permission: 拒絕權限: - +error_send_email: 發送電子郵件錯誤! + +- + error_template_missing: 模板失踪 - @@ -778,6 +838,14 @@ error_update_permission: 無法運行更新! 權限被拒絕! - +error_user_not_found: 用戶名或電子郵件地址無效。 + +- + +error_user_no_email: 沒有為請求的用戶帳戶存儲的電子郵件地址。 + +- + error_var_exists: 已經有一個名稱有一個變量! - @@ -834,11 +902,11 @@ link_title: 添加鏈接 - -login_title: 登錄 +login_title: 登錄儀表板 - -login_username: 用戶名 +login_name_or_email: 用戶名或電子郵件 - @@ -846,7 +914,7 @@ login_password: 密碼 - -log_out_title: 登出 +log_out_title: 退出 - @@ -950,6 +1018,22 @@ page_private: 私人的 - +reset_password_title: 創建密碼 + +- + +reset_password_enter_name_or_email: 請輸入您的用戶名或電子郵件地址,以請求身份驗證令牌以為您的帳戶創建新密碼。 + +- + +reset_password_enter_new_password: 包括身份驗證令牌的電子郵件只是發送給您。 請在下面輸入該令牌以及新密碼。 + +- + +reset_password_token: 身份驗證令牌 + +- + sidebar_header_global: 全球的 - @@ -1050,11 +1134,11 @@ success_installed: 成功安裝 - -success_password_changed: 您的密碼已成功更改! +success_password_changed: 你已經成功更改密碼! - -success_log_out: 成功退出 +success_log_out: 您已成功退出! - @@ -1074,6 +1158,10 @@ success_update: 成功更新了自動機構! - +success_user_invite: 邀請已成功發送。 + +- + success_packages_updated_all: 成功更新了所有包 - @@ -1206,39 +1294,47 @@ sys_user: 用戶 - -sys_user_info: 您可以在此添加或刪除更多用戶或更改密碼。 +sys_user_info: 在這裡,您可以找到與您的帳戶相關的所有信息,並更改您的用戶名,密碼或電子郵件。 為了能夠通過電子郵件重置密碼,請確保您已輸入下面的Vaild和活動電子郵件地址。 - -sys_user_change_password: 更改您的密碼 +sys_user_add: 添加用戶 - -sys_user_change_password_current: 當前密碼 +sys_user_invite: 通過電子郵件邀請用戶 - -sys_user_change_password_new: 新密碼 +sys_user_name: 用戶名 - -sys_user_change_password_repeat: 重複輸入密碼 +sys_user_password: 密碼 - -sys_user_add: 添加用戶 +sys_user_repeat_password: 重複輸入密碼 - -sys_user_add_name: 用戶名 +sys_user_email: 電子郵件 - -sys_user_add_password: 密碼 +sys_user_alert_no_email: 您還沒有為您的帳戶添加有效的電子郵件地址。 請注意,需要有效的電子郵件地址才能重置密碼。 點擊此處立即添加電子郵件。 - -sys_user_add_repeat: 重複輸入密碼 +sys_user_change_password: 更改您的密碼 + +- + +sys_user_current_password: 當前密碼 + +- + +sys_user_new_password: 新密碼 - @@ -1246,6 +1342,10 @@ sys_user_registered: 註冊用戶 - +sys_user_registered_info: 還可以註冊其他用戶,以便允許它們編輯內容。 + +- + sys_user_you: 你 - diff --git a/automad/ui/lang/czech.txt b/automad/ui/lang/czech.txt index d5f7d519a..0d384dfd4 100644 --- a/automad/ui/lang/czech.txt +++ b/automad/ui/lang/czech.txt @@ -66,6 +66,10 @@ btn_files: Nahrané soubory - +btn_forgot_password: Zapomenuté heslo + +- + btn_get_themes: Získejte více motivů - @@ -94,6 +98,10 @@ btn_inpage_edit: Režim úprav na stránce - +btn_invite: Poslat pozvánku + +- + btn_install: Nainstalujte - @@ -154,10 +162,18 @@ btn_reset: Resetovat - +btn_save_password: Uložit heslo + +- + btn_save: Uložit změny - +btn_submit: Předložit + +- + btn_update: Aktualizace - @@ -654,6 +670,38 @@ editor_ui_browse: Procházet soubory - +email_hello: Ahoj + +- + +email_automatic: Tento e-mail byl odeslán automaticky. Prosím neodpovídejte na tento email. + +- + +email_invite_subject: Byl jste přidán jako nový uživatel! + +- + +email_invite_text: Byl pro vás vytvořen nový uživatelský účet na {}. Můžete použít níže uvedené tlačítko pro vytvoření hesla. + +- + +email_invite_button: Vytvořte heslo nyní + +- + +email_reset_password_subject: Token ověřování + +- + +email_reset_password_text_top: Níže naleznete požadovaný ověřovací token pro váš účet na {} níže. Můžete použít ten token, abyste pro vás nyní vytvořili nové heslo. + +- + +email_reset_password_text_bottom: V případě, že jste tento požadavek nespustil, můžete tuto zprávu bezpečně ignorovat. + +- + error_cache_purged: Adresář mezipaměti nelze vymazat! - @@ -686,7 +734,7 @@ error_login: Neplatné uživatelské jméno či heslo - -error_log_out: Odhlášení se nezdařilo! +error_log_out: Odhlásit se Selhalo! - @@ -714,6 +762,10 @@ error_invalid_username: Neplatné uživatelské jméno! Uživatelské jméno mů - +error_invalid_email: Neplatný e-mail! E-mailová adresa může obsahovat pouze následující znaky: + +- + error_json: Neplatný JSON! Obsah konfiguračního souboru není správně naformátován. - @@ -742,10 +794,18 @@ error_password_reuse: Nepoužívejte znovu své staré heslo! - +error_password_reset_verification: Ověřovací token je neplatný nebo již vypršel! + +- + error_permission: Oprávnění odepřena: - +error_send_email: Chyba odesílání e-mailu! + +- + error_template_missing: Šablona chybí - @@ -778,6 +838,14 @@ error_update_permission: Aktualizaci nelze spustit! Oprávnění zamítnuta! - +error_user_not_found: Neplatné uživatelské jméno nebo e-mailová adresa. + +- + +error_user_no_email: Pro požadovaný uživatelský účet není uložena žádná e-mailová adresa. + +- + error_var_exists: Proměnná s tímto názvem již existuje! - @@ -834,11 +902,11 @@ link_title: Přidat odkaz - -login_title: Přihlásit se +login_title: Přihlaste se do řídicího panelu - -login_username: Uživatelské jméno +login_name_or_email: Uživatelské jméno nebo email - @@ -846,7 +914,7 @@ login_password: Heslo - -log_out_title: Odhlásit +log_out_title: Odhlášeno - @@ -950,6 +1018,22 @@ page_private: Soukromé - +reset_password_title: Vytvořit heslo + +- + +reset_password_enter_name_or_email: Zadejte prosím své uživatelské jméno nebo e-mailovou adresu, abyste mohli požádat o ověřovací token vytvořit nové heslo pro váš účet. + +- + +reset_password_enter_new_password: E-mail včetně autentizačního tokenu vám byl poslán. Zadejte prosím token nyní pod spolu s novým heslem. + +- + +reset_password_token: Token autentizace + +- + sidebar_header_global: Globální - @@ -1054,7 +1138,7 @@ success_password_changed: Vaše heslo bylo úspěšně změněno! - -success_log_out: Úspěšně odhlášeno +success_log_out: Úspěšně jste se odhlásili! - @@ -1074,6 +1158,10 @@ success_update: Automad byl úspěšně aktualizován! - +success_user_invite: Pozvánka byla úspěšně odeslána. + +- + success_packages_updated_all: Všechny balíčky byly úspěšně aktualizovány - @@ -1206,39 +1294,47 @@ sys_user: Uživatelé - -sys_user_info: Zde můžete přidat nebo odebrat více uživatelů nebo změnit heslo. +sys_user_info: Zde naleznete všechny informace týkající se vašeho účtu a změnit své uživatelské jméno, heslo nebo e-mail. Aby bylo možné obnovit heslo e-mailem, ujistěte se, že jste zadali ve Vaild a Aktivní e-mailovou adresu níže. - -sys_user_change_password: Změňte si své heslo +sys_user_add: Přidat uživatele - -sys_user_change_password_current: Aktuální heslo +sys_user_invite: Pozvat uživatele e-mailem - -sys_user_change_password_new: Nové heslo +sys_user_name: Uživatelské jméno - -sys_user_change_password_repeat: Zopakovat heslo +sys_user_password: Heslo - -sys_user_add: Přidat uživatele +sys_user_repeat_password: Zopakovat heslo - -sys_user_add_name: Uživatelské jméno +sys_user_email: E-mailem - -sys_user_add_password: Heslo +sys_user_alert_no_email: Do účtu ještě nepřidali platnou e-mailovou adresu. Všimněte si, že platná e-mailová adresa je nutná, aby bylo možné obnovit heslo. Klikněte zde a přidejte nyní e-mail. - -sys_user_add_repeat: Zopakovat heslo +sys_user_change_password: Změňte si své heslo + +- + +sys_user_current_password: Aktuální heslo + +- + +sys_user_new_password: nové heslo - @@ -1246,6 +1342,10 @@ sys_user_registered: Registrovaní uživatelé - +sys_user_registered_info: Je také možné zaregistrovat další uživatele, aby bylo možné upravit obsah. + +- + sys_user_you: Vy - diff --git a/automad/ui/lang/danish.txt b/automad/ui/lang/danish.txt index 0d8777f04..5b737388f 100644 --- a/automad/ui/lang/danish.txt +++ b/automad/ui/lang/danish.txt @@ -66,6 +66,10 @@ btn_files: Uploadede filer - +btn_forgot_password: Glemt kodeord + +- + btn_get_themes: Få flere temaer - @@ -94,6 +98,10 @@ btn_inpage_edit: Redigeringstilstand på siden - +btn_invite: Send invitation + +- + btn_install: Installere - @@ -106,7 +114,7 @@ btn_log_out: Log ud - -btn_login: Log på +btn_login: Log ind - @@ -154,10 +162,18 @@ btn_reset: Nulstil - +btn_save_password: Gem adgangskode + +- + btn_save: Gem ændringer - +btn_submit: Indsend + +- + btn_update: Opdatering - @@ -654,6 +670,38 @@ editor_ui_browse: Gennemse filer. - +email_hello: Hej + +- + +email_automatic: Denne email er blevet sendt automatisk. Venligst svar ikke på denne email. + +- + +email_invite_subject: Du er blevet tilføjet som en ny bruger! + +- + +email_invite_text: En ny brugerkonto på {} er blevet oprettet for dig. Du kan bruge knappen nedenfor til at oprette dit kodeord. + +- + +email_invite_button: Opret adgangskode nu + +- + +email_reset_password_subject: Din Authentication TOKEN. + +- + +email_reset_password_text_top: Den ønskede godkendelsesstoken for din konto på {} kan findes nedenfor. Du kan bruge det token for at oprette en ny adgangskode til dig nu. + +- + +email_reset_password_text_bottom: Hvis du ikke har indledt denne anmodning selv, kan du sikkert ignorere denne besked. + +- + error_cache_purged: Cache-biblioteket kunne ikke renses! - @@ -714,6 +762,10 @@ error_invalid_username: Ugyldigt brugernavn! Et brugernavn kan kun indeholde fø - +error_invalid_email: Ugyldig email! En e-mail-adresse kan kun indeholde følgende tegn: + +- + error_json: Ugyldig JSON! Indholdet af konfigurationsfilen er ikke formateret korrekt. - @@ -742,10 +794,18 @@ error_password_reuse: Genbrug ikke din gamle adgangskode! - +error_password_reset_verification: Autentificeringstoken er ugyldig eller er udløbet allerede! + +- + error_permission: Tilladelser nægtet: - +error_send_email: Fejl ved at sende e-mail! + +- + error_template_missing: Skabelon mangler - @@ -778,6 +838,14 @@ error_update_permission: Kan ikke køre opdatering! Tilladelser nægtet! - +error_user_not_found: Ugyldigt brugernavn eller e-mail-adresse. + +- + +error_user_no_email: Der er ingen e-mail-adresse, der er gemt for den ønskede brugerkonto. + +- + error_var_exists: Der er allerede en variabel med det navn! - @@ -834,11 +902,11 @@ link_title: Tilføj link - -login_title: Log på +login_title: Log ind på instrumentbrættet - -login_username: Brugernavn +login_name_or_email: Brugernavn eller e-mail - @@ -846,7 +914,7 @@ login_password: Adgangskode - -log_out_title: Logget ud +log_out_title: Underskrevet ud - @@ -950,6 +1018,22 @@ page_private: Privat - +reset_password_title: Opret adgangskode + +- + +reset_password_enter_name_or_email: Indtast venligst dit brugernavn eller e-mail-adresse for at anmode om en godkendelsesstoken for at oprette en ny adgangskode til din konto. + +- + +reset_password_enter_new_password: En email, herunder en autentificeringstoken, er bare blevet sendt til dig. Indtast venligst Token nedenfor sammen med en ny adgangskode. + +- + +reset_password_token: Autentificering TOKEN. + +- + sidebar_header_global: Global - @@ -1050,11 +1134,11 @@ success_installed: Installeret - -success_password_changed: Din adgangskode blev ændret med succes! +success_password_changed: Dit kodeord er blevet ændret med succes! - -success_log_out: Logget ud med succes +success_log_out: Du har logget op! - @@ -1074,6 +1158,10 @@ success_update: Automad er opdateret! - +success_user_invite: Invitationen er blevet sendt med succes. + +- + success_packages_updated_all: Alle pakker er opdateret - @@ -1206,39 +1294,47 @@ sys_user: Brugere - -sys_user_info: Du kan tilføje eller fjerne flere brugere eller ændre din adgangskode her. +sys_user_info: Her kan du finde alle oplysninger relateret til din konto og ændre dit brugernavn, adgangskode eller e-mail. For at kunne nulstille din adgangskode via e-mail, skal du sørge for, at du har indtastet en Vaild og Active e-mail-adresse nedenfor. - -sys_user_change_password: Skift dit kodeord +sys_user_add: Tilføj bruger - -sys_user_change_password_current: Nuværende kodeord +sys_user_invite: Inviter bruger via e-mail - -sys_user_change_password_new: Nyt kodeord +sys_user_name: Brugernavn. - -sys_user_change_password_repeat: Gentag adgangskode +sys_user_password: Adgangskode - -sys_user_add: Tilføj bruger +sys_user_repeat_password: Gentag adgangskode - -sys_user_add_name: Brugernavn +sys_user_email: Email. - -sys_user_add_password: Adgangskode +sys_user_alert_no_email: Du har endnu ikke tilføjet en gyldig e-mail-adresse til din konto. Bemærk, at der kræves en gyldig e-mail-adresse for at kunne nulstille dit kodeord. Klik her for at tilføje en email nu. - -sys_user_add_repeat: Gentag adgangskode +sys_user_change_password: Skift dit kodeord + +- + +sys_user_current_password: Nuværende kodeord + +- + +sys_user_new_password: nyt kodeord - @@ -1246,6 +1342,10 @@ sys_user_registered: Registrerede brugere - +sys_user_registered_info: Det er også muligt at registrere andre brugere for at give dem mulighed for at redigere indhold. + +- + sys_user_you: Du - diff --git a/automad/ui/lang/dutch.txt b/automad/ui/lang/dutch.txt index 05c838869..f556f5531 100644 --- a/automad/ui/lang/dutch.txt +++ b/automad/ui/lang/dutch.txt @@ -66,6 +66,10 @@ btn_files: Geüploade bestanden - +btn_forgot_password: Wachtwoord vergeten + +- + btn_get_themes: Krijg meer thema's - @@ -94,6 +98,10 @@ btn_inpage_edit: In-Page Edit Mode - +btn_invite: Verstuur uitnodiging + +- + btn_install: Installeren - @@ -102,11 +110,11 @@ btn_link: Koppeling - -btn_log_out: Uitloggen +btn_log_out: Afmelden - -btn_login: Log in +btn_login: Inloggen - @@ -154,10 +162,18 @@ btn_reset: Reset - +btn_save_password: Wachtwoord opslaan + +- + btn_save: Wijzigingen opslaan - +btn_submit: Indienen + +- + btn_update: Bijwerken - @@ -654,6 +670,38 @@ editor_ui_browse: Bestanden doorbladeren - +email_hello: Hallo + +- + +email_automatic: Deze e-mail is automatisch verzonden. Gelieve deze e-mail niet te beantwoorden. + +- + +email_invite_subject: U bent toegevoegd als een nieuwe gebruiker! + +- + +email_invite_text: Een nieuw gebruikersaccount op {} is voor u gemaakt. U kunt de onderstaande knop gebruiken om uw wachtwoord te maken. + +- + +email_invite_button: Maak nu een wachtwoord + +- + +email_reset_password_subject: Uw authenticatie-token + +- + +email_reset_password_text_top: Het gevraagde authenticatietoken voor uw account op {} vindt u hieronder. U kunt die token gebruiken om nu een nieuw wachtwoord voor u te maken. + +- + +email_reset_password_text_bottom: Als u dit verzoek niet initieert, kunt u dit bericht veilig negeren. + +- + error_cache_purged: De cachemap kan niet worden verwijderd! - @@ -714,6 +762,10 @@ error_invalid_username: Ongeldige gebruikersnaam! Een gebruikersnaam kan alleen - +error_invalid_email: Ongeldig e-mail! Een e-mailadres kan alleen de volgende tekens bevatten: + +- + error_json: Ongeldige JSON! De inhoud van het configuratiebestand is niet correct opgemaakt. - @@ -742,10 +794,18 @@ error_password_reuse: Gebruik uw oude wachtwoord niet opnieuw! - +error_password_reset_verification: Het authenticatietoken is ongeldig of is al verlopen! + +- + error_permission: Toestemmingen geweigerd: - +error_send_email: Fout bij het verzenden van e-mail! + +- + error_template_missing: Sjabloon ontbreekt - @@ -778,6 +838,14 @@ error_update_permission: Kan update niet uitvoeren! Toestemmingen geweigerd! - +error_user_not_found: Ongeldige gebruikersnaam of e-mailadres. + +- + +error_user_no_email: Er is geen e-mailadres opgeslagen voor het gevraagde gebruikersaccount. + +- + error_var_exists: Er is al een variabele met die naam! - @@ -834,11 +902,11 @@ link_title: Voeg een link toe - -login_title: Log in +login_title: Log in op het dashboard - -login_username: Gebruikersnaam +login_name_or_email: Gebruikersnaam of email - @@ -950,6 +1018,22 @@ page_private: Privaat - +reset_password_title: Maak een wachtwoord + +- + +reset_password_enter_name_or_email: Voer uw gebruikersnaam of e-mailadres in om een authenticatietoken aan te vragen om een nieuw wachtwoord voor uw account aan te maken. + +- + +reset_password_enter_new_password: Een e-mail inclusief een authenticatietoken is net naar u verzonden. Voer die token nu hieronder in, samen met een nieuw wachtwoord. + +- + +reset_password_token: Authenticatie-token + +- + sidebar_header_global: Globaal - @@ -1050,11 +1134,11 @@ success_installed: Succesvol geïnstalleerd - -success_password_changed: Uw wachtwoord is succesvol gewijzigd! +success_password_changed: Je wachtwoord is met succes veranderd! - -success_log_out: Succesvol uitgelogd +success_log_out: Je bent succesvol uitgelogd! - @@ -1074,6 +1158,10 @@ success_update: Automad bijgewerkt! - +success_user_invite: De uitnodiging is succesvol verzonden. + +- + success_packages_updated_all: Alle pakketten zijn bijgewerkt - @@ -1206,39 +1294,47 @@ sys_user: Gebruikers - -sys_user_info: U kunt hier meer gebruikers toevoegen of verwijderen of uw wachtwoord wijzigen. +sys_user_info: Hier vindt u alle informatie die gerelateerd is aan uw account en uw gebruikersnaam, wachtwoord of e-mail wijzigen. Om uw wachtwoord per e-mail te kunnen resetten, moet u ervoor zorgen dat u een Vaild en Active E-mailadres hieronder hebt ingevoerd. - -sys_user_change_password: Wijzig uw wachtwoord +sys_user_add: Voeg gebruiker toe - -sys_user_change_password_current: Huidig wachtwoord +sys_user_invite: Nodig de gebruiker uit per e-mail - -sys_user_change_password_new: Nieuw paswoord +sys_user_name: Gebruikersnaam - -sys_user_change_password_repeat: Herhaal wachtwoord +sys_user_password: Wachtwoord - -sys_user_add: Voeg gebruiker toe +sys_user_repeat_password: Herhaal wachtwoord - -sys_user_add_name: Gebruikersnaam +sys_user_email: E-mail - -sys_user_add_password: Wachtwoord +sys_user_alert_no_email: U hebt nog geen geldig e-mailadres toegevoegd aan uw account. Merk op dat een geldig e-mailadres vereist is om uw wachtwoord opnieuw in te stellen. Klik hier om een e-mail nu toe te voegen. - -sys_user_add_repeat: Herhaal wachtwoord +sys_user_change_password: Wijzig uw wachtwoord + +- + +sys_user_current_password: huidig wachtwoord + +- + +sys_user_new_password: nieuw paswoord - @@ -1246,6 +1342,10 @@ sys_user_registered: Geregistreerde gebruikers - +sys_user_registered_info: Het is ook mogelijk om andere gebruikers te registreren om ervoor te zorgen dat ze inhoud kunnen bewerken. + +- + sys_user_you: U - diff --git a/automad/ui/lang/estonian.txt b/automad/ui/lang/estonian.txt index 2c9c8d229..184bfb0f1 100644 --- a/automad/ui/lang/estonian.txt +++ b/automad/ui/lang/estonian.txt @@ -66,6 +66,10 @@ btn_files: Üleslaaditud failid - +btn_forgot_password: Unustasid parooli + +- + btn_get_themes: Hankige rohkem teemasid - @@ -94,6 +98,10 @@ btn_inpage_edit: Lehesisene redigeerimisrežiim - +btn_invite: Saatke kutse + +- + btn_install: Installige - @@ -154,10 +162,18 @@ btn_reset: Lähtesta - +btn_save_password: Salvesta parool + +- + btn_save: Salvesta muudatused - +btn_submit: Esita + +- + btn_update: Uuenda - @@ -654,6 +670,38 @@ editor_ui_browse: Sirvi faile - +email_hello: Tere + +- + +email_automatic: See e-kiri on automaatselt saadetud. Palun ärge vastake sellele e-kirjale. + +- + +email_invite_subject: Te olete lisatud uue kasutajana! + +- + +email_invite_text: Teie jaoks on loodud uus kasutajakonto {}. Parooli loomiseks saate allolevat nuppu kasutada. + +- + +email_invite_button: Loo kohe parool + +- + +email_reset_password_subject: Teie autentimise sümbol + +- + +email_reset_password_text_top: Teie konto taotletud autentimise sümbol {} leiate allpool. Võite kasutada seda sümbolit, et luua teile uus parool. + +- + +email_reset_password_text_bottom: Kui te seda taotlust ise ei algatanud, saate seda sõnumit ohutult ignoreerida. + +- + error_cache_purged: Vahemälu kataloogi ei õnnestunud tühjendada! - @@ -686,7 +734,7 @@ error_login: Vale kasutajanimi või parool - -error_log_out: Sisselogimine ebaõnnestus! +error_log_out: Logi välja! - @@ -714,6 +762,10 @@ error_invalid_username: Vale kasutajanimi! Kasutajanimi võib sisaldada ainult j - +error_invalid_email: Kehtetu e-posti! E-posti aadress võib sisaldada ainult järgmisi märke: + +- + error_json: Kehtetu JSON! Konfiguratsioonifaili sisu pole õigesti vormindatud. - @@ -742,10 +794,18 @@ error_password_reuse: Ärge kasutage oma vana parooli uuesti! - +error_password_reset_verification: Autentimise sümboolne on kehtetu või on juba aegunud! + +- + error_permission: Keelatud load: - +error_send_email: E-kirja saatmine! + +- + error_template_missing: Mall puudub - @@ -778,6 +838,14 @@ error_update_permission: Värskendust ei saa käivitada! Lubadest keelduti! - +error_user_not_found: Kehtetu kasutajanimi või e-posti aadress. + +- + +error_user_no_email: Taotletud kasutajakonto jaoks pole e-posti aadressi salvestatud. + +- + error_var_exists: Selle nimega muutuja on juba olemas! - @@ -834,11 +902,11 @@ link_title: Lisa link - -login_title: Logi sisse +login_title: Logige armatuurlauale sisse - -login_username: Kasutajanimi +login_name_or_email: Kasutajanimi või email - @@ -846,7 +914,7 @@ login_password: Parool - -log_out_title: Välja logitud +log_out_title: Allkirjastanud - @@ -950,6 +1018,22 @@ page_private: Privaatne - +reset_password_title: Loo salasõna + +- + +reset_password_enter_name_or_email: Palun sisestage oma kasutajanimi või e-posti aadress, et taotleda autentimismärki, et luua teie kontole uus parool. + +- + +reset_password_enter_new_password: E-kiri, mis sisaldab autentimise sümbolit just teie jaoks. Palun sisestage see märgis nüüd allpool koos uue parooliga. + +- + +reset_password_token: Autentimise sümboolne + +- + sidebar_header_global: Ülemaailmne - @@ -1050,11 +1134,11 @@ success_installed: Installimine õnnestus - -success_password_changed: Teie parooli muutmine õnnestus! +success_password_changed: Teie parool on edukalt muudetud! - -success_log_out: Sisselogimine õnnestus +success_log_out: Te olete edukalt välja loginud! - @@ -1074,6 +1158,10 @@ success_update: Automadi uuendamine õnnestus! - +success_user_invite: Kutse on edukalt saadetud. + +- + success_packages_updated_all: Kõigi pakettide värskendamine õnnestus - @@ -1206,39 +1294,47 @@ sys_user: Kasutajad - -sys_user_info: Siin saate lisada või eemaldada rohkem kasutajaid või muuta oma parooli. +sys_user_info: Siit leiate kogu oma kontoga seotud teabe ja muuta oma kasutajanime, parooli või e-posti. Selleks, et parooli e-posti teel lähtestada, veenduge, et olete sisestanud Vaild ja aktiivne e-posti aadress allpool. - -sys_user_change_password: Parooli muutmine +sys_user_add: Lisa kasutaja - -sys_user_change_password_current: Praegune salasõna +sys_user_invite: Kutsu kasutaja e-posti teel - -sys_user_change_password_new: Uus salasõna +sys_user_name: Kasutajanimi - -sys_user_change_password_repeat: Korda salasõna +sys_user_password: Parool - -sys_user_add: Lisa kasutaja +sys_user_repeat_password: Korda salasõna - -sys_user_add_name: Kasutajanimi +sys_user_email: E-kiri - -sys_user_add_password: Parool +sys_user_alert_no_email: Te pole veel teie kontole veel kehtivat e-posti aadressi lisanud. Pange tähele, et teie parooli lähtestamiseks on vajalik kehtiv e-posti aadress. E-kirja lisamiseks klõpsake siia. - -sys_user_add_repeat: Korda salasõna +sys_user_change_password: Parooli muutmine + +- + +sys_user_current_password: Praegune salasõna + +- + +sys_user_new_password: uus salasõna - @@ -1246,6 +1342,10 @@ sys_user_registered: Registreeritud kasutajad - +sys_user_registered_info: Samuti on võimalik registreerida teisi kasutajaid, et võimaldada neil sisu muuta. + +- + sys_user_you: Sina - diff --git a/automad/ui/lang/finnish.txt b/automad/ui/lang/finnish.txt index 12a2f53af..08a4418be 100644 --- a/automad/ui/lang/finnish.txt +++ b/automad/ui/lang/finnish.txt @@ -66,6 +66,10 @@ btn_files: Ladatut tiedostot - +btn_forgot_password: Unohtuiko salasana + +- + btn_get_themes: Hanki lisää teemoja - @@ -94,6 +98,10 @@ btn_inpage_edit: Sivun muokkaustila - +btn_invite: Lähetä kutsu + +- + btn_install: Asentaa - @@ -102,7 +110,7 @@ btn_link: Linkki - -btn_log_out: Kirjautua ulos +btn_log_out: Kirjaudu ulos - @@ -154,10 +162,18 @@ btn_reset: Nollaa - +btn_save_password: Tallenna salasana + +- + btn_save: Tallenna muutokset - +btn_submit: Lähetä + +- + btn_update: Päivittää - @@ -654,6 +670,38 @@ editor_ui_browse: Selaa tiedostoja - +email_hello: Hei + +- + +email_automatic: Tämä sähköposti on lähetetty automaattisesti. Ole hyvä ja älä vastaa tähän sähköpostiin. + +- + +email_invite_subject: Olet lisätty uusi käyttäjä! + +- + +email_invite_text: Uusi käyttäjätili {} on luotu sinulle. Voit luoda salasanasi alla olevaan painikkeeseen. + +- + +email_invite_button: Luo salasana nyt + +- + +email_reset_password_subject: Todennusmerkki + +- + +email_reset_password_text_top: Pyydetty todennusmerkki tilillesi {} löytyy alla. Voit käyttää tätä tunnusta, jotta voit luoda uuden salasanan nyt. + +- + +email_reset_password_text_bottom: Jos et käynnistänyt tätä pyyntöä itse, voit turvallisesti sivuuttaa tämän viestin. + +- + error_cache_purged: Välimuistihakemistoa ei voitu tyhjentää! - @@ -686,7 +734,7 @@ error_login: Väärä käyttäjänimi tai salasana - -error_log_out: Kirjautuminen ulos epäonnistui! +error_log_out: Kirjaudu ulos epäonnistui! - @@ -714,6 +762,10 @@ error_invalid_username: Virheellinen käyttäjätunnus! Käyttäjätunnus voi si - +error_invalid_email: Virheellinen sähköpostiosoite! Sähköpostiosoite voi sisältää vain seuraavat merkit: + +- + error_json: Virheellinen JSON! Kokoonpanotiedoston sisältö ei ole alustettu oikein. - @@ -742,10 +794,18 @@ error_password_reuse: Älä käytä vanhaa salasanaasi uudelleen! - +error_password_reset_verification: Todennusmerkki on virheellinen tai on jo päättynyt jo! + +- + error_permission: Estetyt käyttöoikeudet: - +error_send_email: Virhe lähettämällä sähköpostia! + +- + error_template_missing: Malli puuttuu - @@ -778,6 +838,14 @@ error_update_permission: Päivitystä ei voi suorittaa! Luvat evätty! - +error_user_not_found: Virheellinen käyttäjätunnus tai sähköpostiosoite. + +- + +error_user_no_email: Pyydetty käyttäjätilille ei ole tallennettu sähköpostiosoitetta. + +- + error_var_exists: Tällä nimellä on jo muuttuja! - @@ -834,11 +902,11 @@ link_title: Lisää linkki - -login_title: Kirjaudu sisään +login_title: Kirjaudu sisään kojelautaan - -login_username: Käyttäjätunnus +login_name_or_email: Käyttäjätunnus tai sähköpostiosoite - @@ -846,7 +914,7 @@ login_password: Salasana - -log_out_title: Kirjautunut ulos +log_out_title: Kirjautui ulos - @@ -950,6 +1018,22 @@ page_private: Yksityinen - +reset_password_title: Luo salasana + +- + +reset_password_enter_name_or_email: Anna käyttäjätunnuksesi tai sähköpostiosoitteesi, jotta voit pyytää todennusmerkkiä luodaksesi uuden salasanan tilillesi. + +- + +reset_password_enter_new_password: Sähköposti, johon kuuluu todennusmerkki, on lähettänyt sinulle. Anna kyseinen tunnus nyt uuden salasanan kanssa. + +- + +reset_password_token: Todennusmerkki + +- + sidebar_header_global: Maailmanlaajuinen - @@ -1050,11 +1134,11 @@ success_installed: Asennus onnistui - -success_password_changed: Salasanasi vaihdettiin onnistuneesti! +success_password_changed: Salasanasi on vaihdettu onnistuneesti! - -success_log_out: Kirjautuminen ulos onnistuneesti +success_log_out: Olet onnistuneesti kirjautunut ulos! - @@ -1074,6 +1158,10 @@ success_update: Päivitetty Automad! - +success_user_invite: Kutsu on lähetetty onnistuneesti. + +- + success_packages_updated_all: Kaikkien pakettien päivittäminen onnistui - @@ -1206,39 +1294,47 @@ sys_user: Käyttäjät - -sys_user_info: Voit lisätä tai poistaa lisää käyttäjiä tai vaihtaa salasanasi täällä. +sys_user_info: Täältä löydät kaikki tilillesi liittyvät tiedot ja vaihda käyttäjätunnuksesi, salasanasi tai sähköpostiosoitteesi. Jotta voit palauttaa salasanasi sähköpostitse, varmista, että olet antanut alla olevan Vaild- ja aktiivisen sähköpostiosoitteen. - -sys_user_change_password: Vaihda salasanasi +sys_user_add: Lisää käyttäjä - -sys_user_change_password_current: Nykyinen salasana +sys_user_invite: Kutsu käyttäjä sähköpostitse - -sys_user_change_password_new: Uusi salasana +sys_user_name: Käyttäjätunnus - -sys_user_change_password_repeat: Toista salasana +sys_user_password: Salasana - -sys_user_add: Lisää käyttäjä +sys_user_repeat_password: Toista salasana - -sys_user_add_name: Käyttäjätunnus +sys_user_email: Sähköposti - -sys_user_add_password: Salasana +sys_user_alert_no_email: Et ole vielä lisännyt tiliisi voimassa olevaa sähköpostiosoitetta. Huomaa, että voimassa oleva sähköpostiosoite vaaditaan salasanan palauttamiseksi. Klikkaa tästä lisätäksesi sähköpostin nyt. - -sys_user_add_repeat: Toista salasana +sys_user_change_password: Vaihda salasanasi + +- + +sys_user_current_password: Nykyinen salasana + +- + +sys_user_new_password: uusi salasana - @@ -1246,6 +1342,10 @@ sys_user_registered: Rekisteröityneet käyttäjät - +sys_user_registered_info: On myös mahdollista rekisteröidä muita käyttäjiä, jotta ne voivat muokata sisältöä. + +- + sys_user_you: Sinä - diff --git a/automad/ui/lang/french.txt b/automad/ui/lang/french.txt index 26b9463dc..4682ad2e7 100644 --- a/automad/ui/lang/french.txt +++ b/automad/ui/lang/french.txt @@ -66,6 +66,10 @@ btn_files: Fichiers téléchargés - +btn_forgot_password: Mot de passe oublié + +- + btn_get_themes: Obtenez plus de thèmes - @@ -94,6 +98,10 @@ btn_inpage_edit: Mode d'édition sur la page - +btn_invite: Envoyer une invitation + +- + btn_install: Installer - @@ -102,7 +110,7 @@ btn_link: Lien - -btn_log_out: Se déconnecter +btn_log_out: Déconnexion - @@ -154,10 +162,18 @@ btn_reset: Réinitialiser - +btn_save_password: Enregistrer le mot de passe + +- + btn_save: Sauvegarder les modifications - +btn_submit: Soumettre + +- + btn_update: Mise à jour - @@ -654,6 +670,38 @@ editor_ui_browse: Parcourir les fichiers - +email_hello: Bonjour + +- + +email_automatic: Cet email a été envoyé automatiquement. S'il vous plait ne répondez pas à cet email. + +- + +email_invite_subject: Vous avez été ajouté comme nouvel utilisateur! + +- + +email_invite_text: Un nouveau compte d'utilisateur sur {} a été créé pour vous. Vous pouvez utiliser le bouton ci-dessous pour créer votre mot de passe. + +- + +email_invite_button: Créer un mot de passe maintenant + +- + +email_reset_password_subject: Votre jeton d'authentification + +- + +email_reset_password_text_top: Le jeton d'authentification demandé pour votre compte sur {} peut être trouvé ci-dessous. Vous pouvez utiliser ce jeton afin de créer un nouveau mot de passe pour vous maintenant. + +- + +email_reset_password_text_bottom: Si vous n'aviez pas initié cette demande vous-même, vous pouvez ignorer ce message en toute sécurité. + +- + error_cache_purged: Le répertoire de cache n'a pas pu être purgé! - @@ -686,7 +734,7 @@ error_login: Nom d'utilisateur ou mot de passe invalide - -error_log_out: La déconnexion a échoué! +error_log_out: Déconnexion a échoué! - @@ -714,6 +762,10 @@ error_invalid_username: Nom d'utilisateur invalide! Un nom d'utilisateur ne peut - +error_invalid_email: Email invalide! Une adresse e-mail ne peut contenir que les caractères suivants: + +- + error_json: JSON invalide! Le contenu du fichier de configuration n'est pas formaté correctement. - @@ -742,10 +794,18 @@ error_password_reuse: Ne réutilisez pas votre ancien mot de passe! - +error_password_reset_verification: Le jeton d'authentification n'est pas valide ou a déjà expiré! + +- + error_permission: Autorisations refusées: - +error_send_email: Erreur lors de l'envoi de courrier électronique! + +- + error_template_missing: Modèle manquant - @@ -778,6 +838,14 @@ error_update_permission: Impossible d'exécuter la mise à jour! Autorisations r - +error_user_not_found: Nom d'utilisateur ou adresse e-mail non valide. + +- + +error_user_no_email: Il n'y a pas d'adresse e-mail stockée pour le compte d'utilisateur demandé. + +- + error_var_exists: Il existe déjà une variable avec ce nom! - @@ -834,11 +902,11 @@ link_title: Ajouter un lien - -login_title: S'identifier +login_title: Connectez-vous au tableau de bord - -login_username: Nom d'utilisateur +login_name_or_email: Nom d'utilisateur ou email - @@ -846,7 +914,7 @@ login_password: Mot de passe - -log_out_title: Déconnecté +log_out_title: Se déconnecter - @@ -950,6 +1018,22 @@ page_private: Privée - +reset_password_title: Créer un mot de passe + +- + +reset_password_enter_name_or_email: Veuillez entrer votre nom d'utilisateur ou votre adresse e-mail afin de demander un jeton d'authentification pour créer un nouveau mot de passe pour votre compte. + +- + +reset_password_enter_new_password: Un email comprenant un jeton d'authentification vient de vous envoyer. Veuillez entrer ce jeton maintenant ci-dessous avec un nouveau mot de passe. + +- + +reset_password_token: Jeton d'authentification + +- + sidebar_header_global: Globale - @@ -1054,7 +1138,7 @@ success_password_changed: Votre mot de passe a été changé avec succès! - -success_log_out: Déconnexion réussie +success_log_out: Vous avez décollé avec succès! - @@ -1074,6 +1158,10 @@ success_update: Automad mis à jour avec succès! - +success_user_invite: L'invitation a été envoyée avec succès. + +- + success_packages_updated_all: Mise à jour réussie de tous les packages - @@ -1206,39 +1294,47 @@ sys_user: Utilisatrices - -sys_user_info: Vous pouvez ajouter ou supprimer d'autres utilisateurs ou modifier votre mot de passe ici. +sys_user_info: Vous trouverez ici toutes les informations relatives à votre compte et modifier votre nom d'utilisateur, votre mot de passe ou votre email. Pour pouvoir réinitialiser votre mot de passe par courrier électronique, assurez-vous que vous avez entré une adresse e-mail Vaild et Active ci-dessous. - -sys_user_change_password: Changez votre mot de passe +sys_user_add: Ajouter un utilisateur - -sys_user_change_password_current: Mot de passe actuel +sys_user_invite: Inviter l'utilisateur par email - -sys_user_change_password_new: Nouveau mot de passe +sys_user_name: Nom d'utilisateur - -sys_user_change_password_repeat: Répéter le mot de passe +sys_user_password: Mot de passe - -sys_user_add: Ajouter un utilisateur +sys_user_repeat_password: Répéter le mot de passe - -sys_user_add_name: Nom d'utilisateur +sys_user_email: E-mail - -sys_user_add_password: Mot de passe +sys_user_alert_no_email: Vous n'avez pas encore ajouté d'adresse électronique valide à votre compte. Notez qu'une adresse électronique valide est requise pour pouvoir réinitialiser votre mot de passe. Cliquez ici pour ajouter un email maintenant. - -sys_user_add_repeat: Répéter le mot de passe +sys_user_change_password: Changez votre mot de passe + +- + +sys_user_current_password: Mot de passe actuel + +- + +sys_user_new_password: nouveau mot de passe - @@ -1246,6 +1342,10 @@ sys_user_registered: Utilisateurs enregistrés - +sys_user_registered_info: Il est également possible d'enregistrer d'autres utilisateurs afin de leur permettre d'éditer du contenu. + +- + sys_user_you: Tue - diff --git a/automad/ui/lang/german.txt b/automad/ui/lang/german.txt index 1b287aae0..dfe6fcbee 100644 --- a/automad/ui/lang/german.txt +++ b/automad/ui/lang/german.txt @@ -66,6 +66,10 @@ btn_files: Hochgeladene Dateien - +btn_forgot_password: Passwort vergessen + +- + btn_get_themes: Holen Sie sich mehr Themen - @@ -94,6 +98,10 @@ btn_inpage_edit: In-Page-Bearbeitungsmodus - +btn_invite: Einladung senden + +- + btn_install: Installieren - @@ -106,7 +114,7 @@ btn_log_out: Ausloggen - -btn_login: Anmeldung +btn_login: Einloggen - @@ -154,10 +162,18 @@ btn_reset: Zurücksetzen - +btn_save_password: Passwort speichern + +- + btn_save: Änderungen speichern - +btn_submit: einreichen + +- + btn_update: Aktualisieren - @@ -654,6 +670,38 @@ editor_ui_browse: Dateien durchsuchen - +email_hello: Hallo + +- + +email_automatic: Diese E-Mail wurde automatisch gesendet. Bitte antworten Sie nicht auf diese Email. + +- + +email_invite_subject: Sie wurden als neuer Benutzer hinzugefügt! + +- + +email_invite_text: Für Sie wurde ein neues Benutzerkonto auf {} erstellt. Sie können die Schaltfläche unten verwenden, um Ihr Passwort zu erstellen. + +- + +email_invite_button: Kennwort jetzt erstellen. + +- + +email_reset_password_subject: Ihr Authentifizierungstoken + +- + +email_reset_password_text_top: Das angeforderte Authentifizierungstoken für Ihr Konto auf {} finden Sie unten. Sie können dieses Token verwenden, um jetzt ein neues Passwort für Sie zu erstellen. + +- + +email_reset_password_text_bottom: Falls Sie diese Anfrage nicht selbst initiiert haben, können Sie diese Nachricht sicher ignorieren. + +- + error_cache_purged: Das Cache-Verzeichnis konnte nicht gelöscht werden! - @@ -714,6 +762,10 @@ error_invalid_username: Ungültiger Benutzername! Ein Benutzername kann nur die - +error_invalid_email: Ungültige E-Mail! Eine E-Mail-Adresse kann nur die folgenden Zeichen enthalten: + +- + error_json: Ungültiger JSON! Der Inhalt der Konfigurationsdatei ist nicht korrekt formatiert. - @@ -742,10 +794,18 @@ error_password_reuse: Verwenden Sie Ihr altes Passwort nicht wieder! - +error_password_reset_verification: Das Authentifizierungstoken ist ungültig oder ist bereits abgelaufen! + +- + error_permission: Berechtigungen verweigert: - +error_send_email: Fehler beim Senden von E-Mails! + +- + error_template_missing: Vorlage fehlt - @@ -778,6 +838,14 @@ error_update_permission: Update kann nicht ausgeführt werden! Berechtigungen ve - +error_user_not_found: Ungültiger Benutzername oder E-Mail-Adresse. + +- + +error_user_no_email: Für das angeforderte Benutzerkonto gibt es keine E-Mail-Adresse. + +- + error_var_exists: Es gibt bereits eine Variable mit diesem Namen! - @@ -834,11 +902,11 @@ link_title: Link hinzufügen - -login_title: Einloggen +login_title: Melden Sie sich beim Dashboard an - -login_username: Nutzername +login_name_or_email: Benutzername oder E-Mail-Adresse - @@ -950,6 +1018,22 @@ page_private: Privat - +reset_password_title: Passwort erstellen + +- + +reset_password_enter_name_or_email: Bitte geben Sie Ihren Benutzernamen- oder E-Mail-Adresse ein, um ein Authentifizierungs-Token anzufordern, um ein neues Passwort für Ihr Konto zu erstellen. + +- + +reset_password_enter_new_password: Eine E-Mail mit einem Authentifizierungstoken ist nur an Sie gesendet. Bitte geben Sie dieses Token jetzt unten mit einem neuen Passwort ein. + +- + +reset_password_token: Authentifizierungstoken + +- + sidebar_header_global: Global - @@ -1054,7 +1138,7 @@ success_password_changed: Ihr Passwort wurde erfolgreich geändert! - -success_log_out: Erfolgreich abgemeldet +success_log_out: Du hast dich erfolgreich abgemeldet! - @@ -1074,6 +1158,10 @@ success_update: Automad erfolgreich aktualisiert! - +success_user_invite: Die Einladung wurde erfolgreich gesendet. + +- + success_packages_updated_all: Alle Pakete erfolgreich aktualisiert - @@ -1206,39 +1294,47 @@ sys_user: Benutzer - -sys_user_info: Hier können Sie weitere Benutzer hinzufügen oder entfernen oder Ihr Passwort ändern. +sys_user_info: Hier finden Sie alle Informationen zu Ihrem Konto und ändern Ihren Benutzernamen, Ihr Passwort oder Ihre E-Mail-Adresse. Um Ihr Passwort per E-Mail zurücksetzen zu können, stellen Sie sicher, dass Sie unten eine Vaild- und aktive E-Mail-Adresse eingegeben haben. - -sys_user_change_password: Ändern Sie Ihr Passwort +sys_user_add: Benutzer hinzufügen - -sys_user_change_password_current: Derzeitiges Passwort +sys_user_invite: Benutzer per E-Mail einladen - -sys_user_change_password_new: Neues Kennwort +sys_user_name: Nutzername - -sys_user_change_password_repeat: Wiederhole das Passwort +sys_user_password: Passwort - -sys_user_add: Benutzer hinzufügen +sys_user_repeat_password: Passwort wiederholen - -sys_user_add_name: Nutzername +sys_user_email: Email - -sys_user_add_password: Passwort +sys_user_alert_no_email: Sie haben Ihrem Konto noch keine gültige E-Mail-Adresse hinzugefügt. Beachten Sie, dass eine gültige E-Mail-Adresse erforderlich ist, um Ihr Passwort zurücksetzen zu können. Klicken Sie hier, um jetzt eine E-Mail hinzuzufügen. - -sys_user_add_repeat: Wiederhole das Passwort +sys_user_change_password: Ändern Sie Ihr Passwort + +- + +sys_user_current_password: Aktuelles Passwort + +- + +sys_user_new_password: Neues Kennwort - @@ -1246,6 +1342,10 @@ sys_user_registered: Registrierte Benutzer - +sys_user_registered_info: Es ist auch möglich, andere Benutzer zu registrieren, damit sie Inhalte bearbeiten können. + +- + sys_user_you: Du - diff --git a/automad/ui/lang/greek.txt b/automad/ui/lang/greek.txt index 003a948dd..f96bc4037 100644 --- a/automad/ui/lang/greek.txt +++ b/automad/ui/lang/greek.txt @@ -66,6 +66,10 @@ btn_files: Μεταφορτωμένα αρχεία - +btn_forgot_password: Ξεχάσατε τον κωδικό + +- + btn_get_themes: Λάβετε περισσότερα θέματα - @@ -94,6 +98,10 @@ btn_inpage_edit: Λειτουργία επεξεργασίας στη σελίδ - +btn_invite: Στελνω ΠΡΟΣΚΛΗΣΗ + +- + btn_install: Εγκαθιστώ - @@ -106,7 +114,7 @@ btn_log_out: Αποσύνδεση - -btn_login: Σύνδεση +btn_login: Συνδεθείτε - @@ -154,10 +162,18 @@ btn_reset: Επαναφορά - +btn_save_password: Αποθήκευση κωδικού + +- + btn_save: Αποθήκευσε τις αλλαγές - +btn_submit: υποβάλλουν + +- + btn_update: Εκσυγχρονίζω - @@ -654,6 +670,38 @@ editor_ui_browse: ΕΞΕΡΕΥΝΗΣΗ ΑΡΧΕΙΩΝ - +email_hello: γεια σας + +- + +email_automatic: Αυτό το μήνυμα ηλεκτρονικού ταχυδρομείου έχει σταλεί αυτόματα. Παρακαλώ μην απαντήσετε σε αυτό το μήνυμα ηλεκτρονικού ταχυδρομείου. + +- + +email_invite_subject: Έχετε προστεθεί ως νέος χρήστης! + +- + +email_invite_text: Ένας νέος λογαριασμός χρήστη στο {} δημιουργήθηκε για εσάς. Μπορείτε να χρησιμοποιήσετε το παρακάτω κουμπί για να δημιουργήσετε τον κωδικό πρόσβασής σας. + +- + +email_invite_button: Δημιουργία κωδικού πρόσβασης τώρα + +- + +email_reset_password_subject: Το διακριτικό ελέγχου ταυτότητας + +- + +email_reset_password_text_top: Το ζήτημα που ζητήσατε έλεγχο ταυτότητας για το λογαριασμό σας στο {} μπορεί να βρεθεί παρακάτω. Μπορείτε να χρησιμοποιήσετε αυτό το διακριτικό για να δημιουργήσετε έναν νέο κωδικό πρόσβασης για εσάς τώρα. + +- + +email_reset_password_text_bottom: Σε περίπτωση που δεν το κάνατε αυτό το αίτημα, μπορείτε να αγνοήσετε με ασφάλεια αυτό το μήνυμα. + +- + error_cache_purged: Δεν ήταν δυνατή η εκκαθάριση του καταλόγου προσωρινής μνήμης! - @@ -686,7 +734,7 @@ error_login: μη έγκυρο όνομα ή κωδικός - -error_log_out: Η αποσύνδεση απέτυχε! +error_log_out: Η αποστολή απέτυχε! - @@ -714,6 +762,10 @@ error_invalid_username: Μη έγκυρο όνομα χρήστη! Ένα όνο - +error_invalid_email: Ακυρη διεύθυνση ηλεκτρονικού ταχυδρομείου! Μια διεύθυνση ηλεκτρονικού ταχυδρομείου μπορεί να περιέχει μόνο τους ακόλουθους χαρακτήρες: + +- + error_json: Μη έγκυρο JSON! Τα περιεχόμενα του αρχείου διαμόρφωσης δεν έχουν μορφοποιηθεί σωστά. - @@ -742,10 +794,18 @@ error_password_reuse: Μην ξαναχρησιμοποιήσετε τον πα - +error_password_reset_verification: Το διακριτικό ελέγχου ταυτότητας δεν είναι έγκυρο ή έχει ήδη λήξει! + +- + error_permission: Τα δικαιώματα απορρίφθηκαν: - +error_send_email: Σφάλμα στέλνοντας το ηλεκτρονικό ταχυδρομείο! + +- + error_template_missing: Λείπει πρότυπο - @@ -778,6 +838,14 @@ error_update_permission: Δεν είναι δυνατή η εκτέλεση εν - +error_user_not_found: Μη έγκυρο όνομα χρήστη ή διεύθυνση ηλεκτρονικού ταχυδρομείου. + +- + +error_user_no_email: Δεν υπάρχει αποθηκευμένη διεύθυνση ηλεκτρονικού ταχυδρομείου για τον απαιτούμενο λογαριασμό χρήστη. + +- + error_var_exists: Υπάρχει ήδη μια μεταβλητή με αυτό το όνομα! - @@ -834,11 +902,11 @@ link_title: Προσθήκη συνδέσμου - -login_title: Σύνδεση +login_title: Συνδεθείτε στο ταμπλό - -login_username: Όνομα χρήστη +login_name_or_email: Ονομα χρήστη ή διεύθυνση ηλεκτρονικού ταχυδρομίου - @@ -846,7 +914,7 @@ login_password: Κωδικός πρόσβασης - -log_out_title: Αποσυνδέθηκα +log_out_title: Αποσυνδέθηκε - @@ -950,6 +1018,22 @@ page_private: ιδιωτικός - +reset_password_title: Δημιούργησε κωδικό + +- + +reset_password_enter_name_or_email: Εισαγάγετε το όνομα χρήστη ή τη διεύθυνση ηλεκτρονικού ταχυδρομείου σας για να ζητήσετε ένα αναγνωριστικό ελέγχου ταυτότητας για να δημιουργήσετε έναν νέο κωδικό πρόσβασης για το λογαριασμό σας. + +- + +reset_password_enter_new_password: Ένα μήνυμα ηλεκτρονικού ταχυδρομείου που περιλαμβάνει ένα διακριτικό ελέγχου ταυτότητας μόλις σας στείλει. Εισαγάγετε αυτό το διακριτικό τώρα παρακάτω μαζί με έναν νέο κωδικό πρόσβασης. + +- + +reset_password_token: Έλεγχος ταυτότητας + +- + sidebar_header_global: Παγκόσμια - @@ -1050,11 +1134,11 @@ success_installed: Εγκαταστάθηκε επιτυχώς - -success_password_changed: Ο κωδικός πρόσβασής σας άλλαξε με επιτυχία! +success_password_changed: Ο κωδικός πρόσβασής σας έχει αλλάξει με επιτυχία! - -success_log_out: Αποσυνδεθήκαμε με επιτυχία +success_log_out: Έχετε αποσυνδεθεί με επιτυχία! - @@ -1074,6 +1158,10 @@ success_update: Το Automad ενημερώθηκε με επιτυχία! - +success_user_invite: Η πρόσκληση έχει σταλεί με επιτυχία. + +- + success_packages_updated_all: Ενημερώθηκαν επιτυχώς όλα τα πακέτα - @@ -1206,39 +1294,47 @@ sys_user: Χρήστες - -sys_user_info: Μπορείτε να προσθέσετε ή να καταργήσετε περισσότερους χρήστες ή να αλλάξετε τον κωδικό πρόσβασής σας εδώ. +sys_user_info: Εδώ μπορείτε να βρείτε όλες τις πληροφορίες σχετικά με το λογαριασμό σας και να αλλάξετε το όνομα χρήστη, τον κωδικό πρόσβασης ή το ηλεκτρονικό ταχυδρομείο. Για να μπορέσετε να επαναφέρετε τον κωδικό πρόσβασής σας μέσω ηλεκτρονικού ταχυδρομείου, βεβαιωθείτε ότι έχετε εισάγει ένα Vaild και ενεργό διεύθυνση ηλεκτρονικού ταχυδρομείου παρακάτω. - -sys_user_change_password: Αλλάξτε τον κωδικό σας +sys_user_add: Πρόσθεσε χρήστη - -sys_user_change_password_current: Τρέχων κωδικός πρόσβασης +sys_user_invite: Προσκαλέστε το χρήστη μέσω ηλεκτρονικού ταχυδρομείου - -sys_user_change_password_new: Νέος Κωδικός +sys_user_name: Όνομα χρήστη - -sys_user_change_password_repeat: Επανάληψη κωδικού πρόσβασης +sys_user_password: Κωδικός πρόσβασης - -sys_user_add: Πρόσθεσε χρήστη +sys_user_repeat_password: Επαναλάβετε τον κωδικό πρόσβασης - -sys_user_add_name: Όνομα χρήστη +sys_user_email: ΗΛΕΚΤΡΟΝΙΚΗ ΔΙΕΥΘΥΝΣΗ - -sys_user_add_password: Κωδικός πρόσβασης +sys_user_alert_no_email: Δεν έχετε προσθέσει ακόμα μια έγκυρη διεύθυνση ηλεκτρονικού ταχυδρομείου στο λογαριασμό σας. Σημειώστε ότι απαιτείται έγκυρη διεύθυνση ηλεκτρονικού ταχυδρομείου για να μπορέσετε να επαναφέρετε τον κωδικό πρόσβασής σας. Κάντε κλικ εδώ για να προσθέσετε ένα μήνυμα ηλεκτρονικού ταχυδρομείου τώρα. - -sys_user_add_repeat: Επανάληψη κωδικού πρόσβασης +sys_user_change_password: Αλλάξτε τον κωδικό σας + +- + +sys_user_current_password: Τρέχον κωδικό πρόσβασης + +- + +sys_user_new_password: Νέος Κωδικός - @@ -1246,6 +1342,10 @@ sys_user_registered: εγγεγραμμένοι χρήστες - +sys_user_registered_info: Είναι επίσης δυνατή η εγγραφή άλλων χρηστών προκειμένου να τους επιτρέψουν να επεξεργαστούν το περιεχόμενο. + +- + sys_user_you: Εσύ - diff --git a/automad/ui/lang/icelandic.txt b/automad/ui/lang/icelandic.txt index ac37fa5d5..fac7e91b5 100644 --- a/automad/ui/lang/icelandic.txt +++ b/automad/ui/lang/icelandic.txt @@ -66,6 +66,10 @@ btn_files: Sendar skrár - +btn_forgot_password: Gleymt lykilorð + +- + btn_get_themes: Fáðu fleiri þemu - @@ -94,6 +98,10 @@ btn_inpage_edit: Breytingarstilling á síðu - +btn_invite: Senda boð + +- + btn_install: Setja upp - @@ -102,11 +110,11 @@ btn_link: Tengill - -btn_log_out: Að skrá þig út +btn_log_out: Útskrá - -btn_login: Skrá inn +btn_login: Skráðu þig inn - @@ -154,10 +162,18 @@ btn_reset: Endurstilla - +btn_save_password: Vista lykilorð + +- + btn_save: Vista breytingar - +btn_submit: Sendu inn + +- + btn_update: Uppfærsla - @@ -654,6 +670,38 @@ editor_ui_browse: Skoðaðu skrár - +email_hello: Halló + +- + +email_automatic: Þessi tölvupóstur hefur verið sendur sjálfkrafa. Vinsamlegast svaraðu ekki þessum tölvupósti. + +- + +email_invite_subject: Þú hefur verið bætt við sem nýjan notanda! + +- + +email_invite_text: Ný notendareikningur á {} hefur verið búið til fyrir þig. Þú getur notað hnappinn hér að neðan til að búa til lykilorðið þitt. + +- + +email_invite_button: Búðu til lykilorð núna + +- + +email_reset_password_subject: Staðfestingarmerkið þitt + +- + +email_reset_password_text_top: Umbeðin staðfestingarmerki fyrir reikninginn þinn á {} má finna hér að neðan. Þú getur notað þessi tákn til að búa til nýtt lykilorð fyrir þig núna. + +- + +email_reset_password_text_bottom: Ef þú hefur ekki byrjað á þessari beiðni sjálfur geturðu örugglega hunsað þessa skilaboð. + +- + error_cache_purged: Ekki var hægt að hreinsa skyndiminnismöppuna! - @@ -686,7 +734,7 @@ error_login: Rangt notandanafn eða lykilorð - -error_log_out: Útskráning mistókst! +error_log_out: Skráðu þig mistókst! - @@ -714,6 +762,10 @@ error_invalid_username: Ógilt notandanafn! Notandanafn getur aðeins innihaldi - +error_invalid_email: Ógilt netfang! Netfang getur aðeins innihaldið eftirfarandi stafi: + +- + error_json: Ógilt JSON! Innihald stillingarskrárinnar er ekki sniðið rétt. - @@ -742,10 +794,18 @@ error_password_reuse: Ekki endurnýta gamla lykilorðið þitt! - +error_password_reset_verification: Staðfestingarmerkið er ógilt eða hefur útrunnið þegar! + +- + error_permission: Heimildum hafnað: - +error_send_email: Villa við að senda tölvupóst! + +- + error_template_missing: Sniðmát vantar - @@ -778,6 +838,14 @@ error_update_permission: Get ekki keyrt uppfærslu! Leyfi hafnað! - +error_user_not_found: Ógilt notandanafn eða netfang. + +- + +error_user_no_email: Það er ekkert netfang sem er geymt fyrir umbeðna notendareikninginn. + +- + error_var_exists: Það er þegar til breyta með því nafni! - @@ -834,11 +902,11 @@ link_title: Bæta við hlekk - -login_title: Skrá inn +login_title: Skráðu þig inn á mælaborðið - -login_username: Notendanafn +login_name_or_email: Notendanafn eða tölvupóstur - @@ -846,7 +914,7 @@ login_password: Lykilorð - -log_out_title: Útskráður +log_out_title: Undirritaður út - @@ -950,6 +1018,22 @@ page_private: Einkaaðila - +reset_password_title: Búa til lykilorð + +- + +reset_password_enter_name_or_email: Vinsamlegast sláðu inn notendanafnið þitt eða netfangið þitt til að biðja um staðfestingarmerki til að búa til nýtt lykilorð fyrir reikninginn þinn. + +- + +reset_password_enter_new_password: Netfang þar á meðal staðfestingarmerki hefur bara verið send til þín. Vinsamlegast sláðu inn þessi tákn núna fyrir neðan með nýju lykilorði. + +- + +reset_password_token: Staðfestingarmerki + +- + sidebar_header_global: Alheimslegt - @@ -1050,11 +1134,11 @@ success_installed: Vel uppsett - -success_password_changed: Lykilorðinu þínu var breytt! +success_password_changed: Lykilorðið þitt hefur verið breytt með góðum árangri! - -success_log_out: Útskráður tókst +success_log_out: Þú hefur skráð þig inn! - @@ -1074,6 +1158,10 @@ success_update: Tókst að uppfæra Automad! - +success_user_invite: Boðið hefur verið sent með góðum árangri. + +- + success_packages_updated_all: Allir pakkar uppfærðir - @@ -1206,39 +1294,47 @@ sys_user: Notendur - -sys_user_info: Þú getur bætt við eða fjarlægt fleiri notendur eða breytt lykilorðinu þínu hér. +sys_user_info: Hér getur þú fundið allar upplýsingar sem tengjast reikningnum þínum og breyttu notendanafninu, lykilorðinu eða tölvupósti. Til þess að geta endurstillt lykilorðið þitt með tölvupósti skaltu ganga úr skugga um að þú hafir slegið inn Vail og Active Netfang hér að neðan. - -sys_user_change_password: Breyttu lykilorðinu þínu +sys_user_add: Bæta við notanda - -sys_user_change_password_current: Núverandi lykilorð +sys_user_invite: Bjóddu notanda með tölvupósti - -sys_user_change_password_new: Nýtt lykilorð +sys_user_name: Notandanafn - -sys_user_change_password_repeat: Endurtaktu lykilorð +sys_user_password: Lykilorð - -sys_user_add: Bæta við notanda +sys_user_repeat_password: Endurtaktu lykilorð - -sys_user_add_name: Notendanafn +sys_user_email: Email. - -sys_user_add_password: Lykilorð +sys_user_alert_no_email: Þú hefur ekki enn bætt við gilt netfangi á reikninginn þinn. Athugaðu að gilt netfang er nauðsynlegt til að geta endurstillt lykilorðið þitt. Smelltu hér til að bæta við tölvupósti núna. - -sys_user_add_repeat: Endurtaktu lykilorð +sys_user_change_password: Breyttu lykilorðinu þínu + +- + +sys_user_current_password: Núverandi lykilorð + +- + +sys_user_new_password: nýtt lykilorð - @@ -1246,6 +1342,10 @@ sys_user_registered: Skráðir notendur - +sys_user_registered_info: Einnig er hægt að skrá aðra notendur til að leyfa þeim að breyta efni. + +- + sys_user_you: Þú - diff --git a/automad/ui/lang/irish.txt b/automad/ui/lang/irish.txt index 7b64d0e8b..7793f4df7 100644 --- a/automad/ui/lang/irish.txt +++ b/automad/ui/lang/irish.txt @@ -66,6 +66,10 @@ btn_files: Comhaid Uaslódáilte - +btn_forgot_password: Dearmad ar pasfhocal + +- + btn_get_themes: Faigh Tuilleadh Téamaí - @@ -94,6 +98,10 @@ btn_inpage_edit: Mód Eagarthóireachta In-Leathanach - +btn_invite: Seol Cuireadh + +- + btn_install: Suiteáil - @@ -106,7 +114,7 @@ btn_log_out: Logáil Amach - -btn_login: Logáil isteach +btn_login: Sínigh isteach - @@ -154,10 +162,18 @@ btn_reset: Athshocraigh - +btn_save_password: Sábháil an focal faire + +- + btn_save: Sabháil na hathruithe - +btn_submit: Cuir isteach + +- + btn_update: Nuashonrú - @@ -654,6 +670,38 @@ editor_ui_browse: Brabhsáil na comhaid - +email_hello: Dia dhuit + +- + +email_automatic: Seoladh an ríomhphost seo go huathoibríoch. Ná tabhair freagra ar an ríomhphost seo le do thoil. + +- + +email_invite_subject: Tá tú curtha isteach mar úsáideoir nua! + +- + +email_invite_text: Cruthaíodh cuntas úsáideora nua ar {} duitse. Is féidir leat an cnaipe thíos a úsáid chun do phasfhocal a chruthú. + +- + +email_invite_button: Cruthaigh pasfhocal anois + +- + +email_reset_password_subject: Do chomhartha fíordheimhnithe + +- + +email_reset_password_text_top: Is féidir an dearbhán fíordheimhnithe iarrtha do do chuntas ar {} a fháil thíos. Is féidir leat an comhartha sin a úsáid chun pasfhocal nua a chruthú duit anois. + +- + +email_reset_password_text_bottom: Sa chás nár chuir tú tús leis an iarratas seo féin, is féidir leat neamhaird a dhéanamh go sábháilte an teachtaireacht seo. + +- + error_cache_purged: Ní fhéadfaí an t-eolaire taisce a ghlanadh! - @@ -686,7 +734,7 @@ error_login: Ainm úsáideora nó pasfhocal neamhbhailí - -error_log_out: Theip ar logáil amach! +error_log_out: Theip ar shíniú amach! - @@ -714,6 +762,10 @@ error_invalid_username: Ainm Úsáideora neamhbhailí! Ní féidir ach na carach - +error_invalid_email: R-phost neamhbhailí! Ní féidir ach na carachtair seo a leanas a bheith i seoladh ríomhphoist: + +- + error_json: JSON neamhbhailí! Níl ábhar an chomhaid chumraíochta formáidithe i gceart. - @@ -742,10 +794,18 @@ error_password_reuse: Ná athúsáid do sheanfhocal faire! - +error_password_reset_verification: Tá an dearbhán fíordheimhnithe neamhbhailí nó tá sé imithe in éag cheana féin! + +- + error_permission: Diúltaíodh ceadanna: - +error_send_email: Earráid ag seoladh r-phost! + +- + error_template_missing: Teimpléad ar iarraidh - @@ -778,6 +838,14 @@ error_update_permission: Ní féidir nuashonrú a reáchtáil! Diúltaíodh cead - +error_user_not_found: Ainm Úsáideora Neamhbhailí nó Seoladh Ríomhphoist. + +- + +error_user_no_email: Níl aon seoladh ríomhphoist stóráilte don chuntas úsáideora iarrtha. + +- + error_var_exists: Tá athróg ann cheana leis an ainm sin! - @@ -834,11 +902,11 @@ link_title: Cuir Nasc leis - -login_title: Logáil isteach +login_title: Sínigh isteach sa phainéal - -login_username: Ainm úsáideora +login_name_or_email: Ainm Úsáideora nó R-phost - @@ -846,7 +914,7 @@ login_password: Pasfhocal - -log_out_title: Logáilte Amach +log_out_title: Sínithe amach - @@ -950,6 +1018,22 @@ page_private: Príobháideach - +reset_password_title: Ceap pasfhocal + +- + +reset_password_enter_name_or_email: Cuir isteach d'ainm úsáideora nó do sheoladh ríomhphoist le do thoil chun dearbhán fíordheimhnithe a iarraidh chun pasfhocal nua a chruthú do do chuntas. + +- + +reset_password_enter_new_password: Tá ríomhphost lena n-áirítear dearbhán fíordheimhnithe curtha chugat. Cuir isteach an comhartha sin thíos mar aon le pasfhocal nua. + +- + +reset_password_token: Dearbhán fíordheimhnithe + +- + sidebar_header_global: Domhanda - @@ -1054,7 +1138,7 @@ success_password_changed: Athraíodh do phasfhocal go rathúil! - -success_log_out: Logáilte Amach go rathúil +success_log_out: Tá tú logáilte amach go rathúil! - @@ -1074,6 +1158,10 @@ success_update: Automad nuashonraithe go rathúil! - +success_user_invite: Seoladh an cuireadh go rathúil. + +- + success_packages_updated_all: Rinneadh gach pacáiste a nuashonrú go rathúil - @@ -1206,39 +1294,47 @@ sys_user: Úsáideoirí - -sys_user_info: Féadfaidh tú níos mó úsáideoirí a chur leis nó a bhaint nó do phasfhocal a athrú anseo. +sys_user_info: Anseo, is féidir leat teacht ar an eolas go léir a bhaineann le do chuntas agus d'ainm úsáideora, pasfhocal nó ríomhphost a athrú. D'fhonn a bheith in ann do phasfhocal a athshocrú trí ríomhphost, déan cinnte go bhfuil seoladh ríomhphoist sínte agus gníomhach agat thíos. - -sys_user_change_password: Athraigh Do Pasfhocal +sys_user_add: Cuir Úsáideoir leis - -sys_user_change_password_current: Pasfhocal reatha +sys_user_invite: Tabhair cuireadh don úsáideoir trí ríomhphost - -sys_user_change_password_new: Focal Faire Nua +sys_user_name: Ainm úsáideora - -sys_user_change_password_repeat: Athscríobh an Pasfhocal +sys_user_password: Pasfhocal - -sys_user_add: Cuir Úsáideoir leis +sys_user_repeat_password: Athscríobh an Pasfhocal - -sys_user_add_name: Ainm úsáideora +sys_user_email: Ríomhphost a chur chuig - -sys_user_add_password: Pasfhocal +sys_user_alert_no_email: Níor chuir tú seoladh ríomhphoist bailí leis go fóill chuig do chuntas. Tabhair faoi deara go bhfuil gá le seoladh ríomhphoist bailí chun go mbeidh tú in ann do phasfhocal a athshocrú. Cliceáil anseo chun ríomhphost a chur leis anois. - -sys_user_add_repeat: Athscríobh an Pasfhocal +sys_user_change_password: Athraigh Do Pasfhocal + +- + +sys_user_current_password: Pasfhocal reatha + +- + +sys_user_new_password: Focal Faire Nua - @@ -1246,6 +1342,10 @@ sys_user_registered: Úsáideoirí Cláraithe - +sys_user_registered_info: Is féidir úsáideoirí eile a chlárú freisin chun ligean dóibh ábhar a chur in eagar. + +- + sys_user_you: Tú - diff --git a/automad/ui/lang/italian.txt b/automad/ui/lang/italian.txt index 834d08ccf..515eebca5 100644 --- a/automad/ui/lang/italian.txt +++ b/automad/ui/lang/italian.txt @@ -66,6 +66,10 @@ btn_files: File caricati - +btn_forgot_password: Ha dimenticato la password + +- + btn_get_themes: Ottieni più temi - @@ -94,6 +98,10 @@ btn_inpage_edit: Modalità di modifica in-page - +btn_invite: Spedire un invito + +- + btn_install: Installare - @@ -102,11 +110,11 @@ btn_link: Link - -btn_log_out: Disconnettersi +btn_log_out: disconnessione - -btn_login: Accesso +btn_login: Registrazione - @@ -154,10 +162,18 @@ btn_reset: Ripristina - +btn_save_password: Salva la password + +- + btn_save: Salvare le modifiche - +btn_submit: Invia + +- + btn_update: Aggiornare - @@ -654,6 +670,38 @@ editor_ui_browse: Sfoglia i file - +email_hello: Ciao + +- + +email_automatic: Questa email è stata inviata automaticamente. Per favore non rispondere a questa email. + +- + +email_invite_subject: Sei stato aggiunto come un nuovo utente! + +- + +email_invite_text: È stato creato un nuovo account utente su {} per te. È possibile utilizzare il pulsante qui sotto per creare la tua password. + +- + +email_invite_button: Crea password ora + +- + +email_reset_password_subject: Il tuo token di autenticazione + +- + +email_reset_password_text_top: Il token di autenticazione richiesto per il tuo account su {} può essere trovato di seguito. Puoi usare quel token per creare una nuova password per te ora. + +- + +email_reset_password_text_bottom: Nel caso in cui non hai iniziato questa richiesta, puoi tranquillamente ignorare questo messaggio. + +- + error_cache_purged: La directory della cache non può essere eliminata! - @@ -686,7 +734,7 @@ error_login: Nome utente o password errati - -error_log_out: Logout fallito! +error_log_out: Firmi fallito! - @@ -714,6 +762,10 @@ error_invalid_username: Nome utente non valido! Un nome utente può contenere so - +error_invalid_email: E-mail non valido! Un indirizzo email può contenere solo i seguenti caratteri: + +- + error_json: JSON non valido! Il contenuto del file di configurazione non è formattato correttamente. - @@ -742,10 +794,18 @@ error_password_reuse: Non riutilizzare la vecchia password! - +error_password_reset_verification: Il token di autenticazione non è valido o è già scaduto! + +- + error_permission: Autorizzazioni negate: - +error_send_email: Errore durante l'invio di email! + +- + error_template_missing: Modello mancante - @@ -778,6 +838,14 @@ error_update_permission: Impossibile eseguire l'aggiornamento! Autorizzazioni ne - +error_user_not_found: Nome utente o indirizzo email non valido. + +- + +error_user_no_email: Non esiste un indirizzo email memorizzato per l'account utente richiesto. + +- + error_var_exists: Esiste già una variabile con quel nome! - @@ -834,11 +902,11 @@ link_title: Aggiungi collegamento - -login_title: Accesso +login_title: Accedi al cruscotto - -login_username: Nome utente +login_name_or_email: Nome utente o email - @@ -950,6 +1018,22 @@ page_private: Privata - +reset_password_title: Crea password + +- + +reset_password_enter_name_or_email: Inserisci il tuo nome utente o indirizzo email per richiedere un token di autenticazione per creare una nuova password per il tuo account. + +- + +reset_password_enter_new_password: Una e-mail inclusa un token di autenticazione è stato inviato solo a te. Si prega di inserire quel token ora sotto con una nuova password. + +- + +reset_password_token: Token di autenticazione + +- + sidebar_header_global: Globale - @@ -1050,11 +1134,11 @@ success_installed: Installato con successo - -success_password_changed: La tua password è stata modificata con successo! +success_password_changed: La tua password è stata cambiata con successo! - -success_log_out: Disconnesso con successo +success_log_out: Ti sei disconnesso con successo! - @@ -1074,6 +1158,10 @@ success_update: Automad aggiornato con successo! - +success_user_invite: L'invito è stato inviato con successo. + +- + success_packages_updated_all: Aggiornato con successo tutti i pacchetti - @@ -1206,39 +1294,47 @@ sys_user: Utenti - -sys_user_info: Puoi aggiungere o rimuovere più utenti o modificare la password qui. +sys_user_info: Qui puoi trovare tutte le informazioni relative al tuo account e modificare il tuo nome utente, password o e-mail. Per poter ripristinare la tua password via e-mail, assicurati di aver inserito un indirizzo email vaild e attivo di seguito. - -sys_user_change_password: Cambia la tua password +sys_user_add: Aggiungi utente - -sys_user_change_password_current: Password attuale +sys_user_invite: Invita l'utente via e-mail - -sys_user_change_password_new: Nuova password +sys_user_name: Nome utente - -sys_user_change_password_repeat: Ripeti la password +sys_user_password: Parola d'ordine - -sys_user_add: Aggiungi utente +sys_user_repeat_password: Ripeti la password - -sys_user_add_name: Nome utente +sys_user_email: E-mail - -sys_user_add_password: Parola d'ordine +sys_user_alert_no_email: Non hai ancora aggiunto un indirizzo email valido al tuo account. Si noti che è richiesto un indirizzo email valido per poter ripristinare la password. Clicca qui per aggiungere un'email ora. - -sys_user_add_repeat: Ripeti la password +sys_user_change_password: Cambia la tua password + +- + +sys_user_current_password: password attuale + +- + +sys_user_new_password: nuova password - @@ -1246,6 +1342,10 @@ sys_user_registered: Utente registrato - +sys_user_registered_info: È anche possibile registrare altri utenti per consentire loro di modificare il contenuto. + +- + sys_user_you: Tu - diff --git a/automad/ui/lang/japanese.txt b/automad/ui/lang/japanese.txt index f47cfc422..51885e7d0 100644 --- a/automad/ui/lang/japanese.txt +++ b/automad/ui/lang/japanese.txt @@ -66,6 +66,10 @@ btn_files: アップロードされたファイル - +btn_forgot_password: パスワードをお忘れですか + +- + btn_get_themes: もっとテーマを入手してください - @@ -94,6 +98,10 @@ btn_inpage_edit: ページ内編集モード - +btn_invite: 招待状を送る + +- + btn_install: インストール - @@ -102,7 +110,7 @@ btn_link: リンク - -btn_log_out: ログアウト +btn_log_out: サインアウト - @@ -154,10 +162,18 @@ btn_reset: リセットする - +btn_save_password: パスワードを保存する + +- + btn_save: 変更内容を保存 - +btn_submit: 送信 + +- + btn_update: アップデート - @@ -654,6 +670,38 @@ editor_ui_browse: ブラウズファイル - +email_hello: こんにちは + +- + +email_automatic: このEメールは自動的に送信されました。 このメールに返信しないでください。 + +- + +email_invite_subject: あなたは新しいユーザーとして追加されました! + +- + +email_invite_text: {}の新しいユーザーアカウントがあなたのために作成されました。 下のボタンを使用してパスワードを作成できます。 + +- + +email_invite_button: 今すぐパスワードを作成します + +- + +email_reset_password_subject: 認証トークン + +- + +email_reset_password_text_top: {}のアカウントの要求された認証トークンは以下にあります。 あなたは今あなたのために新しいパスワードを作成するためにそのトークンを使うことができます。 + +- + +email_reset_password_text_bottom: この要求を自分で開始しなかった場合は、このメッセージを安全に無視することができます。 + +- + error_cache_purged: キャッシュディレクトリを削除できませんでした。 - @@ -686,7 +734,7 @@ error_login: 無効なユーザー名またはパスワード - -error_log_out: ログアウト失敗しました! +error_log_out: サインアウトに失敗しました! - @@ -714,6 +762,10 @@ error_invalid_username: 無効なユーザー名! ユーザー名には、次 - +error_invalid_email: 無効なEメール! 電子メールアドレスには、次の文字のみが含まれています。 + +- + error_json: 無効なJSON! 構成ファイルの内容は正しくフォーマットされていません。 - @@ -742,10 +794,18 @@ error_password_reuse: 古いパスワードを再利用しないでください - +error_password_reset_verification: 認証トークンが無効であるか、またはすでに期限切れになっています。 + +- + error_permission: 権限が拒否されました。 - +error_send_email: 電子メール送信エラー! + +- + error_template_missing: テンプレートの欠落 - @@ -778,6 +838,14 @@ error_update_permission: 更新を実行できません! 許可が拒否され - +error_user_not_found: 無効なユーザー名または電子メールアドレス。 + +- + +error_user_no_email: 要求されたユーザーアカウントに格納されている電子メールアドレスはありません。 + +- + error_var_exists: その名前で変数があります。 - @@ -834,11 +902,11 @@ link_title: リンクを追加する - -login_title: ログイン +login_title: ダッシュボードにサインインします - -login_username: ユーザー名 +login_name_or_email: ユーザー名または電子メール - @@ -846,7 +914,7 @@ login_password: パスワード - -log_out_title: ログアウト +log_out_title: 署名された - @@ -950,6 +1018,22 @@ page_private: プライベート - +reset_password_title: パスワードを作成します + +- + +reset_password_enter_name_or_email: アカウントの新しいパスワードを作成するために認証トークンを要求するために、ユーザー名または電子メールアドレスを入力してください。 + +- + +reset_password_enter_new_password: 認証トークンを含む電子メールがあなたに送信されました。 新しいパスワードと一緒に下のそのトークンを入力してください。 + +- + +reset_password_token: 認証トークン + +- + sidebar_header_global: グローバル - @@ -1050,11 +1134,11 @@ success_installed: 正常にインストールされました - -success_password_changed: あなたのパスワードは正常に変更されました! +success_password_changed: パスワードが正常に変更されました! - -success_log_out: 正常にログアウトされました +success_log_out: あなたは正常にログアウトしました! - @@ -1074,6 +1158,10 @@ success_update: automadを更新しました! - +success_user_invite: 招待状は正常に送信されました。 + +- + success_packages_updated_all: すべてのパッケージを正常に更新しました - @@ -1206,39 +1294,47 @@ sys_user: ユーザー - -sys_user_info: ここでもっとユーザーを追加または削除したり、パスワードを変更したりできます。 +sys_user_info: ここであなたはあなたのアカウントに関するすべての情報を見つけて、あなたのユーザー名、パスワード、または電子メールを変更することができます。 電子メールでパスワードをリセットできるようにするには、下記のVaildとActive Eメールアドレスを入力したことを確認してください。 - -sys_user_change_password: パスワードを変更してください +sys_user_add: ユーザーを追加する - -sys_user_change_password_current: 現在のパスワード +sys_user_invite: Eメールでユーザーを招待します - -sys_user_change_password_new: 新しいパスワード +sys_user_name: ユーザー名 - -sys_user_change_password_repeat: パスワードを再度入力してください +sys_user_password: パスワード - -sys_user_add: ユーザーを追加する +sys_user_repeat_password: パスワードを再度入力してください - -sys_user_add_name: ユーザー名 +sys_user_email: Eメール - -sys_user_add_password: パスワード +sys_user_alert_no_email: あなたはあなたのアカウントに有効な電子メールアドレスを追加していません。 パスワードをリセットできるようにするには、有効な電子メールアドレスが必要です。 今すぐメールを追加するにはここをクリックしてください。 - -sys_user_add_repeat: パスワードを再度入力してください +sys_user_change_password: パスワードを変更してください + +- + +sys_user_current_password: 現在のパスワード + +- + +sys_user_new_password: 新しいパスワード - @@ -1246,6 +1342,10 @@ sys_user_registered: 登録ユーザー - +sys_user_registered_info: コンテンツを編集できるようにするために他のユーザーを登録することも可能です。 + +- + sys_user_you: 君 - diff --git a/automad/ui/lang/korean.txt b/automad/ui/lang/korean.txt index 63fc84cf3..295db32c6 100644 --- a/automad/ui/lang/korean.txt +++ b/automad/ui/lang/korean.txt @@ -66,6 +66,10 @@ btn_files: 업로드 된 파일 - +btn_forgot_password: 비밀번호를 잊으 셨나요 + +- + btn_get_themes: 더 많은 주제를 얻으십시오 - @@ -94,6 +98,10 @@ btn_inpage_edit: 인 페이지 편집 모드 - +btn_invite: 초대장을 보내다 + +- + btn_install: 설치 - @@ -102,7 +110,7 @@ btn_link: 링크 - -btn_log_out: 로그 아웃 +btn_log_out: 로그 아웃하십시오 - @@ -154,10 +162,18 @@ btn_reset: 초기화 - +btn_save_password: 암호 저장 + +- + btn_save: 변경 사항을 저장하다 - +btn_submit: 제출하다 + +- + btn_update: 업데이트 - @@ -654,6 +670,38 @@ editor_ui_browse: 파일을 찾아보십시오 - +email_hello: 안녕하십니까 + +- + +email_automatic: 이 이메일이 자동으로 전송되었습니다. 이 메일에 답장하지 마십시오. + +- + +email_invite_subject: 새 사용자로 추가되었습니다! + +- + +email_invite_text: {}의 새로운 사용자 계정이 만들어졌습니다. 아래 버튼을 사용하여 암호를 작성할 수 있습니다. + +- + +email_invite_button: 지금 암호를 만듭니다 + +- + +email_reset_password_subject: 인증 토큰 + +- + +email_reset_password_text_top: {}에 대한 계정에 대한 요청 된 인증 토큰은 아래에서 찾을 수 있습니다. 지금 새 암호를 만들려면 해당 토큰을 사용하여 새 암호를 만들 수 있습니다. + +- + +email_reset_password_text_bottom: 이 요청을 직접 시작하지 않은 경우이 메시지를 안전하게 무시할 수 있습니다. + +- + error_cache_purged: 캐시 디렉토리를 제거 할 수 없습니다! - @@ -686,7 +734,7 @@ error_login: 잘못된 사용자 이름 또는 암호가 잘못되었습니다 - -error_log_out: 로그 아웃하지 못했습니다! +error_log_out: 로그 아웃 실패! - @@ -714,6 +762,10 @@ error_invalid_username: 잘못된 사용자 이름! 사용자 이름에는 다 - +error_invalid_email: 잘못된 이메일! 이메일 주소에는 다음 문자 만 포함될 수 있습니다. + +- + error_json: 잘못된 JSON! 구성 파일의 내용이 올바르게 포맷되지 않습니다. - @@ -742,10 +794,18 @@ error_password_reuse: 이전 암호를 재사용하지 마십시오! - +error_password_reset_verification: 인증 토큰이 잘못되었거나 이미 만료되었습니다! + +- + error_permission: 사용 권한이 거부되었습니다. - +error_send_email: 이메일 보내기 오류! + +- + error_template_missing: 템플릿 누락 - @@ -778,6 +838,14 @@ error_update_permission: 업데이트를 실행할 수 없습니다! 사용 권 - +error_user_not_found: 잘못된 사용자 이름 또는 이메일 주소가 잘못되었습니다. + +- + +error_user_no_email: 요청한 사용자 계정에 저장된 전자 메일 주소가 없습니다. + +- + error_var_exists: 그 이름이 이미있는 변수가 있습니다! - @@ -834,11 +902,11 @@ link_title: 링크를 추가하십시오 - -login_title: 로그인 +login_title: 대시 보드에 로그인하십시오 - -login_username: 사용자 이름 +login_name_or_email: 아이디 또는 이메일 - @@ -846,7 +914,7 @@ login_password: 비밀번호 - -log_out_title: 로그 아웃했다 +log_out_title: 로그 아웃 - @@ -950,6 +1018,22 @@ page_private: 사적인 - +reset_password_title: 암호를 만듭니다 + +- + +reset_password_enter_name_or_email: 인증 토큰을 요청하여 계정에 대한 새 암호를 만들려면 사용자 이름 또는 이메일 주소를 입력하십시오. + +- + +reset_password_enter_new_password: 인증 토큰을 포함한 이메일은 방금 보내졌습니다. 새 암호와 함께 아래에 해당 토큰을 입력하십시오. + +- + +reset_password_token: 인증 토큰 + +- + sidebar_header_global: 글로벌 - @@ -1054,7 +1138,7 @@ success_password_changed: 비밀번호가 성공적으로 변경되었습니다! - -success_log_out: 로그 아웃했습니다 +success_log_out: 당신은 성공적으로 로그 아웃했습니다! - @@ -1074,6 +1158,10 @@ success_update: Automad를 성공적으로 업데이트했습니다! - +success_user_invite: 초대장이 성공적으로 전송되었습니다. + +- + success_packages_updated_all: 모든 패키지를 성공적으로 업데이트했습니다 - @@ -1206,39 +1294,47 @@ sys_user: 사용자 - -sys_user_info: 더 많은 사용자를 추가하거나 제거하거나 암호를 변경할 수 있습니다. +sys_user_info: 여기서 귀하의 계정과 관련된 모든 정보를 찾아 사용자 이름, 암호 또는 이메일을 변경할 수 있습니다. 이메일로 암호를 재설정 할 수 있으려면 아래의 VAILD 및 활성 이메일 주소를 입력했는지 확인하십시오. - -sys_user_change_password: 암호를 변경하십시오 +sys_user_add: 사용자 추가 - -sys_user_change_password_current: 현재 비밀번호 +sys_user_invite: 이메일로 사용자를 초대하십시오 - -sys_user_change_password_new: 새 비밀번호 +sys_user_name: 사용자 이름 - -sys_user_change_password_repeat: 암호를 반복하십시오 +sys_user_password: 비밀번호 - -sys_user_add: 사용자 추가 +sys_user_repeat_password: 암호를 반복하십시오 - -sys_user_add_name: 사용자 이름 +sys_user_email: 이메일 - -sys_user_add_password: 비밀번호 +sys_user_alert_no_email: 귀하는 아직 귀하의 계정에 유효한 이메일 주소를 추가하지 않았습니다. 암호를 재설정하려면 유효한 이메일 주소가 필요합니다. 지금 이메일을 추가하려면 여기를 클릭하십시오. - -sys_user_add_repeat: 암호를 반복하십시오 +sys_user_change_password: 암호를 변경하십시오 + +- + +sys_user_current_password: 현재 비밀번호 + +- + +sys_user_new_password: 새 비밀번호 - @@ -1246,6 +1342,10 @@ sys_user_registered: 등록 된 사용자들 - +sys_user_registered_info: 또한 콘텐츠를 편집 할 수 있도록 다른 사용자를 등록 할 수도 있습니다. + +- + sys_user_you: 너 - diff --git a/automad/ui/lang/latvian.txt b/automad/ui/lang/latvian.txt index 02229cd96..18cbb2488 100644 --- a/automad/ui/lang/latvian.txt +++ b/automad/ui/lang/latvian.txt @@ -66,6 +66,10 @@ btn_files: Augšupielādētie faili - +btn_forgot_password: Aizmirsi paroli + +- + btn_get_themes: Iegūstiet vairāk motīvu - @@ -94,6 +98,10 @@ btn_inpage_edit: Lapas rediģēšanas režīms - +btn_invite: Nosūtīt ielūgumu + +- + btn_install: Uzstādīt - @@ -102,11 +110,11 @@ btn_link: Saite - -btn_log_out: Izlogoties +btn_log_out: Izrakstīties - -btn_login: Pieslēgties +btn_login: Ielogoties - @@ -154,10 +162,18 @@ btn_reset: Atiestatīt - +btn_save_password: Saglabājiet paroli + +- + btn_save: Saglabāt izmaiņas - +btn_submit: Iesniegt + +- + btn_update: Atjaunināt - @@ -654,6 +670,38 @@ editor_ui_browse: Pārlūkot failus - +email_hello: Sveiki + +- + +email_automatic: Šis e-pasts ir nosūtīts automātiski. Lūdzu, neatbildiet uz šo e-pastu. + +- + +email_invite_subject: Jūs esat pievienots kā jauns lietotājs! + +- + +email_invite_text: Jums ir izveidots jauns lietotāja konts {}. Lai izveidotu savu paroli, varat izmantot tālāk redzamo pogu. + +- + +email_invite_button: Izveidojiet paroli tagad + +- + +email_reset_password_subject: Jūsu autentifikācijas marķieris + +- + +email_reset_password_text_top: Pieprasītais autentifikācijas marķieris jūsu kontam uz {} var atrast zemāk. Jūs varat izmantot šo marķieri, lai izveidotu jaunu paroli jums tagad. + +- + +email_reset_password_text_bottom: Gadījumā, ja jūs neesat uzsācis šo pieprasījumu pats, jūs varat droši ignorēt šo ziņojumu. + +- + error_cache_purged: Kešatmiņas direktoriju nevarēja iztīrīt! - @@ -686,7 +734,7 @@ error_login: Nederīgs lietotājvārds vai parole - -error_log_out: Neizdevās atteikties! +error_log_out: Izrakstīšanās neizdevās! - @@ -714,6 +762,10 @@ error_invalid_username: Nederīgs lietotājvārds! Lietotājvārds var saturēt - +error_invalid_email: Nepareizs e-pasts! E-pasta adrese var saturēt tikai šādas rakstzīmes: + +- + error_json: Nederīgs JSON! Konfigurācijas faila saturs nav pareizi formatēts. - @@ -742,10 +794,18 @@ error_password_reuse: Nelietojiet atkārtoti izmantot savu veco paroli! - +error_password_reset_verification: Autentifikācijas marķieris ir nederīgs vai jau beidzies jau! + +- + error_permission: Noraidītās atļaujas: - +error_send_email: Kļūda Nosūtot e-pastu! + +- + error_template_missing: Veidne trūkst - @@ -778,6 +838,14 @@ error_update_permission: Nevar palaist atjauninājumu! Atļaujas liegtas! - +error_user_not_found: Nederīgs lietotājvārds vai e-pasta adrese. + +- + +error_user_no_email: Pieprasītajam lietotāja kontam nav saglabāta e-pasta adrese. + +- + error_var_exists: Ir jau mainīgais ar šādu nosaukumu! - @@ -834,11 +902,11 @@ link_title: Pievienot saiti - -login_title: Pieslēgties +login_title: Pierakstieties panelī - -login_username: Lietotājvārds +login_name_or_email: Lietotājvārds vai e-pastu - @@ -846,7 +914,7 @@ login_password: Parole - -log_out_title: Izlogojies +log_out_title: Parakstīt - @@ -950,6 +1018,22 @@ page_private: Privāts - +reset_password_title: Izveidot paroli + +- + +reset_password_enter_name_or_email: Lūdzu, ievadiet savu lietotājvārdu vai e-pasta adresi, lai pieprasītu autentifikācijas marķieri, lai izveidotu jaunu konta paroli. + +- + +reset_password_enter_new_password: E-pasts, ieskaitot autentifikācijas marķieri, kas tikko nosūtīts jums. Lūdzu, ievadiet šo marķieri tagad tālāk ar jaunu paroli. + +- + +reset_password_token: Autentifikācijas marķieris + +- + sidebar_header_global: Globāls - @@ -1050,11 +1134,11 @@ success_installed: Veiksmīgi instalēta - -success_password_changed: Jūsu parole tika veiksmīgi nomainīta! +success_password_changed: Jūsu parole ir veiksmīgi mainīta! - -success_log_out: Izrakstījies veiksmīgi +success_log_out: Jūs esat veiksmīgi pieteicies! - @@ -1074,6 +1158,10 @@ success_update: Veiksmīgi atjaunināts Automad! - +success_user_invite: Uzaicinājums ir veiksmīgi nosūtīts. + +- + success_packages_updated_all: Veiksmīgi atjauninātas visas pakotnes - @@ -1206,39 +1294,47 @@ sys_user: Lietotāji - -sys_user_info: Šeit varat pievienot vai noņemt vairāk lietotāju vai mainīt savu paroli. +sys_user_info: Šeit jūs varat atrast visu informāciju, kas saistīta ar jūsu kontu un mainīt savu lietotājvārdu, paroli vai e-pastu. Lai varētu atiestatīt savu paroli pa e-pastu, lūdzu, pārliecinieties, vai esat ievadījis Vaild un aktīvo e-pasta adresi zemāk. - -sys_user_change_password: Nomainiet paroli +sys_user_add: Pievienot lietotāju - -sys_user_change_password_current: Pašreizējā parole +sys_user_invite: Uzaiciniet lietotāju pa e-pastu - -sys_user_change_password_new: Jauna parole +sys_user_name: Lietotājvārds - -sys_user_change_password_repeat: Atkārtojiet paroli +sys_user_password: Parole - -sys_user_add: Pievienot lietotāju +sys_user_repeat_password: Atkārtojiet paroli - -sys_user_add_name: Lietotājvārds +sys_user_email: E-pasta adrese - -sys_user_add_password: Parole +sys_user_alert_no_email: Jūs vēl neesat pievienojis derīgu e-pasta adresi savam kontam. Ņemiet vērā, ka ir nepieciešama derīga e-pasta adrese, lai varētu atiestatīt savu paroli. Noklikšķiniet šeit, lai tagad pievienotu e-pastu. - -sys_user_add_repeat: Atkārtojiet paroli +sys_user_change_password: Nomainiet paroli + +- + +sys_user_current_password: Pašreizējā parole + +- + +sys_user_new_password: jauna parole - @@ -1246,6 +1342,10 @@ sys_user_registered: Reģistrētie lietotāji - +sys_user_registered_info: Ir iespējams arī reģistrēt citus lietotājus, lai tie varētu rediģēt saturu. + +- + sys_user_you: Jūs - diff --git a/automad/ui/lang/lithuanian.txt b/automad/ui/lang/lithuanian.txt index eb6c46f92..a51609098 100644 --- a/automad/ui/lang/lithuanian.txt +++ b/automad/ui/lang/lithuanian.txt @@ -66,6 +66,10 @@ btn_files: Įkelti failai - +btn_forgot_password: Pamiršote slaptažodį + +- + btn_get_themes: Gaukite daugiau temų - @@ -94,6 +98,10 @@ btn_inpage_edit: Redagavimo puslapyje režimas - +btn_invite: Siųsti kvietimą + +- + btn_install: Diegti - @@ -154,10 +162,18 @@ btn_reset: Atstatyti - +btn_save_password: Išsaugoti slaptažodį + +- + btn_save: Išsaugoti pakeitimus - +btn_submit: Pateikti + +- + btn_update: Atnaujinti - @@ -654,6 +670,38 @@ editor_ui_browse: Naršyti failus - +email_hello: Sveiki + +- + +email_automatic: Šis el. Laiškas išsiųstas automatiškai. Prašome neatsakyti į šį el. Laišką. + +- + +email_invite_subject: Jūs buvote pridedamas kaip naujas vartotojas! + +- + +email_invite_text: Jums sukurta nauja vartotojo paskyra {}. Jei norite sukurti slaptažodį, galite naudoti žemiau esantį mygtuką. + +- + +email_invite_button: Dabar sukurkite slaptažodį + +- + +email_reset_password_subject: Jūsų autentifikavimo simbolis + +- + +email_reset_password_text_top: Toliau pateikiamas prašomas autentifikavimo raktas jūsų paskyroje. Jūs galite naudoti šį raktą, kad galėtumėte sukurti naują slaptažodį. + +- + +email_reset_password_text_bottom: Jei nepradėjote šio prašymo, galite saugiai ignoruoti šį pranešimą. + +- + error_cache_purged: Talpyklos katalogo nepavyko išvalyti! - @@ -686,7 +734,7 @@ error_login: Neteisingas prisijungimo vardas arba slaptažodis - -error_log_out: Nepavyko atsijungti! +error_log_out: Pasirašykite nepavyko! - @@ -714,6 +762,10 @@ error_invalid_username: Neteisingas vartotojo vardas! Vartotojo vardas gali būt - +error_invalid_email: Neteisingas el. pašto adresas! El. Pašto adresu gali būti tik šie simboliai: + +- + error_json: Netinkamas JSON! Konfigūracijos failo turinys netinkamai suformatuotas. - @@ -742,10 +794,18 @@ error_password_reuse: Nenaudokite senojo slaptažodžio! - +error_password_reset_verification: Autentifikavimo raktas yra neteisingas arba baigėsi jau! + +- + error_permission: Atmesti leidimai: - +error_send_email: Klaida siunčiant el. Laišką! + +- + error_template_missing: Šablono nėra - @@ -778,6 +838,14 @@ error_update_permission: Nepavyksta paleisti atnaujinimo! Leidimai atmesti! - +error_user_not_found: Neteisingas naudotojo vardas arba el. Pašto adresas. + +- + +error_user_no_email: Nėra el. Pašto adreso, saugomo vartotojo paskyrai. + +- + error_var_exists: Šiuo vardu jau yra kintamasis! - @@ -834,11 +902,11 @@ link_title: Pridėti nuorodą - -login_title: Prisijungti +login_title: Prisijunkite prie prietaisų skydelio - -login_username: Vartotojo vardas +login_name_or_email: Vartotojo vardas arba elektroninio pašto adresas - @@ -846,7 +914,7 @@ login_password: Slaptažodis - -log_out_title: Atsijungęs +log_out_title: Pasirašyta - @@ -950,6 +1018,22 @@ page_private: Privatus - +reset_password_title: Sukurti slaptažodį + +- + +reset_password_enter_name_or_email: Prašome įvesti savo naudotojo vardą arba el. Pašto adresą, kad galėtumėte paprašyti autentifikavimo rakto, kad sukurtumėte naują paskyros slaptažodį. + +- + +reset_password_enter_new_password: Siunčiamas el. Laiškas, įskaitant autentifikavimo raktą. Prašome įvesti šį žetoną dabar žemiau su nauju slaptažodžiu. + +- + +reset_password_token: Autentifikavimo simbolis + +- + sidebar_header_global: Visuotinis - @@ -1050,11 +1134,11 @@ success_installed: Sėkmingai įdiegta - -success_password_changed: Jūsų slaptažodis sėkmingai pakeistas! +success_password_changed: Jūsų slaptažodis buvo sėkmingai pakeistas! - -success_log_out: Sėkmingai atsijungiau +success_log_out: Jūs sėkmingai atsijungėte! - @@ -1074,6 +1158,10 @@ success_update: Sėkmingai atnaujinta „Automad“! - +success_user_invite: Kvietimas buvo sėkmingai išsiųstas. + +- + success_packages_updated_all: Sėkmingai atnaujinti visi paketai - @@ -1206,39 +1294,47 @@ sys_user: Vartotojai - -sys_user_info: Čia galite pridėti ar pašalinti daugiau vartotojų arba pakeisti slaptažodį. +sys_user_info: Čia rasite visą informaciją, susijusią su jūsų paskyra ir pakeiskite naudotojo vardą, slaptažodį ar el. Laišką. Kad galėtumėte iš naujo nustatyti slaptažodį el. Paštu, įsitikinkite, kad žemiau įvedėte "Vaild" ir aktyvų el. Pašto adresą. - -sys_user_change_password: Pasikeiskite slaptažodį +sys_user_add: Pridėti naudotoją - -sys_user_change_password_current: Dabartinis slaptažodis +sys_user_invite: Pakvieskite vartotoją el. Paštu - -sys_user_change_password_new: Naujas Slaptažodis +sys_user_name: Vartotojo vardas - -sys_user_change_password_repeat: Pakartokite slaptažodį +sys_user_password: Slaptažodis - -sys_user_add: Pridėti naudotoją +sys_user_repeat_password: Pakartokite slaptažodį - -sys_user_add_name: Vartotojo vardas +sys_user_email: El. Paštas. \ T - -sys_user_add_password: Slaptažodis +sys_user_alert_no_email: Jūs dar nepridėjote galiojančio el. Pašto adreso į savo paskyrą. Atkreipkite dėmesį, kad reikalingas galiojantis el. Pašto adresas, kad būtų galima iš naujo nustatyti slaptažodį. Spauskite čia norėdami pridėti el. Laišką. - -sys_user_add_repeat: Pakartokite slaptažodį +sys_user_change_password: Pasikeiskite slaptažodį + +- + +sys_user_current_password: Dabartinis slaptažodis + +- + +sys_user_new_password: Naujas Slaptažodis - @@ -1246,6 +1342,10 @@ sys_user_registered: Registruoti vartotojai - +sys_user_registered_info: Taip pat galima užregistruoti kitus vartotojus, kad jie galėtų redaguoti turinį. + +- + sys_user_you: Tu - diff --git a/automad/ui/lang/norwegian.txt b/automad/ui/lang/norwegian.txt index 90160fe6a..3e5f47829 100644 --- a/automad/ui/lang/norwegian.txt +++ b/automad/ui/lang/norwegian.txt @@ -66,6 +66,10 @@ btn_files: Lastede filer - +btn_forgot_password: Glemt passord + +- + btn_get_themes: Få flere temaer - @@ -94,6 +98,10 @@ btn_inpage_edit: Redigeringsmodus på siden - +btn_invite: Send invitasjon + +- + btn_install: Installere - @@ -106,7 +114,7 @@ btn_log_out: Logg ut - -btn_login: Logg Inn +btn_login: Logg inn - @@ -154,10 +162,18 @@ btn_reset: Nullstille - +btn_save_password: Lagre passord + +- + btn_save: Lagre endringer - +btn_submit: Sende inn + +- + btn_update: Oppdater - @@ -654,6 +670,38 @@ editor_ui_browse: Bla gjennom filer - +email_hello: Hallo + +- + +email_automatic: Denne e-posten er sendt automatisk. Vennligst ikke svar på denne e-posten. + +- + +email_invite_subject: Du har blitt lagt til som en ny bruker! + +- + +email_invite_text: En ny brukerkonto på {} er opprettet for deg. Du kan bruke knappen nedenfor for å opprette passordet ditt. + +- + +email_invite_button: Opprett passord nå + +- + +email_reset_password_subject: Din godkjenningstoken + +- + +email_reset_password_text_top: Den forespurte godkjenningen token for kontoen din på {} finner du nedenfor. Du kan bruke det token for å skape et nytt passord for deg nå. + +- + +email_reset_password_text_bottom: I tilfelle du ikke startet denne forespørselen selv, kan du trygt ignorere denne meldingen. + +- + error_cache_purged: Cache-katalogen kunne ikke tømmes! - @@ -686,7 +734,7 @@ error_login: Ugyldig brukernavn eller passord - -error_log_out: Meldingen mislyktes! +error_log_out: Logg ut mislyktes! - @@ -714,6 +762,10 @@ error_invalid_username: Ugyldig brukernavn! Et brukernavn kan bare inneholde fø - +error_invalid_email: Ugyldig epost! En e-postadresse kan bare inneholde følgende tegn: + +- + error_json: Ugyldig JSON! Innholdet i konfigurasjonsfilen er ikke formatert riktig. - @@ -742,10 +794,18 @@ error_password_reuse: Ikke bruk ditt gamle passord på nytt! - +error_password_reset_verification: Autentiseringstokenet er ugyldig eller er allerede utløpt! + +- + error_permission: Tillatelser nektet: - +error_send_email: Feil ved å sende e-post! + +- + error_template_missing: Malen mangler - @@ -778,6 +838,14 @@ error_update_permission: Kan ikke kjøre oppdatering! Tillatelser nektet! - +error_user_not_found: Ugyldig brukernavn eller e-postadresse. + +- + +error_user_no_email: Det er ingen e-postadresse som er lagret for den forespurte brukerkontoen. + +- + error_var_exists: Det er allerede en variabel med det navnet! - @@ -834,11 +902,11 @@ link_title: Legg til lenke - -login_title: Logg Inn +login_title: Logg inn på dashbordet - -login_username: Brukernavn +login_name_or_email: Brukernavn eller e-post - @@ -950,6 +1018,22 @@ page_private: Privat - +reset_password_title: Lag passord + +- + +reset_password_enter_name_or_email: Vennligst skriv inn brukernavnet eller e-postadressen din for å be om en godkjenningstoken for å opprette et nytt passord for kontoen din. + +- + +reset_password_enter_new_password: En e-post inkludert en autentisering token har bare blitt sendt til deg. Vennligst skriv inn det Token nå under sammen med et nytt passord. + +- + +reset_password_token: Autentisering Token + +- + sidebar_header_global: Global - @@ -1050,11 +1134,11 @@ success_installed: Vellykket installert - -success_password_changed: Passordet ditt ble endret! +success_password_changed: Byttingen av passordet ditt er velykket! - -success_log_out: Logget av vellykket +success_log_out: Du har logget deg ut! - @@ -1074,6 +1158,10 @@ success_update: Vellykket oppdatert Automad! - +success_user_invite: Invitasjonen er sendt vellykket. + +- + success_packages_updated_all: Oppdaterte alle pakkene - @@ -1206,39 +1294,47 @@ sys_user: Brukere - -sys_user_info: Du kan legge til eller fjerne flere brukere eller endre passordet her. +sys_user_info: Her finner du all informasjon relatert til kontoen din og endrer brukernavn, passord eller e-post. For å kunne tilbakestille passordet ditt via e-post, må du sørge for at du har angitt en Vail-og aktiv e-postadresse nedenfor. - -sys_user_change_password: Bytt passord +sys_user_add: Legg til bruker - -sys_user_change_password_current: Nåværende passord +sys_user_invite: Inviter bruker via e-post - -sys_user_change_password_new: Nytt passord +sys_user_name: Brukernavn - -sys_user_change_password_repeat: Gjenta passord +sys_user_password: Passord - -sys_user_add: Legg til bruker +sys_user_repeat_password: Gjenta passord - -sys_user_add_name: Brukernavn +sys_user_email: E-post - -sys_user_add_password: Passord +sys_user_alert_no_email: Du har ennå ikke lagt til en gyldig e-postadresse til kontoen din. Merk at en gyldig e-postadresse er nødvendig for å kunne tilbakestille passordet ditt. Klikk her for å legge til en epost nå. - -sys_user_add_repeat: Gjenta passord +sys_user_change_password: Bytt passord + +- + +sys_user_current_password: Nåværende passord + +- + +sys_user_new_password: Nytt passord - @@ -1246,6 +1342,10 @@ sys_user_registered: Registrerte brukere - +sys_user_registered_info: Det er også mulig å registrere andre brukere for å tillate dem å redigere innhold. + +- + sys_user_you: Du - diff --git a/automad/ui/lang/polish.txt b/automad/ui/lang/polish.txt index 5b9e98eab..5be56e9cc 100644 --- a/automad/ui/lang/polish.txt +++ b/automad/ui/lang/polish.txt @@ -66,6 +66,10 @@ btn_files: Przesłane pliki - +btn_forgot_password: Zapomniałeś hasła + +- + btn_get_themes: Pobierz więcej motywów - @@ -94,6 +98,10 @@ btn_inpage_edit: Tryb edycji w treści strony - +btn_invite: Wyślij zaproszenie + +- + btn_install: Zainstalować - @@ -102,11 +110,11 @@ btn_link: Połączyć - -btn_log_out: Wyloguj +btn_log_out: Wyloguj się - -btn_login: Zaloguj sie +btn_login: Zaloguj się - @@ -154,10 +162,18 @@ btn_reset: Resetowanie - +btn_save_password: Zapisz hasło + +- + btn_save: Zapisz zmiany - +btn_submit: Składać + +- + btn_update: Aktualizacja - @@ -654,6 +670,38 @@ editor_ui_browse: Przeglądaj pliki. - +email_hello: dzień dobry + +- + +email_automatic: Ten e-mail został wysłany automatycznie. Proszę nie odpowiadać na ten email. + +- + +email_invite_subject: Zostałeś dodany jako nowy użytkownik! + +- + +email_invite_text: Nowe konto użytkownika na {} zostało utworzone dla Ciebie. Możesz użyć poniższego przycisku, aby utworzyć hasło. + +- + +email_invite_button: Utwórz hasło teraz. + +- + +email_reset_password_subject: Twój token uwierzytelniania. + +- + +email_reset_password_text_top: Żądany token uwierzytelniania do konta na {} można znaleźć poniżej. Możesz użyć tego tokena, aby utworzyć teraz nowe hasło. + +- + +email_reset_password_text_bottom: W przypadku, gdy nie zainicjował tego żądania siebie, możesz bezpiecznie zignorować tę wiadomość. + +- + error_cache_purged: Nie można wyczyścić katalogu pamięci podręcznej! - @@ -686,7 +734,7 @@ error_login: Nieprawidłowa nazwa użytkownika lub hasło - -error_log_out: Wylogowanie się nie powiodło! +error_log_out: Wyloguj się nie powiodło się! - @@ -714,6 +762,10 @@ error_invalid_username: Zła nazwa użytkownika! Nazwa użytkownika może zawier - +error_invalid_email: Niepoprawny email! Adres e-mail może zawierać tylko następujące znaki: + +- + error_json: Nieprawidłowy JSON! Zawartość pliku konfiguracyjnego nie jest poprawnie sformatowana. - @@ -742,10 +794,18 @@ error_password_reuse: Nie używaj ponownie swojego starego hasła! - +error_password_reset_verification: Token uwierzytelniania jest nieprawidłowy lub już wygasł! + +- + error_permission: Odmowa uprawnień: - +error_send_email: Błąd wysyłania wiadomości e-mail! + +- + error_template_missing: Brak szablonu - @@ -778,6 +838,14 @@ error_update_permission: Nie można uruchomić aktualizacji! Odmowa uprawnień! - +error_user_not_found: Nieprawidłowa nazwa użytkownika lub adres e-mail. + +- + +error_user_no_email: Nie ma adresu e-mail przechowywanego na żądane konto użytkownika. + +- + error_var_exists: Istnieje już zmienna o tej nazwie! - @@ -834,11 +902,11 @@ link_title: Dodaj link - -login_title: Zaloguj sie +login_title: Zaloguj się do pulpitu nawigacyjnego - -login_username: Nazwa Użytkownika +login_name_or_email: Nazwa użytkownika lub email - @@ -846,7 +914,7 @@ login_password: Hasło - -log_out_title: Wylogowano +log_out_title: Wylogowany - @@ -950,6 +1018,22 @@ page_private: Prywatny - +reset_password_title: Stwórz hasło + +- + +reset_password_enter_name_or_email: Wprowadź swój adres użytkownika lub adres e-mail, aby poprosić o token uwierzytelniania, aby utworzyć nowe hasło do konta. + +- + +reset_password_enter_new_password: Wyślij wiadomość e-mail, w tym token uwierzytelniający. Wprowadź teraz token teraz wraz z nowym hasłem. + +- + +reset_password_token: Token uwierzytelniania + +- + sidebar_header_global: Światowy - @@ -1050,11 +1134,11 @@ success_installed: Pomyślnie zainstalowano - -success_password_changed: Twoje hasło zostało pomyślnie zmienione! +success_password_changed: Twoje hasło zostało zmienione! - -success_log_out: Wylogowano pomyślnie +success_log_out: Pomyślnie wylogowałeś się! - @@ -1074,6 +1158,10 @@ success_update: Pomyślnie zaktualizowano Automada! - +success_user_invite: Zaproszenie zostało pomyślnie wysłane. + +- + success_packages_updated_all: Pomyślnie zaktualizowano wszystkie pakiety - @@ -1206,39 +1294,47 @@ sys_user: Użytkownicy - -sys_user_info: Tutaj możesz dodać lub usunąć więcej użytkowników lub zmienić swoje hasło. +sys_user_info: Tutaj znajdziesz wszystkie informacje związane z Twoim kontem i zmienić nazwę użytkownika, hasło lub e-mail. Aby móc zresetować hasło pocztą elektroniczną, upewnij się, że wpisałeś poniższy adres e-mail w Vaild i aktywny adres e-mail. - -sys_user_change_password: Zmień swoje hasło +sys_user_add: Dodaj użytkownika - -sys_user_change_password_current: Aktualne hasło +sys_user_invite: Zapraszaj użytkownika pocztą elektroniczną - -sys_user_change_password_new: Nowe hasło +sys_user_name: Nazwa użytkownika - -sys_user_change_password_repeat: Powtórz hasło +sys_user_password: Hasło - -sys_user_add: Dodaj użytkownika +sys_user_repeat_password: Powtórz hasło - -sys_user_add_name: Nazwa Użytkownika +sys_user_email: E-mail - -sys_user_add_password: Hasło +sys_user_alert_no_email: Do konta nie dodałeś prawidłowego adresu e-mail. Zauważ, że wymagany jest prawidłowy adres e-mail, aby móc zresetować hasło. Kliknij tutaj, aby dodać wiadomość e-mail teraz. - -sys_user_add_repeat: Powtórz hasło +sys_user_change_password: Zmień swoje hasło + +- + +sys_user_current_password: Aktualne hasło + +- + +sys_user_new_password: nowe hasło - @@ -1246,6 +1342,10 @@ sys_user_registered: Zarejestrowani Użytkownicy - +sys_user_registered_info: Możliwe jest również zarejestrowanie innych użytkowników, aby umożliwić im edycję treści. + +- + sys_user_you: Ty - diff --git a/automad/ui/lang/portuguese.txt b/automad/ui/lang/portuguese.txt index 61101cc7f..e51b6bd30 100644 --- a/automad/ui/lang/portuguese.txt +++ b/automad/ui/lang/portuguese.txt @@ -66,6 +66,10 @@ btn_files: Arquivos carregados - +btn_forgot_password: Esqueceu sua senha + +- + btn_get_themes: Obtenha mais temas - @@ -94,6 +98,10 @@ btn_inpage_edit: Modo de edição na página - +btn_invite: Enviar convite + +- + btn_install: Instalar - @@ -106,7 +114,7 @@ btn_log_out: Sair - -btn_login: Conecte-se +btn_login: Entrar - @@ -154,10 +162,18 @@ btn_reset: Redefinir - +btn_save_password: Salvar senha + +- + btn_save: Salvar alterações - +btn_submit: Enviar + +- + btn_update: Atualizar - @@ -654,6 +670,38 @@ editor_ui_browse: Navegue arquivos - +email_hello: Olá + +- + +email_automatic: Este email foi enviado automaticamente. Por favor não responda esse email. + +- + +email_invite_subject: Você foi adicionado como um novo usuário! + +- + +email_invite_text: Uma nova conta de usuário no {} foi criada para você. Você pode usar o botão abaixo para criar sua senha. + +- + +email_invite_button: Crie senha agora + +- + +email_reset_password_subject: Seu token de autenticação + +- + +email_reset_password_text_top: O token de autenticação solicitado para sua conta no {} pode ser encontrado abaixo. Você pode usar esse token para criar uma nova senha para você agora. + +- + +email_reset_password_text_bottom: No caso de você não iniciar este pedido, você pode ignorar com segurança esta mensagem. + +- + error_cache_purged: O diretório do cache não pôde ser removido! - @@ -686,7 +734,7 @@ error_login: Nome de usuário ou senha inválidos - -error_log_out: O logout falhou! +error_log_out: Sair falhou! - @@ -714,6 +762,10 @@ error_invalid_username: Nome de usuário Inválido! Um nome de usuário só pode - +error_invalid_email: E-mail inválido! Um endereço de e-mail só pode conter os seguintes caracteres: + +- + error_json: JSON inválido! O conteúdo do arquivo de configuração não está formatado corretamente. - @@ -742,10 +794,18 @@ error_password_reuse: Não reutilize sua senha antiga! - +error_password_reset_verification: O token de autenticação é inválido ou já expirou! + +- + error_permission: Permissões negadas: - +error_send_email: Erro ao enviar e-mail! + +- + error_template_missing: Falta modelo - @@ -778,6 +838,14 @@ error_update_permission: Não é possível executar a atualização! Permissões - +error_user_not_found: Nome de usuário ou endereço de e-mail inválido. + +- + +error_user_no_email: Não há endereço de e-mail armazenado para a conta de usuário solicitada. + +- + error_var_exists: Já existe uma variável com esse nome! - @@ -834,11 +902,11 @@ link_title: Adicionar Link - -login_title: Conecte-se +login_title: Entre no painel - -login_username: Nome do usuário +login_name_or_email: Nome de usuário ou email - @@ -846,7 +914,7 @@ login_password: Senha - -log_out_title: Desconectado +log_out_title: Assinado - @@ -950,6 +1018,22 @@ page_private: Privada - +reset_password_title: Criar senha + +- + +reset_password_enter_name_or_email: Por favor, digite seu nome de usuário ou endereço de e-mail para solicitar um token de autenticação para criar uma nova senha para sua conta. + +- + +reset_password_enter_new_password: Um email, incluindo um token de autenticação, apenas foi enviado para você. Por favor, insira esse token agora abaixo com uma nova senha. + +- + +reset_password_token: Token de autenticação + +- + sidebar_header_global: Global - @@ -1054,7 +1138,7 @@ success_password_changed: Sua senha foi alterada com sucesso! - -success_log_out: Saiu com sucesso +success_log_out: Você começou com sucesso! - @@ -1074,6 +1158,10 @@ success_update: Automad atualizado com sucesso! - +success_user_invite: O convite foi enviado com sucesso. + +- + success_packages_updated_all: Todos os pacotes foram atualizados com sucesso - @@ -1206,39 +1294,47 @@ sys_user: Comercial - -sys_user_info: Você pode adicionar ou remover mais usuários ou alterar sua senha aqui. +sys_user_info: Aqui você pode encontrar todas as informações relacionadas à sua conta e alterar seu nome de usuário, senha ou e-mail. Para poder redefinir sua senha por e-mail, certifique-se de ter inserido um endereço de e-mail Vaild e ativo abaixo. - -sys_user_change_password: Mude sua senha +sys_user_add: Adicionar usuário - -sys_user_change_password_current: Senha atual +sys_user_invite: Convidar o usuário por email - -sys_user_change_password_new: Nova senha +sys_user_name: Nome do usuário - -sys_user_change_password_repeat: Repita a senha +sys_user_password: Senha - -sys_user_add: Adicionar usuário +sys_user_repeat_password: Repita a senha - -sys_user_add_name: Nome do usuário +sys_user_email: O email - -sys_user_add_password: Senha +sys_user_alert_no_email: Você ainda não adicionou um endereço de e-mail válido à sua conta. Observe que um endereço de e-mail válido é necessário para ser capaz de redefinir sua senha. Clique aqui para adicionar um email agora. - -sys_user_add_repeat: Repita a senha +sys_user_change_password: Mude sua senha + +- + +sys_user_current_password: Senha atual + +- + +sys_user_new_password: Nova Senha - @@ -1246,6 +1342,10 @@ sys_user_registered: Usuários registrados - +sys_user_registered_info: Também é possível registrar outros usuários para permitir que eles editem conteúdo. + +- + sys_user_you: Você - diff --git a/automad/ui/lang/romanian.txt b/automad/ui/lang/romanian.txt index 7af19f2c6..f1cc382f2 100644 --- a/automad/ui/lang/romanian.txt +++ b/automad/ui/lang/romanian.txt @@ -66,6 +66,10 @@ btn_files: Fișiere încărcate - +btn_forgot_password: Ați uitat parola + +- + btn_get_themes: Obțineți mai multe teme - @@ -94,6 +98,10 @@ btn_inpage_edit: Mod de editare în pagină - +btn_invite: Trimite invitatia + +- + btn_install: Instalare - @@ -102,11 +110,11 @@ btn_link: Legătură - -btn_log_out: Deconectează-te +btn_log_out: Sign out - -btn_login: Autentificare +btn_login: Loghează-te - @@ -154,10 +162,18 @@ btn_reset: Resetați - +btn_save_password: Salveaza parola + +- + btn_save: Salvează modificările - +btn_submit: Trimite + +- + btn_update: Actualizați - @@ -654,6 +670,38 @@ editor_ui_browse: Cauta fisiere - +email_hello: Buna ziua + +- + +email_automatic: Acest e-mail a fost trimis automat. Vă rugăm să nu răspundeți la acest e-mail. + +- + +email_invite_subject: Ați adăugat ca un utilizator nou! + +- + +email_invite_text: Un nou cont de utilizator pe {} a fost creat pentru tine. Puteți utiliza butonul de mai jos pentru a crea parola. + +- + +email_invite_button: Creați acum parola + +- + +email_reset_password_subject: Tokenul dvs. de autentificare + +- + +email_reset_password_text_top: Tokenul de autentificare solicitat pentru contul dvs. pe {} poate fi găsit mai jos. Puteți utiliza acel token pentru a crea acum o nouă parolă pentru dvs. + +- + +email_reset_password_text_bottom: În cazul în care nu ați inițiat această solicitare, puteți ignora în siguranță acest mesaj. + +- + error_cache_purged: Directorul cache nu a putut fi eliminat! - @@ -686,7 +734,7 @@ error_login: Nume de utilizator sau parola incorecte - -error_log_out: Deconectarea a eșuat! +error_log_out: Descrieți-vă că a eșuat! - @@ -714,6 +762,10 @@ error_invalid_username: Nume de utilizator invalid! Un nume de utilizator poate - +error_invalid_email: E-mail invalid! O adresă de e-mail poate conține numai următoarele caractere: + +- + error_json: JSON nevalid! Conținutul fișierului de configurare nu este formatat corect. - @@ -742,10 +794,18 @@ error_password_reuse: Nu refolosiți vechea parolă! - +error_password_reset_verification: Tokenul de autentificare este nevalid sau a expirat deja! + +- + error_permission: Permisiuni refuzate: - +error_send_email: Eroare la trimiterea de e-mail! + +- + error_template_missing: Șablonul lipsește - @@ -778,6 +838,14 @@ error_update_permission: Nu se poate rula actualizarea! Permisiuni refuzate! - +error_user_not_found: Numele de utilizator nevalid sau adresa de e-mail. + +- + +error_user_no_email: Nu există nicio adresă de e-mail stocată pentru contul de utilizator solicitat. + +- + error_var_exists: Există deja o variabilă cu acest nume! - @@ -834,11 +902,11 @@ link_title: Adăugați un link - -login_title: Autentificare +login_title: Conectați-vă la tabloul de bord - -login_username: Nume de utilizator +login_name_or_email: Nume de utilizator sau email - @@ -846,7 +914,7 @@ login_password: Parola - -log_out_title: Delogat +log_out_title: Semnat - @@ -950,6 +1018,22 @@ page_private: Privat - +reset_password_title: Creaza parola + +- + +reset_password_enter_name_or_email: Introduceți numele dvs. de utilizator sau adresa de e-mail pentru a solicita un jeton de autentificare pentru a crea o nouă parolă pentru contul dvs. + +- + +reset_password_enter_new_password: Un e-mail care include un token de autentificare tocmai ți-a fost trimis. Introduceți acel token acum de mai jos împreună cu o nouă parolă. + +- + +reset_password_token: Token de autentificare + +- + sidebar_header_global: Global - @@ -1050,11 +1134,11 @@ success_installed: Instalat cu succes - -success_password_changed: Parola dvs. a fost schimbată cu succes! +success_password_changed: Parola dvs. a fost modificată cu succes! - -success_log_out: Deconectat cu succes +success_log_out: Te-ai deconectat cu succes! - @@ -1074,6 +1158,10 @@ success_update: Automad a fost actualizat cu succes! - +success_user_invite: Invitația a fost trimisă cu succes. + +- + success_packages_updated_all: S-au actualizat cu succes toate pachetele - @@ -1206,39 +1294,47 @@ sys_user: Utilizatori - -sys_user_info: Puteți adăuga sau elimina mai mulți utilizatori sau puteți schimba parola aici. +sys_user_info: Aici puteți găsi toate informațiile referitoare la contul dvs. și puteți schimba numele de utilizator, parola sau e-mailul. Pentru a putea reseta parola prin e-mail, asigurați-vă că ați introdus o adresă de e-mail VAIL și activă de mai jos. - -sys_user_change_password: Schimbați-vă parola +sys_user_add: Adăugați utilizator - -sys_user_change_password_current: Parola actuală +sys_user_invite: Invitați utilizatorul prin e-mail - -sys_user_change_password_new: Parolă Nouă +sys_user_name: Nume de utilizator - -sys_user_change_password_repeat: Repeta parola +sys_user_password: Parola - -sys_user_add: Adăugați utilizator +sys_user_repeat_password: Repeta parola - -sys_user_add_name: Nume de utilizator +sys_user_email: E-mail - -sys_user_add_password: Parola +sys_user_alert_no_email: Nu ați adăugat încă o adresă de e-mail validă în contul dvs. Rețineți că este necesară o adresă de e-mail validă pentru a putea reseta parola. Faceți clic aici pentru a adăuga un e-mail acum. - -sys_user_add_repeat: Repeta parola +sys_user_change_password: Schimbați-vă parola + +- + +sys_user_current_password: Parola actuală + +- + +sys_user_new_password: Parolă Nouă - @@ -1246,6 +1342,10 @@ sys_user_registered: Utilizatori Înregistrați - +sys_user_registered_info: De asemenea, este posibil să se înregistreze alți utilizatori pentru a le permite să editeze conținut. + +- + sys_user_you: Tu - diff --git a/automad/ui/lang/russian.txt b/automad/ui/lang/russian.txt index 875b88edb..7e8f50188 100644 --- a/automad/ui/lang/russian.txt +++ b/automad/ui/lang/russian.txt @@ -66,6 +66,10 @@ btn_files: Загруженные файлы - +btn_forgot_password: Забыл пароль + +- + btn_get_themes: Получить больше тем - @@ -94,6 +98,10 @@ btn_inpage_edit: Режим редактирования на странице - +btn_invite: Отправь приглашение + +- + btn_install: Установить - @@ -102,11 +110,11 @@ btn_link: Ссылка на сайт - -btn_log_out: Выйти +btn_log_out: выход - -btn_login: Авторизоваться +btn_login: Войти - @@ -154,10 +162,18 @@ btn_reset: Сброс настроек - +btn_save_password: Сохранить пароль + +- + btn_save: Сохранить изменения - +btn_submit: Представлять на рассмотрение + +- + btn_update: Обновить - @@ -654,6 +670,38 @@ editor_ui_browse: Просмотр файлов - +email_hello: Привет + +- + +email_automatic: Это письмо было отправлено автоматически. Пожалуйста, не отвечайте на это письмо. + +- + +email_invite_subject: Вы были добавлены как новый пользователь! + +- + +email_invite_text: Новая учетная запись пользователя на {} была создана для вас. Вы можете использовать кнопку ниже, чтобы создать пароль. + +- + +email_invite_button: Создать пароль сейчас + +- + +email_reset_password_subject: Ваш токен аутентификации + +- + +email_reset_password_text_top: Запрашиваемый токен аутентификации для вашей учетной записи на {} можно найти ниже. Вы можете использовать этот токен, чтобы создать новый пароль для вас сейчас. + +- + +email_reset_password_text_bottom: Если вы не инициировали этот запрос самостоятельно, вы можете смело игнорировать это сообщение. + +- + error_cache_purged: Не удалось очистить каталог кеша! - @@ -686,7 +734,7 @@ error_login: неправильное имя пользователя или п - -error_log_out: Не удалось выйти! +error_log_out: Выйди не удалось! - @@ -714,6 +762,10 @@ error_invalid_username: Неверное имя пользователя! Имя - +error_invalid_email: Неверный адрес электронной почты! Адрес электронной почты может содержать только следующие символы: + +- + error_json: Неверный JSON! Содержимое файла конфигурации отформатировано неправильно. - @@ -742,10 +794,18 @@ error_password_reuse: Не используйте повторно свой ст - +error_password_reset_verification: Токен аутентификации недействителен или уже истек! + +- + error_permission: В разрешениях отказано: - +error_send_email: Ошибка отправки электронной почты! + +- + error_template_missing: Отсутствует шаблон - @@ -778,6 +838,14 @@ error_update_permission: Не могу запустить обновление! - +error_user_not_found: Неверное имя пользователя или адрес электронной почты. + +- + +error_user_no_email: Для запрошенной учетной записи пользователя нет адреса электронной почты. + +- + error_var_exists: Переменная с таким именем уже существует! - @@ -834,11 +902,11 @@ link_title: Добавить ссылку - -login_title: Авторизоваться +login_title: Войдите в приборную панель - -login_username: Имя пользователя +login_name_or_email: Имя пользователя или адрес электронной почты - @@ -846,7 +914,7 @@ login_password: пароль - -log_out_title: Вышли из +log_out_title: Подписано - @@ -950,6 +1018,22 @@ page_private: частный - +reset_password_title: Придумать пароль + +- + +reset_password_enter_name_or_email: Пожалуйста, введите ваше имя пользователя или адрес электронной почты, чтобы запросить токен аутентификации, чтобы создать новый пароль для вашей учетной записи. + +- + +reset_password_enter_new_password: Письмо, включая токен аутентификации, просто отправлял вам. Пожалуйста, введите этот токен сейчас ниже вместе с новым паролем. + +- + +reset_password_token: Токен аутентификации + +- + sidebar_header_global: Глобальный - @@ -1050,11 +1134,11 @@ success_installed: Успешно установлен - -success_password_changed: Ваш пароль успешно изменен! +success_password_changed: Ваш пароль был успешно изменен! - -success_log_out: Выход успешно выполнен +success_log_out: Вы успешно вышли в систему! - @@ -1074,6 +1158,10 @@ success_update: Успешно обновлен Automad! - +success_user_invite: Приглашение было успешно отправлено. + +- + success_packages_updated_all: Успешно обновлены все пакеты - @@ -1206,39 +1294,47 @@ sys_user: Пользователи - -sys_user_info: Вы можете добавить или удалить других пользователей или изменить свой пароль здесь. +sys_user_info: Здесь вы можете найти всю информацию, связанную с вашей учетной записью и измените свое имя пользователя, пароль или адрес электронной почты. Чтобы иметь возможность сбросить пароль по электронной почте, убедитесь, что вы ввели Vaild и Active адрес электронной почты ниже. - -sys_user_change_password: Изменить пароль +sys_user_add: Добавить пользователя - -sys_user_change_password_current: действующий пароль +sys_user_invite: Пригласите пользователя по электронной почте - -sys_user_change_password_new: новый пароль +sys_user_name: Имя пользователя - -sys_user_change_password_repeat: Повторите пароль +sys_user_password: Пароль - -sys_user_add: Добавить пользователя +sys_user_repeat_password: Повторите пароль - -sys_user_add_name: Имя пользователя +sys_user_email: Эл. адрес - -sys_user_add_password: пароль +sys_user_alert_no_email: Вы еще не добавили допустимый адрес электронной почты на вашу учетную запись. Обратите внимание, что необходим действительный адрес электронной почты, чтобы иметь возможность сбросить пароль. Нажмите здесь, чтобы добавить электронное письмо сейчас. - -sys_user_add_repeat: Повторите пароль +sys_user_change_password: Изменить пароль + +- + +sys_user_current_password: текущий пароль + +- + +sys_user_new_password: новый пароль - @@ -1246,6 +1342,10 @@ sys_user_registered: Зарегистрированные пользовател - +sys_user_registered_info: Также возможно зарегистрировать других пользователей, чтобы позволить им редактировать контент. + +- + sys_user_you: Вы - diff --git a/automad/ui/lang/serbian.txt b/automad/ui/lang/serbian.txt index 2a48032a5..399fef143 100644 --- a/automad/ui/lang/serbian.txt +++ b/automad/ui/lang/serbian.txt @@ -66,6 +66,10 @@ btn_files: Отпремљене датотеке - +btn_forgot_password: Заборавили сте лозинку + +- + btn_get_themes: Набавите још тема - @@ -94,6 +98,10 @@ btn_inpage_edit: Режим уређивања на страници - +btn_invite: Пошаљи позивницу + +- + btn_install: Инсталирај - @@ -102,7 +110,7 @@ btn_link: Линк - -btn_log_out: Одјавити се +btn_log_out: Одјава - @@ -154,10 +162,18 @@ btn_reset: Ресетовање - +btn_save_password: Сачувај лозинку + +- + btn_save: Сачувај промене - +btn_submit: прихвати + +- + btn_update: ажурирање - @@ -654,6 +670,38 @@ editor_ui_browse: Прегледајте датотеке - +email_hello: Здраво + +- + +email_automatic: Ова адреса е-поште је послата аутоматски. Молим вас да не одговарате на овај мејл. + +- + +email_invite_subject: Додате сте као нови корисник! + +- + +email_invite_text: Нови кориснички налог на {} је створен за вас. Можете да користите дугме испод да бисте креирали лозинку. + +- + +email_invite_button: Креирајте лозинку сада + +- + +email_reset_password_subject: Ваш токен за аутентификацију + +- + +email_reset_password_text_top: Тражени токен аутентификације за ваш налог на {} можете пронаћи у наставку. Можете да користите тај токен да бисте сада створили нову лозинку за вас. + +- + +email_reset_password_text_bottom: У случају да сами нисте иницирали овај захтев, можете сигурно игнорисати ову поруку. + +- + error_cache_purged: Није могуће очистити директоријум кеш меморије! - @@ -686,7 +734,7 @@ error_login: погрешно корисничко име или лозинка - -error_log_out: Одјава није успела! +error_log_out: Одјавите се није успело! - @@ -714,6 +762,10 @@ error_invalid_username: Погрешно корисничко име! Корис - +error_invalid_email: Неважећа е-маил! Адреса е-поште може да садржи само следеће знакове: + +- + error_json: Неважећи ЈСОН! Садржај конфигурационе датотеке није правилно форматиран. - @@ -742,10 +794,18 @@ error_password_reuse: Не користите поново стару лозин - +error_password_reset_verification: Токен за аутентификацију је неважећи или је већ истекао! + +- + error_permission: Дозволе одбијене: - +error_send_email: Грешка приликом слања е-поште! + +- + error_template_missing: Недостаје шаблон - @@ -778,6 +838,14 @@ error_update_permission: Није могуће покренути ажурира - +error_user_not_found: Неважеће корисничко име или адреса е-поште. + +- + +error_user_no_email: Не постоји адреса е-поште сачувана за тражени кориснички налог. + +- + error_var_exists: Већ постоји променљива са тим именом! - @@ -834,11 +902,11 @@ link_title: Додај везу - -login_title: Пријавите се +login_title: Пријавите се на контролну таблу - -login_username: Корисничко име +login_name_or_email: Корисничко име или е-маил - @@ -846,7 +914,7 @@ login_password: Лозинка - -log_out_title: Одјављени +log_out_title: Одјавити се - @@ -950,6 +1018,22 @@ page_private: приватни - +reset_password_title: Направите лозинку + +- + +reset_password_enter_name_or_email: Молимо унесите своје корисничко име или адресу е-поште како бисте затражили токен за аутентификацију да бисте креирали нову лозинку за свој налог. + +- + +reset_password_enter_new_password: Послао вам је само е-пошту која укључује токен за аутентификацију. Унесите тај токен сада у даљем тексту заједно са новом лозинком. + +- + +reset_password_token: Токен за аутентификацију + +- + sidebar_header_global: Глобално - @@ -1054,7 +1138,7 @@ success_password_changed: Ваша лозинка је успешно проме - -success_log_out: Одјављени сте успешно +success_log_out: Успешно сте се пријавили! - @@ -1074,6 +1158,10 @@ success_update: Успешно ажуриран Аутомад! - +success_user_invite: Позив је успешно послато. + +- + success_packages_updated_all: Успешно ажурирани сви пакети - @@ -1206,39 +1294,47 @@ sys_user: Корисници - -sys_user_info: Овде можете додати или уклонити више корисника или променити лозинку. +sys_user_info: Овде можете пронаћи све информације које се односе на ваш налог и промените своје корисничко име, лозинку или е-пошту. Да бисте могли да ресетујете лозинку путем е-маила, молимо вас да будете сигурни да сте унели ваилду и активну адресу е-поште у наставку. - -sys_user_change_password: Промените своју лозинку +sys_user_add: Додати корисника - -sys_user_change_password_current: Тренутна лозинка +sys_user_invite: Позовите корисника путем е-маила - -sys_user_change_password_new: Нова лозинка +sys_user_name: Корисничко име - -sys_user_change_password_repeat: Поновите лозинку +sys_user_password: Лозинка - -sys_user_add: Додати корисника +sys_user_repeat_password: Поновите лозинку - -sys_user_add_name: Корисничко име +sys_user_email: Е-маил - -sys_user_add_password: Лозинка +sys_user_alert_no_email: Још нисте додали важећу адресу е-поште на свој рачун. Имајте на уму да је потребна ваљана адреса е-поште како би се могло ресетовати лозинку. Кликните овде да додате е-пошту одмах. - -sys_user_add_repeat: Поновите лозинку +sys_user_change_password: Промените своју лозинку + +- + +sys_user_current_password: Тренутна лозинка + +- + +sys_user_new_password: Нова лозинка - @@ -1246,6 +1342,10 @@ sys_user_registered: регистровани корисници - +sys_user_registered_info: Такође је могуће регистровати друге кориснике како би им омогућило да уређују садржај. + +- + sys_user_you: ти - diff --git a/automad/ui/lang/slovak.txt b/automad/ui/lang/slovak.txt index 35ff585b1..0230fce4b 100644 --- a/automad/ui/lang/slovak.txt +++ b/automad/ui/lang/slovak.txt @@ -66,6 +66,10 @@ btn_files: Odovzdané súbory - +btn_forgot_password: Zabudol si heslo + +- + btn_get_themes: Získajte viac motívov - @@ -94,6 +98,10 @@ btn_inpage_edit: Režim úprav na stránke - +btn_invite: Poslať pozvánku + +- + btn_install: Inštalácia - @@ -102,7 +110,7 @@ btn_link: Odkaz - -btn_log_out: Odhlásiť sa +btn_log_out: Odhlásiť Sa - @@ -154,10 +162,18 @@ btn_reset: Resetovať - +btn_save_password: Uložiť heslo + +- + btn_save: Uložiť zmeny - +btn_submit: Predložiť + +- + btn_update: Aktualizácia - @@ -654,6 +670,38 @@ editor_ui_browse: Prehľadávať súbory - +email_hello: Ahoj + +- + +email_automatic: Tento e-mail bol odoslaný automaticky. Prosím neodpovedajte na tento email. + +- + +email_invite_subject: Boli ste pridaný ako nový používateľ! + +- + +email_invite_text: Nový používateľský účet na {} bol vytvorený pre vás. Môžete použiť nižšie uvedené tlačidlo na vytvorenie hesla. + +- + +email_invite_button: Vytvorte heslo teraz + +- + +email_reset_password_subject: Token autentifikácie + +- + +email_reset_password_text_top: Požadovaný token autentifikácie pre váš účet na {} možno nájsť nižšie. Môžete použiť tento token s cieľom vytvoriť nové heslo pre vás teraz. + +- + +email_reset_password_text_bottom: V prípade, že ste túto požiadavku nezačali, môžete túto správu bezpečne ignorovať. + +- + error_cache_purged: Adresár cache sa nepodarilo vyčistiť! - @@ -686,7 +734,7 @@ error_login: Nesprávne užívateľské meno alebo heslo - -error_log_out: Odhlásenie sa nepodarilo! +error_log_out: Odhlásiť sa zlyhalo! - @@ -714,6 +762,10 @@ error_invalid_username: Neplatné užívateľské meno! Užívateľské meno mô - +error_invalid_email: Neplatný email! E-mailová adresa môže obsahovať iba nasledujúce znaky: + +- + error_json: Neplatný JSON! Obsah konfiguračného súboru nie je správne naformátovaný. - @@ -742,10 +794,18 @@ error_password_reuse: Nepoužívajte znova svoje staré heslo! - +error_password_reset_verification: Token autentifikácie je neplatný alebo už uplynul! + +- + error_permission: Povolenia zamietnuté: - +error_send_email: Chyba odosielanie e-mailom! + +- + error_template_missing: Chýba šablóna - @@ -778,6 +838,14 @@ error_update_permission: Aktualizáciu nie je možné spustiť! Povolenia zamiet - +error_user_not_found: Neplatné užívateľské meno alebo e-mailovú adresu. + +- + +error_user_no_email: Pre požadovaný používateľský účet neexistuje žiadna e-mailová adresa. + +- + error_var_exists: Premenná s týmto názvom už existuje! - @@ -834,11 +902,11 @@ link_title: Pridať odkaz - -login_title: Prihlásiť sa +login_title: Prihláste sa do palubnej dosky - -login_username: Užívateľské meno +login_name_or_email: Užívateľské meno alebo email - @@ -846,7 +914,7 @@ login_password: Heslo - -log_out_title: Odhlasený +log_out_title: Podpísaný - @@ -950,6 +1018,22 @@ page_private: Súkromné - +reset_password_title: Vytvor heslo + +- + +reset_password_enter_name_or_email: Zadajte svoje používateľské meno alebo e-mailovú adresu, aby ste požiadali o autentifikačný token vytvoriť nové heslo pre váš účet. + +- + +reset_password_enter_new_password: E-mail vrátane autentifikačného tokenu práve vám pošle. Zadajte tento token teraz nižšie s novým heslom. + +- + +reset_password_token: Autentifikačný token + +- + sidebar_header_global: Globálne - @@ -1054,7 +1138,7 @@ success_password_changed: Vaše heslo bolo úspešne zmenené! - -success_log_out: Úspešne odhlásený +success_log_out: Úspešne ste sa odhlásili! - @@ -1074,6 +1158,10 @@ success_update: Automad bol úspešne aktualizovaný! - +success_user_invite: Pozvánka bola úspešne odoslaná. + +- + success_packages_updated_all: Všetky balíčky boli úspešne aktualizované - @@ -1206,39 +1294,47 @@ sys_user: Používatelia - -sys_user_info: Tu môžete pridať alebo odobrať ďalších používateľov alebo zmeniť svoje heslo. +sys_user_info: Tu nájdete všetky informácie týkajúce sa vášho účtu a zmeňte svoje používateľské meno, heslo alebo e-mail. Aby ste mohli obnoviť heslo e-mailom, uistite sa, že ste zadali adresu VailD a aktívnu e-mailovú adresu. - -sys_user_change_password: Zmeň si heslo +sys_user_add: Pridať používateľa - -sys_user_change_password_current: Aktuálne heslo +sys_user_invite: Pozvite používateľa e-mailom - -sys_user_change_password_new: Nové heslo +sys_user_name: Užívateľské meno - -sys_user_change_password_repeat: Zopakujte heslo +sys_user_password: Heslo - -sys_user_add: Pridať používateľa +sys_user_repeat_password: Zopakujte heslo - -sys_user_add_name: Užívateľské meno +sys_user_email: E-mail - -sys_user_add_password: Heslo +sys_user_alert_no_email: Na váš účet ste ešte nepridali platnú e-mailovú adresu. Na to, aby ste mohli obnoviť heslo, vyžaduje sa platná e-mailová adresa. Kliknite tu pre pridanie e-mailu. - -sys_user_add_repeat: Zopakujte heslo +sys_user_change_password: Zmeň si heslo + +- + +sys_user_current_password: Aktuálne heslo + +- + +sys_user_new_password: Nové heslo - @@ -1246,6 +1342,10 @@ sys_user_registered: Registrovaní užívatelia - +sys_user_registered_info: Je tiež možné zaregistrovať iných používateľov, aby im umožnili úpravu obsahu. + +- + sys_user_you: Vy - diff --git a/automad/ui/lang/slovenian.txt b/automad/ui/lang/slovenian.txt index be879be4f..6e9fbbfd0 100644 --- a/automad/ui/lang/slovenian.txt +++ b/automad/ui/lang/slovenian.txt @@ -66,6 +66,10 @@ btn_files: Naložene datoteke - +btn_forgot_password: Ste pozabili geslo + +- + btn_get_themes: Pridobite več tem - @@ -94,6 +98,10 @@ btn_inpage_edit: Način urejanja na strani - +btn_invite: Pošlji vabilo + +- + btn_install: Namestite - @@ -106,7 +114,7 @@ btn_log_out: Odjava - -btn_login: Vpiši se +btn_login: Prijaviti se - @@ -154,10 +162,18 @@ btn_reset: Ponastaviti - +btn_save_password: Shrani geslo + +- + btn_save: Shrani spremembe - +btn_submit: Pošlji + +- + btn_update: Nadgradnja - @@ -654,6 +670,38 @@ editor_ui_browse: Prebrskajte datoteke - +email_hello: zdravo + +- + +email_automatic: To e-poštno sporočilo je bilo poslano samodejno. Prosim, ne odgovarjajte na to e-poštno sporočilo. + +- + +email_invite_subject: Dodali ste kot nov uporabnik! + +- + +email_invite_text: Za vas je bil ustvarjen nov uporabniški račun na {}. Spodnji gumb lahko uporabite, da ustvarite geslo. + +- + +email_invite_button: Ustvarite geslo + +- + +email_reset_password_subject: Vaš znak za preverjanje pristnosti + +- + +email_reset_password_text_top: Zahtevani žeton za preverjanje pristnosti za vaš račun na {} je na voljo spodaj. To žeton lahko uporabite za ustvarjanje novega gesla za vas zdaj. + +- + +email_reset_password_text_bottom: V primeru, da tega zahtevka niste sprožili, lahko to sporočilo varno prezrete. + +- + error_cache_purged: Imenika predpomnilnika ni bilo mogoče očistiti! - @@ -714,6 +762,10 @@ error_invalid_username: Neveljavno uporabniško ime! Uporabniško ime lahko vseb - +error_invalid_email: Neveljavna e-pošta! E-poštni naslov lahko vsebuje samo naslednje znake: + +- + error_json: Neveljaven JSON! Vsebina konfiguracijske datoteke ni pravilno oblikovana. - @@ -742,10 +794,18 @@ error_password_reuse: Ne uporabljajte starega gesla! - +error_password_reset_verification: Žeton za preverjanje pristnosti je neveljaven ali je že potekel! + +- + error_permission: Zavrnjena dovoljenja: - +error_send_email: Napaka pri pošiljanju e-pošte! + +- + error_template_missing: Manjka predloga - @@ -778,6 +838,14 @@ error_update_permission: Posodobitve ni mogoče zagnati! Dovoljenja zavrnjena! - +error_user_not_found: Neveljavno uporabniško ime ali e-poštni naslov. + +- + +error_user_no_email: Za zahtevani uporabniški račun ni shranjen e-poštnega naslova. + +- + error_var_exists: S tem imenom že obstaja spremenljivka! - @@ -834,11 +902,11 @@ link_title: Dodaj povezavo - -login_title: Vpiši se +login_title: Prijavite se na armaturno ploščo - -login_username: Uporabniško ime +login_name_or_email: Uporabnisko ime ali e-posta - @@ -846,7 +914,7 @@ login_password: Geslo - -log_out_title: Odjavljeni +log_out_title: Podpisan - @@ -950,6 +1018,22 @@ page_private: Zasebno - +reset_password_title: Ustvari geslo + +- + +reset_password_enter_name_or_email: Vnesite svoje uporabniško ime ali e-poštni naslov, da zahtevate žeton za preverjanje pristnosti, da ustvarite novo geslo za vaš račun. + +- + +reset_password_enter_new_password: E-pošta, vključno z žetonom pristnosti, je bila poslana. Vnesite ta žeton zdaj spodaj z novim geslom. + +- + +reset_password_token: Preverjanje pristnosti Token. + +- + sidebar_header_global: Globalno - @@ -1054,7 +1138,7 @@ success_password_changed: Vaše geslo je bilo uspešno spremenjeno! - -success_log_out: Odjava uspešna +success_log_out: Uspešno ste se odjavili! - @@ -1074,6 +1158,10 @@ success_update: Uspešno posodobljen Automad! - +success_user_invite: Vabilo je bilo uspešno poslano. + +- + success_packages_updated_all: Uspešno posodobljeni vsi paketi - @@ -1206,39 +1294,47 @@ sys_user: Uporabniki - -sys_user_info: Tu lahko dodate ali odstranite več uporabnikov ali spremenite geslo. +sys_user_info: Tukaj lahko najdete vse informacije, povezane z vašim računom in spremenite svoje uporabniško ime, geslo ali e-pošto. Da bi lahko ponastavili geslo po e-pošti, se prepričajte, da ste vnesli želeni in aktivni e-poštni naslov spodaj. - -sys_user_change_password: Zamenjajte geslo +sys_user_add: Dodaj uporabnika - -sys_user_change_password_current: Trenutno geslo +sys_user_invite: Povabite uporabnika po e-pošti - -sys_user_change_password_new: Novo geslo +sys_user_name: Uporabniško ime - -sys_user_change_password_repeat: Ponovite geslo +sys_user_password: Geslo - -sys_user_add: Dodaj uporabnika +sys_user_repeat_password: Ponovite geslo - -sys_user_add_name: Uporabniško ime +sys_user_email: E-naslov - -sys_user_add_password: Geslo +sys_user_alert_no_email: Za vaš račun še niste dodali veljavnega e-poštnega naslova. Upoštevajte, da je potreben veljaven e-poštni naslov, da bi lahko ponastavili svoje geslo. Kliknite tukaj, če želite zdaj dodati e-pošto. - -sys_user_add_repeat: Ponovite geslo +sys_user_change_password: Zamenjajte geslo + +- + +sys_user_current_password: trenutno geslo + +- + +sys_user_new_password: novo geslo - @@ -1246,6 +1342,10 @@ sys_user_registered: Registrirani uporabniki - +sys_user_registered_info: Prav tako je mogoče registrirati druge uporabnike, da bi jim omogočili urejanje vsebine. + +- + sys_user_you: Ti - diff --git a/automad/ui/lang/spanish.txt b/automad/ui/lang/spanish.txt index 94fcaed5d..60e73903c 100644 --- a/automad/ui/lang/spanish.txt +++ b/automad/ui/lang/spanish.txt @@ -66,6 +66,10 @@ btn_files: Archivos subidos - +btn_forgot_password: Has olvidado tu contraseña + +- + btn_get_themes: Obtener más temas - @@ -94,6 +98,10 @@ btn_inpage_edit: Modo de edición en la página - +btn_invite: Enviar invitacion + +- + btn_install: Instalar en pc - @@ -102,11 +110,11 @@ btn_link: Enlace - -btn_log_out: Cerrar sesión +btn_log_out: desconectar - -btn_login: Iniciar sesión +btn_login: Registrarse - @@ -154,10 +162,18 @@ btn_reset: Reiniciar - +btn_save_password: Guardar contraseña + +- + btn_save: Guardar cambios - +btn_submit: Enviar + +- + btn_update: Actualizar - @@ -654,6 +670,38 @@ editor_ui_browse: Búsqueda de archivos - +email_hello: Hola + +- + +email_automatic: Este correo electrónico ha sido enviado automáticamente. Por favor no responder a este email. + +- + +email_invite_subject: ¡Se ha agregado como nuevo usuario! + +- + +email_invite_text: Una nueva cuenta de usuario en {} se ha creado para usted. Puede usar el botón de abajo para crear su contraseña. + +- + +email_invite_button: Crear contraseña ahora + +- + +email_reset_password_subject: Su token de autenticación + +- + +email_reset_password_text_top: El token de autenticación solicitado para su cuenta en {} se puede encontrar a continuación. Puede usar ese token para crear una nueva contraseña para usted ahora. + +- + +email_reset_password_text_bottom: En caso de que no haya iniciado esta solicitud, puede ignorar este mensaje de manera segura. + +- + error_cache_purged: ¡No se pudo purgar el directorio de caché! - @@ -686,7 +734,7 @@ error_login: Usuario o contraseña invalido - -error_log_out: ¡No se pudo cerrar la sesión! +error_log_out: ¡Fallo! - @@ -714,6 +762,10 @@ error_invalid_username: ¡Nombre de usuario no válido! Un nombre de usuario sol - +error_invalid_email: ¡Email inválido! Una dirección de correo electrónico solo puede contener los siguientes caracteres: + +- + error_json: JSON no válido El contenido del archivo de configuración no tiene el formato correcto. - @@ -742,10 +794,18 @@ error_password_reuse: ¡No reutilice su contraseña anterior! - +error_password_reset_verification: ¡El token de autenticación no es válido o ya ha caducado! + +- + error_permission: Permisos denegados: - +error_send_email: Error al enviar un correo electrónico! + +- + error_template_missing: Falta plantilla - @@ -778,6 +838,14 @@ error_update_permission: ¡No se puede ejecutar la actualización! ¡Permisos de - +error_user_not_found: Nombre de usuario o dirección de correo electrónico no válida. + +- + +error_user_no_email: No hay una dirección de correo electrónico almacenada para la cuenta de usuario solicitada. + +- + error_var_exists: ¡Ya existe una variable con ese nombre! - @@ -834,11 +902,11 @@ link_title: Añadir enlace - -login_title: Iniciar sesión +login_title: Inicia sesión en el tablero - -login_username: Nombre de usuario +login_name_or_email: Nombre de usuario o correo electrónico - @@ -846,7 +914,7 @@ login_password: Contraseña - -log_out_title: Desconectado +log_out_title: Cerró sesión - @@ -950,6 +1018,22 @@ page_private: Privada - +reset_password_title: Crear contraseña + +- + +reset_password_enter_name_or_email: Ingrese su nombre de usuario o dirección de correo electrónico para solicitar un token de autenticación para crear una nueva contraseña para su cuenta. + +- + +reset_password_enter_new_password: Un correo electrónico que incluye un token de autenticación solo le ha sido enviado. Por favor ingrese ese token ahora a continuación, junto con una nueva contraseña. + +- + +reset_password_token: Token de autenticación + +- + sidebar_header_global: Global - @@ -1050,11 +1134,11 @@ success_installed: Instalado exitosamente - -success_password_changed: ¡Tu contraseña se cambió correctamente! +success_password_changed: ¡Tu contraseña ha sido cambiada exitosamente! - -success_log_out: Cerrar sesión correctamente +success_log_out: ¡Has terminado tu sesion satisfactoriamente! - @@ -1074,6 +1158,10 @@ success_update: Actualizada con éxito Automad! - +success_user_invite: La invitación ha sido enviada exitosamente. + +- + success_packages_updated_all: Todos los paquetes actualizados con éxito - @@ -1206,39 +1294,47 @@ sys_user: Usuarias - -sys_user_info: Puede agregar o eliminar más usuarios o cambiar su contraseña aquí. +sys_user_info: Aquí puede encontrar toda la información relacionada con su cuenta y cambie su nombre de usuario, contraseña o correo electrónico. Para poder restablecer su contraseña por correo electrónico, asegúrese de haber ingresado una dirección de correo electrónico activa y VALD a continuación. - -sys_user_change_password: Cambia tu contraseña +sys_user_add: Agregar usuario - -sys_user_change_password_current: Contraseña actual +sys_user_invite: Invitar al usuario por correo electrónico - -sys_user_change_password_new: Nueva contraseña +sys_user_name: Nombre de usuario - -sys_user_change_password_repeat: Repite la contraseña +sys_user_password: Contraseña - -sys_user_add: Agregar usuario +sys_user_repeat_password: Repite la contraseña - -sys_user_add_name: Nombre de usuario +sys_user_email: Correo electrónico - -sys_user_add_password: Contraseña +sys_user_alert_no_email: Aún no ha agregado una dirección de correo electrónico válida a su cuenta. Tenga en cuenta que se requiere una dirección de correo electrónico válida para poder restablecer su contraseña. Haga clic aquí para agregar un correo electrónico ahora. - -sys_user_add_repeat: Repite la contraseña +sys_user_change_password: Cambia tu contraseña + +- + +sys_user_current_password: Contraseña actual + +- + +sys_user_new_password: Nueva contraseña - @@ -1246,6 +1342,10 @@ sys_user_registered: Usuarios registradas - +sys_user_registered_info: También es posible registrar a otros usuarios con el fin de permitirles editar contenido. + +- + sys_user_you: Usted - diff --git a/automad/ui/lang/swedish.txt b/automad/ui/lang/swedish.txt index 5eb05bd37..fc7cee443 100644 --- a/automad/ui/lang/swedish.txt +++ b/automad/ui/lang/swedish.txt @@ -66,6 +66,10 @@ btn_files: Uppladdade filer - +btn_forgot_password: Glömt ditt lösenord + +- + btn_get_themes: Få fler teman - @@ -94,6 +98,10 @@ btn_inpage_edit: Redigeringsläge på sidan - +btn_invite: Skicka inbjudan + +- + btn_install: Installera - @@ -154,10 +162,18 @@ btn_reset: Återställa - +btn_save_password: Spara lösenord + +- + btn_save: Spara ändringar - +btn_submit: Skicka in + +- + btn_update: Uppdatering - @@ -654,6 +670,38 @@ editor_ui_browse: Bläddra i filer - +email_hello: Hej + +- + +email_automatic: Det här e-postmeddelandet har skickats automatiskt. Var god och svara ej på detta mail. + +- + +email_invite_subject: Du har lagts till som ny användare! + +- + +email_invite_text: Ett nytt användarkonto på {} har skapats för dig. Du kan använda knappen nedan för att skapa ditt lösenord. + +- + +email_invite_button: Skapa lösenord nu + +- + +email_reset_password_subject: Din autentiseringstoken + +- + +email_reset_password_text_top: Den begärda autentiseringstoken för ditt konto på {} finns nedan. Du kan använda det token för att skapa ett nytt lösenord för dig nu. + +- + +email_reset_password_text_bottom: Om du inte initierade denna begäran själv kan du säkert ignorera det här meddelandet. + +- + error_cache_purged: Cachekatalogen kunde inte rensas! - @@ -714,6 +762,10 @@ error_invalid_username: Ogiltigt användarnamn! Ett användarnamn kan bara inneh - +error_invalid_email: Ogiltig e-postadress! En e-postadress kan bara innehålla följande tecken: + +- + error_json: Ogiltig JSON! Innehållet i konfigurationsfilen är inte formaterat korrekt. - @@ -742,10 +794,18 @@ error_password_reuse: Återanvänd inte ditt gamla lösenord! - +error_password_reset_verification: Autentiseringstoken är ogiltig eller har ändrats redan! + +- + error_permission: Tillstånd nekade: - +error_send_email: Fel på att skicka e-post! + +- + error_template_missing: Mall saknas - @@ -778,6 +838,14 @@ error_update_permission: Kan inte köra uppdatering! Tillstånd nekas! - +error_user_not_found: Ogiltigt användarnamn eller e-postadress. + +- + +error_user_no_email: Det finns ingen e-postadress som är lagrad för det begärda användarkontot. + +- + error_var_exists: Det finns redan en variabel med det namnet! - @@ -834,11 +902,11 @@ link_title: Lägg till länk - -login_title: Logga in +login_title: Logga in på instrumentpanelen - -login_username: Användarnamn +login_name_or_email: Användarnamn eller e-mail - @@ -950,6 +1018,22 @@ page_private: Privat - +reset_password_title: Skapa lösenord + +- + +reset_password_enter_name_or_email: Vänligen ange ditt användarnamn eller e-postadress för att begära en autentiseringstoken för att skapa ett nytt lösenord för ditt konto. + +- + +reset_password_enter_new_password: Ett e-postmeddelande inklusive en autentiseringstoken har bara skickats till dig. Vänligen ange det token nu nedan med ett nytt lösenord. + +- + +reset_password_token: Autentiseringstoken + +- + sidebar_header_global: Global - @@ -1054,7 +1138,7 @@ success_password_changed: Ditt lösenord har ändrats framgångsrikt! - -success_log_out: Loggade ut framgångsrikt +success_log_out: Du har lyckats logga ut! - @@ -1074,6 +1158,10 @@ success_update: Uppdaterad Automad! - +success_user_invite: Inbjudan har skickats framgångsrikt. + +- + success_packages_updated_all: Alla paket har uppdaterats - @@ -1206,39 +1294,47 @@ sys_user: Användare - -sys_user_info: Du kan lägga till eller ta bort fler användare eller ändra ditt lösenord här. +sys_user_info: Här kan du hitta all information relaterad till ditt konto och ändra ditt användarnamn, lösenord eller e-post. För att kunna återställa ditt lösenord via e-post, se till att du har angett en Vaild och aktiv e-postadress nedan. - -sys_user_change_password: Ändra ditt lösenord +sys_user_add: Lägg till användare - -sys_user_change_password_current: Nuvarande lösenord +sys_user_invite: Bjud in användaren via e-post - -sys_user_change_password_new: Nytt lösenord +sys_user_name: Användarnamn - -sys_user_change_password_repeat: Repetera lösenord +sys_user_password: Lösenord - -sys_user_add: Lägg till användare +sys_user_repeat_password: Repetera lösenord - -sys_user_add_name: Användarnamn +sys_user_email: E-post - -sys_user_add_password: Lösenord +sys_user_alert_no_email: Du har ännu inte lagt till en giltig e-postadress till ditt konto. Observera att en giltig e-postadress krävs för att kunna återställa ditt lösenord. Klicka här för att lägga till ett mail nu. - -sys_user_add_repeat: Repetera lösenord +sys_user_change_password: Ändra ditt lösenord + +- + +sys_user_current_password: Nuvarande lösenord + +- + +sys_user_new_password: nytt lösenord - @@ -1246,6 +1342,10 @@ sys_user_registered: Registrerade användare - +sys_user_registered_info: Det är också möjligt att registrera andra användare för att låta dem redigera innehåll. + +- + sys_user_you: Du - diff --git a/automad/ui/lang/ukrainian.txt b/automad/ui/lang/ukrainian.txt index 00cdc6a7e..fc84182f6 100644 --- a/automad/ui/lang/ukrainian.txt +++ b/automad/ui/lang/ukrainian.txt @@ -66,6 +66,10 @@ btn_files: Завантажені файли - +btn_forgot_password: Забули пароль + +- + btn_get_themes: Отримайте більше тем - @@ -94,6 +98,10 @@ btn_inpage_edit: Режим редагування на сторінці - +btn_invite: Надсилати запрошення + +- + btn_install: Встановити - @@ -102,11 +110,11 @@ btn_link: Посилання - -btn_log_out: Вийти +btn_log_out: Вийти з аккаунта - -btn_login: Увійдіть +btn_login: Увійти - @@ -154,10 +162,18 @@ btn_reset: Скинути - +btn_save_password: Зберегти пароль + +- + btn_save: Зберегти зміни - +btn_submit: Подавати + +- + btn_update: Оновлення - @@ -654,6 +670,38 @@ editor_ui_browse: Переглядати файли - +email_hello: Здравствуйте + +- + +email_automatic: Цей електронний лист був надісланий автоматично. Будь ласка, не відповідайте на це повідомлення електронної пошти. + +- + +email_invite_subject: Ви додали як новий користувач! + +- + +email_invite_text: Для вас створено новий обліковий запис користувача на {}. Ви можете використовувати кнопку нижче, щоб створити пароль. + +- + +email_invite_button: Створіть пароль зараз + +- + +email_reset_password_subject: Ваша маркер автентифікації + +- + +email_reset_password_text_top: Потрібна маркер автентифікації для вашого облікового запису на {} можна знайти нижче. Ви можете використовувати цей маркер, щоб створити новий пароль для вас зараз. + +- + +email_reset_password_text_bottom: У випадку, якщо ви не ініціювали цей запит самостійно, ви можете безпечно ігнорувати це повідомлення. + +- + error_cache_purged: Не вдалося очистити каталог кешу! - @@ -686,7 +734,7 @@ error_login: Неправильне ім'я користувача або пар - -error_log_out: Не вдалося вийти! +error_log_out: Вихід не вдалося! - @@ -714,6 +762,10 @@ error_invalid_username: Невірне ім'я користувача! Ім'я - +error_invalid_email: Неправильна електронна пошта! Адреса електронної пошти може містити лише такі символи: + +- + error_json: Недійсний JSON! Вміст файлу конфігурації відформатовано неправильно. - @@ -742,10 +794,18 @@ error_password_reuse: Не використовуйте свій старий п - +error_password_reset_verification: Текен автентифікації недійсний або закінчився вже! + +- + error_permission: Відмовлено в дозволах: - +error_send_email: Помилка надсилання електронної пошти! + +- + error_template_missing: Шаблон відсутній - @@ -778,6 +838,14 @@ error_update_permission: Не вдається запустити оновлен - +error_user_not_found: Недійсне ім'я користувача або адресу електронної пошти. + +- + +error_user_no_email: Немає ніякої електронної адреси, збереженої для запитуваного облікового запису користувача. + +- + error_var_exists: Вже є така змінна з такою назвою! - @@ -834,11 +902,11 @@ link_title: Додати посилання - -login_title: Увійти +login_title: Увійдіть до інформаційної панелі - -login_username: Ім'я користувача +login_name_or_email: Ім'я користувача або адресу електронної пошти - @@ -846,7 +914,7 @@ login_password: Пароль - -log_out_title: Вийшов +log_out_title: Підписаний - @@ -950,6 +1018,22 @@ page_private: приватний - +reset_password_title: Створити пароль + +- + +reset_password_enter_name_or_email: Будь ласка, введіть своє ім'я користувача або адресу електронної пошти, щоб запитати маркер автентифікації, щоб створити новий пароль для вашого облікового запису. + +- + +reset_password_enter_new_password: Електронна пошта, включаючи маркер автентифікації, просто надіслано вам. Введіть цей маркер зараз нижче, разом із новим паролем. + +- + +reset_password_token: Аутентифікація маркера + +- + sidebar_header_global: Глобальний - @@ -1050,11 +1134,11 @@ success_installed: Успішно встановлено - -success_password_changed: Ваш пароль успішно змінено! +success_password_changed: Ваш пароль був успішно змінений! - -success_log_out: Вийшов успішно +success_log_out: Ви успішно вийшли! - @@ -1074,6 +1158,10 @@ success_update: Успішно оновлено Automad! - +success_user_invite: Запрошення успішно надіслано. + +- + success_packages_updated_all: Успішно оновлено всі пакети - @@ -1206,39 +1294,47 @@ sys_user: Користувачі - -sys_user_info: Ви можете додати або видалити більше користувачів або змінити свій пароль тут. +sys_user_info: Тут ви можете знайти всю інформацію, що стосується вашого облікового запису та змінити своє ім'я користувача, пароль або електронну пошту. Щоб мати можливість скинути пароль електронною поштою, переконайтеся, що ви ввели VAILD та активну адресу електронної пошти нижче. - -sys_user_change_password: Змінити пароль +sys_user_add: Додати користувача - -sys_user_change_password_current: Поточний пароль +sys_user_invite: Запросити користувача по електронній пошті - -sys_user_change_password_new: Новий пароль +sys_user_name: Ім'я користувача - -sys_user_change_password_repeat: Повторіть пароль +sys_user_password: Пароль - -sys_user_add: Додати користувача +sys_user_repeat_password: Повторіть пароль - -sys_user_add_name: Ім'я користувача +sys_user_email: Електронна пошта - -sys_user_add_password: Пароль +sys_user_alert_no_email: Ви ще не додали дійсну адресу електронної пошти до свого облікового запису. Зауважте, що потрібна дійсна адреса електронної пошти, щоб мати можливість скинути пароль. Натисніть тут, щоб додати електронний лист зараз. - -sys_user_add_repeat: Повторіть пароль +sys_user_change_password: Змінити пароль + +- + +sys_user_current_password: Поточний пароль + +- + +sys_user_new_password: Новий пароль - @@ -1246,6 +1342,10 @@ sys_user_registered: Зареєстровані користувачі - +sys_user_registered_info: Також можна зареєструвати інших користувачів, щоб дозволити їм редагувати вміст. + +- + sys_user_you: ви - From 77bc8f3795966c2347bc194ff55f25dd0e93f248 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sun, 3 Oct 2021 13:31:37 +0200 Subject: [PATCH 26/74] update sample content --- pages/01.blocks/project.txt | 88 +++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/pages/01.blocks/project.txt b/pages/01.blocks/project.txt index 66f0e3660..954f1c44c 100644 --- a/pages/01.blocks/project.txt +++ b/pages/01.blocks/project.txt @@ -6,45 +6,45 @@ tags: Blocks, Content - -+hero: { - "time": 1628357018662, - "blocks": [ - { - "type": "section", - "data": { - "content": { - "time": 1628357018201, - "blocks": [ - { - "type": "paragraph", - "data": { - "text": "Blocks are single units of content. There are several types of them. They can be arranged by using the little grip icon to drag them around. ☝️ Check out some examples below.", - "large": false, - "alignment": "left" - } - } - ], - "version": "2.20.2" - }, - "style": { - "backgroundColor": "#F4F5F7", - "paddingTop": "11.25rem", - "paddingBottom": "7rem" - }, - "justify": "start", - "gap": true, - "minBlockWidth": "", - "stretched": true - } - } - ], - "version": "2.20.2" ++hero: { + "time": 1628357018662, + "blocks": [ + { + "type": "section", + "data": { + "content": { + "time": 1628357018201, + "blocks": [ + { + "type": "paragraph", + "data": { + "text": "Blocks are single units of content. There are several types of them. They can be arranged by using the little grip icon to drag them around. ☝️ Check out some examples below.", + "large": false, + "alignment": "left" + } + } + ], + "version": "2.20.2" + }, + "style": { + "backgroundColor": "#F4F5F7", + "paddingTop": "11.25rem", + "paddingBottom": "7rem" + }, + "justify": "start", + "gap": true, + "minBlockWidth": "", + "stretched": true + } + } + ], + "version": "2.20.2" } - +main: { - "time": 1628443413494, + "time": 1633260606749, "blocks": [ { "type": "header", @@ -69,7 +69,7 @@ tags: Blocks, Content "layout": "vertical", "width": "150px", "height": "10rem", - "gap": "0.5rem", + "gap": "2px", "cleanBottom": true } }, @@ -88,7 +88,7 @@ tags: Blocks, Content "layout": "horizontal", "width": "250px", "height": "9rem", - "gap": "0.5rem", + "gap": "2px", "cleanBottom": true } }, @@ -196,12 +196,24 @@ tags: Blocks, Content "alignment": "left" } }, + { + "type": "embed", + "data": { + "service": "youtube", + "source": "https://www.youtube.com/watch?v=a021NEVTxBw", + "embed": "https://www.youtube.com/embed/a021NEVTxBw", + "width": 16, + "height": 9, + "caption": "", + "span": "" + } + }, { "type": "embed", "data": { "service": "mixcloud", - "source": "https://www.mixcloud.com/marcantondahmen/home-session-21/", - "embed": "https://www.mixcloud.com/widget/iframe/?hide_cover=1&feed=/marcantondahmen/home-session-21/", + "source": "https://www.mixcloud.com/marcantondahmen/home-session-022/", + "embed": "https://www.mixcloud.com/widget/iframe/?hide_cover=1&feed=/marcantondahmen/home-session-022/", "height": 180, "caption": "", "span": "" From 80a7eec847e31f50eff57fe9d54d973618bc50e2 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Sun, 3 Oct 2021 23:23:45 +0200 Subject: [PATCH 27/74] fix minor install ui issues --- automad/src/UI/Views/CreateUser.php | 77 +++++++++++------------------ automad/ui/js/CreateUser.js | 74 +++++++++++++++++++++++++++ automad/ui/lang/english.txt | 13 +++-- 3 files changed, 108 insertions(+), 56 deletions(-) create mode 100644 automad/ui/js/CreateUser.js diff --git a/automad/src/UI/Views/CreateUser.php b/automad/src/UI/Views/CreateUser.php index 0c75bd194..53c8e1f6a 100644 --- a/automad/src/UI/Views/CreateUser.php +++ b/automad/src/UI/Views/CreateUser.php @@ -36,6 +36,8 @@ namespace Automad\UI\Views; +use Automad\UI\Components\Nav\NoUserNavbar; +use Automad\UI\Components\Notify\Error; use Automad\UI\Controllers\UserCollectionController; use Automad\UI\Utils\Text; @@ -65,68 +67,62 @@ protected function body() { $fn = $this->fn; return <<< HTML -
    -
    -
    -
    - -
    -
    - {$fn(Text::get('install_help'))} -
    + {$fn(Error::render($error))} + {$fn(NoUserNavbar::render($this->Automad->Shared->get(AM_KEY_SITENAME), Text::get('install_title')))} +
    +
    +
    + {$fn(Text::get('install_help'))}
    - +
    + -
    - -
    +
    -
    -
    -
    - -
    +
    - {$fn($this->error($error))} HTML; } @@ -140,21 +136,4 @@ protected function title() { return "$title — Automad"; } - - /** - * Render error notification in case or errors. - * - * @param string|null $error - * @return string the error notification markup - */ - private function error(?string $error = null) { - if (!empty($error)) { - return <<< HTML - -HTML; - } - } } diff --git a/automad/ui/js/CreateUser.js b/automad/ui/js/CreateUser.js new file mode 100644 index 000000000..d9d95d487 --- /dev/null +++ b/automad/ui/js/CreateUser.js @@ -0,0 +1,74 @@ +/* + * .... + * .: '':. + * :::: ':.. + * ::. ''.. + * .:'.. ..':.:::' . :. '':. + * :. '' '' '. ::::.. ..: + * ::::. ..':.. .'''::::: . + * :::::::.. '..:::: :. :::: : + * ::'':::::::. ':::.'':.:::: : + * :.. ''::::::....': '':: : + * :::::. '::::: : .. '' . + * .''::::::::... ':::.'' ..'' :.''''. + * :..:::''::::: :::::...:'' :..: + * ::::::. ':::: :::::::: ..:: . + * ::::::::.:::: :::::::: :'':.:: .'' + * ::: '::::::::.' ''::::: :.' '': : + * ::: :::::::::..' :::: ::...' . + * ::: .:::::::::: :::: :::: .:' + * '::' ''::::::: :::: : :: : + * ':::: :::: :'' .: + * :::: :::: ..'' + * :::: ..:::: .:'' + * '''' ''''' + * + * + * AUTOMAD + * + * Copyright (c) 2016-2021 by Marc Anton Dahmen + * https://marcdahmen.de + * + * Licensed under the MIT license. + * https://automad.org/license + */ + +/* + * Handle form when creating first user. + */ + ++(function (Automad, $) { + Automad.CreateUser = { + dataAttr: 'data-am-create-user', + + init: function () { + const container = document.querySelector(`[${this.dataAttr}]`); + + if (container) { + const form = container.querySelector('form'); + + form.addEventListener('submit', () => { + const inputs = Array.from( + container.querySelectorAll('input') + ); + const panels = Array.from( + container.querySelectorAll('.uk-panel') + ); + + inputs.forEach((input) => { + input.removeAttribute('required'); + input.setAttribute('type', 'hidden'); + }); + + panels.forEach((panel) => { + panel.classList.toggle('uk-hidden'); + }); + }); + } + }, + }; + + $(document).on('ready', () => { + Automad.CreateUser.init(); + }); +})((window.Automad = window.Automad || {}), jQuery); diff --git a/automad/ui/lang/english.txt b/automad/ui/lang/english.txt index 633c2bcff..12540b681 100644 --- a/automad/ui/lang/english.txt +++ b/automad/ui/lang/english.txt @@ -965,20 +965,19 @@ images_shared: General Images -install_help: ### Create User Account -Before you can make use of the Automad dashboard, you have to register the first user by following these steps: - -1. Create an user account using the form below and download the created file to your computer. +install_help: Before you can make use of the Automad dashboard, you have to register the first user by following these steps: + +1. Create an user account using the form below and download the created file to your computer. 2. Move the downloaded file to the "/config" directory within your Automad installation. (via a file browser, FTP or SSH) - + After completing these steps, the dashboard should be ready to use. Other users can be added later via the system preferences. - -install_login: ### Move Account File -Please move now the downloaded file to your "/config" directory. After you have successfully finished this installation process, you can sign in to the dashboard. +install_login: Please move now the downloaded file to your "/config" directory. +After you have successfully finished this installation process, you can sign in to the dashboard. - From d34f25d310fa90a941f3b7c7236f8bac5dc9807f Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Tue, 5 Oct 2021 18:53:21 +0200 Subject: [PATCH 28/74] improve heredoc indentation --- automad/src/Blocks/Buttons.php | 16 +- automad/src/Blocks/Embed.php | 50 ++- automad/src/Blocks/Gallery.php | 38 +- automad/src/Blocks/Image.php | 14 +- automad/src/Blocks/Mail.php | 22 +- automad/src/Blocks/Quote.php | 14 +- automad/src/Blocks/Section.php | 8 +- automad/src/Blocks/Slider.php | 10 +- .../Components/Accordion/UnusedVariables.php | 2 +- .../src/UI/Components/Accordion/Variables.php | 2 +- automad/src/UI/Components/Alert/Alert.php | 2 +- .../src/UI/Components/Alert/ThemeReadme.php | 8 +- automad/src/UI/Components/Card/File.php | 162 +++---- automad/src/UI/Components/Card/Package.php | 126 +++--- automad/src/UI/Components/Card/Page.php | 66 ++- .../UI/Components/Card/SearchFileResults.php | 2 +- automad/src/UI/Components/Card/Theme.php | 120 ++--- automad/src/UI/Components/Card/User.php | 6 +- .../UI/Components/Email/AbstractEmailBody.php | 66 +-- .../src/UI/Components/Form/CheckboxHidden.php | 38 +- .../UI/Components/Form/CheckboxPrivate.php | 32 +- automad/src/UI/Components/Form/Field.php | 221 ++++----- .../src/UI/Components/Form/FieldHidden.php | 14 +- automad/src/UI/Components/Form/Group.php | 74 +-- .../src/UI/Components/Form/HeadlessEditor.php | 2 +- automad/src/UI/Components/Form/Select.php | 18 +- .../src/UI/Components/Form/SelectImage.php | 22 +- .../src/UI/Components/Form/SelectTemplate.php | 26 +- automad/src/UI/Components/Fullscreen/Bar.php | 44 +- automad/src/UI/Components/Grid/Files.php | 16 +- automad/src/UI/Components/Grid/Packages.php | 16 +- automad/src/UI/Components/Grid/Pages.php | 16 +- automad/src/UI/Components/Grid/Users.php | 2 +- automad/src/UI/Components/InPage/Edit.php | 38 +- .../UI/Components/Layout/FileCollection.php | 4 +- automad/src/UI/Components/Layout/Packages.php | 2 +- automad/src/UI/Components/Layout/PageData.php | 16 +- .../Layout/PasswordReset/ResetForm.php | 2 +- .../Layout/PasswordReset/ResetSuccess.php | 2 +- .../Layout/PasswordReset/TokenRequestForm.php | 2 +- .../src/UI/Components/Layout/SelectImage.php | 2 +- .../src/UI/Components/Layout/SharedData.php | 6 +- .../src/UI/Components/Layout/SystemUpdate.php | 4 +- automad/src/UI/Components/Modal/About.php | 86 ++-- automad/src/UI/Components/Modal/AddPage.php | 11 +- .../src/UI/Components/Modal/CopyResized.php | 150 +++---- .../src/UI/Components/Modal/EditConfig.php | 56 +-- .../src/UI/Components/Modal/EditFileInfo.php | 132 +++--- automad/src/UI/Components/Modal/Import.php | 34 +- automad/src/UI/Components/Modal/Link.php | 2 +- automad/src/UI/Components/Modal/Readme.php | 36 +- .../src/UI/Components/Modal/SelectImage.php | 40 +- automad/src/UI/Components/Modal/Upload.php | 40 +- automad/src/UI/Components/Nav/Jumpbar.php | 36 +- .../src/UI/Components/Nav/NoUserNavbar.php | 2 +- automad/src/UI/Components/Notify/Error.php | 2 +- automad/src/UI/Components/Status/Button.php | 18 +- automad/src/UI/Components/Status/Response.php | 3 +- automad/src/UI/Components/System/Cache.php | 106 ++--- automad/src/UI/Components/System/Debug.php | 28 +- automad/src/UI/Components/System/Headless.php | 154 +++---- automad/src/UI/Components/System/Language.php | 20 +- automad/src/UI/Components/System/Update.php | 2 +- automad/src/UI/Components/System/Users.php | 424 +++++++++--------- .../src/UI/Controllers/ConfigController.php | 14 +- automad/src/UI/Dashboard.php | 2 - automad/src/UI/InPage.php | 74 +-- automad/src/UI/Views/AbstractView.php | 8 +- automad/src/UI/Views/CreateUser.php | 2 +- automad/src/UI/Views/Elements/Navbar.php | 4 +- automad/src/UI/Views/Elements/Sidebar.php | 4 +- automad/src/UI/Views/Home.php | 14 +- automad/src/UI/Views/Login.php | 2 +- automad/src/UI/Views/Logout.php | 4 +- automad/src/UI/Views/Packages.php | 4 +- automad/src/UI/Views/Page.php | 2 +- automad/src/UI/Views/ResetPassword.php | 2 +- automad/src/UI/Views/Search.php | 2 +- automad/src/UI/Views/Shared.php | 2 +- automad/src/UI/Views/System.php | 2 +- 80 files changed, 1435 insertions(+), 1442 deletions(-) diff --git a/automad/src/Blocks/Buttons.php b/automad/src/Blocks/Buttons.php index 60d25a807..b7b11aeb5 100644 --- a/automad/src/Blocks/Buttons.php +++ b/automad/src/Blocks/Buttons.php @@ -96,14 +96,14 @@ public static function render(object $data, Automad $Automad) { } $html .= <<< HTML - - $text - -HTML; + + $text + + HTML; } } diff --git a/automad/src/Blocks/Embed.php b/automad/src/Blocks/Embed.php index 82952d388..dcb5b1c30 100644 --- a/automad/src/Blocks/Embed.php +++ b/automad/src/Blocks/Embed.php @@ -58,42 +58,44 @@ class Embed extends AbstractBlock { */ public static function render(object $data, Automad $Automad) { $attr = <<< HTML - scrolling="no" - frameborder="no" - allowtransparency="true" - allowfullscreen="true" -HTML; + scrolling="no" + frameborder="no" + allowtransparency="true" + allowfullscreen="true" + HTML; if ($data->service == 'twitter') { $url = Str::stripStart($data->embed, 'https://twitframe.com/show?url='); + $html = <<< HTML - - -HTML; + + + HTML; } elseif (!empty($data->width)) { $paddingTop = $data->height / $data->width * 100; + $html = <<< HTML -
    - -
    -HTML; - } else { - $html = <<< HTML +
    -HTML; +
    + HTML; + } else { + $html = <<< HTML + + HTML; } if (!empty($data->caption)) { diff --git a/automad/src/Blocks/Gallery.php b/automad/src/Blocks/Gallery.php index b8ece5acb..b55ab6675 100644 --- a/automad/src/Blocks/Gallery.php +++ b/automad/src/Blocks/Gallery.php @@ -111,16 +111,16 @@ private static function flexbox($files, $data) { $width = round($Image->width / 2); $html .= <<< HTML - - - -HTML; + + + + HTML; } $html .= '
    '; @@ -165,15 +165,15 @@ private static function masonry($files, $data) { $span = round($Image->height / ($masonryRowHeight * 2)); $html .= <<< HTML - -HTML; + + HTML; } $html .= '
    '; diff --git a/automad/src/Blocks/Image.php b/automad/src/Blocks/Image.php index 9a87b2f81..aa3e8113e 100644 --- a/automad/src/Blocks/Image.php +++ b/automad/src/Blocks/Image.php @@ -70,12 +70,12 @@ public static function render(object $data, Automad $Automad) { } return <<< HTML - -
    - $img - $caption -
    -
    -HTML; + +
    + $img + $caption +
    +
    + HTML; } } diff --git a/automad/src/Blocks/Mail.php b/automad/src/Blocks/Mail.php index 815cd1107..b5fdf559c 100644 --- a/automad/src/Blocks/Mail.php +++ b/automad/src/Blocks/Mail.php @@ -79,17 +79,17 @@ public static function render(object $data, Automad $Automad) { $class = self::classAttr(); return <<< HTML - - $status -
    - - - - - -
    -
    -HTML; + + $status +
    + + + + + +
    +
    + HTML; } } } diff --git a/automad/src/Blocks/Quote.php b/automad/src/Blocks/Quote.php index bc8dd1448..403bef499 100644 --- a/automad/src/Blocks/Quote.php +++ b/automad/src/Blocks/Quote.php @@ -67,12 +67,12 @@ public static function render(object $data, Automad $Automad) { $class = self::classAttr($classes); return <<< HTML - -
    -
    $data->text
    -
    $data->caption
    -
    -
    -HTML; + +
    +
    $data->text
    +
    $data->caption
    +
    +
    + HTML; } } diff --git a/automad/src/Blocks/Section.php b/automad/src/Blocks/Section.php index 33cda4fef..3c2649d43 100644 --- a/automad/src/Blocks/Section.php +++ b/automad/src/Blocks/Section.php @@ -133,9 +133,9 @@ public static function render(object $data, Automad $Automad) { $class = self::classAttr($classes); return <<< HTML - - $html - -HTML; + + $html + + HTML; } } diff --git a/automad/src/Blocks/Slider.php b/automad/src/Blocks/Slider.php index caa74834f..20a1837f0 100644 --- a/automad/src/Blocks/Slider.php +++ b/automad/src/Blocks/Slider.php @@ -76,11 +76,11 @@ public static function render(object $data, Automad $Automad) { $caption = FileUtils::caption($file); $html .= <<< HTML -
    - -
    $caption
    -
    -HTML; +
    + +
    $caption
    +
    + HTML; $first = ''; } diff --git a/automad/src/UI/Components/Accordion/UnusedVariables.php b/automad/src/UI/Components/Accordion/UnusedVariables.php index 2915b516b..d809dc0e2 100644 --- a/automad/src/UI/Components/Accordion/UnusedVariables.php +++ b/automad/src/UI/Components/Accordion/UnusedVariables.php @@ -73,6 +73,6 @@ public static function render(Automad $Automad, array $keys, array $data, string
    {$fn(Group::render($Automad, $keys, $data, 'am-add-variable'))}
    -HTML; + HTML; } } diff --git a/automad/src/UI/Components/Accordion/Variables.php b/automad/src/UI/Components/Accordion/Variables.php index be26b518f..e6aec7281 100644 --- a/automad/src/UI/Components/Accordion/Variables.php +++ b/automad/src/UI/Components/Accordion/Variables.php @@ -77,6 +77,6 @@ public static function render(Automad $Automad, array $keys, array $data, ?Theme
    {$fn(Group::render($Automad, $keys, $data, false, $Theme))}
    -HTML; + HTML; } } diff --git a/automad/src/UI/Components/Alert/Alert.php b/automad/src/UI/Components/Alert/Alert.php index 592c5a8be..a08a25b39 100644 --- a/automad/src/UI/Components/Alert/Alert.php +++ b/automad/src/UI/Components/Alert/Alert.php @@ -58,6 +58,6 @@ public static function render(string $text, string $class = '') {
    $text
    -HTML; + HTML; } } diff --git a/automad/src/UI/Components/Alert/ThemeReadme.php b/automad/src/UI/Components/Alert/ThemeReadme.php index ebbc7f57a..1bff1eaf2 100644 --- a/automad/src/UI/Components/Alert/ThemeReadme.php +++ b/automad/src/UI/Components/Alert/ThemeReadme.php @@ -64,10 +64,10 @@ public static function render(?Theme $Theme = null, string $id = 'am-readme-moda if ($Theme && $Theme->readme) { $html = Readme::render($id, $Theme->readme); $html .= <<< HTML - - $Text->theme_readme_alert - -HTML; + + $Text->theme_readme_alert + + HTML; return $html; } diff --git a/automad/src/UI/Components/Card/File.php b/automad/src/UI/Components/Card/File.php index b60268b6a..ac9cb6ed5 100644 --- a/automad/src/UI/Components/Card/File.php +++ b/automad/src/UI/Components/Card/File.php @@ -73,83 +73,83 @@ public static function render(string $file, string $id) { if ($caption) { $caption = <<< HTML -
    -   - $caption -
    -HTML; +
    +   + $caption +
    + HTML; } if (FileUtils::fileIsImage($file)) { $resize = <<< HTML -
  • - -   - $Text->btn_copy_resized - -
  • -HTML; +
  • + +   + $Text->btn_copy_resized + +
  • + HTML; } return <<< HTML +
    + $preview
    - $preview -
    - $title -
    - $caption -
    -   - $mTime -
    -
    -
    - + $caption +
    +   + $mTime +
    +
    + +
    + +
    -HTML; +
    + HTML; } /** @@ -194,27 +194,27 @@ private static function getPreview(string $file) { $url = AM_BASE_URL . $imgPanel->file; $preview = <<< HTML - -
    - $imgPanel->originalWidth - - $imgPanel->originalHeight -
    -HTML; + +
    + $imgPanel->originalWidth + + $imgPanel->originalHeight +
    + HTML; } else { $preview = ''; } return <<< HTML - -
    - $preview -
    -
    -HTML; + +
    + $preview +
    +
    + HTML; } } diff --git a/automad/src/UI/Components/Card/Package.php b/automad/src/UI/Components/Card/Package.php index 2c330575c..3f8ba4a6b 100644 --- a/automad/src/UI/Components/Card/Package.php +++ b/automad/src/UI/Components/Card/Package.php @@ -64,81 +64,81 @@ public static function render(object $package) { $active = 'uk-active'; $badge = <<< HTML - - $Text->packages_installed - -HTML; + + $Text->packages_installed + + HTML; $button = <<< HTML -
    -
    - - -
    -
    - - -
    -
    -HTML; - } else { - $button = <<< HTML -
    +
    + + +
    + +
    -HTML; +
    + HTML; + } else { + $button = <<< HTML +
    + + +
    + HTML; } return <<< HTML -
    - - -
    - $package->name -
    -
    - $package->description -
    - $badge -
    -
    -
    - - - -
    - $button + + HTML; } } diff --git a/automad/src/UI/Components/Card/Page.php b/automad/src/UI/Components/Card/Page.php index 8bcf1e2d2..c1c27c6b4 100644 --- a/automad/src/UI/Components/Card/Page.php +++ b/automad/src/UI/Components/Card/Page.php @@ -85,42 +85,40 @@ public static function render(CorePage $Page) { } return <<< HTML - -
    - -
    - $preview -
    -
    -
    $pageTitle
    -
    $pageMTime
    -
    - +
    + +
    + $preview +
    +
    +
    $pageTitle
    +
    $pageMTime
    +
    + - $badge
    - -HTML; + $badge +
    + HTML; } /** diff --git a/automad/src/UI/Components/Card/SearchFileResults.php b/automad/src/UI/Components/Card/SearchFileResults.php index 0c8583f46..34cd0ee4e 100644 --- a/automad/src/UI/Components/Card/SearchFileResults.php +++ b/automad/src/UI/Components/Card/SearchFileResults.php @@ -91,6 +91,6 @@ class="am-toggle-checkbox uk-active"
    $results
    -HTML; + HTML; } } diff --git a/automad/src/UI/Components/Card/Theme.php b/automad/src/UI/Components/Card/Theme.php index 104209480..39066b2aa 100644 --- a/automad/src/UI/Components/Card/Theme.php +++ b/automad/src/UI/Components/Card/Theme.php @@ -85,8 +85,8 @@ public static function render(?TypesTheme $Theme, ?TypesTheme $activeTheme, stri if ($Theme->readme) { $icon = <<< HTML - $icon -HTML; + $icon + HTML; } $badge = ''; @@ -96,81 +96,81 @@ public static function render(?TypesTheme $Theme, ?TypesTheme $activeTheme, stri if ($Theme->version) { $badge = <<< HTML -
    $Theme->version
    -HTML; +
    $Theme->version
    + HTML; } if ($Theme->author) { $author = <<< HTML -
    -   - $Theme->author -
    -HTML; +
    +   + $Theme->author +
    + HTML; } if ($Theme->license) { $license = <<< HTML -
    -   - $Theme->license -
    -HTML; +
    +   + $Theme->license +
    + HTML; } if ($Theme->readme) { $readmeButton = <<< HTML -
    - - - -
    -HTML; +
    + + + +
    + HTML; } $readme = Readme::render($id . '-modal', $Theme->readme); return <<< HTML - $readme -
    -
    -
    - $icon -
    -
    - $badge -
    - $Theme->name -
    -
    - $Theme->description -
    - $author - $license -
    - $readmeButton -
    - -
    -
    + $readme +
    +
    +
    + $icon +
    +
    + $badge +
    + $Theme->name +
    +
    + $Theme->description +
    + $author + $license +
    + $readmeButton +
    +
    -HTML; +
    +
    + HTML; } } diff --git a/automad/src/UI/Components/Card/User.php b/automad/src/UI/Components/Card/User.php index be4226741..a68cb2a9c 100644 --- a/automad/src/UI/Components/Card/User.php +++ b/automad/src/UI/Components/Card/User.php @@ -78,7 +78,7 @@ public static function render(string $user) {
    -HTML; + HTML; } /** @@ -98,7 +98,7 @@ private static function checkbox(string $user, string $id) { -HTML; + HTML; } return <<< HTML @@ -107,6 +107,6 @@ class="am-toggle-checkbox am-panel-bottom-link" data-am-toggle="#$id"> -HTML; + HTML; } } diff --git a/automad/src/UI/Components/Email/AbstractEmailBody.php b/automad/src/UI/Components/Email/AbstractEmailBody.php index ddf04722b..cdabc9d7c 100644 --- a/automad/src/UI/Components/Email/AbstractEmailBody.php +++ b/automad/src/UI/Components/Email/AbstractEmailBody.php @@ -61,7 +61,7 @@ abstract class AbstractEmailBody { font-size: 18px; line-height: 48px; " -HTML; + HTML; /** * The basic h1 style. @@ -84,37 +84,37 @@ protected static function body(string $content) { $Text = Text::getObject(); return <<< HTML - - - - - - - - - - - - - - - -
    - $content -

    - $Text->email_automatic -
    -
    - Automad -

    -
    - - - HTML; + + + + + + + + + + + + + + + +
    + $content +

    + $Text->email_automatic +
    +
    + Automad +

    +
    + + + HTML; } } diff --git a/automad/src/UI/Components/Form/CheckboxHidden.php b/automad/src/UI/Components/Form/CheckboxHidden.php index 433c301e0..6f795d6d5 100644 --- a/automad/src/UI/Components/Form/CheckboxHidden.php +++ b/automad/src/UI/Components/Form/CheckboxHidden.php @@ -63,24 +63,24 @@ public static function render(string $key, $hidden = false) { $checked = 'checked'; } - return << - - -
    -HTML; + return << + + +
    + HTML; } } diff --git a/automad/src/UI/Components/Form/CheckboxPrivate.php b/automad/src/UI/Components/Form/CheckboxPrivate.php index 3b5f47210..6f36eb819 100644 --- a/automad/src/UI/Components/Form/CheckboxPrivate.php +++ b/automad/src/UI/Components/Form/CheckboxPrivate.php @@ -63,21 +63,21 @@ public static function render(string $key, $private = false) { $checked = 'checked'; } - return << - -
    -HTML; + return << + +
    + HTML; } } diff --git a/automad/src/UI/Components/Form/Field.php b/automad/src/UI/Components/Form/Field.php index 636be85aa..30ba5658a 100644 --- a/automad/src/UI/Components/Form/Field.php +++ b/automad/src/UI/Components/Form/Field.php @@ -150,16 +150,17 @@ public static function render(Automad $Automad, string $key = '', $value = '', b } elseif (strpos($key, '+') === 0) { if (!self::isInPage()) { $help = Text::get('btn_help'); + $html .= << -   - $help - -HTML; + +   + $help + + HTML; } $editorId = 'am-block-editor-' . str_replace('+', '', $key); @@ -185,12 +186,12 @@ class="am-form-block-help uk-button uk-button-mini" */ private static function fieldBlockEditor(string $editorId, string $fullscreenBar, string $attr, $value) { return <<< HTML -
    - $fullscreenBar - -
    -
    -HTML; +
    + $fullscreenBar + +
    +
    + HTML; } /** @@ -236,17 +237,17 @@ private static function fieldCheckbox(string $text, string $attr, $value, $share } return <<< HTML -
    -   $text - -
    -HTML; +
    +   $text + +
    + HTML; } else { $checked = ''; @@ -255,11 +256,11 @@ class="uk-button uk-text-left uk-form-select uk-width-1-1" } return <<< HTML - -HTML; + + HTML; } } @@ -272,11 +273,11 @@ class="uk-button uk-text-left uk-form-select uk-width-1-1" */ private static function fieldColor(string $color, string $attr) { return <<< HTML -
    - - -
    -HTML; +
    + + +
    + HTML; } /** @@ -289,31 +290,31 @@ private static function fieldColor(string $color, string $attr) { */ private static function fieldDate(string $attr, string $attrDate, string $attrTime) { return <<< HTML -
    - -
    - - -
    -
    - - -
    - +
    + +
    + + +
    +
    + +
    -HTML; + +
    + HTML; } /** @@ -325,11 +326,11 @@ class="uk-width-1-1" */ private static function fieldDefault(string $attr, $value) { return <<< HTML - -HTML; + + HTML; } /** @@ -342,17 +343,17 @@ private static function fieldImage(string $attr) { $Text = Text::getObject(); return <<< HTML -
    -
    -
    - - -
    +
    +
    +
    + +
    -HTML; +
    + HTML; } /** @@ -371,16 +372,16 @@ private static function fieldText(string $fullscreenBar, string $attr, $value) { } return <<< HTML -
    - $fullscreenBar - -
    -HTML; +
    + $fullscreenBar + +
    + HTML; } /** @@ -391,13 +392,13 @@ class="uk-form-controls uk-width-1-1" */ private static function fieldUrl(string $attr) { return <<< HTML -
    - - -
    -HTML; +
    + + +
    + HTML; } /** @@ -459,13 +460,13 @@ private static function removeButton(bool $hasRemoveButton) { $Text = Text::getObject(); return <<< HTML - -HTML; + + HTML; } } @@ -484,18 +485,18 @@ private static function tooltip(?Theme $Theme, string $key) { if ($Theme) { if ($tooltip = $Theme->getTooltip($key)) { return <<< HTML -
    -
    - -
    -
    - $tooltip -
    +
    +
    + +
    +
    + $tooltip
    -HTML; +
    + HTML; } } } diff --git a/automad/src/UI/Components/Form/FieldHidden.php b/automad/src/UI/Components/Form/FieldHidden.php index 5a431203e..291cc9069 100644 --- a/automad/src/UI/Components/Form/FieldHidden.php +++ b/automad/src/UI/Components/Form/FieldHidden.php @@ -57,12 +57,12 @@ public static function render(string $key = '', $value = '') { // Convert special characters in $value to HTML entities. $value = htmlspecialchars($value); - return << -HTML; + return << + HTML; } } diff --git a/automad/src/UI/Components/Form/Group.php b/automad/src/UI/Components/Form/Group.php index 0bfdd72aa..eee3614ff 100644 --- a/automad/src/UI/Components/Form/Group.php +++ b/automad/src/UI/Components/Form/Group.php @@ -87,46 +87,46 @@ public static function render(Automad $Automad, array $keys, array $data = array $addVarInputlId = $addVariableIdPrefix . '-input'; $addVarContainerId = $addVariableIdPrefix . '-container'; - $html = <<< HTML -
    $html
    - -   - $Text->btn_add_var - -
    -
    -
    + $html = <<< HTML +
    $html
    + +   + $Text->btn_add_var + +
    +
    +
    + $Text->btn_add_var + +
    + + - - +
    -HTML; +
    + HTML; } return $html; diff --git a/automad/src/UI/Components/Form/HeadlessEditor.php b/automad/src/UI/Components/Form/HeadlessEditor.php index 89de0846b..6ed380da2 100644 --- a/automad/src/UI/Components/Form/HeadlessEditor.php +++ b/automad/src/UI/Components/Form/HeadlessEditor.php @@ -62,6 +62,6 @@ class="uk-form-controls uk-width-1-1" name="template" rows="10" >$template
    -HTML; + HTML; } } diff --git a/automad/src/UI/Components/Form/Select.php b/automad/src/UI/Components/Form/Select.php index fa8c7b2e4..598855553 100644 --- a/automad/src/UI/Components/Form/Select.php +++ b/automad/src/UI/Components/Form/Select.php @@ -65,12 +65,12 @@ public static function render(string $name, array $values, $selected, string $pr $prefix = ltrim($prefix . ' '); $html = <<< HTML -
    - $prefix -   - - + HTML; foreach ($values as $text => $value) { if ($value === $selected) { @@ -83,9 +83,9 @@ public static function render(string $name, array $values, $selected, string $pr } $html .= <<< HTML - -
    -HTML; + +
    + HTML; return $html; } diff --git a/automad/src/UI/Components/Form/SelectImage.php b/automad/src/UI/Components/Form/SelectImage.php index 192344b96..d89f6571c 100644 --- a/automad/src/UI/Components/Form/SelectImage.php +++ b/automad/src/UI/Components/Form/SelectImage.php @@ -62,12 +62,12 @@ public static function render(array $files, string $title, bool $basename = fals $count = count($files); $html = <<< HTML -

    - $title -  $count -

    -
    -HTML; +

    + $title +  $count +

    +
    + HTML; foreach ($files as $file) { if ($basename) { @@ -80,11 +80,11 @@ public static function render(array $files, string $title, bool $basename = fals $imageUrl = AM_BASE_URL . $image->file; $html .= <<< HTML - -HTML; + + HTML; } $html .= '
    '; diff --git a/automad/src/UI/Components/Form/SelectTemplate.php b/automad/src/UI/Components/Form/SelectTemplate.php index 9705a0e01..54d1947f9 100644 --- a/automad/src/UI/Components/Form/SelectTemplate.php +++ b/automad/src/UI/Components/Form/SelectTemplate.php @@ -66,16 +66,16 @@ public static function render(Automad $Automad, ThemeCollection $ThemeCollection // Create HTML. $html = <<< HTML -
    -   - - - - + HTML; // List templates of current main theme. if ($mainTheme) { @@ -118,9 +118,9 @@ class="uk-form-select uk-button uk-button-large uk-button-success uk-width-1-1 u } $html .= <<< HTML - -
    -HTML; + +
    + HTML; return $html; } diff --git a/automad/src/UI/Components/Fullscreen/Bar.php b/automad/src/UI/Components/Fullscreen/Bar.php index 24fdff01a..c8673abe6 100644 --- a/automad/src/UI/Components/Fullscreen/Bar.php +++ b/automad/src/UI/Components/Fullscreen/Bar.php @@ -55,29 +55,29 @@ class Bar { */ public static function render(string $title, string $label) { return <<< HTML - -
    -
    -
    -   - $title - $label -
    - + +
    +
    +
    +   + $title + $label
    +
    -HTML; +
    + HTML; } } diff --git a/automad/src/UI/Components/Grid/Files.php b/automad/src/UI/Components/Grid/Files.php index 651c8cef7..627d7f9a9 100644 --- a/automad/src/UI/Components/Grid/Files.php +++ b/automad/src/UI/Components/Grid/Files.php @@ -66,13 +66,13 @@ public static function render(array $files) { } return <<< HTML -
      - $cards -
    -HTML; +
      + $cards +
    + HTML; } } diff --git a/automad/src/UI/Components/Grid/Packages.php b/automad/src/UI/Components/Grid/Packages.php index d9caa5927..844b3d1e6 100644 --- a/automad/src/UI/Components/Grid/Packages.php +++ b/automad/src/UI/Components/Grid/Packages.php @@ -62,13 +62,13 @@ public static function render(array $packages) { } return <<< HTML -
      - $cards -
    -HTML; +
      + $cards +
    + HTML; } } diff --git a/automad/src/UI/Components/Grid/Pages.php b/automad/src/UI/Components/Grid/Pages.php index 2d9657aad..efdcac561 100644 --- a/automad/src/UI/Components/Grid/Pages.php +++ b/automad/src/UI/Components/Grid/Pages.php @@ -62,13 +62,13 @@ public static function render(array $pages) { } return <<< HTML -
      - $cards -
    -HTML; +
      + $cards +
    + HTML; } } diff --git a/automad/src/UI/Components/Grid/Users.php b/automad/src/UI/Components/Grid/Users.php index 74fb0e2f7..66c65a889 100644 --- a/automad/src/UI/Components/Grid/Users.php +++ b/automad/src/UI/Components/Grid/Users.php @@ -70,6 +70,6 @@ class="uk-grid uk-grid-width-medium-1-4" > $cards
-HTML; + HTML; } } diff --git a/automad/src/UI/Components/InPage/Edit.php b/automad/src/UI/Components/InPage/Edit.php index 8de826ae2..085998520 100644 --- a/automad/src/UI/Components/InPage/Edit.php +++ b/automad/src/UI/Components/InPage/Edit.php @@ -64,28 +64,28 @@ public static function render(Automad $Automad, string $key, $value, string $con $label = Field::labelFromKey($key); $title = $Automad->getPage($context)->get(AM_KEY_TITLE); - return << -
-
-
-   - $title - $label -
-
- -
-
+
- - $field -HTML; + + $field + + HTML; } } diff --git a/automad/src/UI/Components/Layout/FileCollection.php b/automad/src/UI/Components/Layout/FileCollection.php index 2241a77ca..df23e0b8a 100644 --- a/automad/src/UI/Components/Layout/FileCollection.php +++ b/automad/src/UI/Components/Layout/FileCollection.php @@ -112,7 +112,7 @@ class="uk-button" {$fn(Files::render($files))} {$fn(CopyResized::render($url))} {$fn(EditFileInfo::render($modalTitle, $url))} -HTML; + HTML; } else { $html = <<< HTML
@@ -132,7 +132,7 @@ class="uk-button uk-button-success uk-button-large" {$fn(Text::get('btn_import'))}
-HTML; + HTML; } $html .= Upload::render($url); diff --git a/automad/src/UI/Components/Layout/Packages.php b/automad/src/UI/Components/Layout/Packages.php index c2846602b..2f298122d 100644 --- a/automad/src/UI/Components/Layout/Packages.php +++ b/automad/src/UI/Components/Layout/Packages.php @@ -79,6 +79,6 @@ class="uk-button uk-button-link uk-hidden-small" {$fn(Text::get('packages_browse'))} {$fn(GridPackages::render($packages))} -HTML; + HTML; } } diff --git a/automad/src/UI/Components/Layout/PageData.php b/automad/src/UI/Components/Layout/PageData.php index ed1dd7918..77b1be72b 100644 --- a/automad/src/UI/Components/Layout/PageData.php +++ b/automad/src/UI/Components/Layout/PageData.php @@ -197,7 +197,7 @@ class="uk-accordion" {$fn(Variables::render($this->Automad, $this->settingKeys, $this->data, $Theme, Text::get('page_vars_settings')))} {$fn(UnusedVariables::render($this->Automad, $this->unusedDataKeys, $this->data, Text::get('page_vars_unused')))} -HTML; + HTML; } /** @@ -226,7 +226,7 @@ class="uk-button uk-button-mini uk-margin-small-top uk-text-truncate uk-display- > $name -HTML; + HTML; } /** @@ -256,7 +256,7 @@ class="uk-form-controls uk-width-1-1 $class" $attributes /> -HTML; + HTML; } /** @@ -367,7 +367,7 @@ class="uk-button {$templateButtonClass} uk-button-large uk-width-1-1" -HTML; + HTML; } /** @@ -391,7 +391,7 @@ private function settings() { {$fn(Field::render($this->Automad, AM_KEY_DATE, $this->Page->get(AM_KEY_DATE), false, null, Text::get('page_date')))} {$fn($this->tags())} -HTML; + HTML; } /** @@ -462,7 +462,7 @@ private function tags() { value="" /> -HTML; + HTML; } /** @@ -473,7 +473,7 @@ private function tags() { private function title() { $fn = $this->fn; - return <<