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
38 lines
1.4 KiB
PHP
38 lines
1.4 KiB
PHP
@extends('layouts.nova')
|
|
|
|
@php
|
|
$threadsData = collect($subtopics->items())->map(fn ($sub) => [
|
|
'topic_id' => (int) ($sub->topic_id ?? $sub->id ?? 0),
|
|
'topic' => $sub->topic ?? $sub->title ?? 'Untitled',
|
|
'discuss' => $sub->discuss ?? null,
|
|
'num_posts' => (int) ($sub->num_posts ?? 0),
|
|
'uname' => $sub->uname ?? 'Unknown',
|
|
'last_update' => $sub->last_update ?? $sub->post_date ?? null,
|
|
'is_pinned' => $sub->is_pinned ?? false,
|
|
])->values();
|
|
|
|
$paginationData = (isset($subtopics) && method_exists($subtopics, 'currentPage'))
|
|
? [
|
|
'current_page' => $subtopics->currentPage(),
|
|
'last_page' => $subtopics->lastPage(),
|
|
'per_page' => $subtopics->perPage(),
|
|
'total' => $subtopics->total(),
|
|
] : null;
|
|
|
|
$forumCategoryProps = json_encode([
|
|
'category' => ['id' => $category->id ?? null, 'name' => $category->name ?? '', 'slug' => $category->slug ?? ''],
|
|
'threads' => $threadsData,
|
|
'pagination' => $paginationData,
|
|
'isAuthenticated' => auth()->check(),
|
|
], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
|
|
@endphp
|
|
|
|
@section('content')
|
|
<div id="forum-category-root"></div>
|
|
<script type="application/json" id="forum-category-props">{!! $forumCategoryProps !!}</script>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
@vite(['resources/js/entry-forum.jsx'])
|
|
@endpush
|