mirror of
https://code.sup39.dev/repos/Wqawg
synced 2025-03-20 04:46:22 +09:00
Display instance host at the top of all pages
This commit is contained in:
parent
ad034dbacc
commit
c41f1183e0
5 changed files with 14 additions and 0 deletions
src/Vervis
|
@ -174,6 +174,7 @@ instance Yesod App where
|
|||
pc <- widgetToPageContent $ do
|
||||
setTitle $ toHtml $
|
||||
T.intercalate " → " (map snd bcs) <> " → " <> title
|
||||
let instanceHost = appInstanceHost $ appSettings master
|
||||
$(widgetFile "default-layout")
|
||||
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
|
||||
|
||||
|
|
|
@ -59,6 +59,9 @@ data AppSettings = AppSettings
|
|||
-- | Base for all generated URLs. If @Nothing@, determined from the
|
||||
-- request headers.
|
||||
, appRoot :: Maybe Text
|
||||
-- | The instance's host (e.g. \"dev.angeley.es\"), currently used just
|
||||
-- for display.
|
||||
, appInstanceHost :: Text
|
||||
-- | Host/interface the server should bind to.
|
||||
, appHost :: HostPreference
|
||||
-- | Port to listen on
|
||||
|
@ -143,6 +146,7 @@ instance FromJSON AppSettings where
|
|||
appMaxInstanceKeys <- o .:? "max-instance-keys"
|
||||
appMaxActorKeys <- o .:? "max-actor-keys"
|
||||
appRoot <- o .:? "approot"
|
||||
appInstanceHost <- o .: "instance-host"
|
||||
appHost <- fromString <$> o .: "host"
|
||||
appPort <- o .: "http-port"
|
||||
appIpFromHeader <- o .: "ip-from-header"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue