feat: forum rich-text editor, emoji picker, mentions, discover nav, feed, uploads, profile
Forum: - TipTap WYSIWYG editor with full toolbar - @emoji-mart/react emoji picker (consistent with tweets) - @mention autocomplete with user search API - Fix PHP 8.4 parse errors in Blade templates - Fix thread data display (paginator items) - Align forum page widths to max-w-5xl Discover: - Extract shared _nav.blade.php partial - Add missing nav links to for-you page - Add Following link for authenticated users Feed/Posts: - Post model, controllers, policies, migrations - Feed page components (PostComposer, FeedCard, etc) - Post reactions, comments, saves, reports, sharing - Scheduled publishing support - Link preview controller Profile: - Profile page components (ProfileHero, ProfileTabs) - Profile API controller Uploads: - Upload wizard enhancements - Scheduled publish picker - Studio status bar and readiness checklist
This commit is contained in:
@@ -1,34 +1,19 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@php
|
||||
$forumNewThreadProps = json_encode([
|
||||
'category' => ['id' => $category->id, 'name' => $category->name, 'slug' => $category->slug],
|
||||
'csrfToken' => csrf_token(),
|
||||
'errors' => $errors->toArray(),
|
||||
'oldValues' => ['title' => old('title', ''), 'content' => old('content', '')],
|
||||
], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<div class="legacy-page max-w-3xl">
|
||||
<div class="mb-6">
|
||||
<a href="{{ route('forum.category.show', ['category' => $category->slug]) }}" class="text-sm text-sky-300 hover:text-sky-200">← Back to section</a>
|
||||
<h1 class="mt-2 text-2xl font-semibold text-white">Create thread in {{ $category->name }}</h1>
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ route('forum.thread.store', ['category' => $category->slug]) }}" class="space-y-4 rounded-lg border border-white/10 bg-zinc-900/70 p-4">
|
||||
@csrf
|
||||
|
||||
<div>
|
||||
<label for="title" class="mb-1 block text-sm font-medium text-zinc-200">Title</label>
|
||||
<input id="title" name="title" value="{{ old('title') }}" required maxlength="255" class="w-full rounded border border-white/10 bg-zinc-950 px-3 py-2 text-zinc-100" />
|
||||
@error('title')
|
||||
<div class="mt-1 text-xs text-red-400">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="content" class="mb-1 block text-sm font-medium text-zinc-200">Content</label>
|
||||
<textarea id="content" name="content" rows="10" required class="w-full rounded border border-white/10 bg-zinc-950 px-3 py-2 text-zinc-100">{{ old('content') }}</textarea>
|
||||
@error('content')
|
||||
<div class="mt-1 text-xs text-red-400">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" class="rounded bg-sky-600 px-4 py-2 text-sm font-medium text-white hover:bg-sky-500">Publish thread</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="forum-new-thread-root"></div>
|
||||
<script type="application/json" id="forum-new-thread-props">{!! $forumNewThreadProps !!}</script>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@vite(['resources/js/entry-forum.jsx'])
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user