diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index d2308cc..124928b 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -17,6 +17,7 @@ class CommentController extends Controller public function index(Video $video) { $comments = $video->comments()->whereNull('parent_id')->with(['user', 'replies.user'])->get(); + return response()->json($comments); } @@ -35,12 +36,14 @@ class CommentController extends Controller // Handle mentions preg_match_all('/@(\w+)/', $request->body, $matches); - if (!empty($matches[1])) { + if (! empty($matches[1])) { // Mentions found - in production, you would send notifications here // For now, we just parse them } - return response()->json($comment->load('user')); + $video->increment('comment_count'); + + return response()->json(['success' => true, 'comment' => $comment->load('user')]); } public function update(Request $request, Comment $comment) @@ -67,6 +70,7 @@ class CommentController extends Controller } $comment->delete(); + return response()->json(['success' => true]); } } diff --git a/resources/views/components/video-comments.blade.php b/resources/views/components/video-comments.blade.php index fb55723..37cfa35 100644 --- a/resources/views/components/video-comments.blade.php +++ b/resources/views/components/video-comments.blade.php @@ -1,19 +1,24 @@

- Comments ({{ $video->comment_count }}) + Comments ({{ isset($video->comment_count) ? $video->comment_count : 0 }})

- @auth
{{ Auth::user()->name }}
+ placeholder="Add a comment... Use @mm.ss for timestamps (e.g. @1.30)" rows="1" + style="background: transparent; border: none; border-bottom: 2px solid var(--border-color); color: var(--text-primary); border-radius: 0; padding: 12px 0 8px 0; flex: 1; margin: 0; height: 40px; font-size: 14px; outline: none; overflow: hidden; resize: none;"> +
@@ -23,128 +28,248 @@ Sign in to comment
@endauth -
- @forelse($video->comments()->whereNull('parent_id')->with('user', 'replies.user')->latest()->get() as $comment) - @include('videos.partials.comment', ['comment' => $comment]) - @empty -

No comments yet. Be the first to - comment!

- @endforelse + @if (isset($video)) + @forelse($video->comments()->whereNull('parent_id')->with('user', 'replies.user')->latest()->limit(20)->get() as $comment) + @include('videos.partials.comment', ['comment' => $comment]) + @empty +

No comments yet. Be the + first to comment!

+ @endforelse + @endif
+ + diff --git a/resources/views/videos/show.blade.php b/resources/views/videos/show.blade.php index f900bcb..7b3f233 100644 --- a/resources/views/videos/show.blade.php +++ b/resources/views/videos/show.blade.php @@ -601,215 +601,115 @@ @endif - -
-

- Comments ({{ $video->comment_count }}) -

+ @include('components.video-comments', ['video' => $video]) +
+ - @auth -
- {{ Auth::user()->name }} -
- -
- - + +
+ @if ($playlist && $playlistVideos && $playlistVideos->count() > 0) +

+ + {{ $playlist->name }} + ({{ $playlistVideos->count() }} + videos) +

+ - @else -
- Sign in to comment -
- @endauth - -
- @forelse($video->comments()->whereNull('parent_id')->with('user', 'replies.user')->latest()->get() as $comment) - @include('videos.partials.comment', ['comment' => $comment]) - @empty -

No comments yet. Be the - first to comment!

- @endforelse -
+ @endif + @endforeach
- - -
- - -
- @if ($playlist && $playlistVideos && $playlistVideos->count() > 0) -

- - {{ $playlist->name }} - ({{ $playlistVideos->count() }} - videos) -

+ @if ($playlist->canEdit(Auth::user())) + + Edit Playlist + + @endif + @else +

Up Next

