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"
# Uncomment to set an explicit approot
#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
appointment-lengths-minutes: [15, 20, 25]
locations:
......
......@@ -109,6 +109,10 @@ data AppSettings = AppSettings
-- ^ Valid lengths of appointments, in minutes
, appCacheExpiry :: NominalDiffTime
-- ^ 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.
......@@ -153,6 +157,8 @@ instance FromJSON AppSettings where
appBusyCalendarId <- o .: "busy-calendar"
appLookaheadWeeks <- o .: "look-ahead-weeks"
appApptLengthsMinutes <- o .: "appointment-lengths-minutes"
appProviderName <- o .:? "provider-name"
appProviderAvatar <- o .:? "provider-avatar"
appCredentials <- o .: "calendar-credentials"
appCacheExpiry <-
o .:? "calendar-refresh-seconds" .!=
......
......@@ -22,9 +22,9 @@ extra-deps:
- gogol-apps-calendar
# Nix support
#nix:
nix:
pure: false
# enable: true
# pure: false
# Build options
build:
......
$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
$forall eachDay <- daysWithSlots
$maybe firstSlot <- headMay eachDay
......
......@@ -3,13 +3,15 @@
<div .navbar-header>
<a .navbar-brand href=@{HomeR}>
<span .glyphicon.glyphicon-calendar aria-hidden="true">
<p .navbar-text>
Prof. League
$maybe name <- appProviderName (appSettings master)
<p .navbar-text>
#{name}
<div .container>
<div .row #avatar>
<div .col-md-12.hidden-md.hidden-lg>
<img .img-circle width=100 height=100 src="https://avatars3.githubusercontent.com/u/50286?s=100&v=4">
$maybe pic <- appProviderAvatar (appSettings master)
<div .container>
<div .row #avatar>
<div .col-md-12.hidden-md.hidden-lg>
<img .img-circle width=100 height=100 src=#{pic}>
<div .container>
$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