From 3bd05c27d29078663f7225bcdcfe2178e795be4b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 20 Sep 2013 12:19:55 -0400 Subject: [PATCH] work around evilsplicer bug Really simple TH splices are printed in a way it doesn't parse. --- Assistant/WebApp/Configurators/Edit.hs | 2 +- Assistant/WebApp/Gpg.hs | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Assistant/WebApp/Configurators/Edit.hs b/Assistant/WebApp/Configurators/Edit.hs index 32d0e5ecde..18c66c30d8 100644 --- a/Assistant/WebApp/Configurators/Edit.hs +++ b/Assistant/WebApp/Configurators/Edit.hs @@ -242,4 +242,4 @@ encrypted using gpg key:
  • ^{gpgKeyDisplay k (M.lookup k knownkeys)} |] -getRepoEncryption _ _ = [whamlet||] -- local repo +getRepoEncryption _ _ = return () -- local repo diff --git a/Assistant/WebApp/Gpg.hs b/Assistant/WebApp/Gpg.hs index d549547011..e240d36937 100644 --- a/Assistant/WebApp/Gpg.hs +++ b/Assistant/WebApp/Gpg.hs @@ -25,12 +25,11 @@ gpgKeyDisplay :: KeyId -> Maybe UserId -> Widget gpgKeyDisplay keyid userid = [whamlet| # - ^{displayname} + $maybe name <- userid + #{name} + $nothing + key id #{keyid} |] - where - displayname = case userid of - Just name | not (null name) -> [whamlet|#{name}|] - _ -> [whamlet|key id #{keyid}|] {- Generates a gpg user id that is not used by any existing secret key -} newUserId :: IO UserId