73 lines
3.9 KiB
Twig
73 lines
3.9 KiB
Twig
<div class="p-6 flex flex-col gap-6 bg-orange-500 bg-clip-padding backdrop-filter backdrop-blur-md bg-opacity-60 rounded-md">
|
|
<div class="flex flex-row gap-4">
|
|
{% if results.media.poster != null %}
|
|
<img class="w-64 rounded-lg" src="{{ results.media.poster }}" />
|
|
{% else %}
|
|
<div class="w-64 h-[144px] rounded-lg bg-gray-700 flex items-center justify-center">
|
|
<twig:ux:icon width="32" name="hugeicons:loading-01" />
|
|
</div>
|
|
{% endif %}
|
|
<div class="flex flex-col gap-4 grow">
|
|
<h4 class="text-md font-bold">
|
|
{{ results.episode }}. {{ results.media.title }}
|
|
</h4>
|
|
<p>{{ results.media.description }}</p>
|
|
<div>
|
|
<button class="py-1 px-1.5 mr-1 grow-0 font-bold text-xs bg-green-600 rounded-lg hover:cursor-pointer hover:bg-green-700 text-white"
|
|
{{ stimulus_action('tv-results', 'toggleList', 'click') }}
|
|
>
|
|
<span {{ stimulus_target('tv-results', 'count') }}>{{ results.results|length }}</span> results
|
|
</button>
|
|
|
|
{% if results.file != false %}
|
|
<span data-controller="popover">
|
|
<template data-popover-target="content">
|
|
<div data-popover-target="card" class="absolute z-40 p-1 bg-stone-400 p-1 text-black rounded-md m-1 animate-fade">
|
|
<p class="font-bold text-sm text-left">Existing file(s) for this episode:</p>
|
|
<ul class="list-disc ml-3">
|
|
<li class="font-normal">{{ results.file.realPath|strip_media_path }} — <strong>{{ results.file.size|filesize }}</strong></li>
|
|
</ul>
|
|
</div>
|
|
</template>
|
|
<small
|
|
class="py-1 px-1.5 mr-1 grow-0 font-bold bg-blue-600 rounded-lg text-center text-white"
|
|
data-action="mouseenter->popover#show mouseleave->popover#hide"
|
|
>
|
|
exists
|
|
</small>
|
|
</span>
|
|
{% endif %}
|
|
|
|
{% if results.file == false %}
|
|
<small class="py-1 px-1.5 mr-1 grow-0 font-bold bg-rose-600 rounded-lg text-white" title="Episode has not been downloaded yet.">
|
|
missing
|
|
</small>
|
|
{% endif %}
|
|
|
|
<small class="py-1 px-1.5 mr-1 grow-0 font-bold bg-gray-700 rounded-lg font-normal text-white" title="Air date {{ results.media.episodeAirDate }}">
|
|
{{ results.media.episodeAirDate }}
|
|
</small>
|
|
{# <small class="py-1 px-1.5 grow-0 font-bold bg-red-600 hover:bg-red-700 rounded-lg font-normal text-white cursor-pointer" title="Clear cache for {{ results.media.title }}"#}
|
|
{# {{ stimulus_action('tv-results', 'clearCache', 'click') }}#}
|
|
{# >Clear Cache</small>#}
|
|
</div>
|
|
</div>
|
|
<div class="flex flex-col gap-4 justify-between">
|
|
<div class="flex flex-col items-center">
|
|
<input type="checkbox"
|
|
{{ stimulus_target('tv-results', 'episodeSelector') }}
|
|
/>
|
|
</div>
|
|
<button class="flex flex-col items-end"
|
|
{{ stimulus_action('tv-results', 'toggleList', 'click') }}>
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 32 32">
|
|
<path fill="currentColor" d="m16 10l10 10l-1.4 1.4l-8.6-8.6l-8.6 8.6L6 20z"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="inline-block overflow-hidden rounded-lg">
|
|
{{ include('torrentio/partial/option-table.html.twig', {controller: 'tv-results'}) }}
|
|
</div>
|
|
</div>
|