aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Config.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r--compiler/src/Config.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs
index c75ab01..d025afd 100644
--- a/compiler/src/Config.hs
+++ b/compiler/src/Config.hs
@@ -42,6 +42,7 @@ import Resource (Resolution(..))
42 42
43data CompilerConfig = CompilerConfig 43data CompilerConfig = CompilerConfig
44 { galleryName :: String 44 { galleryName :: String
45 , implicitDirectoryTag :: Bool
45 , thumbnailResolution :: Resolution 46 , thumbnailResolution :: Resolution
46 , pictureMaxResolution :: Maybe Resolution 47 , pictureMaxResolution :: Maybe Resolution
47 } deriving (Generic, Show) 48 } deriving (Generic, Show)
@@ -49,6 +50,7 @@ data CompilerConfig = CompilerConfig
49instance FromJSON CompilerConfig where 50instance FromJSON CompilerConfig where
50 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig 51 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig
51 <$> v .:? "galleryName" .!= "Gallery" 52 <$> v .:? "galleryName" .!= "Gallery"
53 <*> v .:? "implicitDirectoryTag" .!= False
52 <*> v .:? "thumbnailResolution" .!= (Resolution 400 400) 54 <*> v .:? "thumbnailResolution" .!= (Resolution 400 400)
53 <*> v .:? "pictureMaxResolution" 55 <*> v .:? "pictureMaxResolution"
54 56