+ @if ($recommendedVideos && $recommendedVideos->count() > 0) diff --git a/resources/views/videos/types/match.blade copy.php b/resources/views/videos/types/match.blade copy.php deleted file mode 100644 index 363051a..0000000 --- a/resources/views/videos/types/match.blade copy.php +++ /dev/null @@ -1,3515 +0,0 @@ -@extends('layouts.app') -@section('title', ($video->title ?? 'Match Video') . ' | ' . config('app.name')) - -@section('extra_styles') - -@endsection - -@section('content') - @php - // ===== DUMMY DATA FALLBACKS ===== - $blueFighter = - $blueFighter ?? - (object) [ - 'name' => 'Sami Al Manea', - 'flag' => '🇧🇭', - 'photo' => 'https://takeone-dev.innovator.bh/storage/images/profiles/profile_5.png?v=1773157950', - 'team' => 'Emperor TaeKwonDo Academy', - 'country' => 'Bahrain', - 'logo' => 'https://takeone-dev.innovator.bh/storage/clubs/1/branding/logo_1771488666.png', - 'member_id' => 5, - 'club_url' => 'https://takeone-dev.innovator.bh/mobile/eta', - ]; - $redFighter = - $redFighter ?? - (object) [ - 'name' => 'Hassan Al Shallan', - 'flag' => '🇧🇭', - 'photo' => 'https://takeone-dev.innovator.bh/storage/images/profiles/profile_11.png?t=1773268056907', - 'team' => 'Legend TaeKwonDo Academy', - 'country' => 'Bahrain', - 'logo' => 'https://takeone-dev.innovator.bh/storage/clubs/logos/logo_1773267551.png', - 'member_id' => 11, - 'club_url' => 'https://takeone-dev.innovator.bh/clubs/legend-taekwondo-academy', - ]; - $match = - $match ?? - (object) [ - 'number' => '103', - 'court' => '2', - 'weight_category' => 'U18', - 'score_blue' => 7, - 'score_red' => 5, - 'features' => - 'Electronic scoring system (PSS & head‑gear) • Video replay available for head kicks and gam-jeom appeals', - ]; - $referee = - $referee ?? - (object) [ - 'name' => 'Ghassan Yusuf', - 'flag' => '🇧🇭', - 'photo' => 'https://takeone-dev.innovator.bh/storage/images/profiles/profile_8.png?t=1773267305519', - 'member_id' => 4, - ]; - $championship = - $championship ?? - (object) [ - 'name' => 'Championship 2026', - 'url' => '/championship/2026', - ]; - $venue = - $venue ?? - (object) [ - 'name' => 'Manama Sports Hall', - 'map_link' => 'https://maps.google.com/?q=Manama+Sports+Hall+Bahrain', - ]; - @endphp - - -
- -
- -
- - - - - - - @if (isset($nextVideo) || isset($previousVideo)) -
- @if (isset($previousVideo)) - - {{ Str::limit($previousVideo->title ?? 'Previous', 20) }} - @else - - @endif - -
- - -
- - @if (isset($nextVideo)) - {{ Str::limit($nextVideo->title ?? 'Next', 20) }} - - @else - - @endif -
-
- -
- @endif -
- - -
- - -
- - @auth - @if (Auth::id() === $video->user_id) - - @endif - @endif - @auth - @if (isset($video)) -
- @csrf - -
- @endif - @else - - - Like - - @endauth - - - @auth - @if (isset($video) && $video->user && Auth::id() !== $video->user_id) - - @endif - @else - - - Subscribe - - @endauth - - - @if (isset($video) && $video->isShareable()) - - @endif - - - - -
-
- - - - @if (isset($video) && $video->description) - @php - $fullDescription = $video->description; - $shortDescription = Str::limit($fullDescription, 200); - $needsExpand = strlen($fullDescription) > 200; - @endphp - -
- - -
- -
-
-
Final • Male -63kg division
-
- -
- - - - -
-
- {{ $match->score_blue ?? 7 }} - Final score - {{ $match->score_red ?? 5 }} -
- -
- - - -
- - -
- - -
-
-

Match Overview

- @if (isset($video) && $video->user) -
- {{ $video->user->name }} - {{ $video->user->name }} - • {{ number_format($video->user->subscriber_count ?? 0) }} subscribers -
- @endif -
-
- {!! Str::markdown($fullDescription) !!} -
-
-
-
- - - @endif - - -
-

- Comments ({{ isset($video) ? $video->comment_count ?? 0 : 0 }}) -

- @auth -
- {{ Auth::user()->name }} -
- - - -
-
- @else -
- Sign in to comment -
- @endauth -
- @if (isset($video)) - @forelse($video->comments()->whereNull('parent_id')->with('user', 'replies.user')->latest()->get() as $comment) - @include('videos.partials.comment', ['comment' => $comment]) - @empty -

No comments yet. Be - the first to comment!

- @endforelse - @endif -
-
- - -
- - -
- - - -
- @if ($playlist && $playlistVideos && $playlistVideos->count() > 0) -

- - {{ $playlist->name }} - ({{ $playlistVideos->count() }} - videos) -

- - @if ($playlist->canEdit(Auth::user())) - - Edit Playlist - - @endif - @else -

Up Next

