This repository was archived by the owner on Feb 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,11 @@ data Config = Config
153
153
, _listener :: ListenerConfig
154
154
, _monitoring :: Maybe ListenerConfig
155
155
, _htmlStatic :: FilePath
156
- , _avatarPath :: FilePath -- avatars are stored in this directory
156
+ , _avatarPath :: FilePath -- avatars are stored in this directory:
157
+ -- FIXME: i think this is not working. run `git grep
158
+ -- \"/avatars\"`, and you will find a few places where
159
+ -- Config should be consulted, but a string literal is used
160
+ -- instead!
157
161
, _cfgCsrfSecret :: CsrfSecret
158
162
, _logging :: LogConfig
159
163
, _persist :: PersistConfig
Original file line number Diff line number Diff line change @@ -97,13 +97,12 @@ instance FormPage PageDelegateVote where
97
97
DF. inputHidden " selected-delegate" v
98
98
div_ [class_ " delegate-image-select" ] $ do
99
99
ul_ . for_ options' $ \ user -> do
100
- let url = " avatars/" <> uid <> " .png"
101
- uid = user ^. _Id . unAUID . showed
100
+ let uid = user ^. _Id . unAUID . showed
102
101
unm = user ^. userLogin . unUserLogin
103
102
li_ [ class_ " icon-list-button col-3-12"
104
103
, id_ $ " page-delegate-vote-uid." <> cs uid
105
104
] $ do
106
- img_ [ src_ . U. TopStatic $ fromString url
105
+ img_ [ src_ . U. TopAvatar . fromString $ uid <> " .png "
107
106
, alt_ $ user ^. userLogin . unUserLogin
108
107
]
109
108
span_ $ toHtml unm
Original file line number Diff line number Diff line change @@ -177,6 +177,7 @@ data Top (r :: AllowedMethod) =
177
177
| TopTesting UriPath
178
178
| TopSamples
179
179
| TopStatic UriPath
180
+ | TopAvatar UriPath
180
181
deriving Generic
181
182
182
183
instance SOP. Generic (Top r )
@@ -189,6 +190,7 @@ top (TopMain p) = relPath p
189
190
top (TopTesting p) = nil </> " testing" <> p
190
191
top TopSamples = nil </> " samples"
191
192
top (TopStatic p) = nil </> " static" <> p
193
+ top (TopAvatar p) = nil </> " avatars" <> p
192
194
193
195
194
196
-- ** Main
You can’t perform that action at this time.
0 commit comments