@@ -114,180 +114,180 @@ defmodule AlgoraWeb.Org.BountiesLive do
114114 < table class = "w-full caption-bottom text-sm " >
115115 < tbody class = "[&_tr:last-child]:border-0 " >
116116 <%= for % { bounty: bounty , claim_groups: claim_groups } <- @ bounty_rows do %>
117- < tr
118- class = "bg-white/[2%] from-white/[2%] via-white/[2%] to-white/[2%] border-b border-white/15 bg-gradient-to-br transition-colors data-[state=selected]:bg-gray-100 hover:bg-gray-100/50 dark:data-[state=selected]:bg-gray-800 dark:hover:bg-white/[2%] "
119- data-state = "false "
120- >
121- < td class = "[&:has([role=checkbox])]:pr-0 p-4 align-middle " >
122- < div class = "min-w-[250px] " >
123- < div class = "group relative flex h-full flex-col " >
124- < div class = "relative h-full pl-2 " >
125- < div class = "flex items-start justify-between " >
126- < div class = "cursor-pointer font-mono text-2xl " >
127- < div class = "font-extrabold text-emerald-300 hover:text-emerald-200 " >
128- { Money . to_string! ( bounty . amount ) }
117+ < tr
118+ class = "bg-white/[2%] from-white/[2%] via-white/[2%] to-white/[2%] border-b border-white/15 bg-gradient-to-br transition-colors data-[state=selected]:bg-gray-100 hover:bg-gray-100/50 dark:data-[state=selected]:bg-gray-800 dark:hover:bg-white/[2%] "
119+ data-state = "false "
120+ >
121+ < td class = "[&:has([role=checkbox])]:pr-0 p-4 align-middle " >
122+ < div class = "min-w-[250px] " >
123+ < div class = "group relative flex h-full flex-col " >
124+ < div class = "relative h-full pl-2 " >
125+ < div class = "flex items-start justify-between " >
126+ < div class = "cursor-pointer font-mono text-2xl " >
127+ < div class = "font-extrabold text-emerald-300 hover:text-emerald-200 " >
128+ { Money . to_string! ( bounty . amount ) }
129+ </ div >
129130 </ div >
130131 </ div >
131- </ div >
132- < . link
133- rel = " noopener "
134- class = " group/issue inline-flex flex-col "
135- href = { Bounty . url ( bounty ) }
136- >
137- < div :if = { Bounty . path ( bounty ) } class = "flex items-center gap-4 " >
138- < div class = "truncate " >
139- < p class = " truncate text-sm font-medium text-gray-300 group-hover/issue:text-gray-200 group-hover/issue:underline " >
140- { Bounty . path ( bounty ) }
141- </ p >
132+ < . link
133+ rel = " noopener "
134+ class = " group/issue inline-flex flex-col "
135+ href = { Bounty . url ( bounty ) }
136+ >
137+ < div :if = { Bounty . path ( bounty ) } class = " flex items-center gap-4 " >
138+ < div class = "truncate " >
139+ < p class = "truncate text-sm font-medium text-gray-300 group-hover/issue:text-gray-200 group-hover/issue:underline " >
140+ { Bounty . path ( bounty ) }
141+ </ p >
142+ </ div >
142143 </ div >
143- </ div >
144- < p class = "line-clamp-2 break-words text-base font-medium leading-tight text-gray-100 group-hover/issue:text-white group-hover/issue:underline " >
145- { bounty . ticket . title }
144+ < p class = "line-clamp-2 break-words text-base font-medium leading-tight text-gray-100 group-hover/issue:text-white group-hover/issue:underline " >
145+ { bounty . ticket . title }
146+ </ p >
147+ < div :if = { is_nil ( Bounty . path ( bounty ) ) and bounty . ticket . description } >
148+ < . markdown
149+ id = { "bounty-description-#{ bounty . id } " }
150+ class = "line-clamp-3 transition-all duration-200 [&>p]:m-0 "
151+ phx-hook = "ExpandableText "
152+ data-expand-id = { "expand-#{ bounty . id } " }
153+ data-class = "line-clamp-3 "
154+ value = { Phoenix.HTML . raw ( Markdown . render ( bounty . ticket . description ) ) }
155+ />
156+ < button
157+ id = { "expand-#{ bounty . id } " }
158+ type = "button "
159+ class = "text-xs text-foreground font-bold hidden "
160+ data-content-id = { "bounty-description-#{ bounty . id } " }
161+ phx-hook = "ExpandableTextButton "
162+ >
163+ ...read more
164+ </ button >
165+ </ div >
166+ </ . link >
167+ < p class = "flex items-center gap-1.5 text-xs text-gray-400 " >
168+ { Algora.Util . time_ago ( bounty . inserted_at ) }
146169 </ p >
147- < div :if = { is_nil ( Bounty . path ( bounty ) ) and bounty . ticket . description } >
148- < . markdown
149- id = { "bounty-description-#{ bounty . id } " }
150- class = "line-clamp-3 transition-all duration-200 [&>p]:m-0 "
151- phx-hook = "ExpandableText "
152- data-expand-id = { "expand-#{ bounty . id } " }
153- data-class = "line-clamp-3 "
154- value = { Phoenix.HTML . raw ( Markdown . render ( bounty . ticket . description ) ) }
155- />
156- < button
157- id = { "expand-#{ bounty . id } " }
158- type = "button "
159- class = "text-xs text-foreground font-bold hidden "
160- data-content-id = { "bounty-description-#{ bounty . id } " }
161- phx-hook = "ExpandableTextButton "
162- >
163- ...read more
164- </ button >
165- </ div >
166- </ . link >
167- < p class = "flex items-center gap-1.5 text-xs text-gray-400 " >
168- { Algora.Util . time_ago ( bounty . inserted_at ) }
169- </ p >
170- </ div >
171- </ div >
172- </ div >
173- </ td >
174- < td class = "[&:has([role=checkbox])]:pr-0 p-4 align-middle " >
175- <%= if map_size ( claim_groups ) > 0 do %>
176- < div class = "group flex cursor-pointer flex-col items-center gap-1 " >
177- < div class = "flex cursor-pointer justify-center -space-x-3 " >
178- <%= for { _group_id , claims } <- claim_groups do %>
179- < div class = "relative h-10 w-10 flex-shrink-0 rounded-full ring-4 ring-gray-800 group-hover:brightness-110 " >
180- < img
181- alt = { User . handle ( hd ( claims ) . user ) }
182- loading = "lazy "
183- decoding = "async "
184- class = "rounded-full "
185- src = { hd ( claims ) . user . avatar_url }
186- style = "position: absolute; height: 100%; width: 100%; inset: 0px; color: transparent; "
187- />
188- </ div >
189- <% end %>
190- </ div >
191- < div class = "flex items-center gap-0.5 " >
192- < div class = "whitespace-nowrap text-sm font-medium text-gray-300 group-hover:text-gray-100 " >
193- { map_size ( claim_groups ) } { ngettext (
194- "claim" ,
195- "claims" ,
196- map_size ( claim_groups )
197- ) }
198170 </ div >
199- < svg
200- xmlns = "http://www.w3.org/2000/svg "
201- width = "24 "
202- height = "24 "
203- viewBox = "0 0 24 24 "
204- fill = "none "
205- stroke = "currentColor "
206- stroke-width = "2 "
207- stroke-linecap = "round "
208- stroke-linejoin = "round "
209- class = "-mr-4 h-4 w-4 rotate-90 text-gray-400 group-hover:text-gray-300 "
210- >
211- < path d = "M9 6l6 6l-6 6 " > </ path >
212- </ svg >
213171 </ div >
214172 </ div >
215- <% end %>
216- </ td >
217- < td class = "[&:has([role=checkbox])]:pr-0 p-4 align-middle " >
218- < div class = "flex items-center justify-end gap-2 " >
219- < . button
220- phx-click = "edit-bounty-amount "
221- phx-value-id = { bounty . id }
222- variant = "secondary "
223- size = "sm "
224- >
225- Edit Amount
226- </ . button >
227- < . button
228- phx-click = "delete-bounty "
229- phx-value-id = { bounty . id }
230- variant = "destructive "
231- size = "sm "
232- >
233- Delete
234- </ . button >
235- </ div >
236- </ td >
237- </ tr >
238- <%= for { _group_id , claims } <- claim_groups do %>
239- < tr
240- class = "border-b border-white/15 bg-gray-950/50 transition-colors data-[state=selected]:bg-gray-100 hover:bg-gray-100/50 dark:data-[state=selected]:bg-gray-800 dark:hover:bg-gray-950/50 "
241- data-state = "false "
242- >
243- < td class = "[&:has([role=checkbox])]:pr-0 p-4 align-middle w-full " >
244- < div class = "min-w-[250px] " >
245- < div class = "flex items-center gap-3 " >
246- < div class = "flex -space-x-3 " >
247- <%= for claim <- claims do %>
248- < div class = "relative h-10 w-10 flex-shrink-0 rounded-full ring-4 ring-background " >
173+ </ td >
174+ < td class = "[&:has([role=checkbox])]:pr-0 p-4 align-middle " >
175+ <%= if map_size ( claim_groups ) > 0 do %>
176+ < div class = "group flex cursor-pointer flex-col items-center gap-1 " >
177+ < div class = "flex cursor-pointer justify-center -space-x-3 " >
178+ <%= for { _group_id , claims } <- claim_groups do %>
179+ < div class = "relative h-10 w-10 flex-shrink-0 rounded-full ring-4 ring-gray-800 group-hover:brightness-110 " >
249180 < img
250- alt = { User . handle ( claim . user ) }
181+ alt = { User . handle ( hd ( claims ) . user ) }
251182 loading = "lazy "
252183 decoding = "async "
253184 class = "rounded-full "
254- src = { claim . user . avatar_url }
185+ src = { hd ( claims ) . user . avatar_url }
255186 style = "position: absolute; height: 100%; width: 100%; inset: 0px; color: transparent; "
256187 />
257188 </ div >
258189 <% end %>
259190 </ div >
260- < div >
261- < div class = "text-sm font-medium text-gray-200 " >
262- { claims
263- |> Enum . map ( fn c -> User . handle ( c . user ) end )
264- |> Algora.Util . format_name_list ( ) }
265- </ div >
266- < div class = "text-xs text-gray-400 " >
267- { Algora.Util . time_ago ( hd ( claims ) . inserted_at ) }
191+ < div class = "flex items-center gap-0.5 " >
192+ < div class = "whitespace-nowrap text-sm font-medium text-gray-300 group-hover:text-gray-100 " >
193+ { map_size ( claim_groups ) } { ngettext (
194+ "claim" ,
195+ "claims" ,
196+ map_size ( claim_groups )
197+ ) }
268198 </ div >
199+ < svg
200+ xmlns = "http://www.w3.org/2000/svg "
201+ width = "24 "
202+ height = "24 "
203+ viewBox = "0 0 24 24 "
204+ fill = "none "
205+ stroke = "currentColor "
206+ stroke-width = "2 "
207+ stroke-linecap = "round "
208+ stroke-linejoin = "round "
209+ class = "-mr-4 h-4 w-4 rotate-90 text-gray-400 group-hover:text-gray-300 "
210+ >
211+ < path d = "M9 6l6 6l-6 6 " > </ path >
212+ </ svg >
269213 </ div >
270214 </ div >
271- </ div >
215+ <% end % >
272216 </ td >
273217 < td class = "[&:has([role=checkbox])]:pr-0 p-4 align-middle " >
274- < div class = "min-w-[180px] " >
275- < div class = "flex items-center justify-end gap-4 " >
276- < . button
277- :if = { hd ( claims ) . source }
278- href = { hd ( claims ) . source . url }
279- variant = "secondary "
280- >
281- View
282- </ . button >
283- < . button href = { ~p" /claims/#{ hd ( claims ) . group_id } " } >
284- Reward
285- </ . button >
286- </ div >
218+ < div class = "flex items-center justify-end gap-2 " >
219+ < . button
220+ phx-click = "edit-bounty-amount "
221+ phx-value-id = { bounty . id }
222+ variant = "secondary "
223+ size = "sm "
224+ >
225+ Edit Amount
226+ </ . button >
227+ < . button
228+ phx-click = "delete-bounty "
229+ phx-value-id = { bounty . id }
230+ variant = "destructive "
231+ size = "sm "
232+ >
233+ Delete
234+ </ . button >
287235 </ div >
288236 </ td >
289237 </ tr >
290- <% end %>
238+ <%= for { _group_id , claims } <- claim_groups do %>
239+ < tr
240+ class = "border-b border-white/15 bg-gray-950/50 transition-colors data-[state=selected]:bg-gray-100 hover:bg-gray-100/50 dark:data-[state=selected]:bg-gray-800 dark:hover:bg-gray-950/50 "
241+ data-state = "false "
242+ >
243+ < td class = "[&:has([role=checkbox])]:pr-0 p-4 align-middle w-full " >
244+ < div class = "min-w-[250px] " >
245+ < div class = "flex items-center gap-3 " >
246+ < div class = "flex -space-x-3 " >
247+ <%= for claim <- claims do %>
248+ < div class = "relative h-10 w-10 flex-shrink-0 rounded-full ring-4 ring-background " >
249+ < img
250+ alt = { User . handle ( claim . user ) }
251+ loading = "lazy "
252+ decoding = "async "
253+ class = "rounded-full "
254+ src = { claim . user . avatar_url }
255+ style = "position: absolute; height: 100%; width: 100%; inset: 0px; color: transparent; "
256+ />
257+ </ div >
258+ <% end %>
259+ </ div >
260+ < div >
261+ < div class = "text-sm font-medium text-gray-200 " >
262+ { claims
263+ |> Enum . map ( fn c -> User . handle ( c . user ) end )
264+ |> Algora.Util . format_name_list ( ) }
265+ </ div >
266+ < div class = "text-xs text-gray-400 " >
267+ { Algora.Util . time_ago ( hd ( claims ) . inserted_at ) }
268+ </ div >
269+ </ div >
270+ </ div >
271+ </ div >
272+ </ td >
273+ < td class = "[&:has([role=checkbox])]:pr-0 p-4 align-middle " >
274+ < div class = "min-w-[180px] " >
275+ < div class = "flex items-center justify-end gap-4 " >
276+ < . button
277+ :if = { hd ( claims ) . source }
278+ href = { hd ( claims ) . source . url }
279+ variant = "secondary "
280+ >
281+ View
282+ </ . button >
283+ < . button href = { ~p" /claims/#{ hd ( claims ) . group_id } " } >
284+ Reward
285+ </ . button >
286+ </ div >
287+ </ div >
288+ </ td >
289+ </ tr >
290+ <% end %>
291291 <% end %>
292292 </ tbody >
293293 </ table >
0 commit comments