mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
129641a5f5
commit
d31c913028
|
@ -205,20 +205,25 @@ repoRefs lww refs = do
|
||||||
let r_ = Text.pack $ show $ pretty r
|
let r_ = Text.pack $ show $ pretty r
|
||||||
let co = show $ pretty h
|
let co = show $ pretty h
|
||||||
let uri = path [ "repo", show $ pretty lww, "tree", co, co ]
|
let uri = path [ "repo", show $ pretty lww, "tree", co, co ]
|
||||||
tr_ do
|
|
||||||
td_ do
|
|
||||||
|
|
||||||
if | Text.isPrefixOf "refs/heads" r_ -> do
|
let showRef = Text.isPrefixOf "refs" r_
|
||||||
img_ [src_ "/icon/git-branch.svg"]
|
|
||||||
| Text.isPrefixOf "refs/tags" r_ -> do
|
|
||||||
img_ [src_ "/icon/git-tag.svg"]
|
|
||||||
| otherwise -> mempty
|
|
||||||
|
|
||||||
td_ (toHtml r_)
|
when showRef do
|
||||||
td_ [class_ "mono"] $ a_ [ href_ "#"
|
tr_ do
|
||||||
, hxGet_ uri
|
td_ do
|
||||||
, hxTarget_ "#repo-tab-data"
|
|
||||||
] (toHtml $ show $ pretty h)
|
if | Text.isPrefixOf "refs/heads" r_ -> do
|
||||||
|
img_ [src_ "/icon/git-branch.svg"]
|
||||||
|
| Text.isPrefixOf "refs/tags" r_ -> do
|
||||||
|
img_ [src_ "/icon/git-tag.svg"]
|
||||||
|
| otherwise -> mempty
|
||||||
|
|
||||||
|
td_ (toHtml r_)
|
||||||
|
td_ [class_ "mono"] $ do
|
||||||
|
a_ [ href_ "#"
|
||||||
|
, hxGet_ uri
|
||||||
|
, hxTarget_ "#repo-tab-data"
|
||||||
|
] (toHtml $ show $ pretty h)
|
||||||
|
|
||||||
|
|
||||||
showRefsHtmxAttribs :: String -> [Attribute]
|
showRefsHtmxAttribs :: String -> [Attribute]
|
||||||
|
|
Loading…
Reference in New Issue