Browse Source

fix response form behaviour

PHP-GTK3
yggverse 4 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
// Show progressbar // Show progressbar
$this->progressbar->infinitive(); $this->progressbar->infinitive();
// Hide response form
$this->response->hide();
// Update content by multi-protocol responser // Update content by multi-protocol responser
$response = new \Yggverse\Yoda\Model\Response( $response = new \Yggverse\Yoda\Model\Response(
$this->navbar->request->getValue(), $this->navbar->request->getValue(),
@ -153,6 +156,23 @@ class Page
$location $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 return false; // stop
} }
@ -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 // Stop event loop on request completed
if ($response->isCompleted()) if ($response->isCompleted())
{ {

2
src/Model/Response.php

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

Loading…
Cancel
Save