mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-09 08:37:37 +03:00
Simplify dialog radio buttons
This commit is contained in:
parent
02de01261e
commit
0b16ddeebc
@ -103,9 +103,7 @@
|
|||||||
"label": "Share Timestamp",
|
"label": "Share Timestamp",
|
||||||
"title": "Share Timestamp",
|
"title": "Share Timestamp",
|
||||||
"description": "Share a timestamped URL of current player position or choose a custom timestamp. Note that this is not a public share URL and is only accessible to users with access to Frigate and this camera.",
|
"description": "Share a timestamped URL of current player position or choose a custom timestamp. Note that this is not a public share URL and is only accessible to users with access to Frigate and this camera.",
|
||||||
"current": "Current Player Timestamp",
|
|
||||||
"custom": "Custom Timestamp",
|
"custom": "Custom Timestamp",
|
||||||
"customDescription": "Pick a specific point in time to share.",
|
|
||||||
"button": "Share Timestamp URL",
|
"button": "Share Timestamp URL",
|
||||||
"shareTitle": "Frigate Review Timestamp: {{camera}}"
|
"shareTitle": "Frigate Review Timestamp: {{camera}}"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -150,47 +150,47 @@ export function ShareTimestampContent({
|
|||||||
setSelectedOption(value as "current" | "custom")
|
setSelectedOption(value as "current" | "custom")
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="space-y-2 rounded-lg border bg-secondary/40 p-3">
|
<div className="flex items-start gap-2">
|
||||||
<div className="flex items-start gap-2">
|
<RadioGroupItem
|
||||||
<RadioGroupItem id="share-current" value="current" />
|
className={
|
||||||
<Label className="cursor-pointer space-y-1" htmlFor="share-current">
|
selectedOption == "current"
|
||||||
<div className="text-sm font-medium">
|
? "bg-selected from-selected/50 to-selected/90 text-selected"
|
||||||
{t("recording.shareTimestamp.current", {
|
: "bg-secondary from-secondary/50 to-secondary/90 text-secondary"
|
||||||
ns: "components/dialog",
|
}
|
||||||
})}
|
id="share-current"
|
||||||
</div>
|
value="current"
|
||||||
<div className="text-sm text-muted-foreground">
|
/>
|
||||||
{currentTimestampLabel}
|
<Label className="cursor-pointer text-sm" htmlFor="share-current">
|
||||||
</div>
|
{currentTimestampLabel}
|
||||||
</Label>
|
</Label>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-3 rounded-lg border bg-secondary/40 p-3">
|
<div className="flex items-start gap-2">
|
||||||
<div className="flex items-start gap-2">
|
<RadioGroupItem
|
||||||
<RadioGroupItem id="share-custom" value="custom" />
|
className={
|
||||||
<Label className="cursor-pointer space-y-1" htmlFor="share-custom">
|
selectedOption == "custom"
|
||||||
<div className="text-sm font-medium">
|
? "bg-selected from-selected/50 to-selected/90 text-selected"
|
||||||
{t("recording.shareTimestamp.custom", {
|
: "bg-secondary from-secondary/50 to-secondary/90 text-secondary"
|
||||||
ns: "components/dialog",
|
}
|
||||||
})}
|
id="share-custom"
|
||||||
</div>
|
value="custom"
|
||||||
<div className="text-sm text-muted-foreground">
|
/>
|
||||||
{t("recording.shareTimestamp.customDescription", {
|
<div className="space-y-3">
|
||||||
ns: "components/dialog",
|
<Label className="cursor-pointer text-sm" htmlFor="share-custom">
|
||||||
})}
|
{t("recording.shareTimestamp.custom", {
|
||||||
</div>
|
|
||||||
</Label>
|
|
||||||
</div>
|
|
||||||
{selectedOption === "custom" && (
|
|
||||||
<CustomTimestampSelector
|
|
||||||
timestamp={customTimestamp}
|
|
||||||
setTimestamp={setCustomTimestamp}
|
|
||||||
label={t("recording.shareTimestamp.custom", {
|
|
||||||
ns: "components/dialog",
|
ns: "components/dialog",
|
||||||
})}
|
})}
|
||||||
/>
|
</Label>
|
||||||
)}
|
{selectedOption === "custom" && (
|
||||||
|
<CustomTimestampSelector
|
||||||
|
timestamp={customTimestamp}
|
||||||
|
setTimestamp={setCustomTimestamp}
|
||||||
|
label={t("recording.shareTimestamp.custom", {
|
||||||
|
ns: "components/dialog",
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user