Files
lubo_comment_query/resources/views/program/construct/video/index.blade.php
2025-12-09 12:50:21 +08:00

95 lines
7.3 KiB
PHP

<html lang="zh">
<head>
<meta charset="UTF-8">
<title>关联视频管理 - 录播查询</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
</head>
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-100">
@include("common.header")
<main class="flex-grow container mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="max-w-7xl mx-auto">
<div class="flex flex-col md:flex-row md:items-center md:justify-between mb-8 space-y-4 md:space-y-0">
<div>
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">关联视频管理</h1>
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400">
当前节目:{{ $program->name }}
</p>
</div>
<div class="flex space-x-3">
<a href="{{ route("program.construct.edit", ["program"=>$program->id]) }}" class="inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
<svg class="h-4 w-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 17l-5-5m0 0l5-5m-5 5h12"></path></svg>
返回节目
</a>
<a href="{{ route("program.construct.video.add", ["program"=>$program->id]) }}" class="inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
<svg class="h-4 w-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>
添加关联视频
</a>
</div>
</div>
<div class="bg-white dark:bg-gray-800 shadow overflow-hidden rounded-lg">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">BVID</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">开始时间</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">开始画面</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">结束画面</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">操作</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
@foreach($videos as $video_pivot)
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a class="text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300 flex items-center"
target="_blank"
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->start_part}}&t={{$video_pivot->start_sec}}"
title="P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}">
{{$video_pivot->video_bvid}}
<svg class="h-4 w-4 ml-1 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
{{$video_pivot->created_at}}
</td>
<td class="px-6 py-4 align-top text-sm">
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->start_part" :time="$video_pivot->start_time">
<div class="text-xs text-gray-500 mb-1">P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div>
@if($video_pivot->start_image)
<img loading="lazy" class="h-20 w-32 object-cover rounded border border-gray-200 dark:border-gray-600" src="{{$video_pivot->start_image}}" alt="Start">
@else
<span class="text-xs text-gray-400 italic">无预览</span>
@endif
</x-links.video_link>
</td>
<td class="px-6 py-4 align-top text-sm">
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->stop_part" :time="$video_pivot->stop_time">
<div class="text-xs text-gray-500 mb-1">P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div>
@if($video_pivot->start_image)
<img loading="lazy" class="h-20 w-32 object-cover rounded border border-gray-200 dark:border-gray-600" src="{{$video_pivot->stop_image}}" alt="End">
@else
<span class="text-xs text-gray-400 italic">无预览</span>
@endif
</x-links.video_link>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a class="text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300"
href="{{route("program.construct.video.edit", ["program_video" => $video_pivot->id])}}">
编辑
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</main>
@include("common.footer")
</body>
</html>