append app prefix to window title

This commit is contained in:
yggverse 2024-04-17 13:16:41 +03:00
parent a011d5e004
commit bdb586144c
3 changed files with 18 additions and 32 deletions

View file

@ -12,13 +12,6 @@
"header":
{
"enabled":true,
"title":
{
"length":
{
"max":64
}
},
"button":
{
"close":true
@ -32,11 +25,7 @@
{
"title":
{
"default":"New page",
"length":
{
"max":32
}
"default":"New page"
},
"redirect":
{

View file

@ -191,13 +191,19 @@ class App
{
if ($value)
{
if ($value == 'Welcome to Yoda!')
{
$title = $value;
}
/* @TODO
$title = urldecode(
mb_strlen($value) > $this->config->header->title->length->max ? mb_substr($value, 0, $this->config->header->title->length->max) . '...'
: $value
);
*/ $title = $value;
else
{
$title = sprintf(
'%s - %s',
$value,
$this->config->name
);
}
}
else

View file

@ -664,10 +664,6 @@ class Page
$title = $origin->getHost();
}
$this->app->setTitle(
$title
);
$this->setTitle(
$title
);
@ -757,10 +753,6 @@ class Page
$h1
);
$this->app->setTitle(
$title
);
$this->setTitle(
$title
);
@ -773,12 +765,7 @@ class Page
{
if ($value)
{
/* @TODO
$title = urldecode(
mb_strlen($value) > $this->config->title->length->max ? mb_substr($value, 0, $this->config->title->length->max) . '...'
: $value
);
*/ $title = $value;
$title = $value;
}
else
@ -790,6 +777,10 @@ class Page
$this->box,
$title
);
$this->app->setTitle(
$title
);
}
public function setProgress(