Add Approve/Deny verdicts to pending requests on P104
All checks were successful
Deploy / deploy (push) Successful in 55s
All checks were successful
Deploy / deploy (push) Successful in 55s
Every TV request now needs a decision, so P104 offers the two verdicts
inline on the rows actually waiting rather than sending the visitor to
Ombi's own UI.
Ombi is now the one service the app writes to. Three details the new
ombi_write() helper and /api/ombi/decide route have to get right:
approve is a POST but deny is a PUT; a TV decision acts on the child
request id, not the show, so get_ombi_summary() carries child["id"] for
TV rows and m["id"] for movies; and Ombi answers 200 with
{"result": false, ...} on a logical refusal, so the body is checked
rather than the status code. A successful decision clears _ombi_cache —
the 4-hour TTL would otherwise keep calling the row pending for the
rest of the afternoon.
The buttons reuse the existing two-tap arming and share its armed slot,
so arming one disarms the other: an approval starts a download and a
denial is somebody's answer, neither wants a stray tap. They reverse
into green and red rather than the shared red of .tt-btn.armed, so the
confirming press states which verdict it is about to send. After a
decision the row's status flips in place and the Pending figure and its
"N of M" both settle; at zero the page drops its warn weight, since
nothing waits on a human any more (discipline 5). Below 560px the
verdicts take a full line of their own rather than shrinking below the
tap target.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNc3gd3GRPudFwgPXNEm8A
This commit is contained in:
parent
8115ed4855
commit
d38ab1b561
5 changed files with 208 additions and 7 deletions
|
|
@ -205,6 +205,13 @@ a.tt-row:focus-visible .tt-row-sub { color: var(--tt-black); }
|
|||
color: var(--live);
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* The verdicts sit after the status they resolve, so the row reads
|
||||
state-then-decision. Only pending rows carry one. */
|
||||
.tt-row-acts {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
gap: 1ch;
|
||||
}
|
||||
.tt-row-val.ok { color: var(--ok); }
|
||||
.tt-row-val.alert { color: var(--alert); }
|
||||
.tt-row-val.warn { color: var(--voice); }
|
||||
|
|
@ -429,6 +436,24 @@ a.tt-row:focus-visible .tt-row-sub { color: var(--tt-black); }
|
|||
.tt-btn-quiet:hover:not(:disabled) { background: var(--live); color: var(--tt-black); }
|
||||
.tt-btn-sm { min-height: calc(var(--row) * 1.6); width: 100%; }
|
||||
|
||||
/* The two verdicts on a pending request (P104). Quiet until armed, then
|
||||
each reverses into its own meaning rather than the shared red of
|
||||
.tt-btn.armed — green is the go-ahead, red is the refusal — so the
|
||||
confirming press says which verdict it is about to send and not merely
|
||||
that something is live. Both come after .tt-btn.armed to win on
|
||||
source order at equal specificity. */
|
||||
.tt-btn-yes, .tt-btn-no {
|
||||
background: transparent;
|
||||
padding: 0 1ch;
|
||||
letter-spacing: 0.12em;
|
||||
}
|
||||
.tt-btn-yes { color: var(--ok); }
|
||||
.tt-btn-no { color: var(--alert); }
|
||||
.tt-btn-yes:hover:not(:disabled),
|
||||
.tt-btn-yes.armed { background: var(--ok); color: var(--tt-black); }
|
||||
.tt-btn-no:hover:not(:disabled),
|
||||
.tt-btn-no.armed { background: var(--alert); color: var(--tt-black); }
|
||||
|
||||
.tt-input {
|
||||
min-height: var(--tap);
|
||||
padding: 0 1ch;
|
||||
|
|
@ -649,6 +674,16 @@ a.tt-row:focus-visible .tt-row-sub { color: var(--tt-black); }
|
|||
}
|
||||
.tt-row-title { white-space: normal; }
|
||||
.tt-row-val { margin-left: auto; white-space: normal; }
|
||||
/* Name and status hold line one, the description takes line two, and
|
||||
the verdicts take a full line of their own — at this width they
|
||||
cannot share a line with the status without either one shrinking
|
||||
below the tap target. */
|
||||
.tt-row-acts {
|
||||
flex: 1 0 100%;
|
||||
order: 4;
|
||||
justify-content: flex-end;
|
||||
margin-top: 0.35em;
|
||||
}
|
||||
.tt-head-name { letter-spacing: 0.12em; }
|
||||
.tt-head-dl { margin-left: 0; flex-basis: 100%; }
|
||||
.tt-head-clock { margin-left: 0; flex-basis: 100%; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue