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:
@@ -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,
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
}
|
@@ -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;
|
||||
}
|
||||
|
@@ -1,5 +0,0 @@
|
||||
<h1>Home from Author</h1>
|
||||
|
||||
<h2>{{ title }}</h2>
|
||||
|
||||
<p>{{ description}}</p>
|
@@ -34,7 +34,7 @@
|
||||
|
||||
{% include 'partials/flash.twig' %}
|
||||
|
||||
<div class="">
|
||||
<div>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user