Upgrade to 3.8.4

This commit is contained in:
Bastian Allgeier
2023-01-10 09:58:43 +01:00
parent 7f6e78ab3b
commit 0ebe0c7b16
35 changed files with 145 additions and 164 deletions

View File

@@ -198,7 +198,9 @@ class Document
*/
public static function icons(): string
{
return F::read(App::instance()->root('kirby') . '/panel/dist/img/icons.svg');
$dev = App::instance()->option('panel.dev', false);
$dir = $dev ? 'public' : 'dist';
return F::read(App::instance()->root('kirby') . '/panel/' . $dir . '/img/icons.svg');
}
/**

View File

@@ -292,17 +292,22 @@ class File extends Model
public function pickerData(array $params = []): array
{
$name = $this->model->filename();
$id = $this->model->id();
if (empty($params['model']) === false) {
$parent = $this->model->parent();
// if the file belongs to the current parent model,
// store only name as ID to keep its path relative to the model
$id = $parent === $params['model'] ? $name : $id;
$absolute = $parent !== $params['model'];
}
$params['text'] ??= '{{ file.filename }}';
return array_merge(parent::pickerData($params), [
'filename' => $name,
'dragText' => $this->dragText('auto', $absolute ?? false),
'filename' => $name,
'id' => $id,
'type' => $this->model->type(),
'url' => $this->model->url()
]);

View File

@@ -660,7 +660,7 @@ class Dom
$metaTag = $this->doc->createElement('meta');
$metaTag->setAttribute('http-equiv', 'Content-Type');
$metaTag->setAttribute('content', 'text/html; charset=utf-8');
$metaTag->setAttribute('id', $metaId = Str::random(10));
$metaTag->setAttribute('id', Str::random(10));
$this->doc->insertBefore($metaTag, $this->doc->documentElement);
if (