- @if ($recommendedVideos && $recommendedVideos->count() > 0) - - @else -
No recommendations available yet. Check back later!
- @endif - @endif -
- -
-
- - - @include('layouts.partials.share-modal') - @include('layouts.partials.edit-video-modal') - - -
-
-
-

Add New Round

- -
-
-
-
- - -
-
- - -
-
-
- - -
-
-
-
- - -
-
-
-

Add Point

- -
-
- - -
-
- - -
-
- - -
-
-
- - -
-
-
- - -
-
- - -
-
-
- - -
-
- - - -
-
-
-
- - -
-
-
-

Edit Round

- -
-
- -
- - -
-
- -
- - -
-
-
-
- - -
- -
- - @if (Session::has('openEditModal') && Session::get('openEditModal')) - @auth - - @endauth - @endif - - - @endsection diff --git a/resources/views/videos/types/match.blade.backup.php b/resources/views/videos/types/match.blade.backup.php deleted file mode 100644 index cb688c7..0000000 --- a/resources/views/videos/types/match.blade.backup.php +++ /dev/null @@ -1,9 +0,0 @@ -@extends('layouts.app') -@section('title', ($video->title ?? 'Match Video') . ' | ' . config('app.name')) - -@section('extra_styles') - -@endsection - -@section('content') - @php - // ===== DUMMY DATA FALLBACKS ===== - $blueFighter = - $blueFighter ?? - (object) [ - 'name' => 'Sami Al Manea', - 'flag' => '🇧🇭', - 'photo' => 'https://takeone-dev.innovator.bh/storage/images/profiles/profile_5.png?v=1773157950', - 'team' => 'Emperor TaeKwonDo Academy', - 'country' => 'Bahrain', - 'logo' => 'https://takeone-dev.innovator.bh/storage/clubs/1/branding/logo_1771488666.png', - 'member_id' => 5, - 'club_url' => 'https://takeone-dev.innovator.bh/mobile/eta', - ]; - $redFighter = - $redFighter ?? - (object) [ - 'name' => 'Hassan Al Shallan', - 'flag' => '🇧🇭', - 'photo' => 'https://takeone-dev.innovator.bh/storage/images/profiles/profile_11.png?t=1773268056907', - 'team' => 'Legend TaeKwonDo Academy', - 'country' => 'Bahrain', - 'logo' => 'https://takeone-dev.innovator.bh/storage/clubs/logos/logo_1773267551.png', - 'member_id' => 11, - 'club_url' => 'https://takeone-dev.innovator.bh/clubs/legend-taekwondo-academy', - ]; - $match = - $match ?? - (object) [ - 'number' => '103', - 'court' => '2', - 'weight_category' => 'U18', - 'score_blue' => 7, - 'score_red' => 5, - 'features' => - 'Electronic scoring system (PSS & head‑gear) • Video replay available for head kicks and gam-jeom appeals', - ]; - $referee = - $referee ?? - (object) [ - 'name' => 'Ghassan Yusuf', - 'flag' => '🇧🇭', - 'photo' => 'https://takeone-dev.innovator.bh/storage/images/profiles/profile_8.png?t=1773267305519', - 'member_id' => 4, - ]; - $championship = - $championship ?? - (object) [ - 'name' => 'Championship 2026', - 'url' => '/championship/2026', - ]; - $venue = - $venue ?? - (object) [ - 'name' => 'Manama Sports Hall', - 'map_link' => 'https://maps.google.com/?q=Manama+Sports+Hall+Bahrain', - ]; - @endphp - - -
- -
- -
- - - - - - - @if (isset($nextVideo) || isset($previousVideo)) -
- @if (isset($previousVideo)) - - {{ Str::limit($previousVideo->title ?? 'Previous', 20) }} - @else - - @endif - -
- - -
- - @if (isset($nextVideo)) - {{ Str::limit($nextVideo->title ?? 'Next', 20) }} - - @else - - @endif -
-
- -
- @endif -
- - -
- - -
- - @auth - @if (Auth::id() === $video->user_id) - - @endif - @endif - @auth - @if (isset($video)) -
- @csrf - -
- @endif - @else - - - Like - - @endauth - - - @auth - @if (isset($video) && $video->user && Auth::id() !== $video->user_id) - - @endif - @else - - - Subscribe - - @endauth - - - @if (isset($video) && $video->isShareable()) - - @endif - - - - -
-
- - - - @if (isset($video) && $video->description) - @php - $fullDescription = $video->description; - $shortDescription = Str::limit($fullDescription, 200); - $needsExpand = strlen($fullDescription) > 200; - @endphp - -
- - -
- -
-
-
Final • Male -63kg division
-
- -
- - - - -
-
- {{ $match->score_blue ?? 7 }} - Final score - {{ $match->score_red ?? 5 }} -
- -
- - - -
- - -
- - -
-
-

