@php if (!function_exists('krx_avatar_initial')) { function krx_avatar_initial($value) { $value = trim((string) $value); if ($value === '') { return 'K'; } if (function_exists('mb_substr') && function_exists('mb_strtoupper')) { return mb_strtoupper(mb_substr($value, 0, 1)); } return strtoupper(substr($value, 0, 1)); } } if (!function_exists('krx_has_real_avatar')) { function krx_has_real_avatar($value) { $value = trim((string) $value); if ($value === '') { return false; } return stripos($value, 'default-avatar') === false; } } @endphp {{ $lobby->title }} - Partida ao vivo @php $scoreA = $report->score_team_a ?? 0; $scoreB = $report->score_team_b ?? 0; $captainA = collect($teamA)->firstWhere('is_captain', 1); $captainB = collect($teamB)->firstWhere('is_captain', 1); $isCaptain = ($captainA && (int) $captainA->user_id === (int) $userId) || ($captainB && (int) $captainB->user_id === (int) $userId); $voiceIntegration = $voiceIntegration ?? []; $voiceChoice = strtoupper((string) ($voiceIntegration['choice'] ?? app(\App\Services\GlobalVoiceProviderService::class)->legacyMode())); $voiceChoice = in_array($voiceChoice, ['A', 'B'], true) ? $voiceChoice : app(\App\Services\GlobalVoiceProviderService::class)->legacyMode(); $voiceChoiceLabel = $voiceChoice === 'B' ? 'TS3' : 'Discord'; $voiceTs3 = $voiceIntegration['ts3'] ?? []; $voiceDiscord = $voiceIntegration['discord'] ?? []; $voiceJoin = $voiceIntegration['join'] ?? []; $voiceUserTeam = (int) ($voiceIntegration['user_team'] ?? 0); $voiceAccessRules = $voiceIntegration['access_rules'] ?? 'Salas privadas por time. Apenas os 5 jogadores do seu time entram na própria sala; admins entram em todas.'; $currentUserRole = \Illuminate\Support\Facades\DB::table('users')->where('id', session('user_id'))->value('role') ?? 'user'; $isAdmin = $currentUserRole === 'admin'; $canManageResult = $isCaptain || $isAdmin; $allMatchPlayers = collect($teamA)->merge(collect($teamB)); $isReadyPlayer = function ($player) { $readyValue = $player->is_ready ?? $player->ready ?? $player->accepted ?? 0; $readyText = strtolower((string) ($player->ready_status ?? $player->status_ready ?? $player->accept_status ?? '')); return (int) $readyValue === 1 || in_array($readyText, ['accepted', 'aceito', 'ready', 'confirmado', 'confirmed', 'ok'], true) || !empty($player->confirmed_at) || !empty($player->accepted_at) || !empty($player->ready_at); }; $readyAcceptedCount = $allMatchPlayers->filter($isReadyPlayer)->count(); $readyTotalCount = max(1, $allMatchPlayers->count()); $readyPercent = min(100, (int) round(($readyAcceptedCount / $readyTotalCount) * 100)); $readyMissingCount = max(0, $readyTotalCount - $readyAcceptedCount); @endphp
✦
{{ $lobby->title }}
partida ao vivo / monitor da sala
AO VIVO
Voltar ao hub
Match {{ $lobby->id }}

{{ $lobby->title }}

Times balanceados automaticamente por skill/sorteio controlado. Acompanhe abaixo quem aceitou a partida.

