aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Config.hs
diff options
context:
space:
mode:
authorpacien2019-12-28 19:04:54 +0100
committerpacien2019-12-28 19:04:54 +0100
commit538996dc84b03eab1429ddd693334673b857c005 (patch)
tree65b8c0e31895b6a96d559e73a038ebcf6395dbf6 /compiler/src/Config.hs
parentc002224309f0149e7ef03b3037d1549f770f2f09 (diff)
downloadldgallery-538996dc84b03eab1429ddd693334673b857c005.tar.gz
compiler: parameterise gallery name
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r--compiler/src/Config.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs
index fe981c3..044a155 100644
--- a/compiler/src/Config.hs
+++ b/compiler/src/Config.hs
@@ -41,13 +41,15 @@ import Processors (Resolution(..))
41 41
42 42
43data CompilerConfig = CompilerConfig 43data CompilerConfig = CompilerConfig
44 { thumbnailResolution :: Resolution 44 { galleryName :: String
45 , thumbnailResolution :: Resolution
45 , pictureMaxResolution :: Maybe Resolution 46 , pictureMaxResolution :: Maybe Resolution
46 } deriving (Generic, Show) 47 } deriving (Generic, Show)
47 48
48instance FromJSON CompilerConfig where 49instance FromJSON CompilerConfig where
49 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig 50 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig
50 <$> v .:? "thumbnailResolution" .!= (Resolution 400 400) 51 <$> v .:? "galleryName" .!= "Gallery"
52 <*> v .:? "thumbnailResolution" .!= (Resolution 400 400)
51 <*> v .:? "pictureMaxResolution" 53 <*> v .:? "pictureMaxResolution"
52 54
53 55