Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bookme
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christopher League
bookme
Commits
2e70e76a
Commit
2e70e76a
authored
Jun 06, 2018
by
Christopher League
🖥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Name/avatar from environment
parent
e2d47bcd
Pipeline
#536
passed with stage
in 1 minute and 9 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
9 deletions
+22
-9
config/settings.yml
config/settings.yml
+2
-0
src/Settings.hs
src/Settings.hs
+6
-0
stack.yaml
stack.yaml
+2
-2
templates/avail.hamlet
templates/avail.hamlet
+4
-1
templates/default-layout.hamlet
templates/default-layout.hamlet
+8
-6
No files found.
config/settings.yml
View file @
2e70e76a
...
...
@@ -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
:
...
...
src/Settings.hs
View file @
2e70e76a
...
...
@@ -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"
.!=
...
...
stack.yaml
View file @
2e70e76a
...
...
@@ -22,9 +22,9 @@ extra-deps:
-
gogol-apps-calendar
# Nix support
#nix:
nix
:
pure
:
false
# enable: true
# pure: false
# Build options
build
:
...
...
templates/avail.hamlet
View file @
2e70e76a
$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
...
...
templates/default-layout.hamlet
View file @
2e70e76a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment