mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 13:01:19 +00:00

- enhance plugin card ui - refactor components to be more consistent - invert toggler label for better UX - edit view components regex
49 lines
2.4 KiB
PHP
49 lines
2.4 KiB
PHP
<?= helper('components') ?>
|
|
<?= $this->extend('_layout') ?>
|
|
|
|
<?= $this->section('title') ?>
|
|
<?= lang('Dashboard.home') ?>
|
|
<?= $this->endSection() ?>
|
|
|
|
<?= $this->section('pageTitle') ?>
|
|
<?= lang('Dashboard.home') ?>
|
|
<?= $this->endSection() ?>
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
<div class="flex flex-col items-stretch gap-4 lg:flex-row">
|
|
<?php // @icon('mic-fill')?>
|
|
<x-DashboardCard href="<?= $onlyPodcastId === null ? route_to('podcast-list') : route_to('podcast-view', $onlyPodcastId) ?>" glyph="mic-fill" title="<?= lang('Dashboard.podcasts.title') ?>" subtitle="<?= $podcastsData['last_published_at'] ? esc(lang('Dashboard.podcasts.last_published', [
|
|
'lastPublicationDate' => local_date($podcastsData['last_published_at']),
|
|
], null, false)) : lang('Dashboard.podcasts.not_found') ?>"><?= $podcastsData['number_of_podcasts'] ?></x-DashboardCard>
|
|
<?php // @icon('play-fill')?>
|
|
<x-DashboardCard href="<?= $onlyPodcastId === null ? '' : route_to('episode-list', $onlyPodcastId) ?>" glyph="play-fill" title="<?= lang('Dashboard.episodes.title') ?>" subtitle="<?= $episodesData['last_published_at'] ? esc(lang('Dashboard.episodes.last_published', [
|
|
'lastPublicationDate' => local_date($episodesData['last_published_at']),
|
|
], null, false)) : lang('Dashboard.episodes.not_found') ?>"><?= $episodesData['number_of_episodes'] ?></x-DashboardCard>
|
|
<?php // @icon('database-2-fill')?>
|
|
<x-DashboardCard glyph="database-2-fill" title="<?= lang('Dashboard.storage.title') ?>" subtitle="<?= lang('Dashboard.storage.subtitle', [
|
|
'totalUploaded' => $storageData['total_uploaded'],
|
|
'totalStorage' => $storageData['limit'],
|
|
]) ?>"><?= $storageData['percentage'] ?>%</x-DashboardCard>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 gap-4 mt-4 lg:grid-cols-2">
|
|
<x-Charts.XY class="col-span-1" title="<?= lang('Charts.total_storage_by_month') ?>" dataUrl="<?= route_to(
|
|
'analytics-data-instance',
|
|
'Podcast',
|
|
'TotalStorageByMonth',
|
|
) ?>" />
|
|
<x-Charts.XY class="col-span-1" title="<?= lang('Charts.total_bandwidth_by_month') ?>" subtitle="<?= $bandwidthLimit !== null ? lang('Charts.total_bandwidth_by_month_limit', [
|
|
'totalBandwidth' => $bandwidthLimit,
|
|
]) : '' ?>" dataUrl="<?= route_to(
|
|
'analytics-data-instance',
|
|
'Podcast',
|
|
'TotalBandwidthByMonth',
|
|
) ?>" />
|
|
</div>
|
|
|
|
|
|
<?= service('vite')
|
|
->asset('js/charts.ts', 'js') ?>
|
|
<?= $this->endsection() ?>
|