diff options
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 |