110 lines
5.9 KiB
PHP
110 lines
5.9 KiB
PHP
|
|
@extends('layouts.app')
|
||
|
|
|
||
|
|
@section('content')
|
||
|
|
<div class="min-h-screen flex items-center justify-center bg-gray-50">
|
||
|
|
<div class="max-w-lg w-full bg-white rounded-lg shadow-md p-8">
|
||
|
|
<div class="text-center mb-8">
|
||
|
|
<h1 class="text-2xl font-bold text-gray-900 mb-2">Configure Your Channel</h1>
|
||
|
|
<p class="text-gray-600">
|
||
|
|
Set up a Lemmy community where articles will be posted
|
||
|
|
</p>
|
||
|
|
|
||
|
|
<!-- Progress indicator -->
|
||
|
|
<div class="flex justify-center mt-6 space-x-2">
|
||
|
|
<div class="w-6 h-6 bg-green-500 text-white rounded-full flex items-center justify-center text-xs font-semibold">✓</div>
|
||
|
|
<div class="w-6 h-6 bg-green-500 text-white rounded-full flex items-center justify-center text-xs font-semibold">✓</div>
|
||
|
|
<div class="w-6 h-6 bg-blue-500 text-white rounded-full flex items-center justify-center text-xs font-semibold">3</div>
|
||
|
|
<div class="w-6 h-6 bg-gray-300 text-gray-600 rounded-full flex items-center justify-center text-xs font-semibold">4</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<form action="{{ route('channels.store') }}" method="POST" class="space-y-6">
|
||
|
|
@csrf
|
||
|
|
|
||
|
|
<div>
|
||
|
|
<label for="name" class="block text-sm font-medium text-gray-700 mb-2">
|
||
|
|
Community Name
|
||
|
|
</label>
|
||
|
|
<input type="text"
|
||
|
|
id="name"
|
||
|
|
name="name"
|
||
|
|
value="{{ old('name') }}"
|
||
|
|
placeholder="technology"
|
||
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
||
|
|
required>
|
||
|
|
<p class="text-sm text-gray-500 mt-1">Enter the community name (without the @ or instance)</p>
|
||
|
|
@error('name')
|
||
|
|
<p class="text-red-600 text-sm mt-1">{{ $message }}</p>
|
||
|
|
@enderror
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div>
|
||
|
|
<label for="platform_instance_id" class="block text-sm font-medium text-gray-700 mb-2">
|
||
|
|
Platform Instance
|
||
|
|
</label>
|
||
|
|
<select id="platform_instance_id"
|
||
|
|
name="platform_instance_id"
|
||
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
||
|
|
required>
|
||
|
|
@foreach(\App\Models\PlatformInstance::where('is_active', true)->get() as $instance)
|
||
|
|
<option value="{{ $instance->id }}" {{ old('platform_instance_id') == $instance->id ? 'selected' : '' }}>
|
||
|
|
{{ $instance->name }} ({{ $instance->url }})
|
||
|
|
</option>
|
||
|
|
@endforeach
|
||
|
|
</select>
|
||
|
|
@error('platform_instance_id')
|
||
|
|
<p class="text-red-600 text-sm mt-1">{{ $message }}</p>
|
||
|
|
@enderror
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div>
|
||
|
|
<label for="language_id" class="block text-sm font-medium text-gray-700 mb-2">
|
||
|
|
Language
|
||
|
|
</label>
|
||
|
|
<select id="language_id"
|
||
|
|
name="language_id"
|
||
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
||
|
|
required>
|
||
|
|
<option value="">Select language</option>
|
||
|
|
@foreach(\App\Models\Language::orderBy('name')->get() as $language)
|
||
|
|
<option value="{{ $language->id }}" {{ old('language_id') == $language->id ? 'selected' : '' }}>
|
||
|
|
{{ $language->name }}
|
||
|
|
</option>
|
||
|
|
@endforeach
|
||
|
|
</select>
|
||
|
|
@error('language_id')
|
||
|
|
<p class="text-red-600 text-sm mt-1">{{ $message }}</p>
|
||
|
|
@enderror
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div>
|
||
|
|
<label for="description" class="block text-sm font-medium text-gray-700 mb-2">
|
||
|
|
Description (Optional)
|
||
|
|
</label>
|
||
|
|
<textarea id="description"
|
||
|
|
name="description"
|
||
|
|
rows="3"
|
||
|
|
placeholder="Brief description of this channel"
|
||
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">{{ old('description') }}</textarea>
|
||
|
|
@error('description')
|
||
|
|
<p class="text-red-600 text-sm mt-1">{{ $message }}</p>
|
||
|
|
@enderror
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<input type="hidden" name="is_active" value="1">
|
||
|
|
<input type="hidden" name="redirect_to" value="{{ route('onboarding.complete') }}">
|
||
|
|
|
||
|
|
<div class="flex justify-between">
|
||
|
|
<a href="{{ route('onboarding.feed') }}"
|
||
|
|
class="px-4 py-2 text-gray-600 hover:text-gray-800 transition duration-200">
|
||
|
|
← Back
|
||
|
|
</a>
|
||
|
|
<button type="submit"
|
||
|
|
class="bg-blue-600 text-white py-2 px-6 rounded-md hover:bg-blue-700 transition duration-200">
|
||
|
|
Continue
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
@endsection
|