Files
root 5476dce882 Add multi-step radio wizard with Shoutcast/Icecast/AzureCast support and multi-language translations
- New 5-step RadioWizardController with session-based wizard flow
- Enhanced RadioStreamService with Shoutcast/Icecast/ AzureCast auto-detection
- Connection test functionality for stream, now-playing, and listeners
- Wizard views for all 5 steps with step indicator navigation
- All 21 language files updated with wizard translation keys (NL/EN + placeholders)
- Wizard link added to existing radio setup page
- Routes registered under /admin/radio/wizard/*
2026-05-24 13:12:57 +02:00

65 lines
2.8 KiB
PHP
Executable File

@php
$statusLabels = [
'success' => __('radio.wizard.status_success'),
'warning' => __('radio.wizard.status_warning'),
'error' => __('radio.wizard.status_error'),
'skipped' => __('radio.wizard.status_skipped'),
'untested' => __('radio.wizard.status_untested'),
];
$statusIcons = [
'success' => '✅',
'warning' => '⚠️',
'error' => '❌',
'skipped' => '⏭️',
'untested' => '❓',
];
$testNames = [
'stream' => '📡 ' . __('radio.wizard.test_result_stream'),
'now_playing' => '🎵 ' . __('radio.wizard.test_result_now_playing'),
'listeners' => '👥 ' . __('radio.wizard.test_result_listeners'),
];
@endphp
@foreach(['stream', 'now_playing', 'listeners'] as $key)
@php $result = $results[$key] ?? null; @endphp
@if($result)
<div class="test-card {{ $result['status'] }}">
<div class="test-title">
{{ $statusIcons[$result['status']] ?? '❓' }} {{ $testNames[$key] ?? $key }}
<span class="status-badge {{ $result['status'] }}">{{ $statusLabels[$result['status']] ?? $result['status'] }}</span>
</div>
<div class="test-detail">
{{ $result['message'] }}
@if(!empty($result['content_type']))
<br><strong>{{ __('radio.wizard.content_type') }}:</strong> {{ $result['content_type'] }}
@endif
@if(!empty($result['http_code']))
<br><strong>{{ __('radio.wizard.http_status') }}:</strong> {{ $result['http_code'] }}
@endif
@if(!empty($result['song']))
<br><strong>{{ __('radio.wizard.song') }}:</strong> {{ $result['song'] }}
@endif
@if(!empty($result['artist']))
<strong>{{ __('radio.wizard.artist') }}:</strong> {{ $result['artist'] }}
@endif
@if(isset($result['count']))
<br><strong>{{ __('radio.wizard.listeners') }}:</strong> {{ $result['count'] }}
@endif
@if(!empty($result['api_url']))
<br><strong>{{ __('radio.wizard.api_url') }}:</strong> {{ $result['api_url'] }}
@endif
</div>
</div>
@endif
@endforeach
<div class="test-result-section">
@if(($results['stream']['status'] ?? '') === 'success' || ($results['stream']['status'] ?? '') === 'warning')
<p style="color: #38a169; font-weight: 600;"> {{ __('radio.wizard.test_stream_ok') }}</p>
@elseif(($results['stream']['status'] ?? '') === 'error')
<p style="color: #e53e3e; font-weight: 600;"> {{ __('radio.wizard.test_stream_fail') }}</p>
@else
<p style="color: #a0aec0;">{{ __('radio.wizard.test_not_run') }}</p>
@endif
</div>