From 538996dc84b03eab1429ddd693334673b857c005 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 28 Dec 2019 19:04:54 +0100 Subject: compiler: parameterise gallery name --- compiler/src/Config.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/src/Config.hs') 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(..)) data CompilerConfig = CompilerConfig - { thumbnailResolution :: Resolution + { galleryName :: String + , thumbnailResolution :: Resolution , pictureMaxResolution :: Maybe Resolution } deriving (Generic, Show) instance FromJSON CompilerConfig where parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig - <$> v .:? "thumbnailResolution" .!= (Resolution 400 400) + <$> v .:? "galleryName" .!= "Gallery" + <*> v .:? "thumbnailResolution" .!= (Resolution 400 400) <*> v .:? "pictureMaxResolution" -- cgit v1.2.3