diff options
author | pacien | 2019-12-28 19:04:54 +0100 |
---|---|---|
committer | pacien | 2019-12-28 19:04:54 +0100 |
commit | 538996dc84b03eab1429ddd693334673b857c005 (patch) | |
tree | 65b8c0e31895b6a96d559e73a038ebcf6395dbf6 /compiler/src/Config.hs | |
parent | c002224309f0149e7ef03b3037d1549f770f2f09 (diff) | |
download | ldgallery-538996dc84b03eab1429ddd693334673b857c005.tar.gz |
compiler: parameterise gallery name
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r-- | compiler/src/Config.hs | 6 |
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 | ||
43 | data CompilerConfig = CompilerConfig | 43 | data 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 | ||
48 | instance FromJSON CompilerConfig where | 49 | instance 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 | ||