Browse Source

set titles from connection response

PHP-GTK3
yggverse 5 months ago
parent
commit
2f6ac84f3e
  1. 6
      src/Entity/Browser/Container/Page.php
  2. 16
      src/Model/Connection/Gemini.php

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

@ -179,9 +179,9 @@ class Page @@ -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

16
src/Model/Connection/Gemini.php

@ -43,6 +43,20 @@ class Gemini @@ -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 @@ -89,7 +103,7 @@ class Gemini
// show link, no follow
$this->_connection->setTitle(
_('Redirect!')
_('Redirect...')
);
$this->_connection->setData(

Loading…
Cancel
Save