From 63b776157541bf218934665a1718feadd991a2f9 Mon Sep 17 00:00:00 2001 From: trendschau Date: Sun, 10 Dec 2023 08:40:56 +0100 Subject: [PATCH] Fixed meta event in meta controller --- .../Controllers/ControllerApiAuthorMeta.php | 8 ++++---- system/typemill/Models/Settings.php | 5 +++-- system/typemill/author/css/output.css | 14 ++++---------- system/typemill/author/home.twig | 5 ----- system/typemill/author/layouts/layoutAuth.twig | 2 +- .../typemill/author/layouts/layoutSystemBlank.twig | 2 ++ 6 files changed, 14 insertions(+), 22 deletions(-) delete mode 100644 system/typemill/author/home.twig diff --git a/system/typemill/Controllers/ControllerApiAuthorMeta.php b/system/typemill/Controllers/ControllerApiAuthorMeta.php index 8db13e1..369588f 100644 --- a/system/typemill/Controllers/ControllerApiAuthorMeta.php +++ b/system/typemill/Controllers/ControllerApiAuthorMeta.php @@ -9,7 +9,7 @@ use Typemill\Models\Validation; use Typemill\Models\Navigation; use Typemill\Models\Meta; use Typemill\Static\Translations; -use Typemill\Events\OnMetaLoaded; +use Typemill\Events\OnMetaDefinitionsLoaded; class ControllerApiAuthorMeta extends Controller { @@ -66,6 +66,9 @@ class ControllerApiAuthorMeta extends Controller $metadefinitions = $meta->getMetaDefinitions($this->settings, $folder = false); } + # update metadefinitions from plugins. + $metadefinitions = $this->c->get('dispatcher')->dispatch(new OnMetaDefinitionsLoaded($metadefinitions),'onMetaDefinitionsLoaded')->getData(); + # cleanup metadata to the current metadefinitions (e.g. strip out deactivated plugins) $metacleared = []; @@ -92,9 +95,6 @@ class ControllerApiAuthorMeta extends Controller # store the metascheme in cache for frontend # $writeMeta->updateYaml('cache', 'metatabs.yaml', $metascheme); - $metacleared = $this->c->get('dispatcher')->dispatch(new OnMetaLoaded($metacleared),'onMetaLoaded')->getData(); - - $response->getBody()->write(json_encode([ 'metadata' => $metacleared, 'metadefinitions' => $metadefinitions, diff --git a/system/typemill/Models/Settings.php b/system/typemill/Models/Settings.php index e545378..8fdab5d 100644 --- a/system/typemill/Models/Settings.php +++ b/system/typemill/Models/Settings.php @@ -106,7 +106,7 @@ class Settings return false; } - + public function getObjectSettings($objectType, $objectName) { $objectSettings = $this->storage->getYaml($objectType, $objectName, $objectName . '.yaml'); @@ -118,7 +118,7 @@ class Settings return false; } - + public function updateSettings($newSettings, $key1 = false, $key2 = false) { $userSettings = $this->getUserSettings(); @@ -238,4 +238,5 @@ class Settings } return false; } + } \ No newline at end of file diff --git a/system/typemill/author/css/output.css b/system/typemill/author/css/output.css index 29bf15c..086ec42 100644 --- a/system/typemill/author/css/output.css +++ b/system/typemill/author/css/output.css @@ -1144,6 +1144,10 @@ video { resize: both; } +.list-inside { + list-style-position: inside; +} + .list-disc { list-style-type: disc; } @@ -1447,21 +1451,11 @@ video { background-color: rgb(0 0 0 / 0.75); } -.bg-stone-300 { - --tw-bg-opacity: 1; - background-color: rgb(214 211 209 / var(--tw-bg-opacity)); -} - .bg-yellow-500 { --tw-bg-opacity: 1; background-color: rgb(234 179 8 / var(--tw-bg-opacity)); } -.bg-stone-500 { - --tw-bg-opacity: 1; - background-color: rgb(120 113 108 / var(--tw-bg-opacity)); -} - .bg-opacity-90 { --tw-bg-opacity: 0.9; } diff --git a/system/typemill/author/home.twig b/system/typemill/author/home.twig deleted file mode 100644 index 00466b7..0000000 --- a/system/typemill/author/home.twig +++ /dev/null @@ -1,5 +0,0 @@ -

Home from Author

- -

{{ title }}

- -

{{ description}}

\ No newline at end of file diff --git a/system/typemill/author/layouts/layoutAuth.twig b/system/typemill/author/layouts/layoutAuth.twig index ed20702..519579d 100644 --- a/system/typemill/author/layouts/layoutAuth.twig +++ b/system/typemill/author/layouts/layoutAuth.twig @@ -34,7 +34,7 @@ {% include 'partials/flash.twig' %} -
+
{% block content %}{% endblock %} diff --git a/system/typemill/author/layouts/layoutSystemBlank.twig b/system/typemill/author/layouts/layoutSystemBlank.twig index 67a58fd..bbe1996 100644 --- a/system/typemill/author/layouts/layoutSystemBlank.twig +++ b/system/typemill/author/layouts/layoutSystemBlank.twig @@ -26,6 +26,7 @@ +
{% include 'partials/symbols.twig' %}
@@ -48,6 +49,7 @@ const data = {{ jsdata | json_encode() | raw }}; +