Match Overview

- @if (isset($video) && $video->user) -
- {{ $video->user->name }} - {{ $video->user->name }} - • {{ number_format($video->user->subscriber_count ?? 0) }} subscribers -
- @endif -
-
- {!! Str::markdown($fullDescription) !!} -
-
-
-
- - - @endif - - -
-

- Comments ({{ isset($video) ? $video->comment_count ?? 0 : 0 }}) -

- @auth -
- {{ Auth::user()->name }} -
- - - -
-
- @else -
- Sign in to comment -
- @endauth -
- @if (isset($video)) - @forelse($video->comments()->whereNull('parent_id')->with('user', 'replies.user')->latest()->get() as $comment) - @include('videos.partials.comment', ['comment' => $comment]) - @empty -

No comments yet. Be - the first to comment!

- @endforelse - @endif -
-
- - -
- - -
- - - -
- @if ($playlist && $playlistVideos && $playlistVideos->count() > 0) -

- - {{ $playlist->name }} - ({{ $playlistVideos->count() }} - videos) -

- - @if ($playlist->canEdit(Auth::user())) - - Edit Playlist - - @endif - @else -

Up Next

- @if ($recommendedVideos && $recommendedVideos->count() > 0) - - @else -
No recommendations available yet. Check back later!
- @endif - @endif -
- -
-
- - - @include('layouts.partials.share-modal') - @include('layouts.partials.edit-video-modal') - - -
-
-
-

Add New Round

- -
-
-
-
- - -
-
- - -
-
-
- - - Video will seek to this time when badge - clicked -
-
- - -
-
-
-
- - -
-
-
-

Add Point

- -
-
- - -
-
- - -
-
- - -
-
-
- - -
-
-
- - -
-
- - -
-
-
- - -
-
- - - -
-
-
-
- - -
-
-
-

✏️ Edit Round

- -
-
- -
- - -
-
- - -
-
- - - Video will seek to this time when badge - clicked -
-
- -
- - -
-
-
-
- - -
- -
- - @if (Session::has('openEditModal') && Session::get('openEditModal')) - @auth - - @endauth - @endif - - - @endsection diff --git a/resources/views/videos/types/match.blade.pre_coach_review_backup.php b/resources/views/videos/types/match.blade.pre_coach_review_backup.php deleted file mode 100644 index 40f5347..0000000 --- a/resources/views/videos/types/match.blade.pre_coach_review_backup.php +++ /dev/null @@ -1,3682 +0,0 @@ -@extends('layouts.app') -@section('title', ($video->title ?? 'Match Video') . ' | ' . config('app.name')) - -@section('extra_styles') - -@endsection - -@section('content') - @php - // ===== DUMMY DATA FALLBACKS ===== - $blueFighter = - $blueFighter ?? - (object) [ - 'name' => 'Sami Al Manea', - 'flag' => '🇧🇭', - 'photo' => 'https://takeone-dev.innovator.bh/storage/images/profiles/profile_5.png?v=1773157950', - 'team' => 'Emperor TaeKwonDo Academy', - 'country' => 'Bahrain', - 'logo' => 'https://takeone-dev.innovator.bh/storage/clubs/1/branding/logo_1771488666.png', - 'member_id' => 5, - 'club_url' => 'https://takeone-dev.innovator.bh/mobile/eta', - ]; - $redFighter = - $redFighter ?? - (object) [ - 'name' => 'Hassan Al Shallan', - 'flag' => '🇧🇭', - 'photo' => 'https://takeone-dev.innovator.bh/storage/images/profiles/profile_11.png?t=1773268056907', - 'team' => 'Legend TaeKwonDo Academy', - 'country' => 'Bahrain', - 'logo' => 'https://takeone-dev.innovator.bh/storage/clubs/logos/logo_1773267551.png', - 'member_id' => 11, - 'club_url' => 'https://takeone-dev.innovator.bh/clubs/legend-taekwondo-academy', - ]; - $match = - $match ?? - (object) [ - 'number' => '103', - 'court' => '2', - 'weight_category' => 'U18', - 'score_blue' => 7, - 'score_red' => 5, - 'features' => - 'Electronic scoring system (PSS & head‑gear) • Video replay available for head kicks and gam-jeom appeals', - ]; - $referee = - $referee ?? - (object) [ - 'name' => 'Ghassan Yusuf', - 'flag' => '🇧🇭', - 'photo' => 'https://takeone-dev.innovator.bh/storage/images/profiles/profile_8.png?t=1773267305519', - 'member_id' => 4, - ]; - $championship = - $championship ?? - (object) [ - 'name' => 'Championship 2026', - 'url' => '/championship/2026', - ]; - $venue = - $venue ?? - (object) [ - 'name' => 'Manama Sports Hall', - 'map_link' => 'https://maps.google.com/?q=Manama+Sports+Hall+Bahrain', - ]; - @endphp - - -
- -
- -
- - - - - - - @if (isset($nextVideo) || isset($previousVideo)) -
- @if (isset($previousVideo)) - - {{ Str::limit($previousVideo->title ?? 'Previous', 20) }} - @else - - @endif - -
- - -
- - @if (isset($nextVideo)) - {{ Str::limit($nextVideo->title ?? 'Next', 20) }} - - @else - - @endif -
-
- -
- @endif -
- - -
- - -
- - @auth - @if (Auth::id() === $video->user_id) - - @endif - @endif - @auth - @if (isset($video)) -
- @csrf - -
- @endif - @else - - - Like - - @endauth - - - @auth - @if (isset($video) && $video->user && Auth::id() !== $video->user_id) - - @endif - @else - - - Subscribe - - @endauth - - - @if (isset($video) && $video->isShareable()) - - @endif - - - - -
-
- - - - @if (isset($video) && $video->description) - @php - $fullDescription = $video->description; - $shortDescription = Str::limit($fullDescription, 200); - $needsExpand = strlen($fullDescription) > 200; - @endphp - -
- - -
- -
-
-
Final • Male -63kg division
-
- -
- - - - -
-
- {{ $match->score_blue ?? 7 }} - Final score - {{ $match->score_red ?? 5 }} -
- -
- - - -
- - -
- - -
-
-

