diff --git a/package.yaml b/package.yaml index 0dabcff..1fb686e 100644 --- a/package.yaml +++ b/package.yaml @@ -21,7 +21,7 @@ description: Hascard is a text-based user interface for reviewing notes dependencies: - base >= 4.7 && < 5 -- brick >= 2.1.1 && < 3.0 +- brick >= 2.3.1 && < 3.0 - containers > 0.6.0 && < 0.8 - directory >= 1.3.3 && < 1.4 - filepath >= 1.4.2 && < 1.5 diff --git a/src/Parameters.hs b/src/Parameters.hs index db46560..4fd9690 100644 --- a/src/Parameters.hs +++ b/src/Parameters.hs @@ -137,7 +137,8 @@ chunkSubsetField capacity stLens initialState = , formFieldLens = stLens , formFieldUpdate = const , formFieldRenderHelper = id - , formFieldConcat = customConcat } + , formFieldConcat = customConcat + , formFieldVisibilityMode = ShowAugmentedField } okField :: (Ord n, Show n) => Lens' s Bool -> n -> String -> s -> FormFieldState s e n okField stLens name label initialState = @@ -153,7 +154,8 @@ okField stLens name label initialState = , formFieldLens = stLens , formFieldUpdate = const , formFieldRenderHelper = id - , formFieldConcat = vBox } + , formFieldConcat = vBox + , formFieldVisibilityMode = ShowAugmentedField } renderOk :: String -> n -> Bool -> Bool -> Widget n renderOk label _ focus _ = diff --git a/src/UI/BrickHelpers.hs b/src/UI/BrickHelpers.hs index e1e4aec..2674546 100644 --- a/src/UI/BrickHelpers.hs +++ b/src/UI/BrickHelpers.hs @@ -80,7 +80,8 @@ yesnoField rightAlign stLens name label initialState = , formFieldLens = stLens , formFieldUpdate = const , formFieldRenderHelper = id - , formFieldConcat = vBox } + , formFieldConcat = vBox + , formFieldVisibilityMode = ShowFocusedFieldOnly } renderYesno :: Ord n => Bool -> String -> n -> Bool -> Bool -> Widget n renderYesno rightAlign label n foc val = @@ -114,7 +115,8 @@ naturalNumberField bound stLens name postfix initialState = , formFieldLens = stLens , formFieldUpdate = const , formFieldRenderHelper = id - , formFieldConcat = vBox } + , formFieldConcat = vBox + , formFieldVisibilityMode = ShowAugmentedField } renderNaturalNumber :: Int -> String -> n -> Bool -> Int -> Widget n renderNaturalNumber bound postfix n foc val = diff --git a/stack.yaml b/stack.yaml index cb1a3d2..c5aac35 100644 --- a/stack.yaml +++ b/stack.yaml @@ -36,6 +36,7 @@ packages: # extra-deps: - vty-windows-0.2.0.1 +- brick-2.3.1@sha256:4c36e5d77dc360641a5aa9361949d981e4aecc7f1372c862e0b2451d614b5f5c,17394 # - acme-missiles-0.3 # - git: https://github.com/commercialhaskell/stack.git # commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a diff --git a/stack.yaml.lock b/stack.yaml.lock index 6594cd3..03c7b61 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -11,6 +11,13 @@ packages: size: 2160 original: hackage: vty-windows-0.2.0.1 +- completed: + hackage: brick-2.3.1@sha256:4c36e5d77dc360641a5aa9361949d981e4aecc7f1372c862e0b2451d614b5f5c,17394 + pantry-tree: + sha256: 7476f449a27ac6736264f1fdde37e0282d43cd803d00da5ebe0ff811ee4035fc + size: 4671 + original: + hackage: brick-2.3.1@sha256:4c36e5d77dc360641a5aa9361949d981e4aecc7f1372c862e0b2451d614b5f5c,17394 snapshots: - completed: sha256: e176944bc843f740e05242fa7a66ca1f440c127e425254f7f1257f9b19add23f