feat(channel): /@handle route + hide composer in preview mode
- New /@handle route (channel.handle name) that maps to UserController@channel,
so YouTube-style profile URLs work. Handle is the existing username
slug for now; a dedicated `handle` column can land later if we want
the two to diverge. {handle} is constrained to [A-Za-z0-9][A-Za-z0-9._-]*
so arbitrary paths don't match this route.
- Composer on the Wall tab used Auth::id() === $user->id directly,
which bypassed the $isOwner flip-to-false that preview-as-visitor
does. The composer now also checks !$preview so previewing an
owner's channel hides the post box as a visitor would see it.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
1 parent
d5d35ab85e
commit
e939dd3a53
2 files changed
+10
-2
No files matched your search
@@ -414,9 +414,9 @@ $headerSocialMap = [
|
||||
{{-- ── LEFT: composer + feed ── --}}
|
||||
<div>
|
||||
|
||||
{{-- Composer (owner only) --}}
|
||||
{{-- Composer (owner only, hidden when previewing as a visitor) --}}
|
||||
@auth
|
||||
@if(Auth::id() === $user->id)
|
||||
@if(Auth::id() === $user->id && !$preview)
|
||||
<div class="ch-composer">
|
||||
<form action="{{ route('posts.store', $user->id) }}" method="POST" enctype="multipart/form-data" id="postForm">
|
||||
@csrf
|
||||
|
||||
Reference in new issue
Block a user