mirror of
https://github.com/knutwurst/patchdl.git
synced 2026-10-06 07:00:26 +02:00
Persist resume state every piece; replace conn field with a stepper
Resume: write the sidecar after every completed piece instead of batching every 8. Each piece's bytes are already fdatasync'd and the sidecar write is a tiny atomic tmp+rename, so an unclean kill now re-downloads only the pieces still in flight, not a batch of up-to-8 already-finished ones. Drops the now -unused 'unpersisted' counter. UI: the "parallel download connections" control is now a stepper — two large 54px -/+ buttons around a tabular value, in a row beside its label, instead of a full-width number field for a 1-16 value. Big targets and a clear green focus ring suit controller navigation (the UI is driven by the PS5 pad via the home tile). Tapping -/+ updates and auto-saves that field alone (debounced), applying live on the server.
This commit is contained in:
1 parent
6024dbfc5d
commit
986ff00c36
4 files changed
+88
-13
No files matched your search
@@ -395,6 +395,34 @@ h2 { font-size: 18px; line-height: 1.2; }
|
||||
background: var(--surface-2);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* number stepper — big, controller-friendly targets with a clear focus ring
|
||||
(the UI is operated by the PS5 controller via the home tile). */
|
||||
.stepper { display: inline-flex; align-items: center; gap: 12px; flex: none; }
|
||||
.stepper-btn {
|
||||
width: 54px; height: 54px;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
font-size: 30px; line-height: 1; font-weight: 600;
|
||||
color: var(--ink);
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 14px;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
transition: background .12s ease, border-color .12s ease, transform .07s ease;
|
||||
}
|
||||
.stepper-btn:hover { background: var(--surface); border-color: var(--muted); }
|
||||
.stepper-btn:active { transform: scale(0.93); background: var(--green-soft); border-color: var(--green); }
|
||||
/* :focus (not only :focus-visible) so the controller's focus is always obvious */
|
||||
.stepper-btn:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
|
||||
.stepper-btn:disabled { opacity: 0.32; cursor: default; transform: none; }
|
||||
.stepper-value {
|
||||
min-width: 52px;
|
||||
text-align: center;
|
||||
font-size: 26px; font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: var(--ink);
|
||||
}
|
||||
.switch-row > span:first-child strong { display: block; font-size: 14px; }
|
||||
.switch-row > span:first-child em { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-style: normal; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user