@extends('layouts.app-sidebar') {{-- ================================================================================ DAYBOT DASHBOARD - DESIGN SYSTEM ================================================================================ COLOR TOKENS: - Background: bg-db-body (#05060a) - Card: bg-db-card (#0f1015) with border-db-border - Surface: bg-db-surface (#1a1b23) - Primary: text-db-accent-primary (#10b981) / emerald - Secondary: text-db-accent-secondary (#06b6d4) / cyan CARD PATTERNS: - Standard: bg-db-card border border-db-border rounded-2xl - Interactive: + hover:border-db-border-hover hover:bg-db-card-hover transition-all - Elevated: + shadow-xl shadow-black/20 SPACING: - Section gap: space-y-8 - Card padding: p-5 or p-6 - Grid gap: gap-4 or gap-5 TYPOGRAPHY: - Page title: text-2xl sm:text-3xl font-bold - Section title: text-lg font-semibold - Card title: text-sm font-medium - Body: text-sm text-db-text-secondary - Muted: text-xs text-db-text-muted ================================================================================ --}} @section('content') {{-- ============================================== --}} {{-- FIRST TIME SETUP GUIDE MODAL --}} {{-- ============================================== --}} @if(!auth()->user()->setup_completed)
{{-- Gradient Header --}}

Welcome to DayBot!

Let's get your bot running in 3 simple steps

{{-- Steps --}}
{{-- Step 1 --}}
1

Add DayBot as Moderator

Go to YouTube Studio → Settings → Community → Moderators

@Daybot_01
{{-- Step 2 --}}
2

Start Your Bot

Click the green "Start DayBot" button. It will auto-connect when you go live.

{{-- Step 3 --}}
3

Customize Everything

Add commands, timers, moderation rules, and enable AI features.

{{-- Warning --}}

Without moderator permissions, DayBot cannot send messages in your chat.

{{-- Footer --}}
Open YouTube Studio
@endif {{-- ============================================== --}} {{-- EMPTY STATE - NO CHANNELS --}} {{-- ============================================== --}} @if($tenants->isEmpty())

Welcome to DayBot

Connect your YouTube channel to start managing your AI-powered chat bot and engage with your community.

Connect with Google
@else {{-- ============================================== --}} {{-- MAIN DASHBOARD CONTENT --}} {{-- ============================================== --}} @foreach($dashboardData as $data) @php $tenant = $data['tenant']; $stats = $data['stats']; $quota = $data['quota']; $roastingMode = $data['roasting_mode']; $hour = (int) date('H'); $greeting = $hour < 12 ? 'Good Morning' : ($hour < 18 ? 'Good Afternoon' : 'Good Evening'); $quotaPercent = $quota['per_minute']['limit'] > 0 ? round(($quota['per_minute']['used'] / $quota['per_minute']['limit']) * 100) : 0; @endphp
{{-- ============================================== --}} {{-- HERO SECTION - Greeting & Add Channel --}} {{-- ============================================== --}}

{{ $greeting }}, {{ explode(' ', auth()->user()->name)[0] }}

Here's what's happening with your bot today

Add
{{-- ============================================== --}} {{-- STATS CARDS - Mobile: Horizontal Scroll, Desktop: Grid --}} {{-- ============================================== --}} {{-- Mobile: Horizontal scrolling stats --}}
{{-- Messages Card - Mobile --}}
Messages
{{ number_format($stats['last_5min']) }}

Last 5 min

{{-- Commands Card - Mobile --}}
Commands
{{ number_format($stats['last_1min']) }}

Last min

{{-- Viewers Card - Mobile --}}
Viewers
{{ number_format($stats['unique_viewers_1h']) }}

Unique (1h)

{{-- Quota Card - Mobile --}}
Quota
{{ $quotaPercent }}%
{{-- Desktop: Grid layout --}} {{-- ============================================== --}} {{-- BOT STATUS BANNER --}} {{-- ============================================== --}} @if($tenant->status !== 'running')
{{-- Background Pattern --}}
{{-- Icon --}}
{{-- Content --}}

DayBot is Currently Offline

Your DayBot is not running. By default, DayBot is enabled for all users. If you've turned it off, simply click "Start DayBot" below to activate it and connect to your live streams.

Auto-connects when you go live All features ready
{{-- Action Button --}}
@csrf
@else {{-- Bot is Running - Show Success Banner --}}
{{-- Icon with pulse --}}
{{-- Content --}}

DayBot is Active

Online

@if($tenant->live_chat_id) Connected to your live stream and monitoring chat @else Running and waiting for your stream to go live @endif

@endif {{-- ============================================== --}} {{-- CHANNEL STATUS CARD --}} {{-- ============================================== --}}
{{-- Channel Header --}}
{{-- Top row: Avatar, Info, and Badges --}}
{{-- Channel Avatar --}}
@if($tenant->status === 'running')
@endif
{{-- Channel Info --}}

{{ $tenant->channel_title }}

{{-- Badges - Horizontal scroll on mobile --}}
{{-- Status Badge --}} @if($tenant->status === 'running') Running @elseif($tenant->status === 'error') Error @else Stopped @endif {{-- LIVE Badge --}} @if($tenant->live_chat_id) Live @endif {{-- Game Badge --}} @if($tenant->current_game) {{ $tenant->current_game }} @endif
{{-- Start/Stop Button - Full width on mobile --}} @if($tenant->status === 'running')
@csrf
@else
@csrf
@endif
{{-- Quick Controls Row --}}
{{-- Mobile: Horizontal scroll, Desktop: Flex wrap --}}
{{-- Roasting Toggle --}}
Roast
{{-- AI Replies Toggle --}}
AI
{{-- Bot Personality --}}
{{-- Inline Scripts for Toggle Functions --}}
{{-- ============================================== --}} {{-- ALERT SECTION (Waiting/Error) --}} {{-- ============================================== --}} @php $isWaiting = ($tenant->last_error && str_contains($tenant->last_error, 'Waiting')) || ($tenant->status === 'running' && !$tenant->live_chat_id); $showAlert = $tenant->last_error || ($tenant->status === 'running' && !$tenant->live_chat_id); @endphp @if($showAlert)
@if($isWaiting) @else @endif

{{ $isWaiting ? 'Waiting for Stream' : 'Bot Error' }}

{{ $tenant->last_error ?? 'DayBot is running and waiting for you to go live' }}

@if($isWaiting)

Auto-connects when you go live

@endif
@if(!$isWaiting && $tenant->last_error && (str_contains($tenant->last_error, 'OAuth') || str_contains($tenant->last_error, 'forbidden'))) Reconnect @endif
@endif {{-- ============================================== --}} {{-- AI FEATURES SECTION --}} {{-- ============================================== --}}

AI Features

Beta
{{-- Mobile: Compact 2-column grid, Desktop: 3-column grid --}}
{{-- Memory System --}}

Memory

{{-- XP & Leveling --}}

XP System

{{-- Auto Greetings --}}

Greetings

{{-- Auto Reactions --}}

Reactions

{{-- Announcements --}}

Announce

@endforeach @endif {{-- ============================================== --}} {{-- GLOBAL FEATURE TOGGLE SCRIPT --}} {{-- ============================================== --}} @endsection