You've already forked Atomcms-edit
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:
+211
@@ -0,0 +1,211 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', __('radio.wizard.title') . ' - ' . __('radio.wizard.step_short') . ' 4 - ' . 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; }
|
||||
.toggle-group { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem; background: #f7fafc; border-radius: 10px; margin-bottom: 0.75rem; }
|
||||
.toggle { position: relative; width: 46px; height: 24px; flex-shrink: 0; }
|
||||
.toggle input { opacity: 0; width: 0; height: 0; }
|
||||
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #cbd5e0; border-radius: 24px; transition: 0.3s; }
|
||||
.toggle-slider:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
|
||||
.toggle input:checked + .toggle-slider { background: #38a169; }
|
||||
.toggle input:checked + .toggle-slider:before { transform: translateX(22px); }
|
||||
.toggle-label { font-weight: 500; color: #2d3748; font-size: 0.95rem; }
|
||||
.toggle-desc { color: #718096; font-size: 0.8rem; margin-left: auto; }
|
||||
.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; }
|
||||
.section-title { font-size: 1.15rem; font-weight: 700; color: #2d3748; margin: 1.5rem 0 1rem 0; padding-bottom: 0.5rem; border-bottom: 2px solid #eeb425; }
|
||||
.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; }
|
||||
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
|
||||
@media (max-width: 640px) { .features-grid { grid-template-columns: 1fr; } }
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="wizard-container">
|
||||
<div class="wizard-header">
|
||||
<h1 class="wizard-title">⚙️ {{ __('radio.wizard.step4_title') }}</h1>
|
||||
<p class="wizard-subtitle">{{ __('radio.wizard.step_prefix') }} 4 {{ __('radio.wizard.of') }} 5 - {{ __('radio.wizard.step4_subtitle') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="steps-indicator">
|
||||
<div class="step-dot completed">✓</div>
|
||||
<div class="step-line active"></div>
|
||||
<div class="step-dot completed">✓</div>
|
||||
<div class="step-line active"></div>
|
||||
<div class="step-dot completed">✓</div>
|
||||
<div class="step-line active"></div>
|
||||
<div class="step-dot active">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: #38a169;">✓ {{ __('radio.wizard.step2_label') }}</span>
|
||||
<span style="color: #38a169;">✓ {{ __('radio.wizard.step3_label') }}</span>
|
||||
<span style="color: #eeb425; font-weight: 600;">{{ __('radio.wizard.step4_label') }}</span>
|
||||
<span>{{ __('radio.wizard.step5_label') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="wizard-card">
|
||||
<form action="{{ route('admin.radio.wizard.process-step-4') }}" method="POST">
|
||||
@csrf
|
||||
|
||||
<h3 class="section-title">{{ __('radio.wizard.section_community') }}</h3>
|
||||
<div class="features-grid">
|
||||
<div class="toggle-group">
|
||||
<label class="toggle">
|
||||
<input type="hidden" name="enable_shouts" value="0">
|
||||
<input type="checkbox" name="enable_shouts" value="1" {{ $enableShouts ? 'checked' : '' }}>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<span class="toggle-label">{{ __('radio.wizard.feature_shouts') }}</span>
|
||||
<span class="toggle-desc">{{ __('radio.wizard.feature_shouts_desc') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="toggle-group">
|
||||
<label class="toggle">
|
||||
<input type="hidden" name="enable_applications" value="0">
|
||||
<input type="checkbox" name="enable_applications" value="1" {{ $enableApplications ? 'checked' : '' }}>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<span class="toggle-label">{{ __('radio.wizard.feature_applications') }}</span>
|
||||
<span class="toggle-desc">{{ __('radio.wizard.feature_applications_desc') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="toggle-group">
|
||||
<label class="toggle">
|
||||
<input type="hidden" name="enable_requests" value="0">
|
||||
<input type="checkbox" name="enable_requests" value="1" {{ $enableRequests ? 'checked' : '' }}>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<span class="toggle-label">{{ __('radio.wizard.feature_requests') }}</span>
|
||||
<span class="toggle-desc">{{ __('radio.wizard.feature_requests_desc') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-title">{{ __('radio.wizard.section_display') }}</h3>
|
||||
<div class="features-grid">
|
||||
<div class="toggle-group">
|
||||
<label class="toggle">
|
||||
<input type="hidden" name="enable_widget" value="0">
|
||||
<input type="checkbox" name="enable_widget" value="1" {{ $enableWidget ? 'checked' : '' }}>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<span class="toggle-label">{{ __('radio.wizard.feature_widget') }}</span>
|
||||
<span class="toggle-desc">{{ __('radio.wizard.feature_widget_desc') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="toggle-group" id="widgetGlobalGroup" style="{{ $enableWidget ? '' : 'opacity: 0.5;' }}">
|
||||
<label class="toggle">
|
||||
<input type="hidden" name="enable_widget_globally" value="0">
|
||||
<input type="checkbox" name="enable_widget_globally" value="1" {{ $enableWidgetGlobally ? 'checked' : '' }}>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<span class="toggle-label">{{ __('radio.wizard.feature_widget_global') }}</span>
|
||||
<span class="toggle-desc">{{ __('radio.wizard.feature_widget_global_desc') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="widget_position">{{ __('radio.wizard.widget_position_label') }}</label>
|
||||
<select name="widget_position" id="widget_position" class="form-input">
|
||||
<option value="bottom-right" {{ $widgetPosition === 'bottom-right' ? 'selected' : '' }}>{{ __('radio.wizard.position_bottom_right') }}</option>
|
||||
<option value="bottom-left" {{ $widgetPosition === 'bottom-left' ? 'selected' : '' }}>{{ __('radio.wizard.position_bottom_left') }}</option>
|
||||
<option value="top-right" {{ $widgetPosition === 'top-right' ? 'selected' : '' }}>{{ __('radio.wizard.position_top_right') }}</option>
|
||||
<option value="top-left" {{ $widgetPosition === 'top-left' ? 'selected' : '' }}>{{ __('radio.wizard.position_top_left') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<h3 class="section-title">{{ __('radio.wizard.section_gamification') }}</h3>
|
||||
<div class="features-grid">
|
||||
<div class="toggle-group">
|
||||
<label class="toggle">
|
||||
<input type="hidden" name="enable_points" value="0">
|
||||
<input type="checkbox" name="enable_points" value="1" {{ $enablePoints ? 'checked' : '' }}>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<span class="toggle-label">{{ __('radio.wizard.feature_points') }}</span>
|
||||
<span class="toggle-desc">{{ __('radio.wizard.feature_points_desc') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="toggle-group">
|
||||
<label class="toggle">
|
||||
<input type="hidden" name="enable_contests" value="0">
|
||||
<input type="checkbox" name="enable_contests" value="1" {{ $enableContests ? 'checked' : '' }}>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<span class="toggle-label">{{ __('radio.wizard.feature_contests') }}</span>
|
||||
<span class="toggle-desc">{{ __('radio.wizard.feature_contests_desc') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="toggle-group">
|
||||
<label class="toggle">
|
||||
<input type="hidden" name="enable_giveaways" value="0">
|
||||
<input type="checkbox" name="enable_giveaways" value="1" {{ $enableGiveaways ? 'checked' : '' }}>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<span class="toggle-label">{{ __('radio.wizard.feature_giveaways') }}</span>
|
||||
<span class="toggle-desc">{{ __('radio.wizard.feature_giveaways_desc') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-title">{{ __('radio.wizard.section_integrations') }}</h3>
|
||||
<div class="toggle-group" style="margin-bottom: 1rem;">
|
||||
<label class="toggle">
|
||||
<input type="hidden" name="enable_discord" value="0">
|
||||
<input type="checkbox" name="enable_discord" value="1" id="enableDiscord" {{ $enableDiscord ? 'checked' : '' }}>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<span class="toggle-label">{{ __('radio.wizard.feature_discord') }}</span>
|
||||
<span class="toggle-desc">{{ __('radio.wizard.feature_discord_desc') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="discordWebhookGroup" style="{{ $enableDiscord ? '' : 'display: none;' }}">
|
||||
<label class="form-label" for="discord_webhook">{{ __('radio.wizard.discord_webhook_label') }}</label>
|
||||
<input type="url" name="discord_webhook" id="discord_webhook" class="form-input" value="{{ old('discord_webhook', $discordWebhook) }}" placeholder="https://discord.com/api/webhooks/...">
|
||||
<div class="form-hint">{{ __('radio.wizard.discord_webhook_hint') }}</div>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 2rem;">
|
||||
<a href="{{ route('admin.radio.wizard.step', ['step' => 3]) }}" class="btn-secondary">← {{ __('radio.wizard.previous_step') }}</a>
|
||||
<button type="submit" class="btn-wizard">{{ __('radio.wizard.next_step') }} →</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('enableDiscord').addEventListener('change', function() {
|
||||
document.getElementById('discordWebhookGroup').style.display = this.checked ? 'block' : 'none';
|
||||
});
|
||||
|
||||
document.querySelector('input[name="enable_widget"]').addEventListener('change', function() {
|
||||
const group = document.getElementById('widgetGlobalGroup');
|
||||
group.style.opacity = this.checked ? '1' : '0.5';
|
||||
if (!this.checked) {
|
||||
document.querySelector('input[name="enable_widget_globally"]').checked = false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user