@extends('layouts.app') @section('title', 'TeamSpeak 3 - GIGAX ARENA') @section('page_title', 'TeamSpeak 3') @php $activeMatches = collect($activeMatches ?? []); $recentLogs = collect($recentLogs ?? []); $selectedLobbyId = (int) ($selectedLobbyId ?? 0); $configSummary = $configSummary ?? []; $status = $status ?? null; @endphp @push('styles') @endpush @section('content')

Controle TeamSpeak 3

Teste de conexão, criação de salas, movimentação dos times e limpeza sem sair da Administração.

{{ $teamspeakEnabled ? '● Serviço habilitado' : '● Serviço desabilitado' }}
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Status e configuração

{{ $teamspeakEnabled ? 'ATIVO' : 'OFF' }}
Host{{ $configSummary['host'] ?? '-' }}
Query{{ $configSummary['query_port'] ?? '-' }}
Server ID{{ $configSummary['server_id'] ?? '-' }}
Canal pai{{ $configSummary['parent_channel_id'] ?? '-' }}
Fallback{{ $configSummary['fallback_channel_id'] ?? '-' }}
@csrf
@csrf
@csrf
@if(session('ts3_diagnostic_steps'))
@foreach(session('ts3_diagnostic_steps') as $step)
✓ {{ $step }}
@endforeach
@endif

Executar ação na partida

{{ $activeMatches->count() }} disponíveis
@csrf
@csrf
@csrf

Status da partida selecionada

{{ $selectedLobbyId > 0 ? '#'.$selectedLobbyId : '—' }}
@if($status) @php $channels = $status['channels'] ?? $status['channel_record'] ?? null; $onlinePlayers = collect($status['online_players'] ?? []); $pendingPlayers = collect($status['pending_players'] ?? $status['unmatched_players'] ?? []); @endphp
Conexão{{ ($status['success'] ?? true) ? 'OK' : 'ERRO' }}
Online TS3{{ $onlinePlayers->count() }}
Pendentes{{ $pendingPlayers->count() }}
@if($channels)
Canais
Principal{{ $channels->root_channel_name ?? $channels['root_channel_name'] ?? '-' }}
Time A{{ $channels->team_a_channel_name ?? $channels['team_a_channel_name'] ?? 'Time A' }}
Time B{{ $channels->team_b_channel_name ?? $channels['team_b_channel_name'] ?? 'Time B' }}
@endif
Jogadores online no TS3
@forelse($onlinePlayers as $player) @empty @endforelse
JogadorUIDCanalTime
{{ $player['nickname'] ?? $player->nickname ?? '-' }} {{ $player['unique_id'] ?? $player['ts3_unique_id'] ?? $player->unique_id ?? $player->ts3_unique_id ?? '-' }} {{ $player['channel_name'] ?? $player->channel_name ?? '-' }} {{ $player['team'] ?? $player->team ?? '-' }}
Nenhum jogador online encontrado.
@if($pendingPlayers->isNotEmpty())
Jogadores pendentes
@foreach($pendingPlayers as $player) @endforeach
JogadorTimeMotivo
{{ $player['nickname'] ?? $player->nickname ?? '-' }} {{ $player['team'] ?? $player->team ?? '-' }} {{ $player['reason'] ?? $player->reason ?? 'UID/cliente não localizado' }}
@endif @else
Selecione uma partida acima para carregar o status das salas e dos jogadores.
@endif

Logs recentes TS3

{{ $recentLogs->count() }}
@forelse($recentLogs as $log) @empty @endforelse
IDPartidaAçãoStatusQuando
{{ $log->id ?? '-' }} #{{ $log->training_match_id ?? 0 }} {{ $log->action ?? $log->action_type ?? '-' }} {{ strtoupper((string)($log->status ?? '-')) }} {{ !empty($log->created_at) ? \Illuminate\Support\Carbon::parse($log->created_at)->format('d/m/Y H:i:s') : '-' }}
Nenhum log encontrado.
@php $lastPayload = optional($recentLogs->first())->payload ?? null; @endphp @if($lastPayload)
Último payload
{{ $lastPayload }}
@endif
@endsection