Match Overview

- @if (isset($video) && $video->user) -
- {{ $video->user->name }} - {{ $video->user->name }} - • {{ number_format($video->user->subscriber_count ?? 0) }} subscribers -
- @endif -
-
- {!! Str::markdown($fullDescription) !!} -
-
-
-
- - - @endif - - -
-

- Comments ({{ isset($video) ? $video->comment_count ?? 0 : 0 }}) -

- @auth -
- {{ Auth::user()->name }} -
- - - -
-
- @else -
- Sign in to comment -
- @endauth -
- @if (isset($video)) - @forelse($video->comments()->whereNull('parent_id')->with('user', 'replies.user')->latest()->get() as $comment) - @include('videos.partials.comment', ['comment' => $comment]) - @empty -

No comments yet. Be - the first to comment!

- @endforelse - @endif -
-
- - -
- - -
- - - -
- @if ($playlist && $playlistVideos && $playlistVideos->count() > 0) -

- - {{ $playlist->name }} - ({{ $playlistVideos->count() }} - videos) -

- - @if ($playlist->canEdit(Auth::user())) - - Edit Playlist - - @endif - @else -

Up Next

- @if ($recommendedVideos && $recommendedVideos->count() > 0) - - @else -
No recommendations available yet. Check back later!
- @endif - @endif -
- -
-
- - - @include('layouts.partials.share-modal') - @include('layouts.partials.edit-video-modal') - - -
-
-
-

Add New Round

- -
-
-
-
- - -
-
- - -
-
-
- - -
-
- - -
-
-
-
- - -
-
-
-

Add Point

- -
-
- - -
-
- - -
-
- - -
-
-
- - -
-
-
- - -
-
- - -
-
-
- - -
-
- - - -
-
-
-
- - -
-
-
-

✏️ Edit Round

