@auth
@if (Auth::id() === $video->user_id)
@if($video->type === 'music')
@endif
{{-- Lyrics generate/regenerate + edit now live inside the player's gear menu
so they're always reachable on both mobile and desktop. --}}
@elseif (Auth::id() !== $video->user_id)
@php $isSubscribed = Auth::user()->isSubscribedTo($video->user); @endphp
@endif
@else
{{-- Guest Subscribe: showToast first so the user understands what's
happening, then redirect to the login page with intended=
preserving the current URL so after login they land back on
this video. 600 ms gives the toast a moment to be seen. --}}
@endauth
@auth
{{-- Like + Dislike pair. Mutually exclusive on the server; clicking
one clears the other via the controllers' detach() call. --}}
@else
@endauth
@if ($video->isShareable())
@endif
Save
@php
$dlAccess = $video->download_access ?? 'disabled';
$dlUser = Auth::user();
$showDl = match($dlAccess) {
'everyone' => true,
'registered' => (bool) $dlUser,
'subscribers' => $dlUser && ($dlUser->id === $video->user_id || $dlUser->isSubscribedTo($video->user)),
default => false,
};
@endphp
@if($showDl)
@php $isAudioDl = $video->isAudioOnly(); @endphp