fix(Codex): expose days instead of frames in arcive form
This commit is contained in:
@@ -247,7 +247,7 @@ module Index =
|
||||
| Ok newArchive ->
|
||||
console.info("Added archive %s with id %s", newArchive.Name, string newArchive.Id)
|
||||
recentlyAddedArchives |> Array.append [|newArchive|] |> setRecentlyAddedArchives
|
||||
setForm {Remoting.AddArchiveRequest.empty() with DataSetId = form.DataSetId}
|
||||
setForm (Remoting.AddArchiveRequest.empty())
|
||||
| Error msg ->
|
||||
console.error("Error adding archive %s: %s", form.Name, msg)
|
||||
setErrMsg (Some msg)
|
||||
@@ -396,21 +396,20 @@ module Index =
|
||||
field.label (
|
||||
Fui.label [
|
||||
label.required true
|
||||
label.text "Frames"
|
||||
label.text "Days"
|
||||
]
|
||||
)
|
||||
field.children (
|
||||
Fui.spinButton [
|
||||
spinButton.value form.Frames
|
||||
spinButton.step 24
|
||||
spinButton.min 24
|
||||
spinButton.value (form.Frames / 24)
|
||||
spinButton.min 1
|
||||
spinButton.onChange (fun (d: SpinButtonOnChangeData) ->
|
||||
match d.value with
|
||||
| Some v ->
|
||||
setForm {form with Frames = v}
|
||||
setForm {form with Frames = v * 24}
|
||||
| None ->
|
||||
if d.displayValue.ToCharArray() |> Array.forall System.Char.IsDigit then
|
||||
setForm {form with Frames = int d.displayValue}
|
||||
setForm {form with Frames = int d.displayValue * 24}
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -423,7 +422,7 @@ module Index =
|
||||
|
||||
let endDate = form.StartTime.AddHours(form.Frames).ToShortDateString()
|
||||
text.text
|
||||
($"End Date: {endDate}, {form.Frames/24} days"
|
||||
($"End Date: {endDate}, {form.Frames} frames"
|
||||
+
|
||||
if framesExceedEnd then
|
||||
" (Exceeds DataSet Bounds!)"
|
||||
@@ -560,7 +559,7 @@ module Index =
|
||||
prop.children [
|
||||
Fui.text.title2 "Actions"
|
||||
Html.div [
|
||||
prop.classes ["flex-column"; "gap-16"]
|
||||
prop.classes ["flex-row"; "flex-wrap";"gap-16"]
|
||||
prop.children [
|
||||
UserAddForm (Option.map (fun email group -> $"User {email} was added to group {group}") >> setMessage)
|
||||
ArchiveAddForm ()
|
||||
|
||||
Reference in New Issue
Block a user