Add prominent watch button to ready requests
This commit is contained in:
@@ -463,6 +463,10 @@ export default function RequestTimelinePage() {
|
||||
|
||||
const presentation = snapshot.presentation ?? {}
|
||||
const pipeline = presentation.pipeline?.length ? presentation.pipeline : fallbackPipeline(snapshot)
|
||||
const availableStage = pipeline.find((stage) => stage.id === 'available')
|
||||
const mediaServerLink = availableStage?.state === 'complete' && availableStage.link
|
||||
? availableStage.link
|
||||
: null
|
||||
const statusLabel = presentation.status?.label ?? fallbackStatusLabel(snapshot.state)
|
||||
const statusMeaning = presentation.status?.meaning ?? snapshot.state_reason ?? 'Magent is checking this request.'
|
||||
const download = presentation.download
|
||||
@@ -671,9 +675,23 @@ export default function RequestTimelinePage() {
|
||||
</div>
|
||||
)}
|
||||
<div className="request-overview-block request-next-step">
|
||||
<span className="request-overview-label">Next step</span>
|
||||
<strong>{nextStep.title}</strong>
|
||||
<p>{nextStep.description}</p>
|
||||
<div className="request-next-step-main">
|
||||
<div className="request-next-step-copy">
|
||||
<span className="request-overview-label">Next step</span>
|
||||
<strong>{nextStep.title}</strong>
|
||||
<p>{nextStep.description}</p>
|
||||
</div>
|
||||
{mediaServerLink && (
|
||||
<a
|
||||
className="request-watch-button"
|
||||
href={mediaServerLink}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Watch on Grizzlyflix <span aria-hidden="true">→</span>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
<div className="request-action-row">
|
||||
{recommendedActions.map((action) => (
|
||||
<button key={action.id} type="button" disabled={Boolean(busyAction)} onClick={() => void runAction(action)}>
|
||||
|
||||
Reference in New Issue
Block a user