mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-07 15:45:59 +00:00
Fix navbar link for anonymous
This commit is contained in:
parent
7cbdf919f4
commit
fe77f7245a
@ -70,7 +70,7 @@ topNavUser auth model =
|
|||||||
, baseStyle = "font-bold inline-flex items-center px-4 py-2"
|
, baseStyle = "font-bold inline-flex items-center px-4 py-2"
|
||||||
, activeStyle = "hover:bg-blue-200 dark:hover:bg-bluegray-800 w-12"
|
, activeStyle = "hover:bg-blue-200 dark:hover:bg-bluegray-800 w-12"
|
||||||
}
|
}
|
||||||
, headerNavItem model
|
, headerNavItem True model
|
||||||
, div [ class "flex flex-grow justify-end" ]
|
, div [ class "flex flex-grow justify-end" ]
|
||||||
[ userMenu texts.app auth model
|
[ userMenu texts.app auth model
|
||||||
, dataMenu texts.app auth model
|
, dataMenu texts.app auth model
|
||||||
@ -93,7 +93,7 @@ topNavAnon model =
|
|||||||
, baseStyle = "font-bold inline-flex items-center px-4 py-2"
|
, baseStyle = "font-bold inline-flex items-center px-4 py-2"
|
||||||
, activeStyle = "hover:bg-blue-200 dark:hover:bg-bluegray-800 w-12"
|
, activeStyle = "hover:bg-blue-200 dark:hover:bg-bluegray-800 w-12"
|
||||||
}
|
}
|
||||||
, headerNavItem model
|
, headerNavItem False model
|
||||||
, div [ class "flex flex-grow justify-end" ]
|
, div [ class "flex flex-grow justify-end" ]
|
||||||
[ langMenu model
|
[ langMenu model
|
||||||
, a
|
, a
|
||||||
@ -107,11 +107,24 @@ topNavAnon model =
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
headerNavItem : Model -> Html Msg
|
headerNavItem : Bool -> Model -> Html Msg
|
||||||
headerNavItem model =
|
headerNavItem authenticated model =
|
||||||
a
|
let
|
||||||
[ class "inline-flex font-bold hover:bg-blue-200 dark:hover:bg-bluegray-800 items-center px-4"
|
tag =
|
||||||
, Page.href HomePage
|
if authenticated then
|
||||||
|
a
|
||||||
|
|
||||||
|
else
|
||||||
|
div
|
||||||
|
in
|
||||||
|
tag
|
||||||
|
[ class "inline-flex font-bold items-center px-4"
|
||||||
|
, classList [ ( "hover:bg-blue-200 dark:hover:bg-bluegray-800", authenticated ) ]
|
||||||
|
, if authenticated then
|
||||||
|
Page.href HomePage
|
||||||
|
|
||||||
|
else
|
||||||
|
href "#"
|
||||||
]
|
]
|
||||||
[ img
|
[ img
|
||||||
[ src (model.flags.config.docspellAssetPath ++ "/img/logo-96.png")
|
[ src (model.flags.config.docspellAssetPath ++ "/img/logo-96.png")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user