mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-06 15:15:58 +00:00
Hide content search field when fulltext is not enabled
This commit is contained in:
parent
ac7d00c28f
commit
481d31ee74
@ -100,7 +100,7 @@ itemsBar texts flags settings model =
|
|||||||
|
|
||||||
|
|
||||||
defaultMenuBar : Texts -> Flags -> UiSettings -> Model -> Html Msg
|
defaultMenuBar : Texts -> Flags -> UiSettings -> Model -> Html Msg
|
||||||
defaultMenuBar texts _ settings model =
|
defaultMenuBar texts flags settings model =
|
||||||
let
|
let
|
||||||
btnStyle =
|
btnStyle =
|
||||||
S.secondaryBasicButton ++ " text-sm"
|
S.secondaryBasicButton ++ " text-sm"
|
||||||
@ -127,12 +127,20 @@ defaultMenuBar texts _ settings model =
|
|||||||
, Maybe.map value searchInput
|
, Maybe.map value searchInput
|
||||||
|> Maybe.withDefault (value "")
|
|> Maybe.withDefault (value "")
|
||||||
, class (String.replace "rounded" "" S.textInput)
|
, class (String.replace "rounded" "" S.textInput)
|
||||||
, class "py-1 text-sm border-r-0 rounded-l"
|
, class "py-2 text-sm"
|
||||||
|
, if flags.config.fullTextSearchEnabled then
|
||||||
|
class " border-r-0 rounded-l"
|
||||||
|
|
||||||
|
else
|
||||||
|
class "border rounded"
|
||||||
]
|
]
|
||||||
[]
|
[]
|
||||||
, a
|
, a
|
||||||
[ class S.secondaryBasicButtonPlain
|
[ class S.secondaryBasicButtonPlain
|
||||||
, class "text-sm px-4 py-2 border rounded-r"
|
, class "text-sm px-4 py-2 border rounded-r"
|
||||||
|
, classList
|
||||||
|
[ ( "hidden", not flags.config.fullTextSearchEnabled )
|
||||||
|
]
|
||||||
, href "#"
|
, href "#"
|
||||||
, onClick ToggleSearchType
|
, onClick ToggleSearchType
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user