ui: err: tweak error message, make it red
This commit is contained in:
parent
6f85e02f1a
commit
b527209e9f
@ -41,7 +41,7 @@ drawErrorScreen :: AppState -> [Widget]
|
|||||||
drawErrorScreen AppState{ -- aopts=_uopts@UIOpts{cliopts_=_copts@CliOpts{reportopts_=_ropts@ReportOpts{query_=querystr}}},
|
drawErrorScreen AppState{ -- aopts=_uopts@UIOpts{cliopts_=_copts@CliOpts{reportopts_=_ropts@ReportOpts{query_=querystr}}},
|
||||||
aScreen=ErrorScreen{esState=err}} = [ui]
|
aScreen=ErrorScreen{esState=err}} = [ui]
|
||||||
where
|
where
|
||||||
toplabel = withAttr ("border" <> "bold") (str "Problem - please fix then press g to reload")
|
toplabel = withAttr ("border" <> "bold") (str "Oops. Please fix this problem then press g to reload")
|
||||||
-- <+> str " transactions"
|
-- <+> str " transactions"
|
||||||
-- <+> borderQueryStr querystr -- no, account transactions report shows all transactions in the acct ?
|
-- <+> borderQueryStr querystr -- no, account transactions report shows all transactions in the acct ?
|
||||||
-- <+> str " and subs"
|
-- <+> str " and subs"
|
||||||
@ -72,8 +72,7 @@ drawErrorScreen AppState{ -- aopts=_uopts@UIOpts{cliopts_=_copts@CliOpts{reporto
|
|||||||
-- totalwidth = c^.availWidthL
|
-- totalwidth = c^.availWidthL
|
||||||
-- - 2 -- XXX due to margin ? shouldn't be necessary (cf UIUtils)
|
-- - 2 -- XXX due to margin ? shouldn't be necessary (cf UIUtils)
|
||||||
|
|
||||||
render $ defaultLayout toplabel bottomlabel $
|
render $ defaultLayout toplabel bottomlabel $ withAttr "error" $ str err
|
||||||
vBox $ map str $ lines err
|
|
||||||
|
|
||||||
drawErrorScreen _ = error "draw function called with wrong screen type, should not happen"
|
drawErrorScreen _ = error "draw function called with wrong screen type, should not happen"
|
||||||
|
|
||||||
|
|||||||
@ -66,6 +66,7 @@ themesList :: [(String, AttrMap)]
|
|||||||
themesList = [
|
themesList = [
|
||||||
("default", attrMap
|
("default", attrMap
|
||||||
(black `on` white & bold) [ -- default style for this theme
|
(black `on` white & bold) [ -- default style for this theme
|
||||||
|
("error", currentAttr `withForeColor` red),
|
||||||
(borderAttr , white `on` black & dim),
|
(borderAttr , white `on` black & dim),
|
||||||
(borderAttr <> "bold", white `on` black & bold),
|
(borderAttr <> "bold", white `on` black & bold),
|
||||||
(borderAttr <> "query", yellow `on` black & bold),
|
(borderAttr <> "query", yellow `on` black & bold),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user