Hide content search field when fulltext is not enabled

This commit is contained in:
eikek 2021-06-07 21:30:41 +02:00
parent ac7d00c28f
commit 481d31ee74

View File

@ -100,7 +100,7 @@ itemsBar texts flags settings model =
defaultMenuBar : Texts -> Flags -> UiSettings -> Model -> Html Msg
defaultMenuBar texts _ settings model =
defaultMenuBar texts flags settings model =
let
btnStyle =
S.secondaryBasicButton ++ " text-sm"
@ -127,12 +127,20 @@ defaultMenuBar texts _ settings model =
, Maybe.map value searchInput
|> Maybe.withDefault (value "")
, 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
[ class S.secondaryBasicButtonPlain
, class "text-sm px-4 py-2 border rounded-r"
, classList
[ ( "hidden", not flags.config.fullTextSearchEnabled )
]
, href "#"
, onClick ToggleSearchType
]