chore(auth): new 'Account' section
This commit is contained in:
parent
1e5c4df163
commit
4c109538ee
@ -1,4 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Steffen Jost <jost@cip.ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>,Winnie Ros <winnie.ros@campus.lmu.de>
|
# SPDX-FileCopyrightText: 2022-2024 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Steffen Jost <jost@cip.ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>,Winnie Ros <winnie.ros@campus.lmu.de>,David Mosbach <david.mosbach@uniworx.de>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
@ -24,6 +24,7 @@ MenuPayments: Zahlungsbedingungen
|
|||||||
MenuInstance: Instanz-Identifikation
|
MenuInstance: Instanz-Identifikation
|
||||||
MenuHealth: Instanz-Zustand
|
MenuHealth: Instanz-Zustand
|
||||||
MenuHelp: Hilfe
|
MenuHelp: Hilfe
|
||||||
|
MenuAccount: Konto
|
||||||
MenuProfile: Anpassen
|
MenuProfile: Anpassen
|
||||||
MenuLogin !ident-ok: Login
|
MenuLogin !ident-ok: Login
|
||||||
MenuLogout !ident-ok: Logout
|
MenuLogout !ident-ok: Logout
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>,Winnie Ros <winnie.ros@campus.lmu.de>
|
# SPDX-FileCopyrightText: 2022-2024 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>,Winnie Ros <winnie.ros@campus.lmu.de>,David Mosbach <david.mosbach@uniworx.de>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
@ -24,6 +24,7 @@ MenuPayments: Payment Terms
|
|||||||
MenuInstance: Instance identification
|
MenuInstance: Instance identification
|
||||||
MenuHealth: Instance health
|
MenuHealth: Instance health
|
||||||
MenuHelp: Support
|
MenuHelp: Support
|
||||||
|
MenuAccount: Account
|
||||||
MenuProfile: Settings
|
MenuProfile: Settings
|
||||||
MenuLogin: Login
|
MenuLogin: Login
|
||||||
MenuLogout: Logout
|
MenuLogout: Logout
|
||||||
|
|||||||
@ -9,7 +9,7 @@ let
|
|||||||
|
|
||||||
haskellPackages = pkgs.haskellPackages;
|
haskellPackages = pkgs.haskellPackages;
|
||||||
|
|
||||||
oauth2Flake = (builtins.getFlake "git+https://gitlab.uniworx.de/mosbach/oauth2-mock-server/?rev=83d99e55303f5b1cd6cde30b2936d61419268f8c&ref=oidc").packages.x86_64-linux;
|
oauth2Flake = (builtins.getFlake "git+https://gitlab.uniworx.de/mosbach/oauth2-mock-server/?rev=7b995e6cffa963a24eb5d0373b2d29089533284f&ref=main").packages.x86_64-linux;
|
||||||
|
|
||||||
|
|
||||||
oauth2MockServer = oauth2Flake.default;
|
oauth2MockServer = oauth2Flake.default;
|
||||||
|
|||||||
@ -543,42 +543,37 @@ defaultLinks :: ( MonadHandler m
|
|||||||
, BearerAuthSite UniWorX
|
, BearerAuthSite UniWorX
|
||||||
) => m [Nav]
|
) => m [Nav]
|
||||||
defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the header.
|
defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the header.
|
||||||
[ return NavHeader
|
[ return NavHeaderContainer
|
||||||
{ navHeaderRole = NavHeaderSecondary
|
{ navHeaderRole = NavHeaderSecondary
|
||||||
, navIcon = IconMenuLogout
|
, navLabel = SomeMessage MsgMenuAccount
|
||||||
, navLink = NavLink
|
, navIcon = IconMenuAccount
|
||||||
{ navLabel = MsgMenuLogout
|
, navChildren =
|
||||||
, navRoute = SSOutR -- AuthR LogoutR
|
[ NavLink
|
||||||
, navAccess' = NavAccessHandler $ is _Just <$> maybeAuthId
|
{ navLabel = MsgMenuLogout
|
||||||
, navType = NavTypeLink { navModal = False }
|
, navRoute = SSOutR -- AuthR LogoutR
|
||||||
, navQuick' = mempty
|
, navAccess' = NavAccessHandler $ is _Just <$> maybeAuthId
|
||||||
, navForceActive = False
|
, navType = NavTypeLink { navModal = False }
|
||||||
}
|
, navQuick' = mempty
|
||||||
}
|
, navForceActive = False
|
||||||
, return NavHeader
|
}
|
||||||
{ navHeaderRole = NavHeaderSecondary
|
, NavLink
|
||||||
, navIcon = IconMenuLogin
|
{ navLabel = MsgMenuLogin
|
||||||
, navLink = NavLink
|
, navRoute = AuthR LoginR
|
||||||
{ navLabel = MsgMenuLogin
|
, navAccess' = NavAccessHandler $ is _Nothing <$> maybeAuthId
|
||||||
, navRoute = AuthR LoginR
|
, navType = NavTypeLink { navModal = True }
|
||||||
, navAccess' = NavAccessHandler $ is _Nothing <$> maybeAuthId
|
, navQuick' = mempty
|
||||||
, navType = NavTypeLink { navModal = True }
|
, navForceActive = False
|
||||||
, navQuick' = mempty
|
}
|
||||||
, navForceActive = False
|
, NavLink
|
||||||
}
|
{ navLabel = MsgMenuProfile
|
||||||
}
|
, navRoute = ProfileR
|
||||||
, return NavHeader
|
, navAccess' = NavAccessHandler $ is _Just <$> maybeAuthId
|
||||||
{ navHeaderRole = NavHeaderSecondary
|
, navType = NavTypeLink { navModal = False }
|
||||||
, navIcon = IconMenuProfile
|
, navQuick' = mempty
|
||||||
, navLink = NavLink
|
, navForceActive = False
|
||||||
{ navLabel = MsgMenuProfile
|
}
|
||||||
, navRoute = ProfileR
|
]
|
||||||
, navAccess' = NavAccessHandler $ is _Just <$> maybeAuthId
|
}
|
||||||
, navType = NavTypeLink { navModal = False }
|
|
||||||
, navQuick' = mempty
|
|
||||||
, navForceActive = False
|
|
||||||
}
|
|
||||||
}
|
|
||||||
, do
|
, do
|
||||||
mCurrentRoute <- getCurrentRoute
|
mCurrentRoute <- getCurrentRoute
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
-- SPDX-FileCopyrightText: 2022-23 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>,Wolfgang Witt <Wolfgang.Witt@campus.lmu.de>,Steffen Jost <s.jost@fraport.de>
|
-- SPDX-FileCopyrightText: 2022-24 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>,Wolfgang Witt <Wolfgang.Witt@campus.lmu.de>,Steffen Jost <s.jost@fraport.de>,David Mosbach <david.mosbach@uniworx.de>
|
||||||
--
|
--
|
||||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
@ -81,6 +81,7 @@ data Icon
|
|||||||
| IconNavContainerClose | IconPageActionChildrenClose
|
| IconNavContainerClose | IconPageActionChildrenClose
|
||||||
| IconMenuNews
|
| IconMenuNews
|
||||||
| IconMenuHelp
|
| IconMenuHelp
|
||||||
|
| IconMenuAccount
|
||||||
| IconMenuProfile
|
| IconMenuProfile
|
||||||
| IconMenuLogin | IconMenuLogout
|
| IconMenuLogin | IconMenuLogout
|
||||||
| IconBreadcrumbsHome
|
| IconBreadcrumbsHome
|
||||||
@ -173,6 +174,7 @@ iconText = \case
|
|||||||
IconPageActionChildrenClose -> "chevron-up"
|
IconPageActionChildrenClose -> "chevron-up"
|
||||||
IconMenuNews -> "megaphone"
|
IconMenuNews -> "megaphone"
|
||||||
IconMenuHelp -> "question"
|
IconMenuHelp -> "question"
|
||||||
|
IconMenuAccount -> "user"
|
||||||
IconMenuProfile -> "cogs"
|
IconMenuProfile -> "cogs"
|
||||||
IconMenuLogin -> "sign-in-alt"
|
IconMenuLogin -> "sign-in-alt"
|
||||||
IconMenuLogout -> "sign-out-alt"
|
IconMenuLogout -> "sign-out-alt"
|
||||||
|
|||||||
Reference in New Issue
Block a user