From 2f6ac84f3e0fe807bd65d643115564e46832f011 Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 18 Jul 2024 12:26:26 +0300 Subject: [PATCH] set titles from connection response --- src/Entity/Browser/Container/Page.php | 6 +++--- src/Model/Connection/Gemini.php | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/Entity/Browser/Container/Page.php b/src/Entity/Browser/Container/Page.php index b6efeaec..cfbb09ca 100644 --- a/src/Entity/Browser/Container/Page.php +++ b/src/Entity/Browser/Container/Page.php @@ -179,9 +179,9 @@ class Page { // Update title $this->title->set( - _('Pending...'), - $request['placeholder'] ? $request['placeholder'] - : _('Response expected') + $connection->getTitle(), + $connection->getSubtitle(), + $connection->getTooltip() ); // Show response form diff --git a/src/Model/Connection/Gemini.php b/src/Model/Connection/Gemini.php index 425cc081..2cbcb753 100644 --- a/src/Model/Connection/Gemini.php +++ b/src/Model/Connection/Gemini.php @@ -43,6 +43,20 @@ class Gemini case 10: // response expected case 11: // sensitive input + $this->_connection->setTitle( + _('Pending...') + ); + + $this->_connection->setSubtitle( + $response->getMeta() ? $response->getMeta() + : _('Response expected') + ); + + $this->_connection->setTooltip( + $response->getMeta() ? $response->getMeta() + : _('Response expected') + ); + $this->_connection->setMime( Filesystem::MIME_TEXT_GEMINI ); @@ -89,7 +103,7 @@ class Gemini // show link, no follow $this->_connection->setTitle( - _('Redirect!') + _('Redirect...') ); $this->_connection->setData(