Skip to content

Commit

Permalink
Merge branch 'develop-minor' into v5/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Feb 7, 2025
2 parents e056b2a + 4bd5592 commit 0579bda
Show file tree
Hide file tree
Showing 14 changed files with 233 additions and 758 deletions.
82 changes: 57 additions & 25 deletions LICENSE.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions composer.lock

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

22 changes: 18 additions & 4 deletions config/areas/languages/dialogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,26 @@
$fields['key']['disabled'] = true;
$fields['value']['autofocus'] = true;

// shows info text when variable is an array
// TODO: 5.0: use entries field instead showing info text
$isVariableArray = is_array($variable->value()) === true;

if ($isVariableArray === true) {
$fields['value'] = [
'label' => I18n::translate('info'),
'type' => 'info',
'text' => 'You are using an array variable for this key. Please modify it in the language file in /site/languages',
];
}

return [
'component' => 'k-form-dialog',
'props' => [
'fields' => $fields,
'size' => 'large',
'value' => [
'props' => [
'cancelButton' => $isVariableArray === false,
'fields' => $fields,
'size' => 'large',
'submitButton' => $isVariableArray === false,
'value' => [
'key' => $variable->key(),
'value' => $variable->value()
]
Expand Down
8 changes: 8 additions & 0 deletions config/components.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Kirby\Http\Uri;
use Kirby\Http\Url;
use Kirby\Image\Darkroom;
use Kirby\Session\SessionStore;
use Kirby\Template\Snippet;
use Kirby\Template\Template;
use Kirby\Text\Markdown;
Expand Down Expand Up @@ -265,6 +266,13 @@
);
},

/**
* Add your own session store
*/
'session::store' => function (App $kirby): string|SessionStore {
return $kirby->root('sessions');
},

/**
* Add your own SmartyPants parser
*
Expand Down
Loading

0 comments on commit 0579bda

Please sign in to comment.