feat: enhance Jellyfin stream URL generation and improve NumberInput component

This commit is contained in:
2026-03-11 19:44:48 +01:00
parent 8d8d320a02
commit c9aa36bb5f
2 changed files with 15 additions and 8 deletions

View File

@@ -66,12 +66,14 @@ function NumberInput({
onChange,
min,
max,
step,
placeholder,
}: {
value: number | "";
onChange: (v: number | "") => void;
min?: number;
max?: number;
step?: number | "any";
placeholder?: string;
}) {
return (
@@ -79,6 +81,7 @@ function NumberInput({
type="number"
min={min}
max={max}
step={step}
value={value}
placeholder={placeholder}
onChange={(e) =>
@@ -229,11 +232,12 @@ function BlockEditor({ block, onChange, onRemove }: BlockEditorProps) {
</div>
<div className="grid grid-cols-2 gap-3">
<Field label="Start time" hint="24-hour format HH:MM">
<TextInput
<Field label="Start time">
<input
type="time"
value={block.start_time.slice(0, 5)}
onChange={(v) => setField("start_time", v + ":00")}
placeholder="20:00"
onChange={(e) => setField("start_time", e.target.value + ":00")}
className="w-full rounded-md border border-zinc-700 bg-zinc-800 px-3 py-2 text-sm text-zinc-100 focus:border-zinc-500 focus:outline-none"
/>
</Field>
<Field label="Duration (minutes)">
@@ -443,6 +447,7 @@ function RecyclePolicyEditor({ policy, onChange }: RecyclePolicyEditorProps) {
}
min={0}
max={1}
step={0.01}
placeholder="0.1"
/>
</Field>