mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
fix session restore
This commit is contained in:
parent
874376bbed
commit
e858944de7
3 changed files with 29 additions and 3 deletions
|
|
@ -94,6 +94,15 @@ class Page
|
||||||
$this->content->refresh();
|
$this->content->refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function init(
|
||||||
|
?string $request = null
|
||||||
|
): void
|
||||||
|
{
|
||||||
|
$this->navbar->request->setValue(
|
||||||
|
$request
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function open(
|
public function open(
|
||||||
?string $request = null,
|
?string $request = null,
|
||||||
bool $history = true
|
bool $history = true
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,13 @@ class Tab
|
||||||
foreach ($this->container->browser->database->getSession() as $session)
|
foreach ($this->container->browser->database->getSession() as $session)
|
||||||
{
|
{
|
||||||
$this->appendPage(
|
$this->appendPage(
|
||||||
$session->request
|
$session->request,
|
||||||
|
boolval( // open
|
||||||
|
parse_url(
|
||||||
|
$session->request,
|
||||||
|
PHP_URL_SCHEME
|
||||||
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,6 +111,7 @@ class Tab
|
||||||
|
|
||||||
public function appendPage(
|
public function appendPage(
|
||||||
?string $request = null,
|
?string $request = null,
|
||||||
|
bool $open = true,
|
||||||
bool $focus = true
|
bool $focus = true
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
|
|
@ -124,13 +131,20 @@ class Tab
|
||||||
$this->_reorderable
|
$this->_reorderable
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($request)
|
if ($open)
|
||||||
{
|
{
|
||||||
$page->open(
|
$page->open(
|
||||||
$request
|
$request
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$page->init(
|
||||||
|
$request
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ($focus)
|
if ($focus)
|
||||||
{
|
{
|
||||||
// Focus on appended tab
|
// Focus on appended tab
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,10 @@ class Add
|
||||||
'activate',
|
'activate',
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
$this->tab->menu->browser->container->tab->appendPage();
|
$this->tab->menu->browser->container->tab->appendPage(
|
||||||
|
null,
|
||||||
|
false
|
||||||
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue