localization, context, react stuff

This commit is contained in:
2022-12-01 01:28:38 +01:00
parent a84a51018c
commit cb75e22811
32 changed files with 379 additions and 208 deletions

View File

@@ -25,7 +25,6 @@ class Account extends TemplateDocument {
protected function loadParameters() {
$settings = $this->getSettings();
$templateName = $this->getTemplateName();
$language = $this->getContext()->getLanguage();
$this->parameters["view"] = ["success" => true];
switch ($templateName) {

View File

@@ -14,5 +14,6 @@ class Admin extends TemplateDocument {
$this->searchable = false;
parent::__construct($router, $template, $params);
$this->enableCSP();
$this->addCSPWhitelist("/js/admin-panel/");
}
}

View File

@@ -0,0 +1,11 @@
<?php
return [
"dashboard" => "Dashboard",
"visitor_statistics" => "Besucherstatistiken",
"user_groups" => "Benutzer & Gruppen",
"page_routes" => "Seiten & Routen",
"settings" => "Einstellungen",
"logs" => "Logs",
"help" => "Hilfe",
];

View File

@@ -9,4 +9,5 @@ return [
"submit" => "Absenden",
"language" => "Sprache",
"loading" => "Laden",
"logout" => "Ausloggen",
];

View File

@@ -0,0 +1,11 @@
<?php
return [
"dashboard" => "Dashboard",
"visitor_statistics" => "Visitor Statistics",
"user_groups" => "User & Groups",
"page_routes" => "Pages & Routes",
"settings" => "Settings",
"logs" => "Logs",
"help" => "Help",
];

View File

@@ -9,4 +9,5 @@ return [
"submit" => "Submit",
"language" => "Language",
"loading" => "Loading",
"logout" => "Logout",
];

View File

@@ -7,7 +7,7 @@
{% block body %}
<noscript>You need Javascript enabled to run this app</noscript>
<div class="wrapper" type="module" id="admin-panel"></div>
<div type="module" id="admin-panel"></div>
<script src="/js/admin-panel/index.js" nonce="{{ site.csp.nonce }}"></script>
<link rel="stylesheet" href="/js/admin-panel/index.css" nonce="{{ site.csp.nonce }}"></link>
{% endblock %}