Profiler/Completions

* show completion info for claimed characters in infobox on
      appropriate db pages
This commit is contained in:
Sarjuuk
2025-11-03 18:00:50 +01:00
parent 37380ff515
commit e3d6f7b3a7
25 changed files with 640 additions and 39 deletions

View File

@@ -8,7 +8,7 @@ if (!defined('AOWOW_REVISION'))
class InfoboxMarkup extends Markup
{
public function __construct(private array $items, array $opts, string $parent = '')
public function __construct(private array $items, array $opts, string $parent = '', private int $completionRowType = 0)
{
parent::__construct('', $opts, $parent);
}
@@ -31,6 +31,10 @@ class InfoboxMarkup extends Markup
public function __toString() : string
{
// inject before output to avoid adding it to cache
if ($this->completionRowType && User::getCharacters())
$this->items[] = [Lang::profiler('completion') . '[span class="compact-completion-display"][/span]', ['style' => 'display:none']];
if ($_ = $this->prepare())
$this->replace($_);