feat(watch): anchor Up Next cards everywhere + Phase 4 tests
- All three type-specific watch templates (generic / music / match) were still rendering the Up Next list as <div onclick="recGoTo(...)"> — only show.blade.php had been converted in the earlier commit. Convert each to <a href> so middle-click / right-click / cmd-click open-in-new-tab work, keeping the SPA swap on normal left-click via an onclick guard that lets modified clicks fall through. - 9 feature tests covering: singular/plural comment counts, top-level vs reply separation, ?lc= permalink HREFs, markdown header promotion in HtmlSanitizer::render(), passthrough of plain text, download access gate for both MP4 and MP3 at disabled + registered tiers, and sidebar anchor-card presence. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
1 parent
36295fcd6a
commit
646d3e9d2a
4 files changed
+201
-9
No files matched your search
@@ -980,9 +980,13 @@
|
||||
@if ($recommendedVideos && $recommendedVideos->count() > 0)
|
||||
<div class="recommended-videos-list" id="recList">
|
||||
@foreach ($recommendedVideos as $recVideo)
|
||||
<div class="sidebar-video-card"
|
||||
{{-- Real <a href> so right-click / middle-click /
|
||||
open-in-new-tab works. recGoTo() still runs
|
||||
on a plain left-click for the SPA swap. --}}
|
||||
<a class="sidebar-video-card"
|
||||
href="{{ route('videos.show', $recVideo) }}"
|
||||
data-rec-url="{{ route('videos.show', $recVideo) }}"
|
||||
onclick="recGoTo('{{ route('videos.show', $recVideo) }}')"
|
||||
onclick="if (event.button===0 && !event.metaKey && !event.ctrlKey && !event.shiftKey) { event.preventDefault(); recGoTo('{{ route('videos.show', $recVideo) }}'); return false; }"
|
||||
style="cursor:pointer;">
|
||||
<div class="sidebar-thumb" style="position: relative;">
|
||||
@if ($recVideo->thumbnail)
|
||||
@@ -1016,7 +1020,7 @@
|
||||
{{ $recVideo->created_at->diffForHumans() }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
|
||||
@@ -3144,9 +3144,13 @@
|
||||
@if ($recommendedVideos && $recommendedVideos->count() > 0)
|
||||
<div class="recommended-videos-list" id="recList">
|
||||
@foreach ($recommendedVideos as $recVideo)
|
||||
<div class="sidebar-video-card"
|
||||
{{-- Real <a href> so right-click / middle-click /
|
||||
open-in-new-tab works. recGoTo() still runs
|
||||
on a plain left-click for the SPA swap. --}}
|
||||
<a class="sidebar-video-card"
|
||||
href="{{ route('videos.show', $recVideo) }}"
|
||||
data-rec-url="{{ route('videos.show', $recVideo) }}"
|
||||
onclick="recGoTo('{{ route('videos.show', $recVideo) }}')"
|
||||
onclick="if (event.button===0 && !event.metaKey && !event.ctrlKey && !event.shiftKey) { event.preventDefault(); recGoTo('{{ route('videos.show', $recVideo) }}'); return false; }"
|
||||
style="cursor:pointer;">
|
||||
<div class="sidebar-thumb" style="position: relative;">
|
||||
@if ($recVideo->thumbnail)
|
||||
@@ -3181,7 +3185,7 @@
|
||||
{{ $recVideo->created_at->diffForHumans() }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
|
||||
@@ -972,9 +972,13 @@
|
||||
@if ($recommendedVideos && $recommendedVideos->count() > 0)
|
||||
<div class="recommended-videos-list" id="recList">
|
||||
@foreach ($recommendedVideos as $recVideo)
|
||||
<div class="sidebar-video-card"
|
||||
{{-- Real <a href> so right-click / middle-click /
|
||||
open-in-new-tab works. recGoTo() still runs
|
||||
on a plain left-click for the SPA swap. --}}
|
||||
<a class="sidebar-video-card"
|
||||
href="{{ route('videos.show', $recVideo) }}"
|
||||
data-rec-url="{{ route('videos.show', $recVideo) }}"
|
||||
onclick="recGoTo('{{ route('videos.show', $recVideo) }}')"
|
||||
onclick="if (event.button===0 && !event.metaKey && !event.ctrlKey && !event.shiftKey) { event.preventDefault(); recGoTo('{{ route('videos.show', $recVideo) }}'); return false; }"
|
||||
style="cursor:pointer;">
|
||||
<div class="sidebar-thumb" style="position: relative;">
|
||||
@if ($recVideo->thumbnail)
|
||||
@@ -1008,7 +1012,7 @@
|
||||
{{ $recVideo->created_at->diffForHumans() }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
|
||||
Reference in new issue
Block a user