@php /** @var \Illuminate\Support\Collection $channels */ /** @var \Illuminate\Support\Collection $broadcasts */ $pill = fn ($s) => match ($s) { 'done' => ['bg-wa-mint text-wa-deep', __('Sent')], 'failed' => ['bg-accent-coral/10 text-accent-coral', __('Failed')], default => ['bg-paper-100 text-ink-600', __('Draft')], }; @endphp
{{ __('WeChat') }} · {{ __('Broadcasts') }}

{{ __('WeChat') }} {{ __('broadcasts') }}

{{ __('Mass-send a message to all followers, a tag, or picked users. Note: WeChat limits Service Accounts to about 4 mass sends per month.') }}

{{ __('Channels') }} @unless ($channels->isEmpty()) {{ __('New broadcast') }} @endunless
@if (session('success'))
{{ session('success') }}
@endif @if (session('error') || $errors->any())
{{ session('error') ?: $errors->first() }}
@endif @if ($channels->isEmpty())
W

{{ __('Connect a WeChat channel first.') }}

{{ __('Connect a channel') }}
@else
@forelse ($broadcasts as $b) @php [$cls, $lbl] = $pill($b->status); @endphp @empty @endforelse
{{ __('Broadcast') }} {{ __('Audience') }} {{ __('Status') }} {{ __('Actions') }}
{{ $b->name }}
{{ $b->created_at?->format('d M Y · H:i') }}@if($b->last_error) · {{ $b->last_error }}@endif
{{ ['all'=>__('All followers'),'tag'=>__('Tag').' '.$b->tag_id,'list'=>$b->total.' '.__('users')][$b->audience] ?? $b->audience }} {{ $lbl }}
@if ($b->status !== 'done')
@csrf
@endif
@csrf @method('DELETE')
{{ __('No broadcasts yet.') }} {{ __('Create your first one') }}.
@endif