diff --git a/plugins/admin/.editorconfig b/plugins/admin/.editorconfig index 3b95e6db..6375a81e 100644 --- a/plugins/admin/.editorconfig +++ b/plugins/admin/.editorconfig @@ -1,4 +1,4 @@ -# EditorConfig is awesome: http://EditorConfig.org +# EditorConfig is awesome: https://EditorConfig.org # top-most EditorConfig file root = true @@ -10,8 +10,8 @@ end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true indent_style = space -indent_size = 4 - -# 2 space indentation -[*.{yaml,.yml}] indent_size = 2 + +# 4 space indentation +[*.php] +indent_size = 4 diff --git a/plugins/admin/.gitignore b/plugins/admin/.gitignore index 77d39444..ddab4e4a 100644 --- a/plugins/admin/.gitignore +++ b/plugins/admin/.gitignore @@ -14,3 +14,4 @@ tests/_support/_generated/* tests/cache/* tests/error.log /crowdin.yaml +.vscode diff --git a/plugins/admin/CHANGELOG.md b/plugins/admin/CHANGELOG.md index fc06bf7a..0a57a767 100644 --- a/plugins/admin/CHANGELOG.md +++ b/plugins/admin/CHANGELOG.md @@ -1,3 +1,136 @@ +# v1.10.35 +## 08/04/2022 + +1. [](#improved) + * Improvements in CodeMirror editor in RTL mode [#359](https://github.com/getgrav/grav-plugin-admin/issues/359), [#2297](https://github.com/getgrav/grav-plugin-admin/pull/2297) + +# v1.10.34 +## 06/22/2022 + +1. [](#improved) + * Exposed `UriToMarkdown` util (`Grav.default.Utils.UriToMarkdown`) in admin, to convert links/images +1. [](#bugfix) + * Fixed `Latest Page Updates` permissions [#2294](https://github.com/getgrav/grav-plugin-admin/pull/2294) + +# v1.10.33.1 +## 04/25/2022 + +1. [](#bugfix) + * Reverted [PR#2265](https://github.com/getgrav/grav-plugin-admin/pull/2265) as it broke sections output + +# v1.10.33 +## 04/25/2022 + +1. [](#new) + * Require **Form 6.0.1** +2. [](#improved) + * Added support for a single `field:` vs `fields:` in element form field to store a single value to the option field + * Allow new media collapser logic to configure different cookie storage name location via `data-storage-location` +1. [](#bugfix) + * Fixed nested element form fields + * Fixed `columns` and `column` fields with `.dotted` variables inside to ignore columns and column names + * Fixed initial elements state not being restored + +# v1.10.32 +## 03/28/2022 + +1. [](#new) + * Require **Grav 1.7.32**, **Form 6.0.0**, **Login 3.7.0**, **Email 3.1.6** and **Flex Objects 1.2.0** +2. [](#improved) + * List field: Support for default values other than key/value [#2255](https://github.com/getgrav/grav-plugin-admin/issues/2255) + * Added question icon to admin fields with help text [#2261](https://github.com/getgrav/grav-plugin-admin/issues/2261) +3. [](#bugfix) + * Fix nested `toggleable`: originalValue now checks with `??` instead of `is defined` + +# v1.10.31 +## 03/14/2022 + +1. [](#new) + * Added new local Multiavatar (local generation). **This will be default in Grav 1.8** +2. [](#bugfix) + * Patch `collection.js` [#2235](https://github.com/getgrav/grav-plugin-admin/issues/2235) + +# v1.10.30.2 +## 02/09/2022 + +2. [](#bugfix) + * Fixed regression preventing new `elements` field from saving its state + +# v1.10.30.1 +## 02/09/2022 + +1. [](#improved) + * List field items will now require confirmation before getting deleted + +# v1.10.30 +## 02/07/2022 + +1. [](#new) + * Require **Grav 1.7.30** + * Updated SCSS compiler to v1.10 + * PageMedia can now be collapsed and thumbnails previewed smaller, in order to save room on the page. Selection will be remembered. + * DEPRECATED: Admin field `pages_list_display_field` is no longer available as an option [#2191](https://github.com/getgrav/grav-plugin-admin/issues/2191) + * When listing installable themes/plugins, it is now possible to sort them by [Premium](https://getgrav.org/premium) +2. [](#improved) + * Updated JavaScript dependencies + * Cleaned up JavaScript unused dependencies and warnings + * Removed unused style assets + * Plugins list rows now properly highlight on hover, no more guessing when wanting to disable a plugin! +3. [](#bugfix) + * Fixed `elements` field when it's used inside `list` field + * Fixed issue uploading non-images media when Resolution setting enabled in Admin [#2172](https://github.com/getgrav/grav-plugin-admin/issues/2172) + * Prevent fields from being toggled incorrectly by adding originalValue to childs of fieldset. [#2218](https://github.com/getgrav/grav-plugin-admin/pull/2218) + * Fixed persistent focus on Folder field when Adding page (Safari) [#2209](https://github.com/getgrav/grav-plugin-admin/issues/2209) + * Fixed performance of Plugins / Themes sort in the installation table + * Fixed list field with key/value pairs throwing an exception due to bad value [#2199](https://github.com/getgrav/grav-plugin-admin/issues/2199) + * Fixed disabling/enabling plugin from the list breaking the plugin configuration + +# v1.10.29 +## 01/28/2022 + +1. [](#new) + * Require **Grav 1.7.29** +3. [](#improved) + * Made path handling unicode-safe, use new `Utils::basename()` and `Utils::pathinfo()` everywhere + +# v1.10.28 +## 01/24/2022 + +1. [](#bugfix) + * Clean file names before displaying errors/metadata modals + * Recompiled JS for production [#2225](https://github.com/getgrav/grav-plugin-admin/issues/2225) + +# v1.10.27 +## 01/12/2022 + +1. [](#new) + * Support for `YubiKey OTP` 2-Factor authenticator + * New `elements` container field that shows/hides children fields based on boolean trigger value + * Requires Grav `v1.7.27` and Login `v3.6.2` +2. [](#improved) + * Added new asset language strings + +# v1.10.26.1 +## 01/03/2022 + +3. [](#bugfix) + * Fixed an issue with missing files reference by cached autoloader + +# v1.10.26 +## 01/03/2022 + +2. [](#improved) + * Updated SCSS compiler to v1.9 and other vendor libraries + * Fixed various deprecation warnings + * Localized dialog buttons and icons [#2207](https://github.com/getgrav/grav-plugin-admin/pull/2207) + * Updated copyright year + +# v1.10.25 +## 11/16/2021 + +3. [](#bugfix) + * Fixed unescaped messages in JSON responses + # v1.10.24 ## 10/26/2021 diff --git a/plugins/admin/README.md b/plugins/admin/README.md index d894296b..4a7d6541 100644 --- a/plugins/admin/README.md +++ b/plugins/admin/README.md @@ -1,6 +1,6 @@ # Grav Standard Administration Panel Plugin -This **admin plugin** for [Grav](http://github.com/getgrav/grav) is an HTML user interface that provides a convenient way to configure Grav and easily create and modify pages. This will remain a totally optional plugin, and is not in any way required or needed to use Grav effectively. In fact, the admin provides an intentionally limited view to ensure it remains easy to use and not overwhelming. I'm sure power users will still prefer to work with the configuration files directly. +This **admin plugin** for [Grav](https://github.com/getgrav/grav) is an HTML user interface that provides a convenient way to configure Grav and easily create and modify pages. This will remain a totally optional plugin, and is not in any way required or needed to use Grav effectively. In fact, the admin provides an intentionally limited view to ensure it remains easy to use and not overwhelming. I'm sure power users will still prefer to work with the configuration files directly. ![](assets/admin-dashboard.png) @@ -33,7 +33,7 @@ This **admin plugin** for [Grav](http://github.com/getgrav/grav) is an HTML user We have tested internally, but we hope to use this public beta phase to identify, isolate, and fix issues related to the plugin to ensure it is as solid and reliable as possible. -For **live chatting**, please use the dedicated [Slack Chat Room](https://getgrav.org/slack) for discussions directly related to Grav. +For **live chatting**, please use the dedicated [Discord Chat Room](https://getgrav.org/discord) for discussions directly related to Grav. For **bugs, features, improvements**, please ensure you [create issues in the admin plugin GitHub repository](https://github.com/getgrav/grav-plugin-admin). @@ -99,7 +99,7 @@ By default, you can access the admin by pointing your browser to `http://yoursit # Standard Free & Paid Pro Versions -If you have been following the [blog](http://getgrav.org/blog), [Twitter](https://twitter.com/getgrav), [Slack chat](https://getgrav.org/slack), etc., you probably already know now that our intention is to provide two versions of this plugin. +If you have been following the [blog](https://getgrav.org/blog), [Twitter](https://twitter.com/getgrav), [Discord chat](https://getgrav.org/discord), etc., you probably already know now that our intention is to provide two versions of this plugin. The **standard free version**, is very powerful, and has more functionality than most commercial flat-file CMS systems. diff --git a/plugins/admin/admin.php b/plugins/admin/admin.php index e2ad4332..123831e0 100644 --- a/plugins/admin/admin.php +++ b/plugins/admin/admin.php @@ -82,7 +82,6 @@ public static function getSubscribedEvents() { return [ 'onPluginsInitialized' => [ - ['autoload', 100001], ['setup', 100000], ['onPluginsInitialized', 1001] ], @@ -119,6 +118,12 @@ public function getFormFieldTypes() 'list' => [ 'array' => true ], + 'elements' => [ + 'input@' => true + ], + 'element' => [ + 'input@' => false + ], 'file' => [ 'array' => true, 'media_field' => true, @@ -170,8 +175,6 @@ public function getFormFieldTypes() } /** - * [onPluginsInitialized:100000] Composer autoload. - * * @return ClassLoader */ public function autoload(): ClassLoader @@ -452,11 +455,11 @@ public function onPagesInitialized() $legacyController = true; } + /** @var UserInterface $user */ + $user = $this->grav['user']; + // Replace page service with admin. if (empty($this->grav['page'])) { - /** @var UserInterface $user */ - $user = $this->grav['user']; - $this->grav['page'] = function () use ($user) { $page = new Page(); @@ -480,7 +483,7 @@ public function onPagesInitialized() Admin::DEBUG && Admin::addDebugMessage("Admin page: {$this->template}"); $page->init(new \SplFileInfo(__DIR__ . "/pages/admin/{$this->template}.md")); - $page->slug(basename($this->template)); + $page->slug(Utils::basename($this->template)); return $page; } @@ -501,7 +504,7 @@ public function onPagesInitialized() Admin::DEBUG && Admin::addDebugMessage("Admin page: plugin {$plugin->name}/{$this->template}"); $page->init(new \SplFileInfo($path)); - $page->slug(basename($this->template)); + $page->slug(Utils::basename($this->template)); return $page; } @@ -525,7 +528,7 @@ public function onPagesInitialized() $error_file = $this->grav['locator']->findResource('plugins://admin/pages/admin/error.md'); $page = new Page(); $page->init(new \SplFileInfo($error_file)); - $page->slug(basename($this->route)); + $page->slug(Utils::basename($this->route)); $page->routable(true); } @@ -537,7 +540,7 @@ public function onPagesInitialized() $login_file = $this->grav['locator']->findResource('plugins://admin/pages/admin/login.md'); $page = new Page(); $page->init(new \SplFileInfo($login_file)); - $page->slug(basename($this->route)); + $page->slug(Utils::basename($this->route)); unset($this->grav['page']); $this->grav['page'] = $page; } @@ -1304,7 +1307,7 @@ public static function themeOptions() $options = []; $theme_files = glob(__dir__ . '/themes/grav/css/codemirror/themes/*.css'); foreach ($theme_files as $theme_file) { - $theme = basename(basename($theme_file, '.css')); + $theme = Utils::basename(Utils::basename($theme_file, '.css')); $options[$theme] = Inflector::titleize($theme); } } diff --git a/plugins/admin/admin.yaml b/plugins/admin/admin.yaml index e785124d..c23f95b1 100644 --- a/plugins/admin/admin.yaml +++ b/plugins/admin/admin.yaml @@ -26,7 +26,6 @@ session: edit_mode: normal frontend_preview_target: inline show_github_msg: true -pages_list_display_field: title admin_icons: line-awesome enable_auto_updates_check: true notifications: diff --git a/plugins/admin/blueprints.yaml b/plugins/admin/blueprints.yaml index b4858dfb..3a4bec40 100644 --- a/plugins/admin/blueprints.yaml +++ b/plugins/admin/blueprints.yaml @@ -1,13 +1,13 @@ name: Admin Panel slug: admin type: plugin -version: 1.10.24 +version: 1.10.35 description: Adds an advanced administration panel to manage your site icon: empire author: name: Team Grav email: devs@getgrav.org - url: http://getgrav.org + url: https://getgrav.org homepage: https://github.com/getgrav/grav-plugin-admin keywords: admin, plugin, manager, panel bugs: https://github.com/getgrav/grav-plugin-admin/issues @@ -15,11 +15,11 @@ docs: https://github.com/getgrav/grav-plugin-admin/blob/develop/README.md license: MIT dependencies: - - { name: grav, version: '>=1.7.24' } - - { name: form, version: '>=5.1.0' } - - { name: login, version: '>=3.5.0' } - - { name: email, version: '>=3.1.0' } - - { name: flex-objects, version: '>=1.1.0' } + - { name: grav, version: '>=1.7.32' } + - { name: form, version: '>=6.0.1' } + - { name: login, version: '>=3.7.0' } + - { name: email, version: '>=3.1.6' } + - { name: flex-objects, version: '>=1.2.0' } form: validation: loose @@ -202,12 +202,6 @@ form: type: bool help: PLUGIN_ADMIN.SHOW_GITHUB_LINK_HELP - pages_list_display_field: - type: text - size: small - label: PLUGIN_ADMIN.PAGES_LIST_DISPLAY_FIELD - help: PLUGIN_ADMIN.PAGES_LIST_DISPLAY_FIELD_HELP - enable_auto_updates_check: type: toggle label: PLUGIN_ADMIN.AUTO_UPDATES diff --git a/plugins/admin/classes/plugin/Admin.php b/plugins/admin/classes/plugin/Admin.php index e0d0e751..ef414886 100644 --- a/plugins/admin/classes/plugin/Admin.php +++ b/plugins/admin/classes/plugin/Admin.php @@ -980,7 +980,7 @@ public function getConfigurationData($type, array $post = null) $obj->file = $file; $obj->page = $pages->get(dirname($obj->path)); - $fileInfo = pathinfo($obj->title); + $fileInfo = Utils::pathinfo($obj->title); $filename = str_replace(['@3x', '@2x'], '', $fileInfo['filename']); if (isset($fileInfo['extension'])) { $filename .= '.' . $fileInfo['extension']; @@ -1979,7 +1979,7 @@ public function getPage($path) $page = $path ? $pages->find($path, true) : $pages->root(); if (!$page) { - $slug = basename($path); + $slug = Utils::basename($path); if ($slug === '') { return null; @@ -2407,7 +2407,7 @@ public function getLogFiles() /** * Get changelog for a given GPM package based on slug * - * @param null $slug + * @param string|null $slug * @return array */ public function getChangelog($slug = null) diff --git a/plugins/admin/classes/plugin/AdminBaseController.php b/plugins/admin/classes/plugin/AdminBaseController.php index ebdb45f5..8c546e0e 100644 --- a/plugins/admin/classes/plugin/AdminBaseController.php +++ b/plugins/admin/classes/plugin/AdminBaseController.php @@ -271,7 +271,7 @@ public function taskFilesUpload() $this->admin->json_response = [ 'status' => 'error', 'message' => sprintf($this->admin::translate('PLUGIN_ADMIN.FILEUPLOAD_UNABLE_TO_UPLOAD', null), - $filename, 'Bad filename') + htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8'), 'Bad filename') ]; return false; @@ -291,7 +291,7 @@ public function taskFilesUpload() $this->admin->json_response = [ 'status' => 'error', 'message' => sprintf($this->admin::translate('PLUGIN_ADMIN.FILEUPLOAD_PREVENT_SELF', null), - $settings->destination) + htmlspecialchars($settings->destination, ENT_QUOTES | ENT_HTML5, 'UTF-8')) ]; return false; @@ -302,7 +302,8 @@ public function taskFilesUpload() $this->admin->json_response = [ 'status' => 'error', 'message' => sprintf($this->admin::translate('PLUGIN_ADMIN.FILEUPLOAD_UNABLE_TO_UPLOAD', null), - $filename, $this->upload_errors[$upload->file->error]) + htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8'), + $this->upload_errors[$upload->file->error]) ]; return false; @@ -340,7 +341,7 @@ public function taskFilesUpload() if ($isMime) { $match = preg_match('#' . $find . '$#', $mime); if (!$match) { - $errors[] = 'The MIME type "' . $mime . '" for the file "' . $filename . '" is not an accepted.'; + $errors[] = htmlspecialchars('The MIME type "' . $mime . '" for the file "' . $filename . '" is not an accepted.', ENT_QUOTES | ENT_HTML5, 'UTF-8'); } else { $accepted = true; break; @@ -348,7 +349,7 @@ public function taskFilesUpload() } else { $match = preg_match('#' . $find . '$#', $filename); if (!$match) { - $errors[] = 'The File Extension for the file "' . $filename . '" is not an accepted.'; + $errors[] = htmlspecialchars('The File Extension for the file "' . $filename . '" is not an accepted.', ENT_QUOTES | ENT_HTML5, 'UTF-8'); } else { $accepted = true; break; @@ -373,14 +374,17 @@ public function taskFilesUpload() // since php removes it from the upload location $tmp_dir = Admin::getTempDir(); $tmp_file = $upload->file->tmp_name; - $tmp = $tmp_dir . '/uploaded-files/' . basename($tmp_file); + $tmp = $tmp_dir . '/uploaded-files/' . Utils::basename($tmp_file); Folder::create(dirname($tmp)); if (!move_uploaded_file($tmp_file, $tmp)) { $this->admin->json_response = [ 'status' => 'error', - 'message' => sprintf($this->admin::translate('PLUGIN_ADMIN.FILEUPLOAD_UNABLE_TO_MOVE', null), '', - $tmp) + 'message' => sprintf( + $this->admin::translate('PLUGIN_ADMIN.FILEUPLOAD_UNABLE_TO_MOVE', null), + '', + htmlspecialchars($tmp, ENT_QUOTES | ENT_HTML5, 'UTF-8') + ) ]; return false; @@ -419,7 +423,7 @@ public function taskFilesUpload() // Generate random name if required if ($settings->random_name) { // TODO: document - $extension = pathinfo($upload->file->name, PATHINFO_EXTENSION); + $extension = Utils::pathinfo($upload->file->name, PATHINFO_EXTENSION); $upload->file->name = Utils::generateRandomString(15) . '.' . $extension; } @@ -925,7 +929,7 @@ protected function taskRemoveFileFromBlueprint() $type = $uri->param('type'); $field = $uri->param('field'); - $filename = basename($this->post['filename'] ?? ''); + $filename = Utils::basename($this->post['filename'] ?? ''); if ($filename === '') { $this->admin->json_response = [ 'status' => 'error', @@ -1064,7 +1068,7 @@ public function taskRemoveMedia($filename = null) if ($file->exists()) { $resultRemoveMedia = $file->delete(); - $fileParts = pathinfo($filename); + $fileParts = Utils::pathinfo($filename); foreach (scandir($fileParts['dirname']) as $file) { $regex_pattern = '/' . preg_quote($fileParts['filename'], '/') . "@\d+x\." . $fileParts['extension'] . "(?:\.meta\.yaml)?$|" . preg_quote($fileParts['basename'], '/') . "\.meta\.yaml$/"; diff --git a/plugins/admin/classes/plugin/AdminController.php b/plugins/admin/classes/plugin/AdminController.php index 05df15e4..1a837532 100644 --- a/plugins/admin/classes/plugin/AdminController.php +++ b/plugins/admin/classes/plugin/AdminController.php @@ -22,6 +22,7 @@ use Grav\Common\Page\Page; use Grav\Common\Page\Pages; use Grav\Common\Page\Collection; +use Grav\Common\Plugins; use Grav\Common\Security; use Grav\Common\User\Interfaces\UserCollectionInterface; use Grav\Common\User\Interfaces\UserInterface; @@ -35,6 +36,7 @@ use Psr\Http\Message\ResponseInterface; use RocketTheme\Toolbox\Event\Event; use RocketTheme\Toolbox\File\File; +use RocketTheme\Toolbox\File\YamlFile; use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; use Twig\Loader\FilesystemLoader; @@ -288,7 +290,7 @@ public function taskRegenerate2FASecret() $debugger = $this->grav['debugger']; $debugger->addException($e); - $this->admin->json_response = ['status' => 'error', 'message' => $e->getMessage()]; + $this->admin->json_response = ['status' => 'error', 'message' => htmlspecialchars($e->getMessage(), ENT_QUOTES | ENT_HTML5, 'UTF-8')]; return false; } @@ -407,7 +409,7 @@ protected function taskGetNotifications() $debugger = $this->grav['debugger']; $debugger->addException($e); - $json_response = ['status' => 'error', 'message' => $e->getMessage()]; + $json_response = ['status' => 'error', 'message' => htmlspecialchars($e->getMessage(), ENT_QUOTES | ENT_HTML5, 'UTF-8')]; } $this->sendJsonResponse($json_response); @@ -490,7 +492,7 @@ protected function taskGetNewsFeed() $debugger = $this->grav['debugger']; $debugger->addException($e); - $json_response = ['status' => 'error', 'message' => $e->getMessage()]; + $json_response = ['status' => 'error', 'message' => htmlspecialchars($e->getMessage(), ENT_QUOTES | ENT_HTML5, 'UTF-8')]; } $this->sendJsonResponse($json_response); @@ -521,7 +523,7 @@ protected function taskBackup() try { if ($download) { - $filename = basename(base64_decode(urldecode($download))); + $filename = Utils::basename(base64_decode(urldecode($download))); $file = $this->grav['locator']->findResource("backup://{$filename}", true); if (!$file || !Utils::endsWith($filename, '.zip', false)) { header('HTTP/1.1 401 Unauthorized'); @@ -540,7 +542,7 @@ protected function taskBackup() $this->admin->json_response = [ 'status' => 'error', - 'message' => $this->admin::translate('PLUGIN_ADMIN.AN_ERROR_OCCURRED') . '. ' . $e->getMessage() + 'message' => $this->admin::translate('PLUGIN_ADMIN.AN_ERROR_OCCURRED') . '. ' . htmlspecialchars($e->getMessage(), ENT_QUOTES | ENT_HTML5, 'UTF-8') ]; return true; @@ -584,7 +586,7 @@ protected function taskBackupDelete() $backup = $this->grav['uri']->param('backup', null); if (null !== $backup) { - $filename = basename(base64_decode(urldecode($backup))); + $filename = Utils::basename(base64_decode(urldecode($backup))); $file = $this->grav['locator']->findResource("backup://{$filename}", true); if ($file && Utils::endsWith($filename, '.zip', false)) { @@ -629,10 +631,8 @@ public function taskEnable() return false; } - // Filter value and save it. - $this->post = ['enabled' => true]; - $obj = $this->prepareData($this->post); - $obj->save(); + $type = $this->getDataType(); + $this->updatePluginState($type, ['enabled' => true]); $this->post = ['_redirect' => 'plugins']; if ($this->grav['uri']->param('redirect')) { @@ -662,10 +662,8 @@ public function taskDisable() return false; } - // Filter value and save it. - $this->post = ['enabled' => false]; - $obj = $this->prepareData($this->post); - $obj->save(); + $type = $this->getDataType(); + $this->updatePluginState($type, ['enabled' => false]); $this->post = ['_redirect' => 'plugins']; $this->admin->setMessage($this->admin::translate('PLUGIN_ADMIN.SUCCESSFULLY_DISABLED_PLUGIN'), 'info'); @@ -675,6 +673,30 @@ public function taskDisable() return true; } + /** + * @param string $type + * @param array $value + * @return void + */ + protected function updatePluginState(string $type, array $value): void + { + $obj = Plugins::get(preg_replace('|plugins/|', '', $type)); + if (null === $obj) { + throw new \RuntimeException("Plugin '{$type}' doesn't exist!"); + } + + /** @var UniformResourceLocator $locator */ + $locator = $this->grav['locator']; + + // Configuration file will be saved to the existing config stream. + $filename = $locator->findResource('config://') . "/{$type}.yaml"; + + $file = YamlFile::instance($filename); + $contents = $value + $file->content(); + + $file->save($contents); + } + /** * Set the default theme. * @@ -917,7 +939,7 @@ protected function taskGetUpdates() $debugger = $this->grav['debugger']; $debugger->addException($e); - $this->admin->json_response = ['status' => 'error', 'message' => $e->getMessage()]; + $this->admin->json_response = ['status' => 'error', 'message' => htmlspecialchars($e->getMessage(), ENT_QUOTES | ENT_HTML5, 'UTF-8')]; return false; } @@ -961,7 +983,7 @@ protected function taskGetPackagesDependencies() $debugger = $this->grav['debugger']; $debugger->addException($e); - $this->admin->json_response = ['status' => 'error', 'message' => $e->getMessage()]; + $this->admin->json_response = ['status' => 'error', 'message' => htmlspecialchars($e->getMessage(), ENT_QUOTES | ENT_HTML5, 'UTF-8')]; return false; } @@ -1004,7 +1026,7 @@ protected function taskInstallDependenciesOfPackages() $debugger = $this->grav['debugger']; $debugger->addException($e); - $this->admin->json_response = ['status' => 'error', 'message' => $e->getMessage()]; + $this->admin->json_response = ['status' => 'error', 'message' => htmlspecialchars($e->getMessage(), ENT_QUOTES | ENT_HTML5, 'UTF-8')]; return false; } @@ -1059,7 +1081,7 @@ protected function taskInstallPackage($reinstall = false) $msg = Utils::contains($msg, '401 Unauthorized') ? "ERROR: License key for this resource is invalid." : $msg; $msg = Utils::contains($msg, '404 Not Found') ? "ERROR: Resource not found" : $msg; - $this->admin->json_response = ['status' => 'error', 'message' => $msg]; + $this->admin->json_response = ['status' => 'error', 'message' => htmlspecialchars($msg, ENT_QUOTES | ENT_HTML5, 'UTF-8')]; return false; } @@ -1133,7 +1155,7 @@ protected function taskRemovePackage(): bool $debugger = $this->grav['debugger']; $debugger->addException($e); - $json_response = ['status' => 'error', 'message' => $e->getMessage()]; + $json_response = ['status' => 'error', 'message' => htmlspecialchars($e->getMessage(), ENT_QUOTES | ENT_HTML5, 'UTF-8')]; $this->sendJsonResponse($json_response, 200); } @@ -2068,7 +2090,7 @@ protected function taskProcessMarkdown() $debugger = $this->grav['debugger']; $debugger->addException($e); - $this->admin->json_response = ['status' => 'error', 'message' => $e->getMessage()]; + $this->admin->json_response = ['status' => 'error', 'message' => htmlspecialchars($e->getMessage(), ENT_QUOTES | ENT_HTML5, 'UTF-8')]; return false; } @@ -2225,7 +2247,7 @@ protected function taskAddmedia() $this->admin->json_response = [ 'status' => 'error', 'message' => sprintf($this->admin::translate('PLUGIN_ADMIN.FILEUPLOAD_UNABLE_TO_UPLOAD'), - $filename, 'Bad filename') + htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8'), 'Bad filename') ]; return false; @@ -2244,7 +2266,7 @@ protected function taskAddmedia() // Check extension - $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); + $extension = strtolower(Utils::pathinfo($filename, PATHINFO_EXTENSION)); // If not a supported type, return if (!$extension || !$config->get("media.types.{$extension}")) { @@ -2293,7 +2315,7 @@ protected function taskAddmedia() // Add metadata if needed $include_metadata = Grav::instance()['config']->get('system.media.auto_metadata_exif', false); - $basename = str_replace(['@3x', '@2x'], '', pathinfo($filename, PATHINFO_BASENAME)); + $basename = str_replace(['@3x', '@2x'], '', Utils::pathinfo($filename, PATHINFO_BASENAME)); $metadata = []; @@ -2423,7 +2445,7 @@ protected function taskDelmedia() return false; } - $filename = !empty($this->post['filename']) ? basename($this->post['filename']) : null; + $filename = !empty($this->post['filename']) ? Utils::basename($this->post['filename']) : null; // Handle bad filenames. if (!$filename || !Utils::checkFilename($filename)) { @@ -2442,7 +2464,7 @@ protected function taskDelmedia() if ($locator->isStream($targetPath)) { $targetPath = $locator->findResource($targetPath, true, true); } - $fileParts = pathinfo($filename); + $fileParts = Utils::pathinfo($filename); $found = false; @@ -2453,7 +2475,7 @@ protected function taskDelmedia() if (!$result) { $this->admin->json_response = [ 'status' => 'error', - 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_COULD_NOT_BE_DELETED') . ': ' . $filename + 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_COULD_NOT_BE_DELETED') . ': ' . htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8') ]; return false; @@ -2474,7 +2496,7 @@ protected function taskDelmedia() if (!$result) { $this->admin->json_response = [ 'status' => 'error', - 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_COULD_NOT_BE_DELETED') . ': ' . $filename + 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_COULD_NOT_BE_DELETED') . ': ' . htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8') ]; return false; @@ -2489,7 +2511,7 @@ protected function taskDelmedia() if (!$found) { $this->admin->json_response = [ 'status' => 'error', - 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_NOT_FOUND') . ': ' . $filename + 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_NOT_FOUND') . ': ' . htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8') ]; return false; @@ -2500,7 +2522,7 @@ protected function taskDelmedia() $this->admin->json_response = [ 'status' => 'success', - 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_DELETED') . ': ' . $filename + 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_DELETED') . ': ' . htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8') ]; return true; @@ -2626,7 +2648,7 @@ protected function getLevelListing($data) $payload = [ 'name' => $file_page ? $file_page->title() : $fileName, 'value' => $file_page ? $file_page->rawRoute() : $file_path, - 'item-key' => basename($file_page ? $file_page->route() : $file_path), + 'item-key' => Utils::basename($file_page ? $file_page->route() : $file_path), 'filename' => $fileName, 'extension' => $type === 'dir' ? '' : $fileInfo->getExtension(), 'type' => $type, diff --git a/plugins/admin/classes/plugin/AdminForm.php b/plugins/admin/classes/plugin/AdminForm.php index 668ddbd3..3402136e 100644 --- a/plugins/admin/classes/plugin/AdminForm.php +++ b/plugins/admin/classes/plugin/AdminForm.php @@ -3,7 +3,7 @@ /** * @package Grav\Plugin\Admin * - * @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved. + * @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @license MIT License; see LICENSE file for details. */ diff --git a/plugins/admin/classes/plugin/Controllers/AbstractController.php b/plugins/admin/classes/plugin/Controllers/AbstractController.php index ff7a8ff9..4949727c 100644 --- a/plugins/admin/classes/plugin/Controllers/AbstractController.php +++ b/plugins/admin/classes/plugin/Controllers/AbstractController.php @@ -292,7 +292,7 @@ public function createErrorResponse(\Exception $exception): ResponseInterface $response = [ 'code' => $code, 'status' => 'error', - 'message' => $message + 'message' => htmlspecialchars($message, ENT_QUOTES | ENT_HTML5, 'UTF-8') ]; $accept = $this->getAccept(['application/json', 'text/html']); diff --git a/plugins/admin/classes/plugin/Controllers/AdminController.php b/plugins/admin/classes/plugin/Controllers/AdminController.php index 600cfb50..7b4c5769 100644 --- a/plugins/admin/classes/plugin/Controllers/AdminController.php +++ b/plugins/admin/classes/plugin/Controllers/AdminController.php @@ -3,7 +3,7 @@ /** * @package Grav\Plugin\Admin * - * @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved. + * @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @license MIT License; see LICENSE file for details. */ diff --git a/plugins/admin/classes/plugin/Controllers/Login/LoginController.php b/plugins/admin/classes/plugin/Controllers/Login/LoginController.php index 1e3c81f0..44790e34 100644 --- a/plugins/admin/classes/plugin/Controllers/Login/LoginController.php +++ b/plugins/admin/classes/plugin/Controllers/Login/LoginController.php @@ -3,7 +3,7 @@ /** * @package Grav\Plugin\Admin * - * @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved. + * @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @license MIT License; see LICENSE file for details. */ @@ -15,6 +15,7 @@ use Grav\Common\Uri; use Grav\Common\User\Interfaces\UserCollectionInterface; use Grav\Common\User\Interfaces\UserInterface; +use Grav\Common\Utils; use Grav\Framework\RequestHandler\Exception\PageExpiredException; use Grav\Framework\RequestHandler\Exception\RequestException; use Grav\Plugin\Admin\Admin; @@ -111,7 +112,7 @@ public function displayUnauthorized(): ResponseInterface { $uri = (string)$this->getRequest()->getUri(); - $ext = pathinfo($uri, PATHINFO_EXTENSION); + $ext = Utils::pathinfo($uri, PATHINFO_EXTENSION); $accept = $this->getAccept(['application/json', 'text/html']); if ($ext === 'json' || $accept === 'application/json') { return $this->createErrorResponse(new RequestException($this->getRequest(), $this->translate('PLUGIN_ADMIN.LOGGED_OUT'), 401)); @@ -275,11 +276,17 @@ public function taskTwofa(): ResponseInterface $twoFa = null; } - $code = $data['2fa_code'] ?? null; - $secret = $user->twofa_secret ?? null; + $code = $data['2fa_code'] ?? ''; + $secret = $user->twofa_secret ?? ''; + $twofa_valid = $twoFa->verifyCode($secret, $code); + + $yubikey_otp = $data['yubikey_otp'] ?? ''; + $yubikey_id = $user->yubikey_id ?? ''; + $yubikey_valid = $twoFa->verifyYubikeyOTP($yubikey_id, $yubikey_otp); + $redirect = (string)$this->getRequest()->getUri(); - if (null === $twoFa || !$user->authenticated || !$code || !$secret || !$twoFa->verifyCode($secret, $code)) { + if (null === $twoFa || !$user->authenticated || (!$twofa_valid && !$yubikey_valid) ) { Admin::DEBUG && Admin::addDebugMessage('Admin login: 2FA check failed, log out!'); // Failed 2FA auth, logout and redirect to the current page. diff --git a/plugins/admin/classes/plugin/Gpm.php b/plugins/admin/classes/plugin/Gpm.php index 0879eaf0..61975d05 100644 --- a/plugins/admin/classes/plugin/Gpm.php +++ b/plugins/admin/classes/plugin/Gpm.php @@ -316,7 +316,7 @@ private static function download(Package $package, $license = null) $bad_chars = array_merge(array_map('chr', range(0, 31)), ['<', '>', ':', '"', '/', '\\', '|', '?', '*']); - $filename = $package->slug . str_replace($bad_chars, '', basename($package->zipball_url)); + $filename = $package->slug . str_replace($bad_chars, '', \Grav\Common\Utils::basename($package->zipball_url)); $filename = preg_replace('/[\\\\\/:"*?&<>|]+/m', '-', $filename); file_put_contents($tmp_dir . DS . $filename . '.zip', $contents); @@ -363,7 +363,7 @@ public static function selfupgrade() $error[] = '

