A season's download sits on the picker's row (#482)

On a phone, on a row of its own under the picker, it cost a line above
the list for one button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RqkrVAJFkEgz9cXG3jG1Zy
This commit is contained in:
2026-11-19 09:24:21 -05:00
parent c441215c62
commit 4421d1d083
2 changed files with 9 additions and 5 deletions

View File

@@ -24,11 +24,12 @@ function seasonsHTML(list: SeasonCount[]): string{
}
function drawSeasons(f: Feed, list: SeasonCount[]|undefined){
const bar=$('#content .toolbar'); if(!bar||S.feed!==f.id) return;
bar.querySelector('.seasons')?.remove(); bar.querySelector('.seasondl')?.remove();
bar.querySelector('.seasonrow')?.remove();
if(!list||!seasonsShown(list)) return;
bar.insertAdjacentHTML('beforeend',seasonsHTML(list));
if(S.season) bar.insertAdjacentHTML('beforeend',`<button class="btn ico seasondl" title="Download ${esc(seasonName(list.find(s=>seasonKey(s)===S.season)?.season))}"
aria-label="Download ${esc(seasonName(list.find(s=>seasonKey(s)===S.season)?.season))}">${ICON.download}</button>`);
// The download beside the picker, on its row: on a phone, on a row of its own, it cost a line.
const picked=list.find(s=>seasonKey(s)===S.season);
bar.insertAdjacentHTML('beforeend',`<div class="seasonrow">${seasonsHTML(list)}${picked?`<button class="btn ico seasondl"
title="Download ${esc(seasonName(picked.season))}" aria-label="Download ${esc(seasonName(picked.season))}">${ICON.download}</button>`:''}</div>`);
bar.querySelector<HTMLButtonElement>('.seasondl')?.addEventListener('click',()=>downloadSeason(f));
// The one picked in view: on a phone Season 3 of six is past the edge, and the picker looked as
// if every season were still showing.