mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-20 06:56:18 -05:00
downloads: surface daily-limit stall to users
Add daily_limit_reached to the DownloadManager summary (/api/status): True when due (new, non-recurring) downloads exist and every one of them is blocked by the global or per-domain daily download limit. Show a "Max Daily Downloads Reached" banner on the Downloads page when set (and the manager is neither disabled nor stopped). Previously a queue stalled by the daily limit looked broken: the UI reported 0 pending with no explanation, and the skip reason was only visible at DEBUG log level. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
2baa9cbd2e
commit
a4eeba14ee
4 changed files with 84 additions and 0 deletions
|
|
@ -611,6 +611,17 @@ export function DownloadWindowMessage() {
|
|||
return null;
|
||||
}
|
||||
|
||||
export function DailyLimitMessage() {
|
||||
const {status} = React.useContext(StatusContext);
|
||||
const downloads = status ? status.downloads : null;
|
||||
|
||||
if (downloads && downloads.daily_limit_reached && !downloads.disabled && !downloads.stopped) {
|
||||
return <Message icon='pause circle outline' header='Max Daily Downloads Reached'
|
||||
content='Downloads are paused because the daily download limit has been reached. Downloads will resume tomorrow.'/>
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function CookiesUnlockModal({open, onClose, onSuccess}) {
|
||||
const [password, setPassword] = useState('');
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import {
|
|||
APIButton,
|
||||
CookiesLockedMessage,
|
||||
DisableDownloadsToggle,
|
||||
DailyLimitMessage,
|
||||
DownloadWindowMessage,
|
||||
ErrorMessage,
|
||||
formatFrequency,
|
||||
|
|
@ -684,6 +685,7 @@ export function DownloadsPage() {
|
|||
return <>
|
||||
<WROLModeMessage content='Downloads are disabled because WROL Mode is enabled.'/>
|
||||
<DownloadWindowMessage/>
|
||||
<DailyLimitMessage/>
|
||||
<DisableDownloadsToggle/>
|
||||
<CookiesLockedMessage/>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue