@extends('layouts.admin') @section('title', 'Dashboard') @section('breadcrumb') @endsection @section('content') @php $totalVideos = \App\Models\Video::count(); $totalAccounts = \App\Models\TikTokAccount::count(); $totalFacebook = \App\Models\FacebookPage::count(); $totalRules = \App\Models\AutomationRule::count(); $pendingWatermark = \App\Models\Video::where('watermark_status', 'tiktok_watermarked')->count(); $cleanVideos = \App\Models\Video::where('watermark_status', 'clean')->count(); $queueWaiting = \App\Models\ShareQueue::where('status', 'waiting')->count(); $queueReady = \App\Models\ShareQueue::where('status', 'ready_to_share')->count(); $sharedToday = \App\Models\ShareQueue::where('status', 'shared') ->whereDate('scheduled_at', today()) ->count(); $rulesActive = \App\Models\AutomationRule::where('status', 'active')->count(); $lastScan = \App\Models\SystemLog::where('event', 'scan_completed') ->latest()->first(); @endphp
{{ $totalVideos }}
Toplam Video
{{ $cleanVideos }} temiz
{{ $queueWaiting + $queueReady }}
Kuyrukta Bekleyen
{{ $sharedToday }} bugün paylaşıldı
{{ $rulesActive }}/{{ $totalRules }}
Aktif Kural
{{ $totalAccounts }} TikTok hesabı
{{ $pendingWatermark }}
Filigran Bekleyen
FFmpeg kuyruğunda
Sistem Durumu {{ $rulesActive > 0 ? 'ÇALIŞIYOR' : 'BEKLEMEDE' }}
Son Tarama
@if($lastScan) {{ $lastScan->created_at->diffForHumans() }}
{{ $lastScan->metadata['videos_found'] ?? 0 }} video bulundu @else Henüz çalışmadı @endif
TikTok Hesapları
{{ $totalAccounts }} hesap bağlı
{{ $totalFacebook }} Facebook sayfası
Hızlı İşlemler
@csrf
Zamanlamaları Yönet
Son Videolar Tümünü Gör
@forelse(\App\Models\Video::with('tiktokAccount')->latest()->limit(10)->get() as $v) @empty @endforelse
Hesap Video Filigran Hak Durum Tarih
{{ $v->tiktokAccount?->username ?? '-' }} {{ $v->tiktok_video_id ?? 'Link' }} @if($v->watermark_status === 'clean') Temiz @elseif($v->watermark_status === 'tiktok_watermarked') Filigranlı @else {{ $v->watermark_status ?? '-' }} @endif @if($v->rights_status === 'approved') Onaylı @elseif($v->rights_status === 'rejected') Red @else Bekliyor @endif @if($v->status === 'shared') Paylaşıldı @elseif($v->status === 'queued') Kuyrukta @elseif($v->status === 'approved') Onaylı @else {{ $v->status }} @endif {{ $v->created_at->format('d.m H:i') }}
Henüz video eklenmemiş.
Bugünkü Paylaşımlar
{{ $sharedToday }}
bugün paylaşıldı
@php $pct = $queueWaiting > 0 ? min(100, round(($sharedToday / max($queueWaiting + $sharedToday, 1)) * 100)) : 0; @endphp
{{ $queueWaiting }} bekleyen
Aktif Kurallar
@forelse(\App\Models\AutomationRule::with(['tiktokAccount','facebookPage'])->where('status','active')->limit(8)->get() as $rule)
{{ $rule->name }}
{{ $rule->tiktokAccount?->username }} → {{ $rule->facebookPage?->page_name }}
{{ $rule->interval_minutes }}dk
@empty
Aktif kural yok.
@endforelse
@endsection