diff options
author | pacien | 2020-09-25 16:01:49 +0200 |
---|---|---|
committer | pacien | 2020-09-25 16:01:49 +0200 |
commit | e93f7b1eb84c083d67567115284c0002a3a7d5fc (patch) | |
tree | 8d373e8f7f571485e1330928f43b090ed004c525 /compiler/src/Config.hs | |
parent | 8e3ac8fe44bebb38e1882ca7f06b8100078ad88d (diff) | |
parent | fd542f75a1d94ee5f804d0925823276b97f38581 (diff) | |
download | ldgallery-e93f7b1eb84c083d67567115284c0002a3a7d5fc.tar.gz |
Merge branch 'develop' for release v2.0v2.0
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r-- | compiler/src/Config.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs index 0ae0fa1..afcfb36 100644 --- a/compiler/src/Config.hs +++ b/compiler/src/Config.hs | |||
@@ -73,8 +73,8 @@ instance FromJSON GalleryConfig where | |||
73 | <*> v .:? "includedTags" .!= ["*"] | 73 | <*> v .:? "includedTags" .!= ["*"] |
74 | <*> v .:? "excludedTags" .!= [] | 74 | <*> v .:? "excludedTags" .!= [] |
75 | <*> v .:? "tagCategories" .!= [] | 75 | <*> v .:? "tagCategories" .!= [] |
76 | <*> v .:? "tagsFromDirectories" .!= (TagsFromDirectoriesConfig 0 "") | 76 | <*> v .:? "tagsFromDirectories" .!= TagsFromDirectoriesConfig 0 "" |
77 | <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 300) | 77 | <*> v .:? "thumbnailMaxResolution" .!= Resolution 400 300 |
78 | <*> v .:? "pictureMaxResolution" | 78 | <*> v .:? "pictureMaxResolution" |
79 | 79 | ||
80 | readConfig :: FileName -> IO GalleryConfig | 80 | readConfig :: FileName -> IO GalleryConfig |
@@ -84,7 +84,7 @@ readConfig = decodeYamlFile | |||
84 | data ViewerConfig = ViewerConfig | 84 | data ViewerConfig = ViewerConfig |
85 | { galleryTitle :: String | 85 | { galleryTitle :: String |
86 | , tagCategories :: [String] | 86 | , tagCategories :: [String] |
87 | } deriving (Generic, ToJSON, Show) | 87 | } deriving (Generic, ToJSON, FromJSON, Show) |
88 | 88 | ||
89 | viewerConfig :: GalleryConfig -> ViewerConfig | 89 | viewerConfig :: GalleryConfig -> ViewerConfig |
90 | viewerConfig GalleryConfig{galleryTitle, tagCategories} = ViewerConfig galleryTitle tagCategories | 90 | viewerConfig GalleryConfig{galleryTitle, tagCategories} = ViewerConfig galleryTitle tagCategories |