Grav has increased the minimum PHP requirement.
'; $error[] = 'You are currently running PHP ' . phpversion() . ''; $error[] = ', but PHP ' . $upgrader->minPHPVersion() . ' is required.

'; - $error[] = '

Additional information

'; + $error[] = '

Additional information

'; Installer::setError(implode("\n", $error)); diff --git a/plugins/admin/classes/plugin/Routers/LoginRouter.php b/plugins/admin/classes/plugin/Routers/LoginRouter.php index df36339a..01142e1d 100644 --- a/plugins/admin/classes/plugin/Routers/LoginRouter.php +++ b/plugins/admin/classes/plugin/Routers/LoginRouter.php @@ -3,7 +3,7 @@ /** * @package Grav\Plugin\Admin * - * @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved. + * @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @license MIT License; see LICENSE file for details. */ diff --git a/plugins/admin/composer.json b/plugins/admin/composer.json index b7f3b4d2..1fe051ac 100644 --- a/plugins/admin/composer.json +++ b/plugins/admin/composer.json @@ -23,7 +23,8 @@ "php": "^7.3.6 || ^8.0", "ext-json": "*", "p3k/picofeed": "@stable", - "scssphp/scssphp": "^1.7" + "scssphp/scssphp": "^1.7", + "laminas/laminas-zendframework-bridge": "^1.4" }, "require-dev": { "codeception/codeception": "^2.4", diff --git a/plugins/admin/composer.lock b/plugins/admin/composer.lock index fc342701..51928908 100644 --- a/plugins/admin/composer.lock +++ b/plugins/admin/composer.lock @@ -4,33 +4,35 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9841a8a750e293f602d3064be4fd61b4", + "content-hash": "e95b50cceb85b45792cbca45623f6a91", "packages": [ { "name": "laminas/laminas-xml", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-xml.git", - "reference": "2eada592359aec9d9e55339270b621295cff3a4f" + "reference": "dcadeefdb6d7ed6b39d772b47e3845003d6ea60f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-xml/zipball/2eada592359aec9d9e55339270b621295cff3a4f", - "reference": "2eada592359aec9d9e55339270b621295cff3a4f", + "url": "https://api.github.com/repos/laminas/laminas-xml/zipball/dcadeefdb6d7ed6b39d772b47e3845003d6ea60f", + "reference": "dcadeefdb6d7ed6b39d772b47e3845003d6ea60f", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0" + "ext-dom": "*", + "ext-simplexml": "*", + "php": "^7.3 || ~8.0.0 || ~8.1.0" }, - "replace": { - "zendframework/zendxml": "^1.2.0" + "conflict": { + "zendframework/zendxml": "*" }, "require-dev": { "ext-iconv": "*", "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^9.4" + "phpunit/phpunit": "^9.5.8", + "squizlabs/php_codesniffer": "3.6.1 as 2.9999999.9999999" }, "type": "library", "autoload": { @@ -62,20 +64,20 @@ "type": "community_bridge" } ], - "time": "2021-02-17T22:44:58+00:00" + "time": "2021-11-30T02:16:35+00:00" }, { "name": "laminas/laminas-zendframework-bridge", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf" + "reference": "88bf037259869891afce6504cacc4f8a07b24d0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/bf180a382393e7db5c1e8d0f2ec0c4af9c724baf", - "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/88bf037259869891afce6504cacc4f8a07b24d0f", + "reference": "88bf037259869891afce6504cacc4f8a07b24d0f", "shasum": "" }, "require": { @@ -124,7 +126,7 @@ "type": "community_bridge" } ], - "time": "2021-09-03T17:53:30+00:00" + "time": "2021-12-21T14:34:37+00:00" }, { "name": "p3k/picofeed", @@ -188,16 +190,16 @@ }, { "name": "scssphp/scssphp", - "version": "v1.8.1", + "version": "v1.10.4", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "5e37759a63caf54392a4b709358a39ac7425a69f" + "reference": "8ed20753db2d3d82629e6f5d35535bbbd3893b0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/5e37759a63caf54392a4b709358a39ac7425a69f", - "reference": "5e37759a63caf54392a4b709358a39ac7425a69f", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/8ed20753db2d3d82629e6f5d35535bbbd3893b0c", + "reference": "8ed20753db2d3d82629e6f5d35535bbbd3893b0c", "shasum": "" }, "require": { @@ -213,7 +215,7 @@ "symfony/phpunit-bridge": "^5.1", "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", - "twbs/bootstrap4": "4.6.0", + "twbs/bootstrap4": "4.6.1", "zurb/foundation": "~6.5" }, "suggest": { @@ -224,6 +226,12 @@ "bin/pscss" ], "type": "library", + "extra": { + "bamarni-bin": { + "forward-command": false, + "bin-links": false + } + }, "autoload": { "psr-4": { "ScssPhp\\ScssPhp\\": "src/" @@ -256,33 +264,32 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.8.1" + "source": "https://github.com/scssphp/scssphp/tree/v1.10.4" }, - "time": "2021-09-18T21:20:53+00:00" + "time": "2022-07-26T16:28:33+00:00" } ], "packages-dev": [ { "name": "behat/gherkin", - "version": "v4.8.0", + "version": "v4.9.0", "source": { "type": "git", "url": "https://github.com/Behat/Gherkin.git", - "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd" + "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/2391482cd003dfdc36b679b27e9f5326bd656acd", - "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/0bc8d1e30e96183e4f36db9dc79caead300beff4", + "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4", "shasum": "" }, "require": { "php": "~7.2|~8.0" }, "require-dev": { - "cucumber/cucumber": "dev-gherkin-16.0.0", + "cucumber/cucumber": "dev-gherkin-22.0.0", "phpunit/phpunit": "~8|~9", - "symfony/phpunit-bridge": "~3|~4|~5", "symfony/yaml": "~3|~4|~5" }, "suggest": { @@ -291,7 +298,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -322,9 +329,9 @@ ], "support": { "issues": "https://github.com/Behat/Gherkin/issues", - "source": "https://github.com/Behat/Gherkin/tree/v4.8.0" + "source": "https://github.com/Behat/Gherkin/tree/v4.9.0" }, - "time": "2021-02-04T12:44:21+00:00" + "time": "2021-10-12T13:05:09+00:00" }, { "name": "codeception/codeception", @@ -424,16 +431,16 @@ }, { "name": "codeception/phpunit-wrapper", - "version": "7.8.2", + "version": "7.8.4", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "cafed18048826790c527843f9b85e8cc79b866f1" + "reference": "dd44fc152433d27d3de03d59b4945449b3407af0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/cafed18048826790c527843f9b85e8cc79b866f1", - "reference": "cafed18048826790c527843f9b85e8cc79b866f1", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/dd44fc152433d27d3de03d59b4945449b3407af0", + "reference": "dd44fc152433d27d3de03d59b4945449b3407af0", "shasum": "" }, "require": { @@ -465,9 +472,9 @@ "description": "PHPUnit classes used by Codeception", "support": { "issues": "https://github.com/Codeception/phpunit-wrapper/issues", - "source": "https://github.com/Codeception/phpunit-wrapper/tree/7.8.2" + "source": "https://github.com/Codeception/phpunit-wrapper/tree/7.8.4" }, - "time": "2020-12-28T14:00:26+00:00" + "time": "2022-05-23T06:09:22+00:00" }, { "name": "codeception/stub", @@ -505,29 +512,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { @@ -554,7 +562,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, "funding": [ { @@ -570,7 +578,7 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-03-03T08:28:38+00:00" }, { "name": "facebook/webdriver", @@ -695,24 +703,24 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.5", + "version": "6.5.8", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981", + "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", + "guzzlehttp/psr7": "^1.9", "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17.0" + "symfony/polyfill-intl-idn": "^1.17" }, "require-dev": { "ext-curl": "*", @@ -729,22 +737,52 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", @@ -760,22 +798,36 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5" + "source": "https://github.com/guzzle/guzzle/tree/6.5.8" }, - "time": "2020-06-16T21:01:06+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2022-06-20T22:16:07+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.4.1", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "shasum": "" }, "require": { @@ -787,26 +839,41 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle promises library", @@ -815,22 +882,36 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.1" + "source": "https://github.com/guzzle/promises/tree/1.5.1" }, - "time": "2021-03-07T09:25:29+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2021-10-22T20:56:57+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.8.2", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91" + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", "shasum": "" }, "require": { @@ -851,29 +932,50 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, { "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" } ], @@ -890,43 +992,58 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.2" + "source": "https://github.com/guzzle/psr7/tree/1.9.0" }, - "time": "2021-04-26T09:17:50+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2022-06-20T21:43:03+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -942,7 +1059,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -950,7 +1067,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "phar-io/manifest", @@ -1117,16 +1234,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { @@ -1137,7 +1254,8 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -1167,22 +1285,22 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.5.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -1217,22 +1335,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2021-09-17T15:28:14+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpspec/prophecy", - "version": "1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { @@ -1284,9 +1402,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" }, - "time": "2021-09-10T09:02:12+00:00" + "time": "2021-12-08T12:19:24+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1357,16 +1475,16 @@ }, { "name": "phpunit/php-file-iterator", - "version": "2.0.4", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05" + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05", - "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "shasum": "" }, "require": { @@ -1405,7 +1523,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" }, "funding": [ { @@ -1413,7 +1531,7 @@ "type": "github" } ], - "time": "2021-07-19T06:46:01+00:00" + "time": "2021-12-02T12:42:26+00:00" }, { "name": "phpunit/php-text-template", @@ -2072,16 +2190,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.3", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", "shasum": "" }, "require": { @@ -2090,7 +2208,7 @@ }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -2137,7 +2255,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" }, "funding": [ { @@ -2145,7 +2263,7 @@ "type": "github" } ], - "time": "2020-11-30T07:47:53+00:00" + "time": "2021-11-11T13:51:24+00:00" }, { "name": "sebastian/global-state", @@ -2478,16 +2596,16 @@ }, { "name": "symfony/browser-kit", - "version": "v4.4.27", + "version": "v4.4.37", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "9629d1524d8ced5a4ec3e94abdbd638b4ec8319b" + "reference": "6e81008cac62369871cb6b8de64576ed138e3998" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/9629d1524d8ced5a4ec3e94abdbd638b4ec8319b", - "reference": "9629d1524d8ced5a4ec3e94abdbd638b4ec8319b", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/6e81008cac62369871cb6b8de64576ed138e3998", + "reference": "6e81008cac62369871cb6b8de64576ed138e3998", "shasum": "" }, "require": { @@ -2530,7 +2648,7 @@ "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/browser-kit/tree/v4.4.27" + "source": "https://github.com/symfony/browser-kit/tree/v4.4.37" }, "funding": [ { @@ -2546,20 +2664,20 @@ "type": "tidelift" } ], - "time": "2021-07-21T12:19:41+00:00" + "time": "2022-01-02T09:41:36+00:00" }, { "name": "symfony/console", - "version": "v4.4.30", + "version": "v4.4.43", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22" + "reference": "8a2628d2d5639f35113dc1b833ecd91e1ed1cf46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a3f7189a0665ee33b50e9e228c46f50f5acbed22", - "reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22", + "url": "https://api.github.com/repos/symfony/console/zipball/8a2628d2d5639f35113dc1b833ecd91e1ed1cf46", + "reference": "8a2628d2d5639f35113dc1b833ecd91e1ed1cf46", "shasum": "" }, "require": { @@ -2620,7 +2738,7 @@ "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.30" + "source": "https://github.com/symfony/console/tree/v4.4.43" }, "funding": [ { @@ -2636,20 +2754,20 @@ "type": "tidelift" } ], - "time": "2021-08-25T19:27:26+00:00" + "time": "2022-06-23T12:22:25+00:00" }, { "name": "symfony/css-selector", - "version": "v4.4.27", + "version": "v4.4.37", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6" + "reference": "0628e6c6d7c92f1a7bae543959bdc17347be2436" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6", - "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/0628e6c6d7c92f1a7bae543959bdc17347be2436", + "reference": "0628e6c6d7c92f1a7bae543959bdc17347be2436", "shasum": "" }, "require": { @@ -2686,7 +2804,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v4.4.27" + "source": "https://github.com/symfony/css-selector/tree/v4.4.37" }, "funding": [ { @@ -2702,20 +2820,87 @@ "type": "tidelift" } ], - "time": "2021-07-21T12:19:41+00:00" + "time": "2022-01-02T09:41:36+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.4.30", + "version": "v4.4.42", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "4632ae3567746c7e915c33c67a2fb6ab746090c4" + "reference": "be5a04618e5d44e71d013f177df80d3ec4b192a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4632ae3567746c7e915c33c67a2fb6ab746090c4", - "reference": "4632ae3567746c7e915c33c67a2fb6ab746090c4", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/be5a04618e5d44e71d013f177df80d3ec4b192a0", + "reference": "be5a04618e5d44e71d013f177df80d3ec4b192a0", "shasum": "" }, "require": { @@ -2760,7 +2945,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v4.4.30" + "source": "https://github.com/symfony/dom-crawler/tree/v4.4.42" }, "funding": [ { @@ -2776,20 +2961,20 @@ "type": "tidelift" } ], - "time": "2021-08-28T15:40:01+00:00" + "time": "2022-04-30T18:34:00+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.30", + "version": "v4.4.42", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "2fe81680070043c4c80e7cedceb797e34f377bac" + "reference": "708e761740c16b02c86e3f0c932018a06b895d40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2fe81680070043c4c80e7cedceb797e34f377bac", - "reference": "2fe81680070043c4c80e7cedceb797e34f377bac", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/708e761740c16b02c86e3f0c932018a06b895d40", + "reference": "708e761740c16b02c86e3f0c932018a06b895d40", "shasum": "" }, "require": { @@ -2844,7 +3029,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.30" + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.42" }, "funding": [ { @@ -2860,20 +3045,20 @@ "type": "tidelift" } ], - "time": "2021-08-04T20:31:23+00:00" + "time": "2022-05-05T15:33:49+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.9", + "version": "v1.1.13", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7" + "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7", - "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/1d5cd762abaa6b2a4169d3e77610193a7157129e", + "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e", "shasum": "" }, "require": { @@ -2886,7 +3071,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "1.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -2923,7 +3108,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.9" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.13" }, "funding": [ { @@ -2939,20 +3124,20 @@ "type": "tidelift" } ], - "time": "2020-07-06T13:19:58+00:00" + "time": "2022-01-02T09:41:36+00:00" }, { "name": "symfony/finder", - "version": "v4.4.30", + "version": "v4.4.41", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "70362f1e112280d75b30087c7598b837c1b468b6" + "reference": "40790bdf293b462798882ef6da72bb49a4a6633a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/70362f1e112280d75b30087c7598b837c1b468b6", - "reference": "70362f1e112280d75b30087c7598b837c1b468b6", + "url": "https://api.github.com/repos/symfony/finder/zipball/40790bdf293b462798882ef6da72bb49a4a6633a", + "reference": "40790bdf293b462798882ef6da72bb49a4a6633a", "shasum": "" }, "require": { @@ -2985,7 +3170,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v4.4.30" + "source": "https://github.com/symfony/finder/tree/v4.4.41" }, "funding": [ { @@ -3001,32 +3186,35 @@ "type": "tidelift" } ], - "time": "2021-08-04T20:31:23+00:00" + "time": "2022-04-14T15:36:10+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3034,12 +3222,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3064,7 +3252,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -3080,20 +3268,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.23.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", - "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { @@ -3107,7 +3295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3115,12 +3303,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3151,7 +3339,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" }, "funding": [ { @@ -3167,20 +3355,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:27:20+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -3192,7 +3380,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3200,12 +3388,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -3235,7 +3423,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -3251,32 +3439,35 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3284,12 +3475,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3315,7 +3506,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -3331,20 +3522,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.23.1", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -3353,7 +3544,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3361,12 +3552,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -3398,7 +3589,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -3414,20 +3605,20 @@ "type": "tidelift" } ], - "time": "2021-07-28T13:41:28+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { "name": "symfony/process", - "version": "v4.4.30", + "version": "v4.4.41", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d" + "reference": "9eedd60225506d56e42210a70c21bb80ca8456ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d", - "reference": "13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d", + "url": "https://api.github.com/repos/symfony/process/zipball/9eedd60225506d56e42210a70c21bb80ca8456ce", + "reference": "9eedd60225506d56e42210a70c21bb80ca8456ce", "shasum": "" }, "require": { @@ -3460,7 +3651,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v4.4.30" + "source": "https://github.com/symfony/process/tree/v4.4.41" }, "funding": [ { @@ -3476,25 +3667,29 @@ "type": "tidelift" } ], - "time": "2021-08-04T20:31:23+00:00" + "time": "2022-04-04T10:19:07+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.4.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/container": "^1.1" + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -3502,7 +3697,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -3539,7 +3734,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -3555,20 +3750,20 @@ "type": "tidelift" } ], - "time": "2021-04-01T10:43:52+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "symfony/yaml", - "version": "v4.4.29", + "version": "v4.4.43", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "3abcc4db06d4e776825eaa3ed8ad924d5bc7432a" + "reference": "07e392f0ef78376d080d5353c081a5e5704835bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/3abcc4db06d4e776825eaa3ed8ad924d5bc7432a", - "reference": "3abcc4db06d4e776825eaa3ed8ad924d5bc7432a", + "url": "https://api.github.com/repos/symfony/yaml/zipball/07e392f0ef78376d080d5353c081a5e5704835bd", + "reference": "07e392f0ef78376d080d5353c081a5e5704835bd", "shasum": "" }, "require": { @@ -3610,7 +3805,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v4.4.29" + "source": "https://github.com/symfony/yaml/tree/v4.4.43" }, "funding": [ { @@ -3626,7 +3821,7 @@ "type": "tidelift" } ], - "time": "2021-07-27T16:19:30+00:00" + "time": "2022-06-20T08:31:17+00:00" }, { "name": "theseer/tokenizer", @@ -3680,21 +3875,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -3732,9 +3927,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], @@ -3752,5 +3947,5 @@ "platform-overrides": { "php": "7.3.6" }, - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/plugins/admin/languages/ar.yaml b/plugins/admin/languages/ar.yaml index b2a04f32..f9d2fa9f 100644 --- a/plugins/admin/languages/ar.yaml +++ b/plugins/admin/languages/ar.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "هذا إصدار بيتا! استخدم هذا في الإنتاج على مسؤوليتك الخاصة..." ADMIN_REPORT_ISSUE: "وجدت مشكلة؟ الرجاء الإبلاغ عن GitHub." - EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" + EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" LOGIN_BTN: "تسجل الدخول" LOGIN_BTN_FORGOT: "نسيت" LOGIN_BTN_RESET: "إعادة تعيين كلمة المرور" diff --git a/plugins/admin/languages/bg.yaml b/plugins/admin/languages/bg.yaml index 9baa86e0..33d6a893 100644 --- a/plugins/admin/languages/bg.yaml +++ b/plugins/admin/languages/bg.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Това е Бета версия! Използвате на ваша отговорност..." ADMIN_REPORT_ISSUE: "Открили сте проблем? Моля, съобщете за него в GitHub." - EMAIL_FOOTER: "Задвижван от Grav - Модерният Флат Файл CMS" + EMAIL_FOOTER: "Задвижван от Grav - Модерният Флат Файл CMS" LOGIN_BTN: "Вход" LOGIN_BTN_FORGOT: "Забравена парола" LOGIN_BTN_RESET: "Промяна на паролата" diff --git a/plugins/admin/languages/br.yaml b/plugins/admin/languages/br.yaml index a9f8547b..97c42b2c 100644 --- a/plugins/admin/languages/br.yaml +++ b/plugins/admin/languages/br.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Un ermaeziadenn beta an hini eo! Arverit en endro produadur gant evezh..." ADMIN_REPORT_ISSUE: "Kavet hoc'h eus ur gudenn? Danevellit anezhi war Github." - EMAIL_FOOTER: "Lusket gant Grav - Ar CMS Restr plad modern" + EMAIL_FOOTER: "Lusket gant Grav - Ar CMS Restr plad modern" LOGIN_BTN: "Anv arveriad" LOGIN_BTN_FORGOT: "Ankouaet" LOGIN_BTN_RESET: "Adderaouekaat ar ger-tremen" diff --git a/plugins/admin/languages/ca.yaml b/plugins/admin/languages/ca.yaml index 09126f0e..0d9e94bc 100644 --- a/plugins/admin/languages/ca.yaml +++ b/plugins/admin/languages/ca.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Aquesta és una versió beta! Utilitza-la en producció sota el teu propi risc..." ADMIN_REPORT_ISSUE: "Has trobat algun problema? Sisplau, reporta'l a GitHub." - EMAIL_FOOTER: "Funcionant amb Grav - El CMS de fitxers plans modern" + EMAIL_FOOTER: "Funcionant amb Grav - El CMS de fitxers plans modern" LOGIN_BTN: "Inicia sessió" LOGIN_BTN_FORGOT: "Ho he oblidat" LOGIN_BTN_RESET: "Restablir contrasenya" diff --git a/plugins/admin/languages/cs.yaml b/plugins/admin/languages/cs.yaml index d4ab209a..5fe6cd57 100644 --- a/plugins/admin/languages/cs.yaml +++ b/plugins/admin/languages/cs.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Prosím povolte JavaScript ve vašem prohlížeči." ADMIN_BETA_MSG: "Jedná se o beta verzi! V ostrém provozu používejte pouze na vlastní nebezpečí..." ADMIN_REPORT_ISSUE: "Objevili jste problém? Nahlaste ho, prosím, na GitHub." - EMAIL_FOOTER: "Beží na Grav CMS - Moderní správce obsahu pomocí souborů prostých textů" + EMAIL_FOOTER: "Beží na Grav CMS - Moderní správce obsahu pomocí souborů prostých textů" LOGIN_BTN: "Přihlásit" LOGIN_BTN_FORGOT: "Obnovit heslo" LOGIN_BTN_RESET: "Obnovit heslo" diff --git a/plugins/admin/languages/cy.yaml b/plugins/admin/languages/cy.yaml index 52b216d8..21cd6610 100644 --- a/plugins/admin/languages/cy.yaml +++ b/plugins/admin/languages/cy.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Mae hwn yn fersiwn beta! Defnyddio hwn yn cynhyrchu ar risg eich hun..." ADMIN_REPORT_ISSUE: "Canfod problem? Rhowch wybod ar GitHub." - EMAIL_FOOTER: " wedi'u pweru gan Grav-ffeil fflat Modern CMS" + EMAIL_FOOTER: " wedi'u pweru gan Grav-ffeil fflat Modern CMS" LOGIN_BTN: "Mewngofnodi" LOGIN_BTN_FORGOT: "Anghofio" LOGIN_BTN_RESET: "Ailosod cyfrinair" diff --git a/plugins/admin/languages/da.yaml b/plugins/admin/languages/da.yaml index ab0670e9..7016de78 100644 --- a/plugins/admin/languages/da.yaml +++ b/plugins/admin/languages/da.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Aktivér JavaScript i din browser." ADMIN_BETA_MSG: "Dette er en beta-udgivelse! Brug i produktionsmiljøer er på egen risiko..." ADMIN_REPORT_ISSUE: "Har du fundet et problem? Så bedes du rapportere det på GitHub." - EMAIL_FOOTER: "Drevet af Grav - det moderne fladfil-CMS" + EMAIL_FOOTER: "Drevet af Grav - det moderne fladfil-CMS" LOGIN_BTN: "Login" LOGIN_BTN_FORGOT: "Glemt" LOGIN_BTN_RESET: "Nulstil adgangskode" diff --git a/plugins/admin/languages/de.yaml b/plugins/admin/languages/de.yaml index fa55bade..09d72d67 100644 --- a/plugins/admin/languages/de.yaml +++ b/plugins/admin/languages/de.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Bitte aktivieren Sie JavaScript in Ihrem Browser." ADMIN_BETA_MSG: "Dies ist eine Beta-Version! Benutzung auf eigene Gefahr..." ADMIN_REPORT_ISSUE: "Fehler gefunden? Bitte melden Sie ihn auf GitHub." - EMAIL_FOOTER: " Umgesetzt mit Grav - dem modernen Flat-File CMS" + EMAIL_FOOTER: " Umgesetzt mit Grav - dem modernen Flat-File CMS" LOGIN_BTN: "Anmelden" LOGIN_BTN_FORGOT: "Passwort vergessen" LOGIN_BTN_RESET: "Passwort zurücksetzen" diff --git a/plugins/admin/languages/el.yaml b/plugins/admin/languages/el.yaml index 172e2f28..2c7671f6 100644 --- a/plugins/admin/languages/el.yaml +++ b/plugins/admin/languages/el.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Αυτή είναι δοκιμαστική έκδοση (beta)! Χρησιμοποιήστε την στην παραγωγή με δική σας ευθύνη..." ADMIN_REPORT_ISSUE: "Βρήκατε κάποιο πρόβλημα; Παρακαλείστε να το αναφέρετε στο GitHub." - EMAIL_FOOTER: " με την ισχύ του Grav - Το μοντέρνο CMS χωρίς τη χρήση Βάσης Δεδομένων" + EMAIL_FOOTER: " με την ισχύ του Grav - Το μοντέρνο CMS χωρίς τη χρήση Βάσης Δεδομένων" LOGIN_BTN: "Σύνδεση" LOGIN_BTN_FORGOT: "Το ξέχασα" LOGIN_BTN_RESET: "Επαναφορά συνθηματικού" diff --git a/plugins/admin/languages/en.yaml b/plugins/admin/languages/en.yaml index 0d61ed75..87ebb0c6 100644 --- a/plugins/admin/languages/en.yaml +++ b/plugins/admin/languages/en.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Please enable JavaScript in your browser." ADMIN_BETA_MSG: "This is a Beta release! Use this in production at your own risk..." ADMIN_REPORT_ISSUE: "Found an issue? Please report it on GitHub." - EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" + EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" LOGIN_BTN: "Login" LOGIN_BTN_FORGOT: "Forgot" LOGIN_BTN_RESET: "Reset Password" @@ -191,6 +191,8 @@ PLUGIN_ADMIN: FILE_COULD_NOT_BE_DELETED: "File could not be deleted" FILE_NOT_FOUND: "File not found" NO_FILE_FOUND: "No file found" + FIELD_REORDER_SUCCESSFUL: "Media Order updated for field '%s'" + FIELD_REORDER_FAILED: "An error occurred while storing the media order for the field '%s'" GRAV_WAS_SUCCESSFULLY_UPDATED_TO: "Grav was successfully updated to" GRAV_UPDATE_FAILED: "Grav update failed" EVERYTHING_UPDATED: "Everything updated" @@ -394,6 +396,7 @@ PLUGIN_ADMIN: AUTOESCAPE_VARIABLES: "Autoescape variables" AUTOESCAPE_VARIABLES_HELP: "Autoescapes all variables. This will break your site most likely" ASSETS: "Assets" + CSS_ASSETS: "CSS Assets" CSS_PIPELINE: "CSS pipeline" CSS_PIPELINE_HELP: "The CSS pipeline is the unification of multiple CSS resources into one file" CSS_PIPELINE_INCLUDE_EXTERNALS: "Include externals in CSS pipeline" @@ -406,12 +409,21 @@ PLUGIN_ADMIN: CSS_MINIFY_WINDOWS_OVERRIDE_HELP: "Minify Override for Windows platforms. False by default due to ThreadStackSize" CSS_REWRITE: "CSS rewrite" CSS_REWRITE_HELP: "Rewrite any CSS relative URLs during pipelining" + JS_ASSETS: "JavaScript Assets" JAVASCRIPT_PIPELINE: "JavaScript pipeline" JAVASCRIPT_PIPELINE_HELP: "The JS pipeline is the unification of multiple JS resources into one file" JAVASCRIPT_PIPELINE_INCLUDE_EXTERNALS: "Include externals in JS pipeline" JAVASCRIPT_PIPELINE_INCLUDE_EXTERNALS_HELP: "External URLs sometimes have relative file references and shouldn't be pipelined" JAVASCRIPT_PIPELINE_BEFORE_EXCLUDES: "JS pipeline render first" JAVASCRIPT_PIPELINE_BEFORE_EXCLUDES_HELP: "Render the JS pipeline before any other JS references that are not included" + JS_MODULE_ASSETS: "JavaScript Module Assets" + JAVASCRIPT_MODULE_PIPELINE: "JavaScript Module pipeline" + JAVASCRIPT_MODULE_PIPELINE_HELP: "The JS Module pipeline is the unification of multiple JS resources into one file" + JAVASCRIPT_MODULE_PIPELINE_INCLUDE_EXTERNALS: "Include externals in JS Module pipeline" + JAVASCRIPT_MODULE_PIPELINE_INCLUDE_EXTERNALS_HELP: "External URLs sometimes have relative file references and shouldn't be pipelined" + JAVASCRIPT_MODULE_PIPELINE_BEFORE_EXCLUDES: "JS Module pipeline render first" + JAVASCRIPT_MODULE_PIPELINE_BEFORE_EXCLUDES_HELP: "Render the JS pipeline before any other JS references that are not included" + GENERAL_CONFIG: "General Asset Configuration" JAVASCRIPT_MINIFY: "JavaScript minify" JAVASCRIPT_MINIFY_HELP: "Minify the JS during pipelining" ENABLED_TIMESTAMPS_ON_ASSETS: "Enable timestamps on assets" @@ -442,8 +454,11 @@ PLUGIN_ADMIN: IMAGES_DEBUG_HELP: "Show an overlay over images indicating the pixel depth of the image when working with retina for example" IMAGES_LOADING: "Image loading behavior" IMAGES_LOADING_HELP: "The loading attribute allows a browser to defer loading offscreen images and iframes until users scroll near them. loading supports three values: auto, lazy, eager" + + # Removed in Grav 1.8 IMAGES_SEOFRIENDLY: "SEO-Friendly Image names" IMAGES_SEOFRIENDLY_HELP: "When enabled, the image name is displayed first, then a smaller hash to reflect processed operations" + UPLOAD_LIMIT: "File upload limit" UPLOAD_LIMIT_HELP: "Set maximum upload size in bytes (0 is unlimited)" ENABLE_MEDIA_TIMESTAMP: "Enable timestamps on media" @@ -748,6 +763,9 @@ PLUGIN_ADMIN: 2FA_SECRET: "2FA Secret" 2FA_SECRET_HELP: "Scan this QR code into your [Authenticator App](https://learn.getgrav.org/admin-panel/2fa#apps). Also it's a good idea to backup the secret in a safe location, in case you need to reinstall your app. Check the [Grav docs](https://learn.getgrav.org/admin-panel/2fa) for more information " 2FA_REGENERATE: "Regenerate" + YUBIKEY_ID: "YubiKey ID" + YUBIKEY_OTP_INPUT: "YubiKey OTP" + YUBIKEY_HELP: "Insert your YubiKey into your computer and click the button to generate an OTP. The first 12 chars are your client ID and will be saved." FORCE_LOWERCASE_URLS: "Force lowercase URLs" FORCE_LOWERCASE_URLS_HELP: "By default Grav will set all slugs and routes to be lowercase. With this set to false, Uppercase slugs and routes can be used" INTL_ENABLED: "Intl module integration" @@ -1122,3 +1140,12 @@ PLUGIN_ADMIN: ENABLE: Enable PLUGINS_MUST_BE_ENABLED: "Plugin must be enabled to configure" ACTIVATION_REQUIRED: "Activation required to configure" + SESSION_SECURE_HTTPS: "Secure (HTTPS)" + SESSION_SECURE_HTTPS_HELP: "Set session secure on HTTPS but not on HTTP. Has no effect if you have above Secure setting set to true. Set to false if your site jumps between HTTP and HTTPS." + AVATAR: "Avatar Generator" + AVATAR_HELP: "Multiavatar is a locally generated avatar. Gravatar is an external service that uses your email address to pull a preconfigured Avatar remotely" + AVATAR_HASH: "NOTE: Optional Avatar custom 'hash' string" + IMAGES_TITLE: "Images" + LEGACY_MEDIA_MUTATION: "Legacy Media Manipulation Compatibility" + LEGACY_MEDIA_MUTATION_HELP: "Enable this setting only if image manipulation broke after Grav update." + BACKWARD_COMPATIBILITY: "Backward Compatibility" diff --git a/plugins/admin/languages/eo.yaml b/plugins/admin/languages/eo.yaml index 88a7c2b1..358cae22 100644 --- a/plugins/admin/languages/eo.yaml +++ b/plugins/admin/languages/eo.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Tio ĉi estas beta-versio! Uzi ĝin en produkta medio estas je via propra risko..." ADMIN_REPORT_ISSUE: "Ĉu vi trovis problemon? Bonvolu raporti ĝin ĉe GitHub." - EMAIL_FOOTER: "Povigita de Grav - La moderna platdosiera CMS" + EMAIL_FOOTER: "Povigita de Grav - La moderna platdosiera CMS" LOGIN_BTN: "Ensaluti" LOGIN_BTN_FORGOT: "Forgesita" LOGIN_BTN_RESET: "Restarigi pasvorton" diff --git a/plugins/admin/languages/es.yaml b/plugins/admin/languages/es.yaml index 31f4c491..a9a0b438 100644 --- a/plugins/admin/languages/es.yaml +++ b/plugins/admin/languages/es.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Por favor, habilita JavaScript en tu navegador." ADMIN_BETA_MSG: "¡Ésta es una versión Beta! Utilízala en producción bajo tu propio riesgo..." ADMIN_REPORT_ISSUE: "¿Encontraste algún problema de funcionamiento? Por favor, repórtalo en GitHub." - EMAIL_FOOTER: "Generado con Grav - El CMS moderno de archivos planos" + EMAIL_FOOTER: "Generado con Grav - El CMS moderno de archivos planos" LOGIN_BTN: "Acceder" LOGIN_BTN_FORGOT: "La olvidé" LOGIN_BTN_RESET: "Restablecer contraseña" diff --git a/plugins/admin/languages/et.yaml b/plugins/admin/languages/et.yaml index 5baa5b2e..ceb20a3b 100644 --- a/plugins/admin/languages/et.yaml +++ b/plugins/admin/languages/et.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Tegemist on beeta-versiooniga! Kasutamine töötaval veebilehel oma vastutusel..." ADMIN_REPORT_ISSUE: "Leidsid mõne vea? Palun anna sellest teada GitHub-i vahendusel." - EMAIL_FOOTER: " Veebileht kasutab Grav'i - kaasaegset failipõhist CMS-i" + EMAIL_FOOTER: " Veebileht kasutab Grav'i - kaasaegset failipõhist CMS-i" LOGIN_BTN: "Logi sisse" LOGIN_BTN_FORGOT: "Unusta" LOGIN_BTN_RESET: "Lähtesta salasõna" diff --git a/plugins/admin/languages/eu.yaml b/plugins/admin/languages/eu.yaml index b79c1259..03da4e40 100644 --- a/plugins/admin/languages/eu.yaml +++ b/plugins/admin/languages/eu.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Beta bertsio bat da hau! Produkzioan erabili ezazu zure ardurapean..." ADMIN_REPORT_ISSUE: "Arazoren bat topatu duzu? Mesedez, horren berri eman GitHub-en." - EMAIL_FOOTER: "Grav-ekin eginda - Fitxategi lauzko CMS modernoa" + EMAIL_FOOTER: "Grav-ekin eginda - Fitxategi lauzko CMS modernoa" LOGIN_BTN: "Sartu" LOGIN_BTN_FORGOT: "Ahaztu" LOGIN_BTN_RESET: "Berrezarri pasahitza" diff --git a/plugins/admin/languages/fa.yaml b/plugins/admin/languages/fa.yaml index 4af47c40..714c8ded 100644 --- a/plugins/admin/languages/fa.yaml +++ b/plugins/admin/languages/fa.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "لطفاً جاوا اسکریپت را در مرورگرتان فعال کنید." ADMIN_BETA_MSG: "این یک نسخه تکمیل نشده است! استفاده از آن در محصولتان شمارا با خطر مواجه میکند..." ADMIN_REPORT_ISSUE: "یک مشکل پیدا شد؟ لطفاً آن را در گیت هاب گزارش کنید." - EMAIL_FOOTER: "قدرت گرفته از گراو - سامانه مدیریت محتوی مدرن و بی نیاز به پایگاه داده" + EMAIL_FOOTER: "قدرت گرفته از گراو - سامانه مدیریت محتوی مدرن و بی نیاز به پایگاه داده" LOGIN_BTN: "ورود" LOGIN_BTN_FORGOT: "فراموش کرده اید" LOGIN_BTN_RESET: "تنظیم مجدد رمز عبور" diff --git a/plugins/admin/languages/fi.yaml b/plugins/admin/languages/fi.yaml index b8dfbb2d..6b58f5ad 100644 --- a/plugins/admin/languages/fi.yaml +++ b/plugins/admin/languages/fi.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Ota JavaScript käyttöön selaimessasi." ADMIN_BETA_MSG: "Tämä on beta-versio! Käyttö tuotannossa omalla vastuulla..." ADMIN_REPORT_ISSUE: "Löysitkö virheen tai puutteen? Ilmoita siitä Github-palveluun." - EMAIL_FOOTER: "Tehty Gravilla - Moderni Flat File CMS" + EMAIL_FOOTER: "Tehty Gravilla - Moderni Flat File CMS" LOGIN_BTN: "Kirjaudu sisään" LOGIN_BTN_FORGOT: "Unohditko" LOGIN_BTN_RESET: "Nollaa salasana" diff --git a/plugins/admin/languages/fr.yaml b/plugins/admin/languages/fr.yaml index a475fe2f..864f543f 100644 --- a/plugins/admin/languages/fr.yaml +++ b/plugins/admin/languages/fr.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Veuillez activer JavaScript pour votre navigateur." ADMIN_BETA_MSG: "Ceci est une version bêta ! Utilisez-là en production à vos risques et périls..." ADMIN_REPORT_ISSUE: "Vous avez rencontré une anomalie ? Veuillez la signaler sur GitHub." - EMAIL_FOOTER: "Propulsé par Grav - Le CMS Moderne sans base de données" + EMAIL_FOOTER: "Propulsé par Grav - Le CMS Moderne sans base de données" LOGIN_BTN: "Connexion" LOGIN_BTN_FORGOT: "Mot de passe oublié" LOGIN_BTN_RESET: "Réinitialiser le mot de passe" diff --git a/plugins/admin/languages/gl.yaml b/plugins/admin/languages/gl.yaml index 912ba5c6..61969ac6 100644 --- a/plugins/admin/languages/gl.yaml +++ b/plugins/admin/languages/gl.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Porfavor habilite JavaScript no seu navegador." ADMIN_BETA_MSG: "Esta é unha versión beta! Utilícea en produción asumindo o risco..." ADMIN_REPORT_ISSUE: "Atopou unha incidencia? Informe dela en GitHub" - EMAIL_FOOTER: "Xerado con Grav - O CMS moderno sobre ficheiro plano" + EMAIL_FOOTER: "Xerado con Grav - O CMS moderno sobre ficheiro plano" LOGIN_BTN: "Iniciar sesión" LOGIN_BTN_FORGOT: "Esquecido" LOGIN_BTN_RESET: "Restabelecer o contrasinal" diff --git a/plugins/admin/languages/he.yaml b/plugins/admin/languages/he.yaml index e24cf655..969a077f 100644 --- a/plugins/admin/languages/he.yaml +++ b/plugins/admin/languages/he.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "זוהי מהדורת ביתא! השימוש על אחריותכם בלבד..." ADMIN_REPORT_ISSUE: "GitHub נמצאה בעיה? נא לדווח עליה דרך" - EMAIL_FOOTER: "אתר זה מופעל על ידי גראב -מערכת ניהול בקובץ שטוח מודרני" + EMAIL_FOOTER: "אתר זה מופעל על ידי גראב -מערכת ניהול בקובץ שטוח מודרני" LOGIN_BTN: "התחברות" LOGIN_BTN_FORGOT: "שכחת" LOGIN_BTN_RESET: "איפוס סיסמה" diff --git a/plugins/admin/languages/hr.yaml b/plugins/admin/languages/hr.yaml index d759d98b..6a81d9f6 100644 --- a/plugins/admin/languages/hr.yaml +++ b/plugins/admin/languages/hr.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Ovo je Beta izdanje! Koristite u produkciji na vlastiti rizik..." ADMIN_REPORT_ISSUE: "Pronašli ste grešku? Molimo Vas da prijavite na GitHub." - EMAIL_FOOTER: "Pokreće Grav - Moderni Flat File CMS" + EMAIL_FOOTER: "Pokreće Grav - Moderni Flat File CMS" LOGIN_BTN: "Prijava" LOGIN_BTN_FORGOT: "Zaboravih" LOGIN_BTN_RESET: "Resetiraj Lozinku" diff --git a/plugins/admin/languages/hu.yaml b/plugins/admin/languages/hu.yaml index b6bfab08..07fcf500 100644 --- a/plugins/admin/languages/hu.yaml +++ b/plugins/admin/languages/hu.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Kérjük, engedélyezd a JavaScriptet a böngésződben." ADMIN_BETA_MSG: "Ez egy béta kiadás! Éles környezetben csak saját felelősségre használd..." ADMIN_REPORT_ISSUE: "Találtál egy hibát? Kérlek jelezd a GitHub-on." - EMAIL_FOOTER: "Powered by Grav - Egy Modern, File-alapú CMS" + EMAIL_FOOTER: "Powered by Grav - Egy Modern, File-alapú CMS" LOGIN_BTN: "Bejelentkezés" LOGIN_BTN_FORGOT: "Elfelejtettem" LOGIN_BTN_RESET: "Új jelszó" diff --git a/plugins/admin/languages/id.yaml b/plugins/admin/languages/id.yaml index f975f1a7..7eb47dee 100644 --- a/plugins/admin/languages/id.yaml +++ b/plugins/admin/languages/id.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Silahkan aktifkan JavaScript di browser Anda." ADMIN_BETA_MSG: "Ini merupakan rilisan Beta! Gunakan ini di produksi dengan resiko anda sendiri..." ADMIN_REPORT_ISSUE: "Menemukan masalah? Harap laporkan di Github." - EMAIL_FOOTER: "Ditenagai oleh Grav - The Modern Flat File CMS" + EMAIL_FOOTER: "Ditenagai oleh Grav - The Modern Flat File CMS" LOGIN_BTN: "Login" LOGIN_BTN_FORGOT: "Lupa" LOGIN_BTN_RESET: "Reset Password" diff --git a/plugins/admin/languages/it.yaml b/plugins/admin/languages/it.yaml index a78e3020..f333d3c3 100644 --- a/plugins/admin/languages/it.yaml +++ b/plugins/admin/languages/it.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Per cortesia, abilita JavaScript nel browser." ADMIN_BETA_MSG: "Questa è una versione beta! Usare in produzione a proprio rischio e pericolo…" ADMIN_REPORT_ISSUE: "Trovato un problema? Per favore, apri un ticket su GitHub" - EMAIL_FOOTER: "Powered by Grav - Il CMS Flat File e Moderno" + EMAIL_FOOTER: "Powered by Grav - Il CMS Flat File e Moderno" LOGIN_BTN: "Accedi" LOGIN_BTN_FORGOT: "Dimenticata" LOGIN_BTN_RESET: "Ripristina la password" diff --git a/plugins/admin/languages/ja.yaml b/plugins/admin/languages/ja.yaml index f391f778..6963d7b6 100644 --- a/plugins/admin/languages/ja.yaml +++ b/plugins/admin/languages/ja.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "お使いのブラウザーの JavaScript を有効にしてください。" ADMIN_BETA_MSG: "これはベータリリースです。稼働中サイトでは、自己責任においてご利用ください。" ADMIN_REPORT_ISSUE: "問題を見つけた場合は、GitHub にてご報告をお願いします。" - EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" + EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" LOGIN_BTN: "ログイン" LOGIN_BTN_FORGOT: "パスワードを紛失" LOGIN_BTN_RESET: "パスワードをリセット" diff --git a/plugins/admin/languages/ko.yaml b/plugins/admin/languages/ko.yaml index 69339219..c92f9c83 100644 --- a/plugins/admin/languages/ko.yaml +++ b/plugins/admin/languages/ko.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "이것은 베타입니다! 개인적으로 사용할시 위험할수있습니다..." ADMIN_REPORT_ISSUE: "문제가 있습니까? GitHub에 신고해주세요." - EMAIL_FOOTER: " Grav에 의해 구동-현대 플랫 파일 CMS" + EMAIL_FOOTER: " Grav에 의해 구동-현대 플랫 파일 CMS" LOGIN_BTN: "로그인" LOGIN_BTN_FORGOT: "잃어버림" LOGIN_BTN_RESET: "비밀번호 초기화" diff --git a/plugins/admin/languages/lt.yaml b/plugins/admin/languages/lt.yaml index d7434225..c0220a11 100644 --- a/plugins/admin/languages/lt.yaml +++ b/plugins/admin/languages/lt.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Tai Grav administravimo įskiepio beta versija! Naudokite atsargiai..." ADMIN_REPORT_ISSUE: "Radote klaidą? Prašome pranešti apie ją GitHub platformoje." - EMAIL_FOOTER: "Naudojama Grav - Moderni TVS, nenaudojanti duomenų bazės" + EMAIL_FOOTER: "Naudojama Grav - Moderni TVS, nenaudojanti duomenų bazės" LOGIN_BTN: "Prisijungti" LOGIN_BTN_FORGOT: "Pamiršau" LOGIN_BTN_RESET: "Atstatyti slaptažodį" diff --git a/plugins/admin/languages/mn.yaml b/plugins/admin/languages/mn.yaml index 904a90cc..892d8655 100644 --- a/plugins/admin/languages/mn.yaml +++ b/plugins/admin/languages/mn.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Хөтөч дээрээ JavaScript-ийг идэвхжүүлнэ үү." ADMIN_BETA_MSG: "Энэ нь туршилтийн хувилбар шүү! Тиймээс ашиглалт нь таны өөрийн эрсдэлийн асуудал..." ADMIN_REPORT_ISSUE: "Алдаа олсон уу? Та ийшээ GitHub -д орж мэдэгдэнэ үү." - EMAIL_FOOTER: "Grav -ын тусламжаар - Орчин үеийн текст файл CMS" + EMAIL_FOOTER: "Grav -ын тусламжаар - Орчин үеийн текст файл CMS" LOGIN_BTN: "Нэвтрэх" LOGIN_BTN_FORGOT: "Мартсан" LOGIN_BTN_RESET: "Нууц үгийг өөрчлөх" diff --git a/plugins/admin/languages/no.yaml b/plugins/admin/languages/no.yaml index 3630de64..b0439629 100644 --- a/plugins/admin/languages/no.yaml +++ b/plugins/admin/languages/no.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Dette er en betaversjon! Bruk denne i produksjon på egen risiko..." ADMIN_REPORT_ISSUE: "Oppdaget et problem? Vennligst rapport det på GitHub." - EMAIL_FOOTER: "Drevet av Grav - Det moderne flat file CMSet" + EMAIL_FOOTER: "Drevet av Grav - Det moderne flat file CMSet" LOGIN_BTN: "Logg inn" LOGIN_BTN_FORGOT: "Glemt" LOGIN_BTN_RESET: "Nullstill passord" diff --git a/plugins/admin/languages/pl.yaml b/plugins/admin/languages/pl.yaml index c4353d61..d214e6a7 100644 --- a/plugins/admin/languages/pl.yaml +++ b/plugins/admin/languages/pl.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Proszę, włącz JavaScript w przeglądarce." ADMIN_BETA_MSG: "To jest wersja Beta! Używasz tego w produkcji na własne ryzyko..." ADMIN_REPORT_ISSUE: "Znalazłeś błąd? Zgłoś to na GitHub." - EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" + EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" LOGIN_BTN: "Zaloguj" LOGIN_BTN_FORGOT: "Zapomniałem" LOGIN_BTN_RESET: "Zresetuj hasło" diff --git a/plugins/admin/languages/pt.yaml b/plugins/admin/languages/pt.yaml index 1ff6640c..cd7a4fb8 100644 --- a/plugins/admin/languages/pt.yaml +++ b/plugins/admin/languages/pt.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Por favor, ative o JavaScript no seu navegador." ADMIN_BETA_MSG: "Esta é uma versão Beta! Usa-a em produção à tua responsabilidade..." ADMIN_REPORT_ISSUE: "Encontrou um problema? Por favor reporte-o no GitHub." - EMAIL_FOOTER: " Gerado por Grav - O moderno CMS de ficheiros simples" + EMAIL_FOOTER: " Gerado por Grav - O moderno CMS de ficheiros simples" LOGIN_BTN: "Entrar" LOGIN_BTN_FORGOT: "Esqueci-me" LOGIN_BTN_RESET: "Repôr Palavra-passe" diff --git a/plugins/admin/languages/ro.yaml b/plugins/admin/languages/ro.yaml index 70523ce3..2fa22dae 100644 --- a/plugins/admin/languages/ro.yaml +++ b/plugins/admin/languages/ro.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Vă rugăm să activați JavaScript în browser-ul dvs." ADMIN_BETA_MSG: "Aceasta este o versiune Beta! Folosiți-o pe propiul risc..." ADMIN_REPORT_ISSUE: "Ați găsit o problemă? Raportați-o pe Github." - EMAIL_FOOTER: "Construit cu Grav - CMS modern" + EMAIL_FOOTER: "Construit cu Grav - CMS modern" LOGIN_BTN: "Logare" LOGIN_BTN_FORGOT: "Ai uitat?" LOGIN_BTN_RESET: "Resetarea parolei" diff --git a/plugins/admin/languages/sk.yaml b/plugins/admin/languages/sk.yaml index a2f1b62d..dfb4dffb 100644 --- a/plugins/admin/languages/sk.yaml +++ b/plugins/admin/languages/sk.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Toto je Beta verzia! Používajte v ostrej prevádzke na vlastné riziko..." ADMIN_REPORT_ISSUE: "Vyskytla sa chyba? Prosím, nahláste to na GitHub." - EMAIL_FOOTER: "Poháňaný Grav-om - moderný flat-file redakčný systém" + EMAIL_FOOTER: "Poháňaný Grav-om - moderný flat-file redakčný systém" LOGIN_BTN: "Prihlásiť sa" LOGIN_BTN_FORGOT: "Zabudli ste meno/heslo" LOGIN_BTN_RESET: "Obnoviť heslo" diff --git a/plugins/admin/languages/sr.yaml b/plugins/admin/languages/sr.yaml index a293adb3..88e01818 100644 --- a/plugins/admin/languages/sr.yaml +++ b/plugins/admin/languages/sr.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Ово је Бета издање! Користите га у раду на сопствену одговорност..." ADMIN_REPORT_ISSUE: "Пронашли сте грешку? Пријавите је на GitHub." - EMAIL_FOOTER: "Покреће се са Grav-ом - Модерним Flat File CMS-ом" + EMAIL_FOOTER: "Покреће се са Grav-ом - Модерним Flat File CMS-ом" LOGIN_BTN: "Пријава" LOGIN_BTN_FORGOT: "Заборавили сте" LOGIN_BTN_RESET: "Ресетуј лозинку" diff --git a/plugins/admin/languages/sv.yaml b/plugins/admin/languages/sv.yaml index dc549936..340ec9c6 100644 --- a/plugins/admin/languages/sv.yaml +++ b/plugins/admin/languages/sv.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Detta är en betaversion! Använd i produktion på egen risk..." ADMIN_REPORT_ISSUE: "Hittat ett fel? Vänligen rapportera det på GitHub." - EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" + EMAIL_FOOTER: "Powered by Grav - The Modern Flat File CMS" LOGIN_BTN: "Logga in" LOGIN_BTN_FORGOT: "Glömt" LOGIN_BTN_RESET: "Återställ Lösenord" diff --git a/plugins/admin/languages/th.yaml b/plugins/admin/languages/th.yaml index 9ed4cff4..cc455311 100644 --- a/plugins/admin/languages/th.yaml +++ b/plugins/admin/languages/th.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "นี่เป็นรุ่นทดลอง หากคุณใช้บนเว็บจริงคุณต้องยอมรับในความเสี่ยงนั้นเอง" ADMIN_REPORT_ISSUE: "พบปัญหา กรุณารายงานบน GitHub" - EMAIL_FOOTER: "ขับเคลื่อนด้วย Grav - The Modern Flat File CMS" + EMAIL_FOOTER: "ขับเคลื่อนด้วย Grav - The Modern Flat File CMS" LOGIN_BTN: "เข้าสู่ระบบ" LOGIN_BTN_FORGOT: "ลืมรหัสผ่าน" LOGIN_BTN_RESET: "กำหนดรหัสผ่านใหม่" diff --git a/plugins/admin/languages/tr.yaml b/plugins/admin/languages/tr.yaml index aee812c6..23cdfecc 100644 --- a/plugins/admin/languages/tr.yaml +++ b/plugins/admin/languages/tr.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Lütfen tarayıcınızda Javascript aktive edin." ADMIN_BETA_MSG: "Bu bir beta sürümüdür! Sunucunuzda kullanmak sizin sorumluluğunuzdadır..." ADMIN_REPORT_ISSUE: "Hata mı var? Lütfen GitHub aracılığıyla bildirin." - EMAIL_FOOTER: "Grav ile güçlendirilmiştir - Modern Düz Dosya CMS" + EMAIL_FOOTER: "Grav ile güçlendirilmiştir - Modern Düz Dosya CMS" LOGIN_BTN: "Giriş" LOGIN_BTN_FORGOT: "Şifremi Unuttum" LOGIN_BTN_RESET: "Şifreni Sıfırla" diff --git a/plugins/admin/languages/uk.yaml b/plugins/admin/languages/uk.yaml index 25ebaea5..d92d0475 100644 --- a/plugins/admin/languages/uk.yaml +++ b/plugins/admin/languages/uk.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "Будь ласка, увімкніть JavaScript у Вашому браузері." ADMIN_BETA_MSG: "Це бета-реліз! Використовуйте його на продуктовому сервері на свій страх і ризик..." ADMIN_REPORT_ISSUE: "Виявила проблему? Будь ласка, повідомте про це на GitHub." - EMAIL_FOOTER: "Працює на Grav - сучасна файлова CMS" + EMAIL_FOOTER: "Працює на Grav - сучасна файлова CMS" LOGIN_BTN: "Увійти" LOGIN_BTN_FORGOT: "Забув" LOGIN_BTN_RESET: "Скинути пароль" diff --git a/plugins/admin/languages/vi.yaml b/plugins/admin/languages/vi.yaml index bf9be46d..29c6a3d9 100644 --- a/plugins/admin/languages/vi.yaml +++ b/plugins/admin/languages/vi.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "Đây là phiên bản thử nghiệm! Bạn phải tự chịu rủi ro khi sử dụng trong production..." ADMIN_REPORT_ISSUE: "Tìm thấy một lỗi? Xin vui lòng báo cáo trên GitHub." - EMAIL_FOOTER: "Cung cấp bởi Grav - The Modern Flat File CMS" + EMAIL_FOOTER: "Cung cấp bởi Grav - The Modern Flat File CMS" LOGIN_BTN: "Đăng nhập" LOGIN_BTN_FORGOT: "Quên" LOGIN_BTN_RESET: "Đặt lại mật khẩu" diff --git a/plugins/admin/languages/zh-cn.yaml b/plugins/admin/languages/zh-cn.yaml index f90d15ff..bfb6f781 100644 --- a/plugins/admin/languages/zh-cn.yaml +++ b/plugins/admin/languages/zh-cn.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "请在您的浏览器中启用 JavaScript。" ADMIN_BETA_MSG: "这是一个 Beta 版本!若在生产环境中使用,请自行承担责任。" ADMIN_REPORT_ISSUE: "遇到问题?请提交到 GitHub。" - EMAIL_FOOTER: "由 Grav 驱动 - 先进的纯文件 CMS" + EMAIL_FOOTER: "由 Grav 驱动 - 先进的纯文件 CMS" LOGIN_BTN: "登录" LOGIN_BTN_FORGOT: "忘记密码" LOGIN_BTN_RESET: "重置密码" diff --git a/plugins/admin/languages/zh-tw.yaml b/plugins/admin/languages/zh-tw.yaml index db3400e3..d9d770ad 100644 --- a/plugins/admin/languages/zh-tw.yaml +++ b/plugins/admin/languages/zh-tw.yaml @@ -2,7 +2,7 @@ PLUGIN_ADMIN: ADMIN_BETA_MSG: "這是 Beta 版!如果要用在營運中請自行承擔風險…" ADMIN_REPORT_ISSUE: "發現有問題?請回報到 GitHub 上。" - EMAIL_FOOTER: "由 Grav 提供技術驅動 - 現代純文字檔案管理系統" + EMAIL_FOOTER: "由 Grav 提供技術驅動 - 現代純文字檔案管理系統" LOGIN_BTN: "登入" LOGIN_BTN_FORGOT: "忘記密碼" LOGIN_BTN_RESET: "重設密碼" diff --git a/plugins/admin/languages/zh.yaml b/plugins/admin/languages/zh.yaml index f90d15ff..bfb6f781 100644 --- a/plugins/admin/languages/zh.yaml +++ b/plugins/admin/languages/zh.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "请在您的浏览器中启用 JavaScript。" ADMIN_BETA_MSG: "这是一个 Beta 版本!若在生产环境中使用,请自行承担责任。" ADMIN_REPORT_ISSUE: "遇到问题?请提交到 GitHub。" - EMAIL_FOOTER: "由 Grav 驱动 - 先进的纯文件 CMS" + EMAIL_FOOTER: "由 Grav 驱动 - 先进的纯文件 CMS" LOGIN_BTN: "登录" LOGIN_BTN_FORGOT: "忘记密码" LOGIN_BTN_RESET: "重置密码" diff --git a/plugins/admin/pages/admin/login.md b/plugins/admin/pages/admin/login.md index 7fa0b44c..79537dfd 100644 --- a/plugins/admin/pages/admin/login.md +++ b/plugins/admin/pages/admin/login.md @@ -37,4 +37,9 @@ forms: id: twofa-code autofocus: true placeholder: PLUGIN_ADMIN.2FA_CODE_INPUT + description: or + yubikey_otp: + type: text + id: yubikey-otp + placeholder: PLUGIN_ADMIN.YUBIKEY_OTP_INPUT --- diff --git a/plugins/admin/themes/grav/.eslintignore b/plugins/admin/themes/grav/.eslintignore new file mode 100644 index 00000000..c2658d7d --- /dev/null +++ b/plugins/admin/themes/grav/.eslintignore @@ -0,0 +1 @@ +node_modules/ diff --git a/plugins/admin/themes/grav/.eslintrc b/plugins/admin/themes/grav/.eslintrc index ed7a786e..759f0831 100644 --- a/plugins/admin/themes/grav/.eslintrc +++ b/plugins/admin/themes/grav/.eslintrc @@ -35,7 +35,6 @@ "generator-star-spacing": [2, { "before": true, "after": true }], "guard-for-in": 0, "handle-callback-err": [2, "^(err|error)$" ], - "indent": [2, 4, { "SwitchCase": 1 }], "key-spacing": [2, { "beforeColon": false, "afterColon": true }], "linebreak-style": 0, "lines-around-comment": 0, diff --git a/plugins/admin/themes/grav/app/forms/fields/collections.js b/plugins/admin/themes/grav/app/forms/fields/collections.js index 2de23724..c9c1ee90 100644 --- a/plugins/admin/themes/grav/app/forms/fields/collections.js +++ b/plugins/admin/themes/grav/app/forms/fields/collections.js @@ -3,259 +3,309 @@ import Sortable from 'sortablejs'; import '../../utils/jquery-utils'; export default class CollectionsField { - constructor() { - this.lists = $(); - - $('[data-type="collection"]').each((index, list) => this.addList(list)); - $('body').on('mutation._grav', this._onAddedNodes.bind(this)); - + constructor() { + this.lists = $(); + + const body = $('body'); + $('[data-type="collection"]').each((index, list) => this.addList(list)); + body.on('mutation._grav', this._onAddedNodes.bind(this)); + body.on('click', (event) => { + const target = $(event.target); + if (!(target.is('[data-action="confirm"], [data-action="delete"]') || target.closest('[data-action="confirm"], [data-action="delete"]').length)) { + CollectionsField.closeConfirmations(); + } + }); + + } + + addList(list) { + list = $(list); + this.lists = this.lists.add(list); + + list.on('click', '> .collection-actions [data-action="add"]', (event) => this.addItem(event)); + list.on('click', '> ul > li > .item-actions [data-action="confirm"]', (event) => this.confirmRemove(event)); + list.on('click', '> ul > li > .item-actions [data-action="delete"]', (event) => this.removeItem(event)); + list.on('click', '> ul > li > .item-actions [data-action="collapse"]', (event) => this.collapseItem(event)); + list.on('click', '> ul > li > .item-actions [data-action="expand"]', (event) => this.expandItem(event)); + list.on('click', '> .collection-actions [data-action-sort="date"]', (event) => this.sortItems(event)); + list.on('click', '> .collection-actions [data-action="collapse_all"]', (event) => this.collapseItems(event)); + list.on('click', '> .collection-actions [data-action="expand_all"]', (event) => this.expandItems(event)); + list.on('input change', '[data-key-observe]', (event) => this.observeKey(event)); + + list.find('[data-collection-holder]').each((index, container) => { + container = $(container); + if (container.data('collection-sort') || container[0].hasAttribute('data-collection-nosort')) { + return; + } + + container.data('collection-sort', new Sortable(container.get(0), { + forceFallback: false, + handle: '.collection-sort', + animation: 150, + onUpdate: () => this.reindex(container) + })); + }); + + this._updateActionsStateBasedOnMinMax(list); + } + + addItem(event) { + let button = $(event.currentTarget); + let position = button.data('action-add') || 'bottom'; + let list = $(button.closest('[data-type="collection"]')); + let template = $(list.find('> [data-collection-template="new"]').data('collection-template-html')); + + this._updateActionsStateBasedOnMinMax(list); + let items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); + let maxItems = list.data('max'); + if (typeof maxItems !== 'undefined' && items.length >= maxItems) { + return; } - addList(list) { - list = $(list); - this.lists = this.lists.add(list); - - list.on('click', '> .collection-actions [data-action="add"]', (event) => this.addItem(event)); - list.on('click', '> ul > li > .item-actions [data-action="delete"]', (event) => this.removeItem(event)); - list.on('click', '> ul > li > .item-actions [data-action="collapse"]', (event) => this.collapseItem(event)); - list.on('click', '> ul > li > .item-actions [data-action="expand"]', (event) => this.expandItem(event)); - list.on('click', '> .collection-actions [data-action-sort="date"]', (event) => this.sortItems(event)); - list.on('click', '> .collection-actions [data-action="collapse_all"]', (event) => this.collapseItems(event)); - list.on('click', '> .collection-actions [data-action="expand_all"]', (event) => this.expandItems(event)); - list.on('input change', '[data-key-observe]', (event) => this.observeKey(event)); - - list.find('[data-collection-holder]').each((index, container) => { - container = $(container); - if (container.data('collection-sort') || container[0].hasAttribute('data-collection-nosort')) { return; } - - container.data('collection-sort', new Sortable(container.get(0), { - forceFallback: false, - handle: '.collection-sort', - animation: 150, - onUpdate: () => this.reindex(container) - })); - }); - - this._updateActionsStateBasedOnMinMax(list); + list.find('> [data-collection-holder]')[position === 'top' + ? 'prepend' + : 'append'](template); + this.reindex(list); + + items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); + let topAction = list.closest('[data-type="collection"]').find('[data-action-add="top"]'); + let sortAction = list.closest('[data-type="collection"]').find('[data-action="sort"]'); + + if (items.length) { + if (topAction.length) { + topAction.parent().removeClass('hidden'); + } + if (sortAction.length && items.length > 1) { + sortAction.removeClass('hidden'); + } } - addItem(event) { - let button = $(event.currentTarget); - let position = button.data('action-add') || 'bottom'; - let list = $(button.closest('[data-type="collection"]')); - let template = $(list.find('> [data-collection-template="new"]').data('collection-template-html')); + // refresh toggleables in a list + $('[data-grav-field="toggleable"] input[type="checkbox"]').trigger('change'); + } - this._updateActionsStateBasedOnMinMax(list); - let items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); - let maxItems = list.data('max'); - if (typeof maxItems !== 'undefined' && items.length >= maxItems) { - return; - } - - list.find('> [data-collection-holder]')[position === 'top' ? 'prepend' : 'append'](template); - this.reindex(list); + static closeConfirmations() { + $('.list-confirm-deletion[data-action="delete"]').addClass('hidden'); + } - items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); - let topAction = list.closest('[data-type="collection"]').find('[data-action-add="top"]'); - let sortAction = list.closest('[data-type="collection"]').find('[data-action="sort"]'); + confirmRemove(event) { - if (items.length) { - if (topAction.length) { topAction.parent().removeClass('hidden'); } - if (sortAction.length && items.length > 1) { sortAction.removeClass('hidden'); } - } - - // refresh toggleables in a list - $('[data-grav-field="toggleable"] input[type="checkbox"]').trigger('change'); - } + const button = $(event.currentTarget); + const list = $(button.closest('.item-actions')); + const action = list.find('.list-confirm-deletion[data-action="delete"]'); + const isHidden = action.hasClass('hidden'); - removeItem(event) { - let button = $(event.currentTarget); - let item = button.closest('[data-collection-item]'); - let list = $(button.closest('[data-type="collection"]')); + CollectionsField.closeConfirmations(); + action[isHidden ? 'removeClass' : 'addClass']('hidden'); + } - let items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); - let minItems = list.data('min'); - - if (typeof minItems !== 'undefined' && items.length <= minItems) { - return; - } - - item.remove(); - this.reindex(list); - - items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); - let topAction = list.closest('[data-type="collection"]').find('[data-action-add="top"]'); - let sortAction = list.closest('[data-type="collection"]').find('[data-action="sort"]'); - - if (!items.length) { - if (topAction.length) { topAction.parent().addClass('hidden'); } - } - - if (sortAction.length && items.length <= 1) { sortAction.addClass('hidden'); } - this._updateActionsStateBasedOnMinMax(list); - } + removeItem(event) { + let button = $(event.currentTarget); + let item = button.closest('[data-collection-item]'); + let list = $(button.closest('[data-type="collection"]')); - collapseItems(event) { - let button = $(event.currentTarget); - let items = $(button.closest('[data-type="collection"]')).find('> ul > [data-collection-item] > .item-actions [data-action="collapse"]'); + let items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); + let minItems = list.data('min'); - items.click(); + if (typeof minItems !== 'undefined' && items.length <= minItems) { + return; } - collapseItem(event) { - let button = $(event.currentTarget); - let item = button.closest('[data-collection-item]'); + item.remove(); + this.reindex(list); - button.attr('data-action', 'expand').removeClass('fa-chevron-circle-down').addClass('fa-chevron-circle-right'); - item.addClass('collection-collapsed'); - } - - expandItems(event) { - let button = $(event.currentTarget); - let items = $(button.closest('[data-type="collection"]')).find('> ul > [data-collection-item] > .item-actions [data-action="expand"]'); + items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); + let topAction = list.closest('[data-type="collection"]').find('[data-action-add="top"]'); + let sortAction = list.closest('[data-type="collection"]').find('[data-action="sort"]'); - items.click(); + if (!items.length) { + if (topAction.length) { + topAction.parent().addClass('hidden'); + } } - expandItem(event) { - let button = $(event.currentTarget); - let item = button.closest('[data-collection-item]'); - - button.attr('data-action', 'collapse').removeClass('fa-chevron-circle-right').addClass('fa-chevron-circle-down'); - item.removeClass('collection-collapsed'); + if (sortAction.length && items.length <= 1) { + sortAction.addClass('hidden'); } - - sortItems(event) { - let button = $(event.currentTarget); - let sortby = button.data('action-sort'); - let sortby_dir = button.data('action-sort-dir') || 'asc'; - let list = $(button.closest('[data-type="collection"]')); - let items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); - - items.sort((a, b) => { - let A = $(a).find('[name$="[' + sortby + ']"]'); - let B = $(b).find('[name$="[' + sortby + ']"]'); - let sort; - - if (sortby_dir === 'asc') { - sort = (A.val() < B.val()) ? -1 : (A.val() > B.val()) ? 1 : 0; - } else { - sort = (A.val() > B.val()) ? -1 : (A.val() < B.val()) ? 1 : 0; + this._updateActionsStateBasedOnMinMax(list); + } + + collapseItems(event) { + let button = $(event.currentTarget); + let items = $(button.closest('[data-type="collection"]')).find('> ul > [data-collection-item] > .item-actions [data-action="collapse"]'); + + items.click(); + } + + collapseItem(event) { + let button = $(event.currentTarget); + let item = button.closest('[data-collection-item]'); + + button.attr('data-action', 'expand').removeClass('fa-chevron-circle-down').addClass('fa-chevron-circle-right'); + item.addClass('collection-collapsed'); + } + + expandItems(event) { + let button = $(event.currentTarget); + let items = $(button.closest('[data-type="collection"]')).find('> ul > [data-collection-item] > .item-actions [data-action="expand"]'); + + items.click(); + } + + expandItem(event) { + let button = $(event.currentTarget); + let item = button.closest('[data-collection-item]'); + + button.attr('data-action', 'collapse').removeClass('fa-chevron-circle-right').addClass('fa-chevron-circle-down'); + item.removeClass('collection-collapsed'); + } + + sortItems(event) { + let button = $(event.currentTarget); + let sortby = button.data('action-sort'); + let sortby_dir = button.data('action-sort-dir') || 'asc'; + let list = $(button.closest('[data-type="collection"]')); + let items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); + + items.sort((a, b) => { + let A = $(a).find('[name$="[' + sortby + ']"]'); + let B = $(b).find('[name$="[' + sortby + ']"]'); + let sort; + + if (sortby_dir === 'asc') { + sort = (A.val() < B.val()) + ? -1 + : (A.val() > B.val()) + ? 1 + : 0; + } else { + sort = (A.val() > B.val()) + ? -1 + : (A.val() < B.val()) + ? 1 + : 0; + } + + return sort; + }).each((_, container) => { + $(container).parent().append(container); + }); + + this.reindex(list); + } + + observeKey(event) { + let input = $(event.target); + let value = input.val(); + let item = input.closest('[data-collection-key]'); + + item.data('collection-key-backup', item.data('collection-key')).data('collection-key', value); + this.reindex(null, item); + } + + reindex(list, items) { + items = items || $(list).closest('[data-type="collection"]').find('> ul > [data-collection-item]'); + + items.each((index, item) => { + item = $(item); + + let observed = item.find('[data-key-observe]'); + let observedValue = observed.val(); + let hasCustomKey = observed.length; + let currentKey = item.data('collection-key-backup'); + + item.attr('data-collection-key', hasCustomKey + ? observedValue + : index); + + ['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-file-post-add', 'data-file-post-remove', 'data-grav-array-name', 'data-grav-elements'].forEach((prop) => { + item.find('[' + prop + '], [_' + prop + ']').each(function() { + let element = $(this); + let indexes = []; + let array_index = null; + let regexps = [ + new RegExp('\\[(\\d+|\\*|' + currentKey + ')\\]', 'g'), + new RegExp('\\.(\\d+|\\*|' + currentKey + ')\\.', 'g') + ]; + + // special case to preserve array field index keys + if (prop === 'name' && element.data('gravArrayType')) { + const match_index = element.attr(prop).match(/\[[0-9]{1,}\]$/); + const pattern = element[0].closest('[data-grav-array-name]').dataset.gravArrayName; + if (match_index && pattern) { + array_index = match_index[0]; + element.attr(prop, `${pattern}${match_index[0]}`); + return; } + } - return sort; - }).each((_, container) => { - $(container).parent().append(container); - }); - - this.reindex(list); - } + if (hasCustomKey && !observedValue) { + element.attr(`_${prop}`, element.attr(prop)); + element.attr(prop, null); + return; + } + + if (element.attr(`_${prop}`)) { + element.attr(prop, element.attr(`_${prop}`)); + element.attr(`_${prop}`, null); + } + + element.parents('[data-collection-key]').map((idx, parent) => indexes.push($(parent).attr('data-collection-key'))); + indexes.reverse(); + + let matchedKey = currentKey; + let replaced = element.attr(prop).replace(regexps[0], (/* str, p1, offset */) => { + let extras = ''; + if (array_index) { + extras = array_index; + console.log(indexes, extras); + } - observeKey(event) { - let input = $(event.target); - let value = input.val(); - let item = input.closest('[data-collection-key]'); + matchedKey = indexes.shift() || matchedKey; + return `[${matchedKey}]${extras}`; + }); - item.data('collection-key-backup', item.data('collection-key')).data('collection-key', value); - this.reindex(null, item); - } + replaced = replaced.replace(regexps[1], (/* str, p1, offset */) => { + matchedKey = indexes.shift() || matchedKey; + return `.${matchedKey}.`; + }); - reindex(list, items) { - items = items || $(list).closest('[data-type="collection"]').find('> ul > [data-collection-item]'); - - items.each((index, item) => { - item = $(item); - - let observed = item.find('[data-key-observe]'); - let observedValue = observed.val(); - let hasCustomKey = observed.length; - let currentKey = item.data('collection-key-backup'); - - item.attr('data-collection-key', hasCustomKey ? observedValue : index); - - ['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-file-post-add', 'data-file-post-remove', 'data-grav-array-name'].forEach((prop) => { - item.find('[' + prop + '], [_' + prop + ']').each(function() { - let element = $(this); - let indexes = []; - let array_index = null; - let regexps = [ - new RegExp('\\[(\\d+|\\*|' + currentKey + ')\\]', 'g'), - new RegExp('\\.(\\d+|\\*|' + currentKey + ')\\.', 'g') - ]; - - // special case to preserve array field index keys - if (prop === 'name' && element.data('gravArrayType')) { - const match_index = element.attr(prop).match(/\[[0-9]{1,}\]$/); - const pattern = element[0].closest('[data-grav-array-name]').dataset.gravArrayName; - if (match_index && pattern) { - array_index = match_index[0]; - element.attr(prop, `${pattern}${match_index[0]}`); - return; - } - } - - if (hasCustomKey && !observedValue) { - element.attr(`_${prop}`, element.attr(prop)); - element.attr(prop, null); - return; - } - - if (element.attr(`_${prop}`)) { - element.attr(prop, element.attr(`_${prop}`)); - element.attr(`_${prop}`, null); - } - - element.parents('[data-collection-key]').map((idx, parent) => indexes.push($(parent).attr('data-collection-key'))); - indexes.reverse(); - - let matchedKey = currentKey; - let replaced = element.attr(prop).replace(regexps[0], (/* str, p1, offset */) => { - let extras = ''; - if (array_index) { extras = array_index; console.log(indexes, extras); } - - matchedKey = indexes.shift() || matchedKey; - return `[${matchedKey}]${extras}`; - }); - - replaced = replaced.replace(regexps[1], (/* str, p1, offset */) => { - matchedKey = indexes.shift() || matchedKey; - return `.${matchedKey}.`; - }); - - element.attr(prop, replaced); - }); - }); + element.attr(prop, replaced); }); + }); + }); + } + + _onAddedNodes(event, target/* , record, instance */) { + let collections = $(target).find('[data-type="collection"]'); + if (!collections.length) { + return; } - _onAddedNodes(event, target/* , record, instance */) { - let collections = $(target).find('[data-type="collection"]'); - if (!collections.length) { return; } + collections.each((index, collection) => { + collection = $(collection); + if (!~this.lists.index(collection)) { + this.addList(collection); + } + }); + } - collections.each((index, collection) => { - collection = $(collection); - if (!~this.lists.index(collection)) { - this.addList(collection); - } - }); - } - - _updateActionsStateBasedOnMinMax(list) { - let items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); - let minItems = list.data('min'); - let maxItems = list.data('max'); + _updateActionsStateBasedOnMinMax(list) { + let items = list.closest('[data-type="collection"]').find('> ul > [data-collection-item]'); + let minItems = list.data('min'); + let maxItems = list.data('max'); - list.find('> .collection-actions [data-action="add"]').attr('disabled', false); - list.find('> ul > li > .item-actions [data-action="delete"]').attr('disabled', false); + list.find('> .collection-actions [data-action="add"]').attr('disabled', false); + list.find('> ul > li > .item-actions [data-action="delete"]').attr('disabled', false); - if (typeof minItems !== 'undefined' && items.length <= minItems) { - list.find('> ul > li > .item-actions [data-action="delete"]').attr('disabled', true); - } + if (typeof minItems !== 'undefined' && items.length <= minItems) { + list.find('> ul > li > .item-actions [data-action="delete"]').attr('disabled', true); + } - if (typeof maxItems !== 'undefined' && items.length >= maxItems) { - list.find('> .collection-actions [data-action="add"]').attr('disabled', true); - } + if (typeof maxItems !== 'undefined' && items.length >= maxItems) { + list.find('> .collection-actions [data-action="add"]').attr('disabled', true); } + } } export let Instance = new CollectionsField(); diff --git a/plugins/admin/themes/grav/app/forms/fields/elements.js b/plugins/admin/themes/grav/app/forms/fields/elements.js new file mode 100644 index 00000000..58aaa617 --- /dev/null +++ b/plugins/admin/themes/grav/app/forms/fields/elements.js @@ -0,0 +1,12 @@ +import $ from 'jquery'; + +$(document).on('change', '[data-grav-elements] select', (event) => { + const target = $(event.currentTarget); + const value = target.val(); + const id = target.closest('[data-grav-elements]').data('gravElements'); + + $(`[id^="${id}_"]`).css('display', 'none'); + $(`[id="${id}__${value}"]`).css('display', 'inherit'); +}); + +$('[data-grav-elements] select').trigger('change'); diff --git a/plugins/admin/themes/grav/app/forms/fields/files.js b/plugins/admin/themes/grav/app/forms/fields/files.js index a927968e..1b899495 100644 --- a/plugins/admin/themes/grav/app/forms/fields/files.js +++ b/plugins/admin/themes/grav/app/forms/fields/files.js @@ -83,6 +83,11 @@ const ACCEPT_FUNC = function(file, done, settings) { const hasMax = (resolution.max && (resolution.max.width || resolution.max.height)); if (hasMin || (!(settings.resizeWidth || settings.resizeHeight) && hasMax)) { reader.onload = function(event) { + if (!/image\//.test(file.type)) { + done(); + return; + } + const image = new Image(); image.src = event.target.result; image.onerror = function() { @@ -139,6 +144,7 @@ export default class FilesField { this.dropzone = new Dropzone(container, this.options); this.dropzone.on('complete', this.onDropzoneComplete.bind(this)); this.dropzone.on('success', this.onDropzoneSuccess.bind(this)); + this.dropzone.on('addedfile', this.onDropzoneAddedFile.bind(this)); this.dropzone.on('removedfile', this.onDropzoneRemovedFile.bind(this)); this.dropzone.on('sending', this.onDropzoneSending.bind(this)); this.dropzone.on('error', this.onDropzoneError.bind(this)); @@ -224,7 +230,7 @@ export default class FilesField { file, data: response, mode: 'removeFile', - msg: `

${translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD} ${file.name}

+ msg: `

${translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD} {{fileName}}

${response.message}
` }); } @@ -240,7 +246,7 @@ export default class FilesField { file, data, mode: 'removeFile', - msg: `

${translations.PLUGIN_ADMIN.FILE_ERROR_ADD} ${file.name}

+ msg: `

${translations.PLUGIN_ADMIN.FILE_ERROR_ADD} {{fileName}}

${data.message}
` }); } @@ -255,6 +261,10 @@ export default class FilesField { return decodeURIComponent(escape(window.atob(str))); } + onDropzoneAddedFile(file, ...extra) { + return this.dropzone.options.addedfile(file); + } + onDropzoneRemovedFile(file, ...extra) { if (!file.accepted || file.rejected) { return; } let url = file.removeUrl || this.urls.delete || this.options.url; @@ -325,7 +335,9 @@ export default class FilesField { } let modal = $('[data-remodal-id="generic"]'); - modal.find('.error-content').html(msg); + const cleanName = file.name.replace('<', '<').replace('>', '>'); + + modal.find('.error-content').html(msg.replace('{{fileName}}', cleanName)); $.remodal.lookup[modal.data('remodal')].open(); } } diff --git a/plugins/admin/themes/grav/app/forms/fields/index.js b/plugins/admin/themes/grav/app/forms/fields/index.js index 06c1fa15..9482b693 100644 --- a/plugins/admin/themes/grav/app/forms/fields/index.js +++ b/plugins/admin/themes/grav/app/forms/fields/index.js @@ -19,6 +19,7 @@ import './mediapicker'; import './multilevel'; import './text'; import './range'; +import './elements'; export default { FilepickerField: { diff --git a/plugins/admin/themes/grav/app/main.js b/plugins/admin/themes/grav/app/main.js index ba2427cc..6edfca99 100644 --- a/plugins/admin/themes/grav/app/main.js +++ b/plugins/admin/themes/grav/app/main.js @@ -3,7 +3,8 @@ import '@babel/polyfill'; import $ from 'jquery'; import './utils/remodal'; -import 'simplebar'; +import 'simplebar/dist/simplebar.min.js'; +import { UriToMarkdown } from './forms/fields/files.js'; import GPM, { Instance as gpm } from './utils/gpm'; import KeepAlive from './utils/keepalive'; import Updates, { Instance as updates, Notifications, Feed } from './updates'; @@ -68,5 +69,5 @@ export default { Instance: MediaFilterInstance }, Scrollbar: { Scrollbar: { deprecated: true }, Instance: { deprecated: true } }, - Utils: { request, toastr, Cookies } + Utils: { request, toastr, Cookies, UriToMarkdown } }; diff --git a/plugins/admin/themes/grav/app/pages/page/add.js b/plugins/admin/themes/grav/app/pages/page/add.js index 8c9fa5ea..c6ad22e3 100644 --- a/plugins/admin/themes/grav/app/pages/page/add.js +++ b/plugins/admin/themes/grav/app/pages/page/add.js @@ -43,7 +43,9 @@ folder.on('input', (event) => { }); -folder.on('focus blur', (event) => getFields('title', event.currentTarget).title.trigger('input')); +folder.on('focus blur', (event) => { + getFields('title').title.trigger('input'); +}); $(document).on('change', '[name="data[route]"]', (event) => { const rawroute = $(event.currentTarget).val(); diff --git a/plugins/admin/themes/grav/app/pages/page/media.js b/plugins/admin/themes/grav/app/pages/page/media.js index 832b7eda..a38d53fd 100644 --- a/plugins/admin/themes/grav/app/pages/page/media.js +++ b/plugins/admin/themes/grav/app/pages/page/media.js @@ -1,4 +1,5 @@ import $ from 'jquery'; +import Cookies from '../../utils/cookies.js'; import request from '../../utils/request'; import FilesField, { UriToMarkdown } from '../../forms/fields/files'; import { config, translations } from 'grav-config'; @@ -90,6 +91,7 @@ export default class PageMedia extends FilesField { this.dropzone.options.thumbnail.call(this.dropzone, mock, data.url); }); + this.updateThumbsSize(); this.container.find('.dz-preview').prop('draggable', 'true'); }); } @@ -113,16 +115,40 @@ export default class PageMedia extends FilesField { } // accepted + this.updateThumbsSize(); + this.updateMediaCount(); $('.dz-preview').prop('draggable', 'true'); } + onDropzoneAddedFile(file, ...extra) { + super.onDropzoneAddedFile(file, extra); + + this.updateThumbsSize(); + } + onDropzoneRemovedFile(file, ...extra) { super.onDropzoneRemovedFile(file, ...extra); + + this.updateMediaCount(); if (this.sortable) { this.sortable.options.onSort(); } } + updateThumbsSize() { + const status = JSON.parse(Cookies.get('grav-admin-pagemedia') || '{}'); + + if (status.width) { + const input = this.container.closest('.pagemedia-field').find('.media-resizer'); + updateMediaSizes(input[0], status.width, false); + } + } + + updateMediaCount() { + const element = this.container.closest('.pagemedia-field').find('[data-pagemedia-count]'); + element.text(`(${this.dropzone.files.length})`); + } + attachDragDrop() { this.container.delegate('[data-dz-insert]', 'click', (e) => { let target = $(e.currentTarget).parent('.dz-preview').find('.dz-filename'); @@ -155,6 +181,7 @@ export default class PageMedia extends FilesField { const target = $(e.currentTarget); const file = target.parent('.dz-preview').find('.dz-filename'); const filename = encodeURI(file.text()); + const cleanName = file.text().replace('<', '<').replace('>', '>'); let fileObj = this.dropzone.files.filter((file) => file.name === global.decodeURI(filename)).shift() || {}; @@ -163,7 +190,7 @@ export default class PageMedia extends FilesField { } if (Array.isArray(fileObj.extras.metadata) && !fileObj.extras.metadata.length) { - fileObj.extras.metadata = { '': `${global.decodeURI(filename)}.meta.yaml doesn't exist` }; + fileObj.extras.metadata = { '': `${cleanName}.meta.yaml doesn't exist` }; } fileObj = fileObj.extras; @@ -171,14 +198,15 @@ export default class PageMedia extends FilesField { const modal_element = $('body').find('[data-remodal-id="metadata"]'); const modal = $.remodal.lookup[modal_element.data('remodal')]; - modal_element.find('h1 strong').html(filename); + modal_element.find('h1 strong').html(cleanName); if (fileObj.url) { modal_element.find('.meta-preview').html(``); } const container = modal_element.find('.meta-content').html('