mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
draft history tab features
This commit is contained in:
parent
5df6332346
commit
fa92487489
5 changed files with 46 additions and 13 deletions
|
|
@ -56,18 +56,7 @@ class History
|
|||
);
|
||||
|
||||
// Build history list from database records
|
||||
foreach ($this->app->database->getHistory() as $record)
|
||||
{
|
||||
$this->list->append(
|
||||
[
|
||||
$record->url,
|
||||
date(
|
||||
$this->config->time->format,
|
||||
$record->time
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
$this->refresh();
|
||||
|
||||
// Compose page
|
||||
$this->box = new \GtkBox(
|
||||
|
|
@ -87,4 +76,22 @@ class History
|
|||
0
|
||||
);
|
||||
}
|
||||
|
||||
public function refresh(): void
|
||||
{
|
||||
$this->list->clear();
|
||||
|
||||
foreach ($this->app->database->getHistory() as $record)
|
||||
{
|
||||
$this->list->append(
|
||||
[
|
||||
$record->url,
|
||||
date(
|
||||
$this->config->time->format,
|
||||
$record->time
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue