extend('_layout') ?> section('title') ?> endSection() ?> section('pageTitle') ?> endSection() ?> section('headerRight') ?> endSection() ?> section('content') ?> lang('VideoClip.list.status.label'), 'cell' => function ($videoClip): string { $pillVariantMap = [ 'queued' => 'default', 'pending' => 'warning', 'running' => 'primary', 'canceled' => 'default', 'failed' => 'danger', 'passed' => 'success', ]; $pillIconMap = [ 'queued' => 'timer', 'pending' => 'pause', 'running' => 'loader', 'canceled' => 'forbid', 'failed' => 'close', 'passed' => 'check', ]; $pillIconClassMap = [ 'queued' => '', 'pending' => '', 'running' => 'animate-spin', 'canceled' => '', 'failed' => '', 'passed' => '', ]; return '' . lang('VideoClip.list.status.' . $videoClip->status) . ''; }, ], [ 'header' => lang('VideoClip.list.clip'), 'cell' => function ($videoClip): string { $formatClass = [ 'landscape' => 'aspect-video', 'portrait' => 'aspect-[9/16]', 'squared' => 'aspect-square', ]; return '
#' . $videoClip->id . ' – ' . esc($videoClip->title) . 'by ' . esc($videoClip->user->username) . '
' . format_duration((int) $videoClip->duration) . '
'; }, ], [ 'header' => lang('VideoClip.list.duration'), 'cell' => function (VideoClip $videoClip): string { $duration = ''; if ($videoClip->job_started_at !== null) { if ($videoClip->job_ended_at !== null) { $duration = '
' . '
' . format_duration((int) $videoClip->job_duration, true) . '
' . '
' . relative_time($videoClip->job_ended_at) . '
' . '
'; } else { $duration = '
' . format_duration(($videoClip->job_started_at->difference(Time::now()))->getSeconds(), true) . '
'; } } return $duration; }, ], [ 'header' => lang('Common.actions'), 'cell' => function ($videoClip): string { $downloadButton = ''; if ($videoClip->media) { helper('misc'); $filename = 'clip-' . slugify($videoClip->title) . "-{$videoClip->start_time}-{$videoClip->end_time}"; $downloadButton = '' . lang('VideoClip.download_clip') . ''; } return '
' . $downloadButton . '' . '' . '
'; }, ], ], $videoClips, 'mb-6' ) ?> links() ?> endSection() ?>