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/*
This commit is contained in:
root
2026-05-24 13:12:57 +02:00
parent 8c49a1138c
commit 5476dce882
31 changed files with 4298 additions and 43 deletions
+118
View File
@@ -0,0 +1,118 @@
@extends('layouts.app')
@section('title', __('radio.wizard.title') . ' - ' . __('radio.wizard.step_short') . ' 2 - ' . config('app.name'))
@push('styles')
<style>
.wizard-container { max-width: 900px; margin: 0 auto; padding: 2rem; }
.wizard-card { background: white; border-radius: 16px; padding: 2.5rem; box-shadow: 0 4px 20px rgba(0,0,0,0.08); margin-bottom: 2rem; }
.wizard-header { text-align: center; margin-bottom: 2.5rem; }
.wizard-title { font-size: 2rem; font-weight: 800; color: #1a202c; margin-bottom: 0.5rem; }
.wizard-subtitle { color: #4a5568; font-size: 1.1rem; }
.steps-indicator { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 2.5rem; }
.step-dot { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.step-dot.active { background: #eeb425; color: white; }
.step-dot.inactive { background: #e2e8f0; color: #a0aec0; }
.step-dot.completed { background: #38a169; color: white; }
.step-line { width: 60px; height: 3px; align-self: center; border-radius: 2px; }
.step-line.active { background: #eeb425; }
.step-line.inactive { background: #e2e8f0; }
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 600; color: #2d3748; margin-bottom: 0.5rem; }
.form-input { width: 100%; padding: 0.85rem 1rem; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 1rem; transition: border-color 0.2s; }
.form-input:focus { outline: none; border-color: #eeb425; box-shadow: 0 0 0 3px rgba(238,180,37,0.1); }
.form-hint { color: #718096; font-size: 0.85rem; margin-top: 0.3rem; }
.platform-badge { display: inline-block; background: #fffbeb; color: #b7791f; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.btn-wizard { background: linear-gradient(135deg, #eeb425, #d4a52a); color: #1a202c; padding: 0.85rem 2rem; border: none; border-radius: 10px; font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 12px rgba(238,180,37,0.3); text-decoration: none; display: inline-block; }
.btn-wizard:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(238,180,37,0.4); }
.btn-secondary { background: #e2e8f0; color: #4a5568; padding: 0.85rem 2rem; border: none; border-radius: 10px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: all 0.3s; text-decoration: none; display: inline-block; }
.btn-secondary:hover { background: #cbd5e0; }
.info-box { background: #ebf8ff; border-left: 4px solid #3182ce; padding: 1rem 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; }
.info-box-title { font-weight: 700; color: #2b6cb0; margin-bottom: 0.3rem; }
.info-box-text { color: #4a5568; font-size: 0.9rem; }
</style>
@endpush
@section('content')
<div class="wizard-container">
<div class="wizard-header">
<h1 class="wizard-title">📻 {{ __('radio.wizard.step2_title') }}</h1>
<p class="wizard-subtitle">{{ __('radio.wizard.step_prefix') }} 2 {{ __('radio.wizard.of') }} 5 - <span class="platform-badge">{{ $platformLabel }}</span></p>
</div>
<div class="steps-indicator">
<div class="step-dot completed"></div>
<div class="step-line active"></div>
<div class="step-dot active">2</div>
<div class="step-line inactive"></div>
<div class="step-dot inactive">3</div>
<div class="step-line inactive"></div>
<div class="step-dot inactive">4</div>
<div class="step-line inactive"></div>
<div class="step-dot inactive">5</div>
</div>
<div style="display: flex; justify-content: center; gap: 3.5rem; margin-top: -1.5rem; margin-bottom: 1rem; font-size: 0.75rem; color: #718096;">
<span style="color: #38a169;"> {{ __('radio.wizard.step1_label') }}</span>
<span style="color: #eeb425; font-weight: 600;">{{ __('radio.wizard.step2_label') }}</span>
<span>{{ __('radio.wizard.step3_label') }}</span>
<span>{{ __('radio.wizard.step4_label') }}</span>
<span>{{ __('radio.wizard.step5_label') }}</span>
</div>
<div class="wizard-card">
<form action="{{ route('admin.radio.wizard.process-step-2') }}" method="POST">
@csrf
<div class="info-box">
<div class="info-box-title">{{ __("radio.wizard.platform_{$platform}_info_title") }}</div>
<div class="info-box-text">{{ __("radio.wizard.platform_{$platform}_info_desc") }}</div>
</div>
<div class="form-group">
<label class="form-label" for="stream_url">{{ __('radio.wizard.stream_url_label') }} *</label>
<input type="url" name="stream_url" id="stream_url" class="form-input" value="{{ old('stream_url', $streamUrl) }}" placeholder="https://jouw-server.nl:8000/radio.mp3" required>
<div class="form-hint">{{ __('radio.wizard.stream_url_hint') }}</div>
</div>
<div class="form-group">
<label class="form-label" for="stream_name">{{ __('radio.wizard.stream_name_label') }}</label>
<input type="text" name="stream_name" id="stream_name" class="form-input" value="{{ old('stream_name', $streamName) }}" placeholder="{{ __('radio.wizard.stream_name_placeholder') }}">
<div class="form-hint">{{ __('radio.wizard.stream_name_hint') }}</div>
</div>
@if($platform === 'azurecast')
<hr style="border: none; border-top: 2px dashed #e2e8f0; margin: 1.5rem 0;">
<h3 style="font-size: 1.2rem; font-weight: 700; color: #2d3748; margin-bottom: 1rem;">{{ __('radio.wizard.azurecast_section') }}</h3>
<div class="form-group">
<label class="form-label" for="azurecast_base_url">{{ __('radio.wizard.azurecast_base_url_label') }}</label>
<input type="url" name="azurecast_base_url" id="azurecast_base_url" class="form-input" value="{{ old('azurecast_base_url', $azurecastBaseUrl) }}" placeholder="https://radio.jouwdomein.nl">
<div class="form-hint">{{ __('radio.wizard.azurecast_base_url_hint') }}</div>
</div>
<div class="form-group">
<label class="form-label" for="azurecast_station_id">{{ __('radio.wizard.azurecast_station_id_label') }}</label>
<input type="number" name="azurecast_station_id" id="azurecast_station_id" class="form-input" value="{{ old('azurecast_station_id', $azurecastStationId) }}" min="1">
<div class="form-hint">{{ __('radio.wizard.azurecast_station_id_hint') }}</div>
</div>
@endif
@if ($errors->any())
<div style="background: #fff5f5; border: 1px solid #fc8181; border-radius: 8px; padding: 1rem; margin-bottom: 1.5rem;">
<ul style="color: #c53030; margin: 0; padding-left: 1.5rem;">
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<div style="display: flex; justify-content: space-between;">
<a href="{{ route('admin.radio.wizard') }}" class="btn-secondary"> {{ __('radio.wizard.previous_step') }}</a>
<button type="submit" class="btn-wizard">{{ __('radio.wizard.next_step') }} </button>
</div>
</form>
</div>
</div>
@endsection