aboutsummaryrefslogtreecommitdiff
path: root/server/src/View
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/View')
-rw-r--r--server/src/View/Mail/SignIn.hs21
-rw-r--r--server/src/View/Page.hs9
2 files changed, 5 insertions, 25 deletions
diff --git a/server/src/View/Mail/SignIn.hs b/server/src/View/Mail/SignIn.hs
deleted file mode 100644
index 3c5469f..0000000
--- a/server/src/View/Mail/SignIn.hs
+++ /dev/null
@@ -1,21 +0,0 @@
-module View.Mail.SignIn
- ( mail
- ) where
-
-import Data.Text (Text)
-
-import Common.Model (User (..))
-import qualified Common.Msg as Msg
-
-import Conf (Conf)
-import qualified Conf as Conf
-import qualified Model.Mail as M
-
-mail :: Conf -> User -> Text -> [Text] -> M.Mail
-mail conf user url to =
- M.Mail
- { M.from = Conf.noReplyMail conf
- , M.to = to
- , M.subject = Msg.get Msg.SignIn_MailTitle
- , M.body = Msg.get (Msg.SignIn_MailBody (_user_name user) url)
- }
diff --git a/server/src/View/Page.hs b/server/src/View/Page.hs
index f47c544..4ada5f7 100644
--- a/server/src/View/Page.hs
+++ b/server/src/View/Page.hs
@@ -6,6 +6,7 @@ import Data.Aeson (encode)
import qualified Data.Aeson.Types as Json
import Data.Text.Internal.Lazy (Text)
import Data.Text.Lazy.Encoding (decodeUtf8)
+import Prelude hiding (init)
import Text.Blaze.Html
import Text.Blaze.Html.Renderer.Text (renderHtml)
@@ -14,20 +15,20 @@ import qualified Text.Blaze.Html5 as H
import Text.Blaze.Html5.Attributes
import qualified Text.Blaze.Html5.Attributes as A
-import Common.Model (InitResult)
+import Common.Model (Init)
import qualified Common.Msg as Msg
import Design.Global (globalDesign)
-page :: InitResult -> Text
-page initResult =
+page :: Maybe Init -> Text
+page init =
renderHtml . docTypeHtml $ do
H.head $ do
meta ! charset "UTF-8"
meta ! name "viewport" ! content "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
H.title (toHtml $ Msg.get Msg.App_Title)
script ! src "/javascript/main.js" $ ""
- jsonScript "init" initResult
+ jsonScript "init" init
link ! rel "stylesheet" ! type_ "text/css" ! href "/css/reset.css"
link ! rel "icon" ! type_ "image/png" ! href "/images/icon.png"
H.style $ toHtml globalDesign