Commit 2e70e76a authored by Christopher League's avatar Christopher League 🖥

Name/avatar from environment

parent e2d47bcd
Pipeline #536 passed with stage
in 1 minute and 9 seconds
...@@ -10,6 +10,8 @@ ip-from-header: "_env:IP_FROM_HEADER:false" ...@@ -10,6 +10,8 @@ ip-from-header: "_env:IP_FROM_HEADER:false"
# Uncomment to set an explicit approot # Uncomment to set an explicit approot
#approot: "_env:APPROOT:http://localhost:3000" #approot: "_env:APPROOT:http://localhost:3000"
provider-name: "_env:BOOKME_PROVIDER_NAME"
provider-avatar: "_env:BOOKME_PROVIDER_AVATAR"
time-zone: _env:BOOKME_TIME_ZONE:America/New_York time-zone: _env:BOOKME_TIME_ZONE:America/New_York
appointment-lengths-minutes: [15, 20, 25] appointment-lengths-minutes: [15, 20, 25]
locations: locations:
......
...@@ -109,6 +109,10 @@ data AppSettings = AppSettings ...@@ -109,6 +109,10 @@ data AppSettings = AppSettings
-- ^ Valid lengths of appointments, in minutes -- ^ Valid lengths of appointments, in minutes
, appCacheExpiry :: NominalDiffTime , appCacheExpiry :: NominalDiffTime
-- ^ Cached calendar data older than this will be refreshed -- ^ Cached calendar data older than this will be refreshed
, appProviderName :: Maybe Text
-- ^ Name of person/service providing appointments
, appProviderAvatar :: Maybe Text
-- ^ URL to image of person/service providing appointments
} }
-- | Wrap a time zone label, so we can specify type classes. -- | Wrap a time zone label, so we can specify type classes.
...@@ -153,6 +157,8 @@ instance FromJSON AppSettings where ...@@ -153,6 +157,8 @@ instance FromJSON AppSettings where
appBusyCalendarId <- o .: "busy-calendar" appBusyCalendarId <- o .: "busy-calendar"
appLookaheadWeeks <- o .: "look-ahead-weeks" appLookaheadWeeks <- o .: "look-ahead-weeks"
appApptLengthsMinutes <- o .: "appointment-lengths-minutes" appApptLengthsMinutes <- o .: "appointment-lengths-minutes"
appProviderName <- o .:? "provider-name"
appProviderAvatar <- o .:? "provider-avatar"
appCredentials <- o .: "calendar-credentials" appCredentials <- o .: "calendar-credentials"
appCacheExpiry <- appCacheExpiry <-
o .:? "calendar-refresh-seconds" .!= o .:? "calendar-refresh-seconds" .!=
......
...@@ -22,9 +22,9 @@ extra-deps: ...@@ -22,9 +22,9 @@ extra-deps:
- gogol-apps-calendar - gogol-apps-calendar
# Nix support # Nix support
#nix: nix:
pure: false
# enable: true # enable: true
# pure: false
# Build options # Build options
build: build:
......
$if null daysWithSlots $if null daysWithSlots
No appointments available in the next #{pluralN appLookaheadWeeks "week" "weeks"}. <p .alert.alert-warning>
<b>Sorry!
There seem to be no appointments available
in the next #{pluralN appLookaheadWeeks "week" "weeks"}.
$else $else
$forall eachDay <- daysWithSlots $forall eachDay <- daysWithSlots
$maybe firstSlot <- headMay eachDay $maybe firstSlot <- headMay eachDay
......
...@@ -3,13 +3,15 @@ ...@@ -3,13 +3,15 @@
<div .navbar-header> <div .navbar-header>
<a .navbar-brand href=@{HomeR}> <a .navbar-brand href=@{HomeR}>
<span .glyphicon.glyphicon-calendar aria-hidden="true"> <span .glyphicon.glyphicon-calendar aria-hidden="true">
<p .navbar-text> $maybe name <- appProviderName (appSettings master)
Prof. League <p .navbar-text>
#{name}
<div .container> $maybe pic <- appProviderAvatar (appSettings master)
<div .row #avatar> <div .container>
<div .col-md-12.hidden-md.hidden-lg> <div .row #avatar>
<img .img-circle width=100 height=100 src="https://avatars3.githubusercontent.com/u/50286?s=100&v=4"> <div .col-md-12.hidden-md.hidden-lg>
<img .img-circle width=100 height=100 src=#{pic}>
<div .container> <div .container>
$maybe msg <- mmsg $maybe msg <- mmsg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment