1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-30 19:00:32 +02:00

Fixed meta event in meta controller

This commit is contained in:
trendschau
2023-12-10 08:40:56 +01:00
parent 4e650c35ac
commit 63b7761575
6 changed files with 14 additions and 22 deletions

View File

@@ -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,

View File

@@ -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;
}
}

View File

@@ -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;
}

View File

@@ -1,5 +0,0 @@
<h1>Home from Author</h1>
<h2>{{ title }}</h2>
<p>{{ description}}</p>

View File

@@ -34,7 +34,7 @@
{% include 'partials/flash.twig' %}
<div class="">
<div>
{% block content %}{% endblock %}

View File

@@ -26,6 +26,7 @@
</head>
<body class="bg-stone-100 dark:bg-stone-900">
<div class="tailwind list-inside"></div>
{% include 'partials/symbols.twig' %}
<header class="border-b-2 border-stone-200 dark:border-stone-600">
@@ -48,6 +49,7 @@
const data = {{ jsdata | json_encode() | raw }};
</script>
<script src="{{ base_url() }}/system/typemill/author/js/autosize.min.js?v={{ settings.version }}"></script>
<script src="{{ base_url() }}/system/typemill/author/js/axios.min.js?v={{ settings.version }}"></script>
<script>
const tmaxios = axios.create();