Audit fixes against /channel/{slug}:
1. Fluid video grid — repeat(auto-fill, minmax(260px, 1fr)) replaces
the three fixed breakpoints (3/2/4 cols at 1101/1500/… px) that
produced different card widths and could overflow 390 / 1280 /
1920. min-width:0 on every grid child so a long unbroken title
(CJK, "SPARTAWORRIOR") can't widen its track past 1fr.
2. Scoreboard thumbnail — stop including vs-mini + scorebar-mini on
match cards. Those partials leaked fighter names, "AKA/AO",
"ROUND 1", "0:00" into the card DOM, showing stale 0-0 for
finished matches and breaking title layout at narrow widths. The
regular <img> above is the thumbnail now; VS intro + live scorebar
still render on the full match player page where they belong.
3. Sort pills — Latest/Popular/Oldest now append #videos so the page
stays on the Videos tab after reload instead of jumping to Wall.
4. Shorts tab — always render for the owner (so the "My Shorts"
sidebar link always lands somewhere), with an empty-state card
when no shorts exist. Visitors still see it only when shorts > 0.
5. Subscriptions sidebar link — href="#" replaced by a real
/feed/subscriptions route backed by UserController@subscriptionsFeed
that reuses the videos/index view with the subscription feed.
6. Header view count — totalViews now sums video_views over public
videos for visitors (owner still sees the full total). Previously
leaked unlisted and private video view counts.
7. Card redundancy — new hideChannelInfo prop on <x-video-card/>
suppresses the per-card avatar + channel-name row. The channel
page passes it; everywhere else keeps the row.
9. Decorative logo — the second <img alt="Play"> in the responsive
header pair now has alt="" so a screen reader doesn't announce
"Play Play". ⋮ menu button gets aria-label="More actions".
10. Privacy — age, gender, location and horoscope strip now only
render to the owner on the channel header (horoscope strip is
also allowed when the compatibility match-up is being shown to
a signed-in visitor). Joined-month stays public.
11. Notifications dropdown — initial state is "No notifications"
not an indefinite "Loading…". Opening the panel now shows a
spinner while fetching, surfaces a Retry button on error, and
bails out of the "Loading…" state on non-ok HTTP responses.
Title clamp — .yt-video-title is now a 2-line box with
overflow-wrap:anywhere so CJK titles and long words wrap mid-word
and can't widen the card past its track.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
112 lines
4.3 KiB
PHP
112 lines
4.3 KiB
PHP
<!-- Sidebar -->
|
|
<nav class="yt-sidebar" id="sidebar">
|
|
|
|
<!-- Primary section -->
|
|
<div class="yt-sidebar-section">
|
|
<a href="{{ route('home') }}" class="yt-sidebar-link {{ request()->is('/') || request()->is('videos') ? 'active' : '' }}">
|
|
<i class="bi bi-house-door-fill"></i>
|
|
<span>Home</span>
|
|
</a>
|
|
<a href="{{ route('videos.shorts') }}" class="yt-sidebar-link {{ request()->is('shorts') ? 'active' : '' }}">
|
|
<i class="bi bi-play-btn-fill"></i>
|
|
<span>Shorts</span>
|
|
</a>
|
|
<a href="{{ route('videos.trending') }}" class="yt-sidebar-link {{ request()->is('trending') ? 'active' : '' }}">
|
|
<i class="bi bi-fire"></i>
|
|
<span>Trending</span>
|
|
</a>
|
|
@auth
|
|
<a href="{{ route('subscriptions.feed') }}"
|
|
class="yt-sidebar-link {{ request()->routeIs('subscriptions.feed') ? 'active' : '' }}">
|
|
<i class="bi bi-collection-play-fill"></i>
|
|
<span>Subscriptions</span>
|
|
</a>
|
|
@endauth
|
|
</div>
|
|
|
|
<!-- You section (auth only) -->
|
|
@auth
|
|
@php $channelBase = route('channel', Auth::user()->channel); @endphp
|
|
<div class="yt-sidebar-section">
|
|
<div class="yt-sidebar-section-header">You</div>
|
|
<a href="{{ $channelBase }}#wall"
|
|
class="yt-sidebar-link" id="sb-tab-wall">
|
|
<i class="bi bi-layout-text-sidebar-reverse"></i>
|
|
<span>My Wall</span>
|
|
</a>
|
|
<a href="{{ $channelBase }}#videos"
|
|
class="yt-sidebar-link" id="sb-tab-videos">
|
|
<i class="bi bi-play-circle-fill"></i>
|
|
<span>My Videos</span>
|
|
</a>
|
|
<a href="{{ $channelBase }}#shorts"
|
|
class="yt-sidebar-link" id="sb-tab-shorts">
|
|
<i class="bi bi-phone-fill"></i>
|
|
<span>My Shorts</span>
|
|
</a>
|
|
<a href="{{ $channelBase }}#playlists"
|
|
class="yt-sidebar-link" id="sb-tab-playlists">
|
|
<i class="bi bi-collection-play-fill"></i>
|
|
<span>My Playlists</span>
|
|
</a>
|
|
<a href="{{ route('history') }}" class="yt-sidebar-link {{ request()->is('history') ? 'active' : '' }}">
|
|
<i class="bi bi-clock-history"></i>
|
|
<span>History</span>
|
|
</a>
|
|
<a href="{{ route('liked') }}" class="yt-sidebar-link {{ request()->is('liked') ? 'active' : '' }}">
|
|
<i class="bi bi-hand-thumbs-up-fill"></i>
|
|
<span>Liked Videos</span>
|
|
</a>
|
|
</div>
|
|
@endauth
|
|
|
|
<!-- Explore section -->
|
|
<div class="yt-sidebar-section">
|
|
<div class="yt-sidebar-section-header">Explore</div>
|
|
<a href="{{ route('videos.index', ['filter' => 'music']) }}" class="yt-sidebar-link {{ request()->is('videos') && request('filter') === 'music' ? 'active' : '' }}">
|
|
<i class="bi bi-music-note-beamed"></i>
|
|
<span>Music</span>
|
|
</a>
|
|
<a href="{{ route('videos.index', ['filter' => 'match']) }}" class="yt-sidebar-link {{ request()->is('videos') && request('filter') === 'match' ? 'active' : '' }}">
|
|
<i class="bi bi-trophy-fill"></i>
|
|
<span>Sports</span>
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Admin section (super_admin only) -->
|
|
@auth
|
|
@if(Auth::user()->isSuperAdmin())
|
|
<div class="yt-sidebar-section">
|
|
<div class="yt-sidebar-section-header">Admin</div>
|
|
<a href="{{ route('admin.dashboard') }}" class="yt-sidebar-link {{ request()->is('admin*') ? 'active' : '' }}">
|
|
<i class="bi bi-speedometer2"></i>
|
|
<span>Dashboard</span>
|
|
</a>
|
|
</div>
|
|
@endif
|
|
@endauth
|
|
|
|
</nav>
|
|
|
|
@auth
|
|
<script>
|
|
(function () {
|
|
var channelPath = @json(parse_url(route('channel', Auth::user()->channel), PHP_URL_PATH));
|
|
var onChannel = location.pathname === channelPath;
|
|
if (!onChannel) return;
|
|
|
|
var hash = location.hash.replace('#', '') || 'wall';
|
|
var el = document.getElementById('sb-tab-' + hash);
|
|
if (el) el.classList.add('active');
|
|
|
|
window.addEventListener('hashchange', function () {
|
|
document.querySelectorAll('#sb-tab-wall,#sb-tab-videos,#sb-tab-shorts,#sb-tab-playlists')
|
|
.forEach(function (a) { a.classList.remove('active'); });
|
|
var h = location.hash.replace('#', '') || 'wall';
|
|
var t = document.getElementById('sb-tab-' + h);
|
|
if (t) t.classList.add('active');
|
|
});
|
|
}());
|
|
</script>
|
|
@endauth
|