mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
use local config node
This commit is contained in:
parent
7c283e7634
commit
878b194e70
1 changed files with 10 additions and 7 deletions
|
|
@ -15,9 +15,14 @@ class Tab
|
|||
|
||||
public \Yggverse\Yoda\Model\Memory $memory;
|
||||
|
||||
public object $config;
|
||||
|
||||
public function __construct(
|
||||
string $name = 'boxTab'
|
||||
) {
|
||||
// Init config
|
||||
$this->config = \Yggverse\Yoda\Model\File::getConfig();
|
||||
|
||||
// Init memory
|
||||
$this->memory = new \Yggverse\Yoda\Model\Memory();
|
||||
|
||||
|
|
@ -110,8 +115,6 @@ class Tab
|
|||
// Actions
|
||||
public function navigate(string $url)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$this->tray->label->set_text(
|
||||
sprintf(
|
||||
'Open %s...',
|
||||
|
|
@ -125,7 +128,7 @@ class Tab
|
|||
|
||||
$host = null;
|
||||
|
||||
if ($config->resolver->enabled)
|
||||
if ($this->config->resolver->enabled)
|
||||
{
|
||||
$address = new \Yggverse\Net\Address(
|
||||
$url
|
||||
|
|
@ -136,10 +139,10 @@ class Tab
|
|||
if (!$host = $this->memory->get($name))
|
||||
{
|
||||
$resolve = new \Yggverse\Net\Resolve(
|
||||
$config->resolver->request->record,
|
||||
$config->resolver->request->host,
|
||||
$config->resolver->request->timeout,
|
||||
$config->resolver->result->shuffle
|
||||
$this->config->resolver->request->record,
|
||||
$this->config->resolver->request->host,
|
||||
$this->config->resolver->request->timeout,
|
||||
$this->config->resolver->result->shuffle
|
||||
);
|
||||
|
||||
$resolved = $resolve->address(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue