feat: add community activity feed and mentions
This commit is contained in:
@@ -1,24 +1,64 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$headerBreadcrumbs = collect([
|
||||
(object) ['name' => $page_title ?? 'Community Activity', 'url' => route('community.activity')],
|
||||
]);
|
||||
|
||||
{{-- Inline props for the React component --}}
|
||||
<script id="latest-comments-props" type="application/json">
|
||||
$initialFilterLabel = match (($initialFilter ?? 'all')) {
|
||||
'comments' => 'Comments',
|
||||
'replies' => 'Replies',
|
||||
'following' => 'Following',
|
||||
'my' => 'My Activity',
|
||||
default => 'All Activity',
|
||||
};
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<x-nova-page-header
|
||||
section="Community"
|
||||
:title="$page_title ?? 'Community Activity'"
|
||||
icon="fa-wave-square"
|
||||
:breadcrumbs="$headerBreadcrumbs"
|
||||
description="Track comments, replies, reactions, and mentions from across the Skinbase community in one live feed."
|
||||
headerClass="pb-6"
|
||||
>
|
||||
<x-slot name="actions">
|
||||
<div class="flex flex-wrap items-center gap-2 text-xs font-medium">
|
||||
<span id="community-activity-filter-summary" class="inline-flex items-center gap-1.5 rounded-full border border-sky-400/20 bg-sky-500/10 px-3 py-1 text-sky-200">
|
||||
<i class="fa-solid fa-filter"></i>
|
||||
{{ $initialFilterLabel }}
|
||||
</span>
|
||||
@if (!empty($initialUserId))
|
||||
<span id="community-activity-scope-summary" class="inline-flex items-center gap-1.5 rounded-full border border-white/[0.08] bg-white/[0.04] px-3 py-1 text-white/65">
|
||||
<i class="fa-solid fa-user"></i>
|
||||
User #{{ $initialUserId }}
|
||||
</span>
|
||||
@else
|
||||
<span id="community-activity-scope-summary" class="hidden"></span>
|
||||
@endif
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-nova-page-header>
|
||||
|
||||
<script id="community-activity-props" type="application/json">
|
||||
{!! json_encode($props, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_HEX_AMP) !!}
|
||||
</script>
|
||||
|
||||
<div id="latest-comments-root" class="min-h-screen">
|
||||
{{-- SSR skeleton replaced on React hydration --}}
|
||||
<div class="px-4 pt-10 pb-20 sm:px-6 lg:px-8 max-w-5xl mx-auto">
|
||||
<div class="mb-8">
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Community</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">{{ $page_title }}</h1>
|
||||
<p class="mt-1 text-sm text-white/50">Most recent artwork comments from the community.</p>
|
||||
<div id="community-activity-root" class="min-h-[480px]">
|
||||
<div class="mx-auto max-w-6xl px-6 pt-8 pb-20 md:px-10">
|
||||
<div class="mb-6 rounded-[28px] border border-white/[0.06] bg-white/[0.025] p-5 shadow-[0_18px_45px_rgba(0,0,0,0.22)]">
|
||||
<div class="h-3 w-40 animate-pulse rounded bg-white/[0.08]"></div>
|
||||
<div class="mt-3 h-3 w-2/3 animate-pulse rounded bg-white/[0.06]"></div>
|
||||
<div class="mt-5 flex gap-2">
|
||||
<div class="h-10 w-28 animate-pulse rounded-full bg-white/[0.06]"></div>
|
||||
<div class="h-10 w-24 animate-pulse rounded-full bg-white/[0.05]"></div>
|
||||
<div class="h-10 w-24 animate-pulse rounded-full bg-white/[0.05]"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-8 w-8 animate-spin rounded-full border-4 border-nova-500 border-t-transparent mx-auto mt-20"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@vite(['resources/js/Pages/Community/LatestCommentsPage.jsx'])
|
||||
@vite(['resources/js/Pages/Community/CommunityActivityPage.jsx'])
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user