mirror of
https://github.com/WonderAliceUwU/OmniArr.git
synced 2026-11-19 19:35:56 +00:00
feat: refine downloads and mobile calendar
This commit is contained in:
1 parent
1cb4b53b78
commit
9d11535ae4
5 files changed
+653
-40
No files matched your search
+2
-2
@@ -398,8 +398,8 @@ async function routeRequest(request: IncomingMessage, response: ServerResponse):
|
||||
|
||||
if (url.pathname === '/api/requests/series' && method === 'POST') {
|
||||
const config = await readConfig(session!.encryptionKey);
|
||||
const body = await readJson<{ tmdbId: number; user: string | null; qualityProfileId?: number }>(request);
|
||||
await requestSeries(config, Number(body.tmdbId), body.user, Number(body.qualityProfileId) || undefined);
|
||||
const body = await readJson<{ tmdbId: number; user: string | null; qualityProfileId?: number; seasonNumber?: number }>(request);
|
||||
await requestSeries(config, Number(body.tmdbId), body.user, Number(body.qualityProfileId) || undefined, Number(body.seasonNumber) || undefined);
|
||||
sendJson(response, 200, { ok: true });
|
||||
return;
|
||||
}
|
||||
|
||||
+57
-6
@@ -299,6 +299,7 @@ interface SonarrSeriesRecord {
|
||||
title?: string;
|
||||
tmdbId?: number;
|
||||
tvdbId?: number;
|
||||
images?: Array<{ coverType?: string; remoteUrl?: string; url?: string }>;
|
||||
seasons?: Array<{
|
||||
seasonNumber?: number;
|
||||
monitored?: boolean;
|
||||
@@ -2653,7 +2654,13 @@ export async function requestMovie(config: AppConfig, tmdbId: number, user: stri
|
||||
});
|
||||
}
|
||||
|
||||
export async function requestSeries(config: AppConfig, tmdbId: number, user: string | null, qualityProfileId?: number): Promise<void> {
|
||||
export async function requestSeries(
|
||||
config: AppConfig,
|
||||
tmdbId: number,
|
||||
user: string | null,
|
||||
qualityProfileId?: number,
|
||||
seasonNumber?: number
|
||||
): Promise<void> {
|
||||
if (!config.sonarr.baseUrl || !config.sonarr.apiKey) {
|
||||
throw new Error('Sonarr is not configured.');
|
||||
}
|
||||
@@ -2675,13 +2682,16 @@ export async function requestSeries(config: AppConfig, tmdbId: number, user: str
|
||||
addProcessingItem({
|
||||
source: 'sonarr',
|
||||
title: String(details.name || details.original_name || 'Series'),
|
||||
subtitle: 'All seasons',
|
||||
subtitle: typeof seasonNumber === 'number' ? `Season ${seasonNumber}` : 'All seasons',
|
||||
tmdbId,
|
||||
posterUrl: typeof details.poster_path === 'string' && details.poster_path
|
||||
? `${TMDB_IMAGE}/w342${details.poster_path}`
|
||||
: undefined,
|
||||
mediaType: 'series',
|
||||
user: user || 'Unknown',
|
||||
});
|
||||
|
||||
await fetchJson(`${config.sonarr.baseUrl}/api/v3/series`, {
|
||||
const series = await fetchJson<SonarrSeriesRecord>(`${config.sonarr.baseUrl}/api/v3/series`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-Api-Key': config.sonarr.apiKey,
|
||||
@@ -2696,13 +2706,53 @@ export async function requestSeries(config: AppConfig, tmdbId: number, user: str
|
||||
seasonFolder: true,
|
||||
monitored: config.sonarr.monitor !== 'none',
|
||||
addOptions: {
|
||||
monitor: config.sonarr.monitor,
|
||||
searchForMissingEpisodes: true,
|
||||
searchForCutoffUnmetEpisodes: true
|
||||
monitor: typeof seasonNumber === 'number' ? 'none' : config.sonarr.monitor,
|
||||
searchForMissingEpisodes: typeof seasonNumber !== 'number',
|
||||
searchForCutoffUnmetEpisodes: typeof seasonNumber !== 'number'
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
if (typeof seasonNumber !== 'number') {
|
||||
return
|
||||
}
|
||||
|
||||
if (!series?.id) {
|
||||
throw new Error('Sonarr did not return the added series.')
|
||||
}
|
||||
|
||||
const seasons = (series.seasons || []).map((season) =>
|
||||
season.seasonNumber === seasonNumber
|
||||
? { ...season, monitored: true }
|
||||
: { ...season, monitored: false }
|
||||
)
|
||||
if (!seasons.some((season) => season.seasonNumber === seasonNumber)) {
|
||||
throw new Error(`Season ${seasonNumber} was not found in Sonarr.`)
|
||||
}
|
||||
|
||||
await fetchJson(`${config.sonarr.baseUrl}/api/v3/series/${encodeURIComponent(String(series.id))}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'X-Api-Key': config.sonarr.apiKey,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ ...series, seasons })
|
||||
})
|
||||
|
||||
await fetchJson(`${config.sonarr.baseUrl}/api/v3/command`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-Api-Key': config.sonarr.apiKey,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name: 'SeasonSearch',
|
||||
seriesId: series.id,
|
||||
seasonNumber,
|
||||
qualityProfileId
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
export async function requestSeason(config: AppConfig, payload: SeasonRequestPayload, user: string | null): Promise<void> {
|
||||
@@ -2760,6 +2810,7 @@ export async function requestSeason(config: AppConfig, payload: SeasonRequestPay
|
||||
title: series.title || 'Series',
|
||||
subtitle: `Season ${payload.seasonNumber}`,
|
||||
tmdbId: series.tmdbId,
|
||||
posterUrl: extractRemoteImage(series.images),
|
||||
mediaType: 'tv',
|
||||
user: user || 'Unknown',
|
||||
});
|
||||
|
||||
+130
-25
@@ -340,7 +340,7 @@ function App() {
|
||||
}
|
||||
}
|
||||
|
||||
async function handleRequest(card: MediaCard, qualityProfileId?: number) {
|
||||
async function handleRequest(card: MediaCard, qualityProfileId?: number, seasonNumber?: number) {
|
||||
if (!card.tmdbId) return
|
||||
|
||||
setBusy(true)
|
||||
@@ -350,7 +350,7 @@ function App() {
|
||||
if (card.mediaType === 'movie') {
|
||||
await api.requestMovie(card.tmdbId, currentJellyfinUser, qualityProfileId)
|
||||
} else {
|
||||
await api.requestSeries(card.tmdbId, currentJellyfinUser, qualityProfileId)
|
||||
await api.requestSeries(card.tmdbId, currentJellyfinUser, qualityProfileId, seasonNumber)
|
||||
}
|
||||
if (route !== 'downloads' && route !== 'settings' && route !== 'search' && route !== 'calendar') {
|
||||
await loadHub(route as HubPageResponse['page'], { silent: true })
|
||||
@@ -1571,7 +1571,7 @@ function TitleDetailsModal(props: {
|
||||
config: AppConfig
|
||||
onClose: () => void
|
||||
originRect: ModalOriginRect | null
|
||||
onRequest: (card: MediaCard, qualityProfileId?: number) => Promise<void>
|
||||
onRequest: (card: MediaCard, qualityProfileId?: number, seasonNumber?: number) => Promise<void>
|
||||
currentUser: string | null
|
||||
qualityProfiles: { sonarr: SelectOption[]; radarr: SelectOption[] }
|
||||
}) {
|
||||
@@ -2184,7 +2184,7 @@ function TitleDetailsModal(props: {
|
||||
qualityProfileId,
|
||||
}, props.currentUser)
|
||||
} else {
|
||||
await props.onRequest(props.card, qualityProfileId)
|
||||
await props.onRequest(props.card, qualityProfileId, activeSeasonNumber)
|
||||
}
|
||||
await refreshSeasonState(seasonValue || undefined)
|
||||
} catch (error) {
|
||||
@@ -3083,23 +3083,84 @@ function DownloadsPage(props: {
|
||||
onDismissAllCompleted: () => void
|
||||
}) {
|
||||
const hasAny = props.processingItems.length > 0 || props.downloads.length > 0 || props.completedDownloads.length > 0
|
||||
const [selectionMode, setSelectionMode] = useState(false)
|
||||
const [selectedDownloadIds, setSelectedDownloadIds] = useState<string[]>([])
|
||||
const [selectedHistoryIds, setSelectedHistoryIds] = useState<string[]>([])
|
||||
const [batchBusy, setBatchBusy] = useState(false)
|
||||
const selectedCount = selectedDownloadIds.length + selectedHistoryIds.length
|
||||
|
||||
function toggleSelection(id: string, type: 'download' | 'history') {
|
||||
const update = type === 'download' ? setSelectedDownloadIds : setSelectedHistoryIds
|
||||
update((current) => current.includes(id) ? current.filter((value) => value !== id) : [...current, id])
|
||||
}
|
||||
|
||||
function closeSelectionMode() {
|
||||
setSelectionMode(false)
|
||||
setSelectedDownloadIds([])
|
||||
setSelectedHistoryIds([])
|
||||
}
|
||||
|
||||
async function cancelSelectedDownloads() {
|
||||
if (!selectedDownloadIds.length || !window.confirm(`Cancel ${selectedDownloadIds.length} selected download${selectedDownloadIds.length === 1 ? '' : 's'}?`)) {
|
||||
return
|
||||
}
|
||||
|
||||
setBatchBusy(true)
|
||||
try {
|
||||
await Promise.all(selectedDownloadIds.map((id) => props.onDelete(id)))
|
||||
setSelectedDownloadIds([])
|
||||
} finally {
|
||||
setBatchBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
function dismissSelectedHistory() {
|
||||
if (!selectedHistoryIds.length || !window.confirm(`Delete ${selectedHistoryIds.length} selected history entr${selectedHistoryIds.length === 1 ? 'y' : 'ies'}?`)) {
|
||||
return
|
||||
}
|
||||
|
||||
selectedHistoryIds.forEach((id) => props.onDismissCompleted(id))
|
||||
setSelectedHistoryIds([])
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="downloads-page">
|
||||
<div className="downloads-header">
|
||||
<h2><DownloadGlyph /> <span>Downloads</span></h2>
|
||||
<button
|
||||
className={selectionMode ? 'downloads-selection-toggle is-active' : 'downloads-selection-toggle'}
|
||||
onClick={selectionMode ? closeSelectionMode : () => setSelectionMode(true)}
|
||||
type="button"
|
||||
>
|
||||
{selectionMode ? 'Done' : 'Select'}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{selectionMode ? (
|
||||
<div className="downloads-selection-toolbar">
|
||||
<span>{selectedCount ? `${selectedCount} selected` : 'Select downloads or history entries'}</span>
|
||||
<div>
|
||||
{selectedDownloadIds.length ? <button disabled={batchBusy} onClick={() => void cancelSelectedDownloads()} type="button">Cancel downloads</button> : null}
|
||||
{selectedHistoryIds.length ? <button disabled={batchBusy} onClick={dismissSelectedHistory} type="button">Delete history</button> : null}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{props.processingItems.length > 0 ? (
|
||||
<section className="downloads-section">
|
||||
<h3 className="downloads-section-title">Processing</h3>
|
||||
<div className="downloads-grid">
|
||||
{props.processingItems.map((item) => (
|
||||
<article className="download-row download-row-processing" key={item.id}>
|
||||
<div className="download-card">
|
||||
<div className="download-card">
|
||||
<div className="download-artwork">
|
||||
{item.posterUrl || item.backdropUrl
|
||||
? <img alt={item.title} loading="lazy" src={item.backdropUrl || item.posterUrl} />
|
||||
? (
|
||||
<picture>
|
||||
{item.posterUrl ? <source media="(max-width: 980px)" srcSet={item.posterUrl} /> : null}
|
||||
<img alt={item.title} loading="lazy" src={item.backdropUrl || item.posterUrl} />
|
||||
</picture>
|
||||
)
|
||||
: <div className="media-fallback download-poster-fallback">{item.title.slice(0, 1).toUpperCase()}</div>}
|
||||
</div>
|
||||
<div className="download-copy">
|
||||
@@ -3142,6 +3203,9 @@ function DownloadsPage(props: {
|
||||
item={item}
|
||||
key={item.id}
|
||||
onDelete={props.onDelete}
|
||||
onToggleSelection={() => toggleSelection(item.id, 'download')}
|
||||
selected={selectedDownloadIds.includes(item.id)}
|
||||
selectionMode={selectionMode}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
@@ -3152,21 +3216,33 @@ function DownloadsPage(props: {
|
||||
<section className="downloads-section">
|
||||
<div className="downloads-section-header">
|
||||
<h3 className="downloads-section-title">History</h3>
|
||||
<button aria-label="Dismiss history" className="downloads-dismiss-all-button" onClick={props.onDismissAllCompleted} title="Dismiss history" type="button">
|
||||
{!selectionMode ? <button aria-label="Dismiss history" className="downloads-dismiss-all-button" onClick={props.onDismissAllCompleted} title="Dismiss history" type="button">
|
||||
×
|
||||
</button>
|
||||
</button> : null}
|
||||
</div>
|
||||
<div className="downloads-grid">
|
||||
{props.completedDownloads.map((item) => (
|
||||
<article className={item.status === 'cancelled' ? 'download-row download-row-cancelled' : 'download-row download-row-completed'} key={item.id}>
|
||||
<button
|
||||
aria-label={`Dismiss ${item.title}`}
|
||||
className="download-action-button download-delete-button download-history-dismiss-button"
|
||||
onClick={() => props.onDismissCompleted(item.id)}
|
||||
type="button"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
<article className={`${item.status === 'cancelled' ? 'download-row download-row-cancelled' : 'download-row download-row-completed'}${selectionMode ? ' is-selecting' : ''}`} key={item.id}>
|
||||
{selectionMode ? (
|
||||
<button
|
||||
aria-label={`Select ${item.title}`}
|
||||
aria-pressed={selectedHistoryIds.includes(item.id)}
|
||||
className={selectedHistoryIds.includes(item.id) ? 'download-selection-check is-selected' : 'download-selection-check'}
|
||||
onClick={() => toggleSelection(item.id, 'history')}
|
||||
type="button"
|
||||
>
|
||||
{selectedHistoryIds.includes(item.id) ? '✓' : null}
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
aria-label={`Dismiss ${item.title}`}
|
||||
className="download-action-button download-delete-button download-history-dismiss-button"
|
||||
onClick={() => props.onDismissCompleted(item.id)}
|
||||
type="button"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
)}
|
||||
<div className="download-card">
|
||||
<div className="download-artwork">
|
||||
{item.posterUrl || item.backdropUrl
|
||||
@@ -3206,9 +3282,14 @@ function DownloadsPage(props: {
|
||||
) : null}
|
||||
|
||||
{!hasAny ? (
|
||||
<section className="downloads-section">
|
||||
<div className="downloads-grid">
|
||||
<EmptyState copy="The queue will appear here as soon as your services start working." title="No active downloads" />
|
||||
<section className="downloads-section downloads-empty-section">
|
||||
<div className="downloads-empty-state">
|
||||
<div aria-hidden="true" className="downloads-empty-icon">
|
||||
<DownloadGlyph />
|
||||
<span />
|
||||
</div>
|
||||
<h4>No active downloads</h4>
|
||||
<p>The queue will appear here as soon as your services start working.</p>
|
||||
</div>
|
||||
</section>
|
||||
) : null}
|
||||
@@ -3220,6 +3301,9 @@ function DownloadRow(props: {
|
||||
item: DownloadItem
|
||||
busy: boolean
|
||||
onDelete: (id: string) => Promise<void>
|
||||
selectionMode: boolean
|
||||
selected: boolean
|
||||
onToggleSelection: () => void
|
||||
}) {
|
||||
const item = props.item
|
||||
const progressMeta = [item.size, item.speed, item.eta].filter(Boolean).join(' · ')
|
||||
@@ -3234,10 +3318,26 @@ function DownloadRow(props: {
|
||||
}
|
||||
|
||||
return (
|
||||
<article className="download-row">
|
||||
<article className={props.selectionMode ? 'download-row is-selecting' : 'download-row'}>
|
||||
{props.selectionMode ? (
|
||||
<button
|
||||
aria-label={`Select ${item.title}`}
|
||||
aria-pressed={props.selected}
|
||||
className={props.selected ? 'download-selection-check is-selected' : 'download-selection-check'}
|
||||
onClick={props.onToggleSelection}
|
||||
type="button"
|
||||
>
|
||||
{props.selected ? '✓' : null}
|
||||
</button>
|
||||
) : null}
|
||||
<div className="download-card">
|
||||
<div className="download-artwork">
|
||||
{artwork ? <img alt={item.title} loading="lazy" src={artwork} /> : <div className="media-fallback download-poster-fallback">{item.title.slice(0, 1).toUpperCase()}</div>}
|
||||
{artwork ? (
|
||||
<picture>
|
||||
{item.posterUrl ? <source media="(max-width: 980px)" srcSet={item.posterUrl} /> : null}
|
||||
<img alt={item.title} loading="lazy" src={artwork} />
|
||||
</picture>
|
||||
) : <div className="media-fallback download-poster-fallback">{item.title.slice(0, 1).toUpperCase()}</div>}
|
||||
</div>
|
||||
<div className="download-copy">
|
||||
<h4>{item.title}</h4>
|
||||
@@ -3256,7 +3356,7 @@ function DownloadRow(props: {
|
||||
<div className={isCompleted ? 'download-progress-bar download-progress-complete' : 'download-progress-bar'}>
|
||||
<div className="download-progress-fill" style={{ width: `${item.progress}%` }} />
|
||||
</div>
|
||||
<button
|
||||
{!props.selectionMode ? <button
|
||||
aria-label={`Delete ${item.title}`}
|
||||
className="download-action-button download-delete-button"
|
||||
disabled={props.busy}
|
||||
@@ -3264,7 +3364,7 @@ function DownloadRow(props: {
|
||||
type="button"
|
||||
>
|
||||
{props.busy ? '…' : '×'}
|
||||
</button>
|
||||
</button> : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3408,7 +3508,12 @@ function CalendarPage(props: {
|
||||
type="button"
|
||||
>
|
||||
<div className="calendar-entry-art">
|
||||
{entry.imageUrl ? <img alt={entry.title} loading="lazy" src={entry.imageUrl} /> : <div className="media-fallback">{entry.title.slice(0, 1).toUpperCase()}</div>}
|
||||
{entry.imageUrl || entry.card.posterUrl ? (
|
||||
<picture>
|
||||
{entry.card.posterUrl ? <source media="(max-width: 980px)" srcSet={entry.card.posterUrl} /> : null}
|
||||
<img alt={entry.title} loading="lazy" src={entry.imageUrl || entry.card.posterUrl} />
|
||||
</picture>
|
||||
) : <div className="media-fallback">{entry.title.slice(0, 1).toUpperCase()}</div>}
|
||||
</div>
|
||||
<div className="calendar-entry-copy">
|
||||
<h4>{entry.title}</h4>
|
||||
|
||||
+2
-2
@@ -127,10 +127,10 @@ export const api = {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ tmdbId, user, qualityProfileId }),
|
||||
}),
|
||||
requestSeries: (tmdbId: number, user: string | null, qualityProfileId?: number) =>
|
||||
requestSeries: (tmdbId: number, user: string | null, qualityProfileId?: number, seasonNumber?: number) =>
|
||||
request<{ ok: boolean }>('/api/requests/series', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ tmdbId, user, qualityProfileId }),
|
||||
body: JSON.stringify({ tmdbId, user, qualityProfileId, seasonNumber }),
|
||||
}),
|
||||
requestSeason: (payload: SeasonRequestPayload, user: string | null) =>
|
||||
request<{ ok: boolean }>('/api/requests/season', {
|
||||
|
||||
+462
-5
@@ -562,6 +562,7 @@ img {
|
||||
.notice {
|
||||
background: rgba(97, 239, 171, 0.14);
|
||||
color: #91f5c4;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.error-banner {
|
||||
@@ -3021,6 +3022,99 @@ img {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.downloads-header {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.downloads-selection-toggle {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 2.35rem;
|
||||
display: inline-grid;
|
||||
box-sizing: border-box;
|
||||
width: auto;
|
||||
height: 2.2rem;
|
||||
min-height: 0;
|
||||
padding: 0.35rem 0.75rem;
|
||||
place-items: center;
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
color: #dfe7f5;
|
||||
font: inherit;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 700;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.downloads-selection-toggle.is-active {
|
||||
border-color: rgba(104, 171, 255, 0.65);
|
||||
background: rgba(104, 171, 255, 0.16);
|
||||
color: #cce1ff;
|
||||
}
|
||||
|
||||
.downloads-selection-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
margin: 0 2.35rem;
|
||||
padding: 0.7rem 0.85rem;
|
||||
border: 1px solid rgba(104, 171, 255, 0.18);
|
||||
border-radius: 0.9rem;
|
||||
background: rgba(104, 171, 255, 0.08);
|
||||
color: #c8d5ea;
|
||||
font-size: 0.84rem;
|
||||
}
|
||||
|
||||
.downloads-selection-toolbar > div {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: 0.45rem;
|
||||
}
|
||||
|
||||
.downloads-selection-toolbar button {
|
||||
min-height: 2rem;
|
||||
padding: 0.3rem 0.65rem;
|
||||
border: 1px solid rgba(255, 255, 255, 0.16);
|
||||
border-radius: 0.6rem;
|
||||
background: rgba(255, 255, 255, 0.09);
|
||||
color: #f0f5ff;
|
||||
font: inherit;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.download-row.is-selecting {
|
||||
position: relative;
|
||||
border-color: rgba(104, 171, 255, 0.3);
|
||||
}
|
||||
|
||||
.download-selection-check {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
top: 0.65rem;
|
||||
right: 0.65rem;
|
||||
display: grid;
|
||||
width: 1.55rem;
|
||||
height: 1.55rem;
|
||||
padding: 0;
|
||||
place-items: center;
|
||||
border: 1px solid rgba(255, 255, 255, 0.28);
|
||||
border-radius: 999px;
|
||||
background: rgba(9, 11, 16, 0.8);
|
||||
color: #07111e;
|
||||
font: inherit;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.download-selection-check.is-selected {
|
||||
border-color: #7ab7ff;
|
||||
background: #7ab7ff;
|
||||
}
|
||||
|
||||
.search-header p {
|
||||
margin: 0.35rem 0 0;
|
||||
color: #95a2ba;
|
||||
@@ -3177,6 +3271,12 @@ img {
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.calendar-entry-art picture {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.calendar-entry-copy {
|
||||
display: grid;
|
||||
align-content: center;
|
||||
@@ -3229,6 +3329,159 @@ img {
|
||||
color: #93a0b9;
|
||||
}
|
||||
|
||||
/* The calendar's desktop rules are declared last, so keep the mobile layout here. */
|
||||
@media (max-width: 980px) {
|
||||
.calendar-page {
|
||||
gap: 1rem;
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem 1rem;
|
||||
}
|
||||
|
||||
.calendar-header {
|
||||
gap: 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.calendar-container {
|
||||
flex: none;
|
||||
padding: 0.7rem;
|
||||
border-radius: 1.1rem;
|
||||
}
|
||||
|
||||
.calendar-scroll-container {
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.calendar-group-header {
|
||||
padding: 0 0.3rem;
|
||||
}
|
||||
|
||||
.calendar-entry-card {
|
||||
grid-template-columns: 4.8rem minmax(0, 1fr);
|
||||
grid-template-areas:
|
||||
'art copy'
|
||||
'art time';
|
||||
gap: 0.35rem 0.75rem;
|
||||
align-items: start;
|
||||
padding: 0.65rem;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.calendar-entry-art {
|
||||
grid-area: art;
|
||||
order: initial;
|
||||
aspect-ratio: 2 / 3;
|
||||
border-radius: 0.7rem;
|
||||
}
|
||||
|
||||
.calendar-entry-copy {
|
||||
grid-area: copy;
|
||||
align-content: start;
|
||||
gap: 0.25rem;
|
||||
padding-top: 0.1rem;
|
||||
}
|
||||
|
||||
.calendar-entry-copy h4 {
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.calendar-entry-subtitle,
|
||||
.calendar-entry-detail {
|
||||
font-size: 0.78rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.calendar-entry-time {
|
||||
grid-area: time;
|
||||
justify-items: start;
|
||||
align-content: end;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.calendar-entry-time span {
|
||||
min-height: 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 980px) {
|
||||
.calendar-page {
|
||||
gap: 1rem;
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem 1rem;
|
||||
}
|
||||
|
||||
.calendar-header {
|
||||
gap: 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.calendar-container {
|
||||
flex: none;
|
||||
padding: 0.7rem;
|
||||
border-radius: 1.1rem;
|
||||
}
|
||||
|
||||
.calendar-scroll-container {
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.calendar-group-header {
|
||||
padding: 0 0.3rem;
|
||||
}
|
||||
|
||||
.calendar-entry-card {
|
||||
grid-template-columns: 4.8rem minmax(0, 1fr);
|
||||
grid-template-areas:
|
||||
'art copy'
|
||||
'art time';
|
||||
gap: 0.35rem 0.75rem;
|
||||
align-items: start;
|
||||
padding: 0.65rem;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.calendar-entry-art {
|
||||
grid-area: art;
|
||||
aspect-ratio: 2 / 3;
|
||||
border-radius: 0.7rem;
|
||||
}
|
||||
|
||||
.calendar-entry-copy {
|
||||
grid-area: copy;
|
||||
align-content: start;
|
||||
gap: 0.25rem;
|
||||
padding-top: 0.1rem;
|
||||
}
|
||||
|
||||
.calendar-entry-copy h4 {
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.calendar-entry-subtitle,
|
||||
.calendar-entry-detail {
|
||||
font-size: 0.78rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.calendar-entry-time {
|
||||
grid-area: time;
|
||||
justify-items: start;
|
||||
align-content: end;
|
||||
}
|
||||
|
||||
.calendar-entry-time span {
|
||||
min-height: 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.downloads-section {
|
||||
padding: 0 1.25rem 1.4rem;
|
||||
}
|
||||
@@ -3308,6 +3561,86 @@ img {
|
||||
color: #9ca4b8;
|
||||
}
|
||||
|
||||
.downloads-empty-section {
|
||||
display: grid;
|
||||
min-height: clamp(14rem, 44svh, 28rem);
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
.downloads-empty-state {
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
max-width: 28rem;
|
||||
gap: 0.45rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.downloads-empty-state h4,
|
||||
.downloads-empty-state p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.downloads-empty-state h4 {
|
||||
color: #eef4ff;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
.downloads-empty-state p {
|
||||
color: #9ca4b8;
|
||||
}
|
||||
|
||||
.downloads-empty-icon {
|
||||
position: relative;
|
||||
display: grid;
|
||||
width: 3.5rem;
|
||||
height: 3.5rem;
|
||||
margin-bottom: 0.35rem;
|
||||
place-items: center;
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
border-radius: 1rem;
|
||||
background: rgba(255, 255, 255, 0.045);
|
||||
color: #c5cede;
|
||||
}
|
||||
|
||||
.downloads-empty-icon .title-action-icon {
|
||||
width: 1.55rem;
|
||||
height: 1.55rem;
|
||||
}
|
||||
|
||||
.downloads-empty-icon span {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
display: grid;
|
||||
box-sizing: border-box;
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
border: 2px solid #000;
|
||||
border-radius: 999px;
|
||||
background: #7e8798;
|
||||
transform: translate(35%, -35%);
|
||||
}
|
||||
|
||||
.downloads-empty-icon span::before,
|
||||
.downloads-empty-icon span::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 0.55rem;
|
||||
height: 2px;
|
||||
border-radius: 999px;
|
||||
background: #10131a;
|
||||
}
|
||||
|
||||
.downloads-empty-icon span::before {
|
||||
transform: translate(-50%, -50%) rotate(45deg);
|
||||
}
|
||||
|
||||
.downloads-empty-icon span::after {
|
||||
transform: translate(-50%, -50%) rotate(-45deg);
|
||||
}
|
||||
|
||||
.download-subtitle {
|
||||
margin: 0;
|
||||
color: #dce4f4;
|
||||
@@ -3671,12 +4004,20 @@ img {
|
||||
}
|
||||
|
||||
.loading-orb {
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
box-sizing: border-box;
|
||||
border-radius: 999px;
|
||||
background: radial-gradient(circle, #ffd166 0%, #ff8d4d 50%, rgba(255, 141, 77, 0) 70%);
|
||||
filter: blur(4px);
|
||||
animation: pulse 1.8s ease-in-out infinite;
|
||||
border: 3px solid rgba(238, 244, 255, 0.16);
|
||||
border-top-color: #eef4ff;
|
||||
border-right-color: rgba(104, 171, 255, 0.8);
|
||||
animation: loading-spinner 720ms linear infinite;
|
||||
}
|
||||
|
||||
@keyframes loading-spinner {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.loading-placeholder {
|
||||
@@ -5232,3 +5573,119 @@ img {
|
||||
.calendar-entry-detail {
|
||||
color: #93a0b9;
|
||||
}
|
||||
|
||||
/* Mobile overrides must come after the desktop calendar component styles. */
|
||||
@media (max-width: 980px) {
|
||||
.mobile-menu-toggle {
|
||||
top: max(1rem, calc(env(safe-area-inset-top, 0px) + 0.15rem));
|
||||
}
|
||||
|
||||
.calendar-page {
|
||||
gap: 1rem;
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem 1rem;
|
||||
}
|
||||
|
||||
.calendar-header {
|
||||
gap: 1rem;
|
||||
min-height: 2.9rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.downloads-header {
|
||||
display: grid;
|
||||
box-sizing: border-box;
|
||||
height: 2.9rem;
|
||||
min-height: 2.9rem;
|
||||
margin-top: calc(env(safe-area-inset-top, 0px) + 1rem);
|
||||
padding: 0 4.75rem;
|
||||
position: relative;
|
||||
top: 0;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
.downloads-selection-toggle {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 1rem;
|
||||
margin-block: auto;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.downloads-selection-toolbar {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
margin: 0 1rem;
|
||||
}
|
||||
|
||||
.downloads-selection-toolbar > div {
|
||||
width: 100%;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.calendar-container {
|
||||
flex: none;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.calendar-scroll-container {
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.calendar-group-header {
|
||||
padding: 0 0.3rem;
|
||||
}
|
||||
|
||||
.calendar-entry-card {
|
||||
grid-template-columns: 4.8rem minmax(0, 1fr);
|
||||
grid-template-areas:
|
||||
'art copy'
|
||||
'art time';
|
||||
gap: 0.35rem 0.75rem;
|
||||
align-items: start;
|
||||
padding: 0.65rem;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.calendar-entry-art {
|
||||
grid-area: art;
|
||||
order: initial;
|
||||
aspect-ratio: 2 / 3;
|
||||
border-radius: 0.7rem;
|
||||
}
|
||||
|
||||
.calendar-entry-copy {
|
||||
grid-area: copy;
|
||||
align-content: start;
|
||||
gap: 0.25rem;
|
||||
padding-top: 0.1rem;
|
||||
}
|
||||
|
||||
.calendar-entry-copy h4 {
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.calendar-entry-subtitle,
|
||||
.calendar-entry-detail {
|
||||
font-size: 0.78rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.calendar-entry-time {
|
||||
grid-area: time;
|
||||
justify-items: start;
|
||||
align-content: end;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.calendar-entry-time span {
|
||||
min-height: 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user