diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-28 02:02:45 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-28 02:02:45 -0500 |
| commit | db102cb5206acb6008ea80a6c920dd6f320abe2d (patch) | |
| tree | 9e3eda77bbaaaef93153b1ef22282acc8ca15b82 /Omni/Jr/Web | |
| parent | 340d92f19d8839709f4f2d6ce7b96cbb22f73932 (diff) | |
Add fact detail/edit view in web UI
All tests pass with no warnings. The implementation is complete:
1. **Added new routes** (`/kb/:id`, `/kb/:id/edit`, `/kb/:id/delete`)
to 2. **Created `FactDetailPage` data type** with `FactDetailFound`
and `Fa 3. **Created `FactEditForm`** data type for handling
form submissions 4. **Added handlers** (`factDetailHandler`,
`factEditHandler`, `factDele 5. **Added `ToHtml` instance for
`FactDetailPage`** with:
- Detail view showing project, confidence, created date - Editable
content textarea - Related files input - Confidence slider -
Source task link - Danger zone with delete button
6. **Updated KB listing** to make facts clickable links to their
detail 7. **Added CSS styles** for form elements, buttons, danger zone,
and err
Task-Id: t-158.5
Diffstat (limited to 'Omni/Jr/Web')
| -rw-r--r-- | Omni/Jr/Web/Style.hs | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/Omni/Jr/Web/Style.hs b/Omni/Jr/Web/Style.hs index 8ad239c..b262037 100644 --- a/Omni/Jr/Web/Style.hs +++ b/Omni/Jr/Web/Style.hs @@ -703,6 +703,92 @@ formStyles = do flexWrap Flexbox.wrap Stylesheet.key "gap" ("8px" :: Text) marginTop (px 8) + ".fact-edit-form" ? do + marginTop (px 8) + ".form-group" ? do + marginBottom (px 16) + (".form-group" |> label) ? do + display block + marginBottom (px 4) + fontSize (px 13) + fontWeight (weight 500) + color "#374151" + ".form-input" <> ".form-textarea" ? do + width (pct 100) + padding (px 8) (px 10) (px 8) (px 10) + border (px 1) solid "#d1d5db" + borderRadius (px 2) (px 2) (px 2) (px 2) + fontSize (px 14) + lineHeight (em 1.5) + ".form-input" # focus <> ".form-textarea" # focus ? do + borderColor "#0066cc" + Stylesheet.key "outline" ("none" :: Text) + Stylesheet.key "box-shadow" ("0 0 0 2px rgba(0, 102, 204, 0.2)" :: Text) + ".form-textarea" ? do + minHeight (px 120) + Stylesheet.key "resize" ("vertical" :: Text) + fontFamily + [ "-apple-system", + "BlinkMacSystemFont", + "Segoe UI", + "Roboto", + "Helvetica Neue", + "Arial", + "sans-serif" + ] + [sansSerif] + ".btn" ? do + display inlineBlock + padding (px 8) (px 16) (px 8) (px 16) + border (px 0) none transparent + borderRadius (px 3) (px 3) (px 3) (px 3) + fontSize (px 14) + fontWeight (weight 500) + textDecoration none + cursor pointer + transition "all" (ms 150) ease (sec 0) + ".btn-primary" ? do + backgroundColor "#0066cc" + color white + ".btn-primary" # hover ? backgroundColor "#0052a3" + ".btn-secondary" ? do + backgroundColor "#6b7280" + color white + ".btn-secondary" # hover ? backgroundColor "#4b5563" + ".btn-danger" ? do + backgroundColor "#dc2626" + color white + ".btn-danger" # hover ? backgroundColor "#b91c1c" + ".danger-zone" ? do + marginTop (px 24) + padding (px 16) (px 16) (px 16) (px 16) + backgroundColor "#fef2f2" + border (px 1) solid "#fecaca" + borderRadius (px 4) (px 4) (px 4) (px 4) + (".danger-zone" |> h2) ? do + color "#dc2626" + marginBottom (px 12) + ".back-link" ? do + marginTop (px 24) + paddingTop (px 16) + borderTop (px 1) solid "#e5e7eb" + (".back-link" |> a) ? do + color "#6b7280" + textDecoration none + (".back-link" |> a) # hover ? do + color "#374151" + textDecoration underline + ".task-link" ? do + color "#0066cc" + textDecoration none + fontWeight (weight 500) + ".task-link" # hover ? textDecoration underline + ".error-msg" ? do + color "#dc2626" + backgroundColor "#fef2f2" + padding (px 16) (px 16) (px 16) (px 16) + borderRadius (px 4) (px 4) (px 4) (px 4) + border (px 1) solid "#fecaca" executionDetailsStyles :: Css executionDetailsStyles = do |
