mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-20 20:42:04 +00:00
fix: indent epispdelist
This commit is contained in:
parent
4486212fa9
commit
5330207f12
2 changed files with 44 additions and 42 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "6.3.52",
|
||||
"version": "6.3.53",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.14.4",
|
||||
|
|
|
|||
|
|
@ -78,56 +78,58 @@
|
|||
|
||||
<Pagination count={episodeCount} {perPage} bind:currentPage let:pages let:hasNext let:hasPrev let:range let:setPage siblingCount={1}>
|
||||
<div class='overflow-y-auto pt-3 -mx-14 px-14 pointer-events-none -mb-3 pb-3' use:dragScroll>
|
||||
<div class='grid grid-cols-1 sm:grid-cols-[repeat(auto-fit,minmax(500px,1fr))] place-items-center gap-x-10 gap-y-7 justify-center align-middle pointer-events-auto'>
|
||||
<div class='grid grid-cols-1 sm:grid-cols-[repeat(auto-fit,minmax(500px,1fr))] place-items-center gap-x-4 gap-y-7 justify-center align-middle pointer-events-auto'>
|
||||
{#each getPage(currentPage, episodeList) as { episode, image, title, summary, airingAt, airdate, filler, length } (episode)}
|
||||
{@const watched = _progress >= episode}
|
||||
{@const target = _progress + 1 === episode}
|
||||
<div use:click={() => play(episode)}
|
||||
class={cn(
|
||||
'select:scale-[1.05] select:shadow-lg scale-100 transition-[transform,box-shadow] duration-200 shrink-0 ease-out focus-visible:ring-ring focus-visible:ring-1 rounded-md bg-neutral-950 text-secondary-foreground select:bg-neutral-900 flex w-full max-h-28 cursor-pointer relative overflow-hidden group',
|
||||
target && 'ring-ring ring-1',
|
||||
filler && '!ring-yellow-400 ring-1'
|
||||
)}>
|
||||
{#if image}
|
||||
<div class='w-52 shrink-0 relative'>
|
||||
<Load src={image} class={cn('object-cover h-full w-full', watched && 'opacity-20')} />
|
||||
{#if length ?? media.duration}
|
||||
<div class='absolute bottom-1 left-1 bg-neutral-900/80 text-secondary-foreground text-[9.6px] px-1 py-0.5 rounded'>
|
||||
{length ?? media.duration}m
|
||||
<div class={!target ? 'px-3' : 'contents'}>
|
||||
<div use:click={() => play(episode)}
|
||||
class={cn(
|
||||
'select:scale-[1.05] select:shadow-lg scale-100 transition-[transform,box-shadow] duration-200 shrink-0 ease-out focus-visible:ring-ring focus-visible:ring-1 rounded-md bg-neutral-950 text-secondary-foreground select:bg-neutral-900 flex w-full max-h-28 cursor-pointer relative overflow-hidden group',
|
||||
target && 'ring-ring ring-1',
|
||||
filler && '!ring-yellow-400 ring-1'
|
||||
)}>
|
||||
{#if image}
|
||||
<div class='w-52 shrink-0 relative'>
|
||||
<Load src={image} class={cn('object-cover h-full w-full', watched && 'opacity-20')} />
|
||||
{#if length ?? media.duration}
|
||||
<div class='absolute bottom-1 left-1 bg-neutral-900/80 text-secondary-foreground text-[9.6px] px-1 py-0.5 rounded'>
|
||||
{length ?? media.duration}m
|
||||
</div>
|
||||
{/if}
|
||||
<div class='absolute flex items-center justify-center w-full h-full bg-black group-select:bg-opacity-50 bg-opacity-0 duration-200 text-white transition-[background] ease-out top-0'>
|
||||
<Play class='size-6 scale-75 opacity-0 group-select:opacity-100 group-select:scale-100 duration-200 transition-[transform,opacity] ease-out' fill='currentColor' />
|
||||
</div>
|
||||
{/if}
|
||||
<div class='absolute flex items-center justify-center w-full h-full bg-black group-select:bg-opacity-50 bg-opacity-0 duration-200 text-white transition-[background] ease-out top-0'>
|
||||
<Play class='size-6 scale-75 opacity-0 group-select:opacity-100 group-select:scale-100 duration-200 transition-[transform,opacity] ease-out' fill='currentColor' />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class='flex-grow py-3 px-4 flex flex-col'>
|
||||
<div class='font-bold mb-2 line-clamp-1 shrink-0 text-[12.8px]'>
|
||||
{episode}. {title?.en ?? 'Episode ' + episode}
|
||||
</div>
|
||||
{#if watched || completed}
|
||||
<div class='mb-2 h-0.5 overflow-hidden w-full bg-blue-600 shrink-0' />
|
||||
{/if}
|
||||
<div class='text-[9.6px] text-muted-foreground overflow-hidden'>
|
||||
{notes(summary ?? '')}
|
||||
</div>
|
||||
<div class='flex w-full justify-between mt-auto'>
|
||||
{#if airingAt ?? airdate}
|
||||
<div class='text-[9.6px] pt-2'>
|
||||
{since(new Date(airingAt ?? airdate ?? 0))}
|
||||
<div class='flex-grow py-3 px-4 flex flex-col'>
|
||||
<div class='font-bold mb-2 line-clamp-1 shrink-0 text-[12.8px]'>
|
||||
{episode}. {title?.en ?? 'Episode ' + episode}
|
||||
</div>
|
||||
{#if watched || completed}
|
||||
<div class='mb-2 h-0.5 overflow-hidden w-full bg-blue-600 shrink-0' />
|
||||
{/if}
|
||||
<div class='text-[9.6px] text-muted-foreground overflow-hidden'>
|
||||
{notes(summary ?? '')}
|
||||
</div>
|
||||
<div class='flex w-full justify-between mt-auto'>
|
||||
{#if airingAt ?? airdate}
|
||||
<div class='text-[9.6px] pt-2'>
|
||||
{since(new Date(airingAt ?? airdate ?? 0))}
|
||||
</div>
|
||||
{/if}
|
||||
<div class='-space-x-1 ml-auto inline-flex pt-1 pr-0.5'>
|
||||
{#each followerEntries.filter(e => e?.progress === episode) as followerEntry, i (followerEntry?.user?.id ?? i)}
|
||||
{#if followerEntry?.user}
|
||||
<Profile user={followerEntry.user} class='ring-2 ring-neutral-950 size-4 bg-neutral-950' />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
<div class='-space-x-1 ml-auto inline-flex pt-1 pr-0.5'>
|
||||
{#each followerEntries.filter(e => e?.progress === episode) as followerEntry, i (followerEntry?.user?.id ?? i)}
|
||||
{#if followerEntry?.user}
|
||||
<Profile user={followerEntry.user} class='ring-2 ring-neutral-950 size-4 bg-neutral-950' />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
{#if filler}
|
||||
<div class='rounded-tl bg-yellow-400 py-1 px-2 text-primary-foreground absolute bottom-0 right-0 text-[9.6px] font-bold'>Filler</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if filler}
|
||||
<div class='rounded-tl bg-yellow-400 py-1 px-2 text-primary-foreground absolute bottom-0 right-0 text-[9.6px] font-bold'>Filler</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
|
|
|
|||
Loading…
Reference in a new issue