Mapa {{ $lobby->map_name ?: 'Crossfire' }}
Host {{ $lobby->host_name }}
Status {{ $lobby->status ?? 'Monitor live' }}
Ready check {{ $readyAcceptedCount }}/{{ $readyTotalCount }}
Time A
BL
{{ count($teamA) }} jogadores
{{ $scoreA }}
VS
Time B
GR
{{ count($teamB) }} jogadores
{{ $scoreB }}
Início {{ !empty($lobby->started_at) ? \Carbon\Carbon::parse($lobby->started_at)->format('d/m H:i') : '--' }}
Parcial {{ $report->result_text ?? 'Aguardando reporte' }}
Voz {{ $voiceChoice }} - {{ $voiceChoiceLabel }}
Os times são separados automaticamente. O status individual mostra quem já aceitou e quem ainda está pendente no ready check.
Score atual {{ $scoreA }} - {{ $scoreB }}
Capitão A {{ optional($captainA)->nickname ?? '-' }}
Capitão B {{ optional($captainB)->nickname ?? '-' }}
Voz {{ $voiceChoiceLabel }}
Mapa{{ $lobby->map_name ?: 'Crossfire' }}
Host{{ $lobby->host_name }}
Início{{ !empty($lobby->started_at) ? \Carbon\Carbon::parse($lobby->started_at)->format('d/m H:i') : '--' }}
Resultado{{ $report->result_text ?? 'Aguardando reporte' }}
Status{{ $lobby->status ?? 'Monitor live' }}
Elencos da partida
Times sorteados/balanceados automaticamente. Ready: {{ $readyAcceptedCount }}/{{ $readyTotalCount }} aceitaram.
{{ count($teamA) + count($teamB) }} jogadores {{ $readyAcceptedCount }}/{{ $readyTotalCount }} aceitaram
Integração TS3 / Discord
Escolha {{ $voiceChoice }} - {{ $voiceChoiceLabel }}
Como funciona
{{ $voiceAccessRules }}
Modo definido pelo admin: {{ $voiceChoice }} - {{ $voiceChoiceLabel }}
Sua sala do time
Seu time: {{ $voiceUserTeam === 1 ? 'Time A' : ($voiceUserTeam === 2 ? 'Time B' : 'aguardando definição') }}
Discord: {{ $voiceDiscord['team_room_name'] ?? 'será criada automaticamente' }}
TS3: {{ $voiceTs3['team_room_name'] ?? 'será criada automaticamente' }}
@if(!empty($voiceJoin['url'])) {{ $voiceJoin['text'] ?? 'Entrar na sala do meu time' }} @endif @if(!empty($voiceJoin['primary_url'])) {{ $voiceJoin['primary_text'] ?? 'Entrar no Discord' }} @endif @if(!empty($voiceJoin['secondary_url'])) {{ $voiceJoin['secondary_text'] ?? 'Entrar no TS3' }} @endif @if(empty($voiceJoin['url']) && empty($voiceJoin['primary_url']) && !empty($voiceDiscord['invite_url'])) Entrar no servidor Discord @endif
Informações básicas
O acesso à sua sala é liberado automaticamente para o seu time.
Outros jogadores não entram na sala privada do seu time.
Admins podem acessar todas as salas da partida.
@if($isAdmin)
Painel técnico do admin
TS3 raiz: {{ $voiceTs3['root_channel_name'] ?? 'Será criada automaticamente' }}
TS3 sala A: {{ $voiceTs3['team_a_channel_name'] ?? 'Time A' }}
TS3 sala B: {{ $voiceTs3['team_b_channel_name'] ?? 'Time B' }}
TS3 Unique ID do usuário: {{ $voiceTs3['nickname_uid'] ?? 'não informado' }}
Discord usuário: {{ $voiceDiscord['username'] ?? 'não informado' }}
Discord categoria privada: {{ $voiceDiscord['root_channel_name'] ?? ($voiceDiscord['category_id'] ?? 'configurar no .env') }}
Discord sala A: {{ $voiceDiscord['team_a_channel_id'] ?? 'gerado automaticamente' }}
Discord sala B: {{ $voiceDiscord['team_b_channel_id'] ?? 'gerado automaticamente' }}
Discord sala do usuário: {{ $voiceDiscord['team_room_name'] ?? 'será criada automaticamente' }}
@endif
Painel do capitão
{{ $isAdmin ? 'controle administrador' : ($isCaptain ? 'controle capitão' : 'somente leitura') }}
Resumo atual
{{ $report->result_text ?? 'Nenhum resumo enviado ainda.' }}
Considerações
{{ $report->considerations ?? 'Nenhuma observação.' }}
Chat da partida
compacto