Merge pull request #3865 from Roardom/external-tracker-visible-peer

(Add) Display peer visibility on external torrent page
This commit is contained in:
HDVinnie
2024-05-26 15:14:05 -04:00
committed by GitHub
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -112,6 +112,7 @@ class Unit3dAnnounce
* port: int,
* is_seeder: bool,
* is_active: bool,
* is_visible: bool,
* updated_at: int,
* uploaded: int,
* downloaded: int,
@@ -154,6 +155,7 @@ class Unit3dAnnounce
|| !\array_key_exists('port', $peer) || !\is_int($peer['port'])
|| !\array_key_exists('is_seeder', $peer) || !\is_bool($peer['is_seeder'])
|| !\array_key_exists('is_active', $peer) || !\is_bool($peer['is_active'])
|| !\array_key_exists('is_visible', $peer) || !\is_bool($peer['is_visible'])
|| !\array_key_exists('updated_at', $peer) || !\is_int($peer['updated_at'])
|| !\array_key_exists('uploaded', $peer) || !\is_int($peer['uploaded'])
|| !\array_key_exists('downloaded', $peer) || !\is_int($peer['downloaded'])
@@ -79,6 +79,7 @@
<th>{{ __('torrent.started') }}</th>
<th>{{ __('torrent.last-update') }}</th>
<th>{{ __('common.status') }}</th>
<th>Visible</th>
</tr>
</thead>
<tbody>
@@ -159,6 +160,13 @@
Inactive
@endif
</td>
<td class="{{ $peer['is_visible'] ? 'text-green' : 'text-red' }}">
@if ($peer['is_visible'])
{{ __('common.yes') }}
@else
{{ __('common.no') }}
@endif
</td>
</tr>
@endforeach
</tbody>