@extends('layout.default') @section('title')
{{ __('common.user') }} | Peer ID | {{ __('torrent.progress') }} | {{ __('common.upload') }} | {{ __('common.download') }} | {{ __('torrent.left') }} | {{ __('common.ip') }} | {{ __('common.port') }} | {{ __('torrent.last-update') }} | {{ __('common.status') }} | Visible | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@if (null !== ($user = \App\Models\User::find($peer['user_id'])))
@if ($torrent === null)
|
{{ implode('', array_map(fn ($char) => ctype_print($char) ? $char : '\x' . bin2hex($char), str_split(hex2bin(explode('-', $peerId)[1])))) }} | @if ($torrent === null) Torrent size not available @else @php $progress = (100 * ($peer['downloaded'] % $torrent->size)) / $torrent->size; @endphp @if (0 < $progress && $progress < 1) 1% @elseif (99 < $progress && $progress < 100) 99% @else {{ round($progress) }} @endif @endif | {{ \App\Helpers\StringHelper::formatBytes($peer['uploaded'] ?? 0, 2) }} | {{ \App\Helpers\StringHelper::formatBytes($peer['downloaded'] ?? 0, 2) }} | {{ \App\Helpers\StringHelper::formatBytes($peer['left'] ?? 0, 2) }} | @if (auth()->user()->group->is_modo || auth()->id() == $peer->user_id){{ $peer['ip_address'] }} | {{ $peer['port'] }} | @else--- | --- | @endif@php $updatedAt = \Illuminate\Support\Carbon::createFromTimestampUTC($peer['updated_at']); @endphp | @if ($peer['is_active']) @if ($peer['is_seeder']) {{ __('torrent.seeder') }} @else {{ __('torrent.leecher') }} @endif @else Inactive @endif | @if ($peer['is_visible']) {{ __('common.yes') }} @else {{ __('common.no') }} @endif |