- -
-
- -
- - -
-
- - -
-
- - -
-
- - - -
-
-
-
- - -
- -
- - @if (Session::has('openEditModal') && Session::get('openEditModal')) - @auth - - @endauth - @endif - - - @endsection diff --git a/resources/views/videos/types/music.blade.php b/resources/views/videos/types/music.blade.php index d3688b4..e23ce88 100644 --- a/resources/views/videos/types/music.blade.php +++ b/resources/views/videos/types/music.blade.php @@ -210,13 +210,81 @@ color: var(--text-secondary); } + .video-actions { + display: flex; + align-items: center; + gap: 8px; + } + + .yt-action-btn { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 16px; + border-radius: 20px; + border: none; + background: var(--bg-secondary); + color: var(--text-primary); + cursor: pointer; + font-size: 14px; + font-weight: 500; + } + + .yt-action-btn:hover { + background: var(--border-color); + } + + .action-btn, + .comments-section .action-btn { + border: none; + border-radius: 8px; + padding: 8px 14px; + font-size: 0.82rem; + font-weight: 500; + cursor: pointer; + background: var(--bg-secondary); + border: 1px solid var(--border-color); + color: var(--text-primary); + display: flex; + align-items: center; + gap: 6px; + transition: all 0.2s ease; + } + + .action-btn:hover, + .comments-section .action-btn:hover { + background: var(--border-color); + transform: translateY(-1px); + } + + .action-btn:active, + .comments-section .action-btn:active { + transform: translateY(0); + } + + .action-btn svg, + .action-btn i, + .comments-section .action-btn svg, + .comments-section .action-btn i { + flex-shrink: 0; + } + + .action-btn.comment-btn { + background: var(--brand-red); + color: white; + border-color: var(--brand-red); + } + + .yt-action-btn.liked { + color: var(--brand-red); + } + /* Channel Row */ .channel-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; - overflow: visible; } .channel-info { @@ -242,6 +310,18 @@ color: var(--text-secondary); } + .subscribe-btn { + background: white; + color: black; + border: none; + padding: 8px 16px; + border-radius: 18px; + font-weight: 600; + font-size: 14px; + cursor: pointer; + white-space: nowrap; + } + /* Description */ .video-description { background: var(--bg-secondary); @@ -352,16 +432,8 @@ .video-actions { width: 100%; - justify-content: flex-end; - } - - .video-actions>.desktop-action { - display: none !important; - } - - .mobile-action-dropdown { - display: block; - margin-left: auto; + overflow-x: auto; + justify-content: flex-start; } .yt-main { @@ -474,7 +546,76 @@
- + +
+
+ + @if ($video->user) + {{ $video->user->name }} + @else +
+ @endif +
+
{{ $video->user->name ?? 'Unknown' }}
+
+ {{ number_format($video->user->subscriber_count ?? 0) }} subscribers
+
+
+
+ +
+ @auth + @if (Auth::id() !== $video->user_id) + + @else + + @endif + @else + + @endauth + + @auth +
+ @csrf + +
+ @else + + Like + + @endauth + + @if ($video->isShareable()) + + @endif + + + + + +
+
@if ($video->description) @@ -546,45 +687,84 @@ @endif - + +
+

+ Comments ({{ $video->comment_count }}) +

+ @auth +
+ {{ Auth::user()->name }} +
+ + + +
+
+ @else +
+ Sign in to comment +
+ @endauth +
+ @forelse($video->comments()->whereNull('parent_id')->with('user', 'replies.user')->latest()->get() as $comment) + @include('videos.partials.comment', ['comment' => $comment]) + @empty +

No comments yet. Be the + first to comment!

+ @endforelse +
+
-
+ + - document.addEventListener('DOMContentLoaded', function() { - const commentTexts = document.querySelectorAll('.comment-body'); - commentTexts.forEach(text => { - const html = text.innerHTML.replace(/@(\w+)/g, - '@$1'); - text.innerHTML = html; - }); - }); - - function submitReply(videoId, parentId) { - const textarea = document.querySelector(`#replyForm${parentId} textarea`); - const body = textarea.value.trim(); - if (!body) return; - - fetch(`/videos/${videoId}/comments`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'X-CSRF-TOKEN': '{{ csrf_token() }}' - }, - body: JSON.stringify({ - body: body, - parent_id: parentId - }) - }) - .then(response => response.json()) - .then(data => { - if (data.success) { - location.reload(); - } - }); - } - - - - -
- @if ($playlist && $playlistVideos && $playlistVideos->count() > 0) -

- - {{ $playlist->name }} - ({{ $playlistVideos->count() }} - videos) -

- - @if ($playlist->canEdit(Auth::user())) - - Edit Playlist - - @endif - @else -

Up Next

- @if ($recommendedVideos && $recommendedVideos->count() > 0) + +
+ @if ($playlist && $playlistVideos && $playlistVideos->count() > 0) +

+ + {{ $playlist->name }} + ({{ $playlistVideos->count() }} + videos) +

diff --git a/resources/views/videos/types/music.blade.php-script-append b/resources/views/videos/types/music.blade.php-script-append deleted file mode 100644 index bdc43ae..0000000 --- a/resources/views/videos/types/music.blade.php-script-append +++ /dev/null @@ -1,45 +0,0 @@ -