add is_seed_box to peers

This commit is contained in:
xiaomlove
2022-09-12 20:00:07 +08:00
parent 771e7ad88f
commit d5e81ac009
8 changed files with 99 additions and 25 deletions

View File

@@ -138,12 +138,20 @@ class SeedBoxRepository extends BaseRepository
}
foreach (Arr::wrap($ipArr) as $ip) {
if ((isIPV4($ip) || isIPV6($ip)) && $enableSeedBox && isIPSeedBox($ip, $uid)) {
return '<img src="pic/misc/seed-box.png" style="vertical-align: bottom; height: 16px; margin-left: 4px" title="SeedBox" />';
return $this->getSeedBoxIcon();
}
}
return '';
}
public function getSeedBoxIcon($isSeedBox = true): string
{
if (!$isSeedBox) {
return '';
}
return '<img src="pic/misc/seed-box.png" style="vertical-align: bottom; height: 16px; margin-left: 4px" title="SeedBox" />';
}
private function clearCache()
{
return true;