Skip to content

Commit

Permalink
Merge pull request #5950 from getkirby/release/4.0.0-rc.1
Browse files Browse the repository at this point in the history
4.0.0-rc.1
  • Loading branch information
bastianallgeier authored Nov 10, 2023
2 parents cb45cea + 982c737 commit da7346e
Show file tree
Hide file tree
Showing 172 changed files with 3,350 additions and 1,475 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ tests/ export-ignore
panel/.env.example export-ignore
panel/.eslintrc.js export-ignore
panel/.prettierrc.json export-ignore
panel/dist/ui export-ignore
panel/jsconfig.json export-ignore
panel/lab export-ignore
panel/package-lock.json export-ignore
panel/package.json export-ignore
panel/public export-ignore
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "The Kirby core",
"license": "proprietary",
"type": "kirby-cms",
"version": "4.0.0-beta.3",
"version": "4.0.0-rc.1",
"keywords": [
"kirby",
"cms",
Expand Down Expand Up @@ -39,7 +39,7 @@
"christian-riesen/base32": "1.6.0",
"claviska/simpleimage": "4.0.6",
"composer/semver": "3.4.0",
"filp/whoops": "2.15.3",
"filp/whoops": "2.15.4",
"getkirby/composer-installer": "^1.2.1",
"laminas/laminas-escaper": "2.13.0",
"michelf/php-smartypants": "1.8.1",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions config/areas/lab/drawers.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
'lab.docs' => [
'pattern' => 'lab/docs/(:any)',
'load' => function (string $component) {
if (Docs::installed() === false) {
return [
'component' => 'k-text-drawer',
'props' => [
'text' => 'The UI docs are not installed.'
]
];
}

$docs = new Docs($component);

return [
Expand Down
61 changes: 41 additions & 20 deletions config/areas/lab/views.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,27 @@
return [
'component' => 'k-lab-index-view',
'props' => [
'tab' => 'examples',
'categories' => Category::all(),
'info' => Category::installed() ? null : 'The default Lab examples are not installed.',
'tab' => 'examples',
],
];
}
],
'lab.docs' => [
'pattern' => 'lab/docs',
'action' => function () {
$props = match (Docs::installed()) {
true => [
'categories' => [['examples' => Docs::all()]],
'tab' => 'docs',
],
false => [
'info' => 'The UI docs are not installed.',
'tab' => 'docs',
]
};

return [
'component' => 'k-lab-index-view',
'title' => 'Docs',
Expand All @@ -28,34 +40,43 @@
'link' => 'lab/docs'
]
],
'props' => [
'tab' => 'docs',
'categories' => [
['examples' => Docs::all()]
],
],
'props' => $props,
];
}
],
'lab.doc' => [
'pattern' => 'lab/docs/(:any)',
'action' => function (string $component) {
$crumbs = [
[
'label' => 'Docs',
'link' => 'lab/docs'
],
[
'label' => $component,
'link' => 'lab/docs/' . $component
]
];

if (Docs::installed() === false) {
return [
'component' => 'k-lab-index-view',
'title' => $component,
'breadcrumb' => $crumbs,
'props' => [
'info' => 'The UI docs are not installed.',
'tab' => 'docs',
],
];
}

$docs = new Docs($component);

return [
'component' => 'k-lab-docs-view',
'title' => $component,
'breadcrumb' => [
[
'label' => 'Docs',
'link' => 'lab/docs'
],
[
'label' => $component,
'link' => 'lab/docs/' . $component
]
],
'props' => [
'component' => 'k-lab-docs-view',
'title' => $component,
'breadcrumb' => $crumbs,
'props' => [
'component' => $component,
'docs' => $docs->toArray(),
'lab' => $docs->lab()
Expand Down
14 changes: 10 additions & 4 deletions config/areas/site/dialogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

use Kirby\Cms\App;
use Kirby\Cms\Find;
use Kirby\Cms\Page;
use Kirby\Cms\PageRules;
use Kirby\Cms\Response;
use Kirby\Exception\Exception;
use Kirby\Exception\InvalidArgumentException;
use Kirby\Exception\PermissionException;
Expand All @@ -14,6 +12,7 @@
use Kirby\Panel\Panel;
use Kirby\Toolkit\I18n;
use Kirby\Toolkit\Str;
use Kirby\Uuid\Uuids;

$fields = require __DIR__ . '/../fields/dialogs.php';
$files = require __DIR__ . '/../files/dialogs.php';
Expand Down Expand Up @@ -516,14 +515,21 @@
'page.move' => [
'pattern' => 'pages/(:any)/move',
'load' => function (string $id) {
$page = Find::page($id);
$page = Find::page($id);
$parent = $page->parentModel();

if (Uuids::enabled() === false) {
$parentId = $parent?->id() ?? '/';
} else {
$parentId = $parent?->uuid()->toString() ?? 'site://';
}

return [
'component' => 'k-page-move-dialog',
'props' => [
'value' => [
'move' => $page->panel()->url(true),
'parent' => $page->parent()?->panel()->url(true) ?? '/site'
'parent' => $parentId
]
]
];
Expand Down
4 changes: 2 additions & 2 deletions config/areas/site/requests.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
$panel = $site->panel();
$uuid = $site->uuid()?->toString();
$url = $site->url();
$value = $uuid ?? $url;
$value = $uuid ?? '/';

return [
[
Expand All @@ -44,7 +44,7 @@
$panel = $child->panel();
$uuid = $child->uuid()?->toString();
$url = $child->url();
$value = $uuid ?? $url;
$value = $uuid ?? $child->id();

$pages[] = [
'children' => $panel->url(true),
Expand Down
12 changes: 6 additions & 6 deletions config/areas/system/dialogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,24 @@
'props' => [
'fields' => [
'domain' => [
'label' => I18n::translate('license.unregistered'),
'label' => I18n::translate('license.activate.label'),
'type' => 'info',
'theme' => $local ? 'warning' : 'info',
'text' => I18n::template('license.register.' . ($local ? 'local' : 'domain'), ['host' => $system->indexUrl()])
'text' => I18n::template('license.activate.' . ($local ? 'local' : 'domain'), ['host' => $system->indexUrl()])
],
'license' => [
'label' => I18n::translate('license.register.label'),
'label' => I18n::translate('license.code.label'),
'type' => 'text',
'required' => true,
'counter' => false,
'placeholder' => 'K3-',
'help' => I18n::translate('license.register.help') . ' ' . '<a href="https://getkirby.com/buy" target="_blank">' . I18n::translate('license.buy') . ' &rarr;</a>'
'help' => I18n::translate('license.code.help') . ' ' . '<a href="https://getkirby.com/buy" target="_blank">' . I18n::translate('license.buy') . ' &rarr;</a>'
],
'email' => Field::email(['required' => true])
],
'submitButton' => [
'icon' => 'key',
'text' => I18n::translate('license.register'),
'text' => I18n::translate('activate'),
],
'value' => [
'license' => null,
Expand All @@ -88,7 +88,7 @@

return [
'event' => 'system.register',
'message' => I18n::translate('license.register.success')
'message' => I18n::translate('license.success')
];
// @codeCoverageIgnoreEnd
}
Expand Down
19 changes: 10 additions & 9 deletions config/areas/system/views.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,29 @@

$environment = [
[
'label' => $license ? I18n::translate('license') : I18n::translate('license.register.label'),
'label' => $license ? I18n::translate('license') : I18n::translate('license.activate.label'),
'value' => $license ? 'Kirby 3' : I18n::translate('license.unregistered.label'),
'theme' => $license ? null : 'negative',
'icon' => $license ? 'info' : 'key',
'dialog' => $license ? 'license' : 'registration'
],
[
'label' => $updateStatus?->label() ?? I18n::translate('version'),
'value' => $kirby->version(),
'link' => (
$updateStatus ?
$updateStatus->url() :
'https://github.com/getkirby/kirby/releases/tag/' . $kirby->version()
),
'theme' => $updateStatus?->theme()
'link' => $updateStatus?->url() ??
'https://github.com/getkirby/kirby/releases/tag/' . $kirby->version(),
'theme' => $updateStatus?->theme(),
'icon' => $updateStatus?->icon() ?? 'info'
],
[
'label' => 'PHP',
'value' => phpversion()
'value' => phpversion(),
'icon' => 'code'
],
[
'label' => I18n::translate('server'),
'value' => $system->serverSoftware() ?? '?'
'value' => $system->serverSoftware() ?? '?',
'icon' => 'server'
]
];

Expand Down
2 changes: 1 addition & 1 deletion config/fields/date.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
'key' => 'validation.date.between',
'data' => [
'min' => $min->format($format),
'max' => $min->format($format)
'max' => $max->format($format)
]
]);
} elseif ($min && $value->isMin($min) === false) {
Expand Down
Loading

0 comments on commit da7346e

Please sign in to comment.