Browse Source

set titles from connection response

PHP-GTK3
yggverse 4 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
{ {
// Update title // Update title
$this->title->set( $this->title->set(
_('Pending...'), $connection->getTitle(),
$request['placeholder'] ? $request['placeholder'] $connection->getSubtitle(),
: _('Response expected') $connection->getTooltip()
); );
// Show response form // Show response form

16
src/Model/Connection/Gemini.php

@ -43,6 +43,20 @@ class Gemini
case 10: // response expected case 10: // response expected
case 11: // sensitive input 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( $this->_connection->setMime(
Filesystem::MIME_TEXT_GEMINI Filesystem::MIME_TEXT_GEMINI
); );
@ -89,7 +103,7 @@ class Gemini
// show link, no follow // show link, no follow
$this->_connection->setTitle( $this->_connection->setTitle(
_('Redirect!') _('Redirect...')
); );
$this->_connection->setData( $this->_connection->setData(

Loading…
Cancel
Save