Make login status display consider unverified login
This commit is contained in:
parent
04e26a911d
commit
4875f0b9f7
2 changed files with 10 additions and 4 deletions
|
@ -148,7 +148,7 @@ instance Yesod App where
|
|||
defaultLayout widget = do
|
||||
master <- getYesod
|
||||
mmsg <- getMessage
|
||||
mperson <- maybeAuth
|
||||
mperson <- maybeAuthAllowUnverified
|
||||
(title, bcs) <- breadcrumbs
|
||||
|
||||
-- We break up the default layout into two components:
|
||||
|
|
|
@ -12,10 +12,16 @@ $# You should have received a copy of the CC0 Public Domain Dedication along
|
|||
$# with this software. If not, see
|
||||
$# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
$maybe Entity _pid person <- mperson
|
||||
$maybe (Entity _pid person, verified) <- mperson
|
||||
<div>
|
||||
You are logged in as #{personLogin person}.
|
||||
<a href=@{AuthR LogoutR}>Log out.
|
||||
$if verified
|
||||
You are logged in as #{personLogin person}.
|
||||
<a href=@{AuthR LogoutR}>Log out.
|
||||
$else
|
||||
You are logged in as #{personLogin person} (unverified). If you haven't
|
||||
received a verification link by email, you can ask to
|
||||
<a href=@{ResendVerifyEmailR}>resend
|
||||
it. Or <a href=@{AuthR LogoutR}>Log out.
|
||||
$nothing
|
||||
<div>
|
||||
You are not logged in.
|
||||
|
|
Loading…
Reference in a new issue