From 3316a149a6d606324601980cbbc804e9d1fc1afa Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 15 Jul 2024 22:23:38 +0300 Subject: [PATCH] fix response form behaviour --- src/Entity/Browser/Container/Page.php | 31 +++++++++++++++++---------- src/Model/Response.php | 2 ++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/Entity/Browser/Container/Page.php b/src/Entity/Browser/Container/Page.php index 33d7f39c..5dabeda4 100644 --- a/src/Entity/Browser/Container/Page.php +++ b/src/Entity/Browser/Container/Page.php @@ -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 $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 ); } - // 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()) { diff --git a/src/Model/Response.php b/src/Model/Response.php index c8741f44..bdf899df 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -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(),