Browse Source

fix response form behaviour

PHP-GTK3
yggverse 5 months ago
parent
commit
3316a149a6
  1. 31
      src/Entity/Browser/Container/Page.php
  2. 2
      src/Model/Response.php

31
src/Entity/Browser/Container/Page.php

@ -132,6 +132,9 @@ class Page @@ -132,6 +132,9 @@ class Page
// Show progressbar
$this->progressbar->infinitive();
// Hide response form
$this->response->hide();
// Update content by multi-protocol responser
$response = new \Yggverse\Yoda\Model\Response(
$this->navbar->request->getValue(),
@ -153,6 +156,23 @@ class Page @@ -153,6 +156,23 @@ class Page
$location
);
// Hide progressbar
$this->progressbar->hide();
return false; // stop
}
// Response form requested
if ($request = $response->getRequest())
{
$this->response->show(
$request['placeholder'],
$request['visible']
);
// Hide progressbar
$this->progressbar->hide();
return false; // stop
}
@ -199,17 +219,6 @@ class Page @@ -199,17 +219,6 @@ class Page
);
}
// Response form requested
if ($request = $response->getRequest())
{
$this->response->show(
$request['placeholder'],
$request['visible']
);
}
else $this->response->hide();
// Stop event loop on request completed
if ($response->isCompleted())
{

2
src/Model/Response.php

@ -149,6 +149,8 @@ class Response @@ -149,6 +149,8 @@ class Response
case 10: // response expected
case 11: // sensitive input
$this->_mime = self::MIME_TEXT_GEMINI;
$this->_request =
[
'placeholder' => $response->getMeta(),

Loading…
Cancel
Save