hledger-ui 1.32.3 → 1.33
raw patch · 9 files changed
+117/−65 lines, 9 filesdep ~basedep ~hledgerdep ~hledger-libPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, hledger, hledger-lib, process, safe
API changes (from Hackage documentation)
Files
- CHANGES.md +22/−3
- Hledger/UI/AccountsScreen.hs +7/−2
- Hledger/UI/RegisterScreen.hs +4/−0
- Hledger/UI/Theme.hs +25/−1
- Hledger/UI/UIScreens.hs +1/−1
- hledger-ui.1 +3/−3
- hledger-ui.cabal +10/−10
- hledger-ui.info +42/−42
- hledger-ui.txt +3/−3
CHANGES.md view
@@ -1,10 +1,10 @@ <!--- _ + _ _ _(_) | | | | | | |_| | | \__,_|_|- + Breaking changes Fixes@@ -21,6 +21,23 @@ User-visible changes in hledger-ui. See also the hledger changelog. +# 1.33 2024-04-18++Fixes++- Require process 1.6.19.0+ to avoid any vulnerabilities on Windows from+ [HSEC-2024-0003](https://haskell.github.io/security-advisories/advisory/HSEC-2024-0003.html).++Features++- Add a `dark` theme. (Jonathan Dowland)++Improvements++- Allow building with GHC 9.8.++- Require safe >=0.3.20.+ # 1.32.3 2024-01-28 - Use hledger-1.32.3@@ -42,10 +59,10 @@ - Allow megaparsec 9.6 # 1.32.1 2023-12-07- - Use hledger-1.32.1 # 1.32 2023-12-01+ Fixes - The V key now preserves the valuation mode specified at the command@@ -53,6 +70,8 @@ - The hledger-ui package no longer wastefully builds its modules twice.++- Add upper bounds for vty & brick. # 1.31 2023-09-03
Hledger/UI/AccountsScreen.hs view
@@ -1,5 +1,6 @@ -- The accounts screen, showing accounts and balances like the CLI balance command. +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-}@@ -23,7 +24,11 @@ import Brick.Widgets.Edit import Control.Monad import Control.Monad.IO.Class (liftIO)+#if MIN_VERSION_base(4,19,0)+import Data.List hiding (reverse, (!?))+#else import Data.List hiding (reverse)+#endif import Data.Maybe import qualified Data.Text as T import Data.Time.Calendar (Day)@@ -80,7 +85,7 @@ displayitems = ass ^. assList . listElementsL acctwidths = V.map (\AccountsScreenItem{..} -> asItemIndentLevel + realLength asItemDisplayAccountName) displayitems- balwidths = V.map (maybe 0 (wbWidth . showMixedAmountB oneLine) . asItemMixedAmount) displayitems+ balwidths = V.map (maybe 0 (wbWidth . showMixedAmountB oneLineNoCostFmt) . asItemMixedAmount) displayitems preferredacctwidth = V.maximum acctwidths totalacctwidthseen = V.sum acctwidths preferredbalwidth = V.maximum balwidths@@ -169,7 +174,7 @@ splitAmounts balBuilder where balBuilder = maybe mempty showamt asItemMixedAmount- showamt = showMixedAmountB oneLine{displayMinWidth=Just balwidth, displayMaxWidth=Just balwidth}+ showamt = showMixedAmountB oneLineNoCostFmt{displayMinWidth=Just balwidth, displayMaxWidth=Just balwidth} balspace = T.replicate (2 + balwidth - wbWidth balBuilder) " " splitAmounts = foldr1 (<+>) . intersperse (str ", ") . map renderamt . T.splitOn ", " . wbToText renderamt :: T.Text -> Widget Name
Hledger/UI/RegisterScreen.hs view
@@ -19,7 +19,11 @@ import Control.Monad import Control.Monad.IO.Class (liftIO) import Data.Bifunctor (bimap, Bifunctor (second))+#if MIN_VERSION_base(4,19,0)+import Data.List hiding ((!?))+#else import Data.List+#endif import Data.Maybe import qualified Data.Text as T import qualified Data.Vector as V
Hledger/UI/Theme.hs view
@@ -21,9 +21,10 @@ import Data.Maybe import Graphics.Vty import Brick+import Safe (headErr) defaultTheme :: AttrMap-defaultTheme = fromMaybe (snd $ head themesList) $ getTheme "white"+defaultTheme = fromMaybe (snd $ headErr themesList) $ getTheme "white" -- PARTIAL headErr succeeds because themesList is non-null -- the theme named here should exist; -- otherwise it will take the first one from the list, -- which must be non-empty.@@ -101,6 +102,29 @@ (attrName "border" , white `on` black), (attrName "list" , defAttr), (attrName "list" <> attrName "selected" , defAttr & reverseVideo)+ ])++ ,("dark", attrMap (white `on` black & dim) [+ (attrName "border" , white `on` black)+ , (attrName "border" <> attrName "bold" , currentAttr & bold)+ , (attrName "border" <> attrName "depth" , active)+ , (attrName "border" <> attrName "filename" , currentAttr)+ , (attrName "border" <> attrName "key" , active)+ , (attrName "border" <> attrName "minibuffer" , white `on` black & bold)+ , (attrName "border" <> attrName "query" , active)+ , (attrName "border" <> attrName "selected" , active)+ , (attrName "error" , fg red)+ , (attrName "help" , currentAttr & bold)+ , (attrName "help" <> attrName "heading" , fg blue)+ , (attrName "help" <> attrName "key" , active)+ , (attrName "list" <> attrName "amount" <> attrName "decrease" , fg red)+ , (attrName "list" <> attrName "amount" <> attrName "decrease" <> attrName "selected" , red `on` black & bold)+ , (attrName "list" <> attrName "balance" , currentAttr)+ , (attrName "list" <> attrName "balance" <> attrName "negative" , fg red)+ , (attrName "list" <> attrName "balance" <> attrName "positive" , fg white)+ , (attrName "list" <> attrName "balance" <> attrName "negative" <> attrName "selected" , red `on` black & bold)+ , (attrName "list" <> attrName "balance" <> attrName "positive" <> attrName "selected" , yellow `on` black & bold)+ , (attrName "list" <> attrName "selected" , yellow `on` black & bold) ]) ]
Hledger/UI/UIScreens.hs view
@@ -291,7 +291,7 @@ ,rsItemTransaction = t } where- showamt = showMixedAmountB oneLine{displayMaxWidth=Just 3}+ showamt = showMixedAmountB oneLineNoCostFmt{displayMaxWidth=Just 3} wd = whichDate ropts' -- blank items are added to allow more control of scroll position; we won't allow movement over these.
hledger-ui.1 view
@@ -1,5 +1,5 @@ -.TH "HLEDGER\-UI" "1" "January 2024" "hledger-ui-1.32.3 " "hledger User Manuals"+.TH "HLEDGER\-UI" "1" "April 2024" "hledger-ui-1.33 " "hledger User Manuals" @@ -12,7 +12,7 @@ .PD \f[CR]hledger ui \-\- [OPTS] [QUERYARGS]\f[R] .SH DESCRIPTION-This manual is for hledger\[aq]s terminal interface, version 1.32.3.+This manual is for hledger\[aq]s terminal interface, version 1.33. See also the hledger manual for common concepts and file formats. .PP hledger is a robust, user\-friendly, cross\-platform set of programs for@@ -49,7 +49,7 @@ \f[CR]\-w \-\-watch\f[R] watch for data and date changes and reload automatically .TP-\f[CR]\-\-theme=default|terminal|greenterm\f[R]+\f[CR]\-\-theme=default|terminal|greenterm|dark\f[R] use this custom display theme .TP \f[CR]\-\-menu\f[R]
hledger-ui.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: hledger-ui-version: 1.32.3+version: 1.33 synopsis: Terminal interface for the hledger accounting system description: A simple terminal user interface for the hledger accounting system. It can be a more convenient way to browse your accounts than the CLI.@@ -68,11 +68,11 @@ hs-source-dirs: ./ ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind- cpp-options: -DVERSION="1.32.3" -DVERSION="1.32.3"+ cpp-options: -DVERSION="1.33" -DVERSION="1.33" build-depends: ansi-terminal >=0.9 , async- , base >=4.14 && <4.19+ , base >=4.14 && <4.20 , brick >=2.1.1 && <2.4 , cmdargs >=0.8 , containers >=0.5.9@@ -82,14 +82,14 @@ , extra >=1.6.3 , filepath , fsnotify ==0.4.*- , hledger >=1.32.3 && <1.33- , hledger-lib >=1.32.3 && <1.33+ , hledger ==1.33.*+ , hledger-lib ==1.33.* , megaparsec >=7.0.0 && <9.7 , microlens >=0.4 , microlens-platform >=0.2.3.1 , mtl >=2.2.1- , process >=1.2- , safe >=0.3.19+ , process >=1.6.19.0+ , safe >=0.3.20 , split >=0.1 , text >=1.2.4.1 , text-zipper >=0.4@@ -113,10 +113,10 @@ hs-source-dirs: app ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind- cpp-options: -DVERSION="1.32.3"+ cpp-options: -DVERSION="1.33" build-depends:- base >=4.14 && <4.19+ base >=4.14 && <4.20 , hledger-ui default-language: Haskell2010 if flag(threaded)- ghc-options: -threaded+ ghc-options: -threaded -with-rtsopts=-T
hledger-ui.info view
@@ -16,7 +16,7 @@ 'hledger-ui [OPTS] [QUERYARGS]' 'hledger ui -- [OPTS] [QUERYARGS]' - This manual is for hledger's terminal interface, version 1.32.3. See+ This manual is for hledger's terminal interface, version 1.33. See also the hledger manual for common concepts and file formats. hledger is a robust, user-friendly, cross-platform set of programs@@ -66,7 +66,7 @@ '-w --watch' watch for data and date changes and reload automatically-'--theme=default|terminal|greenterm'+'--theme=default|terminal|greenterm|dark' use this custom display theme '--menu'@@ -671,46 +671,46 @@ Tag Table: Node: Top221-Node: OPTIONS1830-Ref: #options1928-Node: General help options2951-Ref: #general-help-options3100-Node: General input options3382-Ref: #general-input-options3567-Node: General reporting options4224-Ref: #general-reporting-options4388-Node: MOUSE7778-Ref: #mouse7873-Node: KEYS8110-Ref: #keys8203-Node: SCREENS12858-Ref: #screens12956-Node: Menu13536-Ref: #menu13629-Node: Cash accounts13824-Ref: #cash-accounts13966-Node: Balance sheet accounts14150-Ref: #balance-sheet-accounts14331-Node: Income statement accounts14451-Ref: #income-statement-accounts14637-Node: All accounts14801-Ref: #all-accounts14947-Node: Register15129-Ref: #register15253-Node: Transaction17537-Ref: #transaction17660-Node: Error19077-Ref: #error19171-Node: TIPS19415-Ref: #tips19514-Node: Watch mode19556-Ref: #watch-mode19663-Node: Debug output21122-Ref: #debug-output21233-Node: ENVIRONMENT21445-Ref: #environment21555-Node: BUGS21746-Ref: #bugs21829+Node: OPTIONS1828+Ref: #options1926+Node: General help options2954+Ref: #general-help-options3103+Node: General input options3385+Ref: #general-input-options3570+Node: General reporting options4227+Ref: #general-reporting-options4391+Node: MOUSE7781+Ref: #mouse7876+Node: KEYS8113+Ref: #keys8206+Node: SCREENS12861+Ref: #screens12959+Node: Menu13539+Ref: #menu13632+Node: Cash accounts13827+Ref: #cash-accounts13969+Node: Balance sheet accounts14153+Ref: #balance-sheet-accounts14334+Node: Income statement accounts14454+Ref: #income-statement-accounts14640+Node: All accounts14804+Ref: #all-accounts14950+Node: Register15132+Ref: #register15256+Node: Transaction17540+Ref: #transaction17663+Node: Error19080+Ref: #error19174+Node: TIPS19418+Ref: #tips19517+Node: Watch mode19559+Ref: #watch-mode19666+Node: Debug output21125+Ref: #debug-output21236+Node: ENVIRONMENT21448+Ref: #environment21558+Node: BUGS21749+Ref: #bugs21832 End Tag Table
hledger-ui.txt view
@@ -9,7 +9,7 @@ hledger ui -- [OPTS] [QUERYARGS] DESCRIPTION- This manual is for hledger's terminal interface, version 1.32.3. See+ This manual is for hledger's terminal interface, version 1.33. See also the hledger manual for common concepts and file formats. hledger is a robust, user-friendly, cross-platform set of programs for@@ -44,7 +44,7 @@ -w --watch watch for data and date changes and reload automatically - --theme=default|terminal|greenterm+ --theme=default|terminal|greenterm|dark use this custom display theme --menu start in the menu screen@@ -535,4 +535,4 @@ SEE ALSO hledger(1), hledger-ui(1), hledger-web(1), ledger(1) -hledger-ui-1.32.3 January 2024 HLEDGER-UI(1)+hledger-ui-1.33 April 2024 HLEDGER-UI(1)