aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Config.hs
diff options
context:
space:
mode:
authorpacien2019-12-31 01:39:23 +0100
committerpacien2019-12-31 01:39:23 +0100
commit7ef9f09c0f3be1cd5e1f38c9abc845abc9ed3639 (patch)
treeb727b960c95feae01f52274013c1ad2ccb01c4d5 /compiler/src/Config.hs
parent856d6ea290f6050e813e9cd5634b9e9960995671 (diff)
downloadldgallery-7ef9f09c0f3be1cd5e1f38c9abc845abc9ed3639.tar.gz
compiler: add option to add implicit directory tags
GitHub: closes #7
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