78 lines
3.7 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>
@include("common.header")
<div>
<h3 class="text-2xl font-bold">
<a class="text-blue-600" href="https://www.bilibili.com/video/{{$video->bvid}}">{{$video->title}}</a>
</h3>
</div>
<table class="table-auto border-collapse w-full lg:border lg:border-black">
<thead>
<tr class="border border-black sticky bg-white lg:static top-0 left-0 right-0">
<th class="border border-black">节目名称</th>
<th class="border border-black">点播及追加</th>
<th class="border border-black hidden lg:table-cell">节目开始</th>
<th class="border border-black hidden lg:table-cell">节目结束</th>
</tr>
</thead>
<tbody>
@foreach($video_pivots as $video_pivot)
<tr>
<td class="border align-top w-1/2 lg:w-1/4">
@auth("web")
<a href="{{route("program.construct.edit", ["program"=>$video_pivot->program->id])}}">编辑</a>
@endauth
<div class="block lg:hidden">{{$video_pivot->created_at}}</div>
<a class="text-blue-600 lg:text-current underline lg:no-underline" href="/programs/{{ $video_pivot->program->id }}/video">
<span title="节目">{{$video_pivot->program->name}}</span>
<span title="难度">{{$video_pivot->program->difficulty}}</span>
<span title="要求">{{$video_pivot->program->desc}}</span>
</a>
</td>
<td class="border align-top w-1/2 lg:w-1/4">
@foreach($video_pivot->program->appends as $append)
<x-append :append="$append"></x-append>
@endforeach
</td>
<td class="border align-top hidden lg:table-cell lg:w-1/4">
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->start_part" :time="$video_pivot->start_time">
<div>{{$video_pivot->created_at}} P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div>
@if($video_pivot->start_image)
<img loading="lazy" width="300" src="{{$video_pivot->start_image}}" alt="开始时的画面">
@else
节目开始位置
@endif
</x-links.video_link>
</td>
<td class="border align-top hidden lg:table-cell lg:w-1/4">
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->stop_part" :time="$video_pivot->stop_time">
<div>P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div>
@if($video_pivot->start_image)
<img loading="lazy" width="300" src="{{$video_pivot->stop_image}}" alt="结束时的画面">
@else
节目结束位置
@endif
</x-links.video_link>
</td>
</tr>
@endforeach
</tbody>
</table>
@auth("web")
@if(sizeof($video_pivots) === 0 && $comment)
<a href="{{ url(route("program.construct.from_comment", ["comment"=>$comment->id])) }}" class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white">一键导入评论中的节目单</a>
@endif
@if($video->danmakus->count() === 0)
<a href="{{ url(route("danmaku.construct.batch_import", ["video_bvid"=>$video->bvid])) }}" class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white">导入直播弹幕</a>
@endif
@endauth
@include("common.footer")
</body>
</html>