don't push react dist anymore
This commit is contained in:
@@ -246,6 +246,8 @@ namespace Core\API\Routes {
|
||||
"type" => new StringType("type"),
|
||||
"target" => new StringType("target", 128),
|
||||
"extra" => new StringType("extra", 64, true, ""),
|
||||
"exact" => new Parameter("exact", Parameter::TYPE_BOOLEAN),
|
||||
"active" => new Parameter("active", Parameter::TYPE_BOOLEAN, true, true),
|
||||
));
|
||||
$this->isPublic = false;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class CreateDatabase extends DatabaseScript {
|
||||
new DocumentRoute("/login", true, \Core\Documents\Account::class, "account/login.twig"),
|
||||
new DocumentRoute("/resendConfirmEmail", true, \Core\Documents\Account::class, "account/resend_confirm_email.twig"),
|
||||
new DocumentRoute("/debug", true, \Core\Documents\Info::class),
|
||||
new StaticFileRoute("/static", true, "/static/welcome.html"),
|
||||
new StaticFileRoute("/", true, "/static/welcome.html"),
|
||||
]);
|
||||
|
||||
$queries[] = $sql->createTable("Settings")
|
||||
|
||||
@@ -7,12 +7,9 @@ use Core\Objects\Router\Router;
|
||||
|
||||
class Admin extends TemplateDocument {
|
||||
public function __construct(Router $router) {
|
||||
$user = $router->getContext()->getUser();
|
||||
$template = $user ? "admin.twig" : "redirect.twig";
|
||||
$params = $user ? [] : ["url" => "/login"];
|
||||
parent::__construct($router, "admin.twig", []);
|
||||
$this->title = "Administration";
|
||||
$this->searchable = false;
|
||||
parent::__construct($router, $template, $params);
|
||||
$this->enableCSP();
|
||||
$this->addCSPWhitelist("/js/admin-panel/");
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
{% block body %}
|
||||
<noscript>You need Javascript enabled to run this app</noscript>
|
||||
<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>
|
||||
<script src="/react/dist/admin-panel/index.js" nonce="{{ site.csp.nonce }}"></script>
|
||||
<link rel="stylesheet" href="/react/dist/admin-panel/index.css" nonce="{{ site.csp.nonce }}"></link>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user