Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevanzuydam committed Jul 16, 2023
2 parents b055aee + 2add643 commit f5b9172
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
16 changes: 4 additions & 12 deletions bin/tina4
Original file line number Diff line number Diff line change
Expand Up @@ -427,21 +427,13 @@ class [CLASS_NAME] extends \Tina4\ORM

addMenu($menus, "webservice", "Runs webservice", static function ($index, $input) use ($argv) {
$port = $argv[2] ?? "7145";

if (strpos($port, ":") !== false) {
$host = explode(":", $port)[0];
$port = explode(":", $port)[1];
\Tina4\Debug::message("Server running on http://localhost:{$port}");
if (strpos(php_uname(), "Linux") !== false) {
`php -S 0.0.0.0:{$port} index.php`;
} else {
$host = $host ?? "localhost";
if (strpos(php_uname(), "Linux") !== false) {
$host = "0.0.0.0";
}
`php -S localhost:{$port} index.php`;
}

\Tina4\Debug::message("Server running on http://localhost:{$port}");

`php -S {$host}:{$port} index.php`;

}, true, ["options" => ["run"]]);


Expand Down
4 changes: 2 additions & 2 deletions src/routes/page-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
if (!empty($site->pageLayout)) {
$pageBuilderContent = json_decode($site->pageLayout);
$components = $pageBuilderContent->frames[0]->component;
$pages[] = ["id" => "layout", "component" => $components];
// $pages[] = ["id" => "layout", "component" => $components];
} else {
$pages[] = ["id" => "layout"];
// $pages[] = ["id" => "layout"];
}


Expand Down
2 changes: 1 addition & 1 deletion src/templates/admin/page-builder.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<a class="exit-builder" href="/cms/dashboard">Back to CMS</a>
<b>Choose Page</b>
<div class="pages">
<a href="#" onclick="loadPage('layout')">Page Layout</a>
<!-- <a href="#" onclick="loadPage('layout')">Page Layout</a> -->
{% for page in pages %}
<a href="#" onclick="loadPage('{{ page.id }}')">{{ page.title }}</a>
{% endfor %}
Expand Down

0 comments on commit f5b9172

Please sign in to comment.