1
0
Fork 0
mirror of https://code.naskya.net/repos/ndqEd synced 2025-01-10 11:06:46 +09:00

UI: Fix and re-enable getRepoSourceR (repo content file/dir browsing)

This commit is contained in:
fr33domlover 2022-09-16 13:47:10 +00:00
parent b66bab4295
commit 40f741e504
8 changed files with 130 additions and 142 deletions

View file

@ -15,9 +15,9 @@
-} -}
module Vervis.Darcs module Vervis.Darcs
( --readSourceView ( readSourceView
--, readWikiView --, readWikiView
readChangesView , readChangesView
--, lastChange --, lastChange
, readPatch , readPatch
, writePostApplyHooks , writePostApplyHooks
@ -97,7 +97,6 @@ import Vervis.Readme
import Vervis.Settings import Vervis.Settings
import Vervis.SourceTree import Vervis.SourceTree
{-
dirToAnchoredPath :: [EntryName] -> AnchoredPath dirToAnchoredPath :: [EntryName] -> AnchoredPath
dirToAnchoredPath = AnchoredPath . map (decodeWhiteName . encodeUtf8) dirToAnchoredPath = AnchoredPath . map (decodeWhiteName . encodeUtf8)
@ -166,7 +165,6 @@ readSourceView path dir = do
let mitem = find expandedTree anch let mitem = find expandedTree anch
for mitem $ itemToSourceView (last dir) for mitem $ itemToSourceView (last dir)
return $ renderSources dir <$> msv return $ renderSources dir <$> msv
-}
{- {-
readWikiView readWikiView

View file

@ -15,8 +15,8 @@
-} -}
module Vervis.Git module Vervis.Git
( --readSourceView ( readSourceView
readChangesView , readChangesView
, listRefs , listRefs
, readPatch , readPatch
--, lastCommitTime --, lastCommitTime
@ -97,7 +97,6 @@ import Vervis.Readme
import Vervis.Settings import Vervis.Settings
import Vervis.SourceTree import Vervis.SourceTree
{-
matchReadme :: (ModePerm, ObjId, Text, EntObjType) -> Bool matchReadme :: (ModePerm, ObjId, Text, EntObjType) -> Bool
matchReadme (_, _, name, EntObjBlob) = isReadme name matchReadme (_, _, name, EntObjBlob) = isReadme name
matchReadme _ = False matchReadme _ = False
@ -171,7 +170,6 @@ readSourceView path ref dir = do
G.withRepo (fromString path) $ \ git -> loadSourceView git ref dir G.withRepo (fromString path) $ \ git -> loadSourceView git ref dir
let toTexts = S.mapMonotonic $ T.pack . refNameRaw let toTexts = S.mapMonotonic $ T.pack . refNameRaw
return (toTexts bs, toTexts ts, renderSources dir <$> msv) return (toTexts bs, toTexts ts, renderSources dir <$> msv)
-}
readChangesView readChangesView
:: FilePath :: FilePath

View file

@ -59,9 +59,9 @@ module Vervis.Handler.Repo
, deleteRepoDevR , deleteRepoDevR
, postRepoDevR , postRepoDevR
, getRepoTeamR , getRepoTeamR
-}
, getHighlightStyleR , getHighlightStyleR
-}
) )
where where
@ -359,20 +359,22 @@ postGitUploadRequestR repoHash = do
getRepoSourceR :: KeyHashid Repo -> [Text] -> Handler Html getRepoSourceR :: KeyHashid Repo -> [Text] -> Handler Html
getRepoSourceR repoHash path = do getRepoSourceR repoHash path = do
repoID <- decodeKeyHashid404 repoHash repoID <- decodeKeyHashid404 repoHash
repo <- runDB $ get404 repoID (repo, actor) <- runDB $ do
r <- get404 repoID
(r,) <$> getJust (repoActor r)
case repoVcs repo of case repoVcs repo of
VCSDarcs -> error "Temporarily disabled" VCSDarcs -> getDarcsRepoSource repo actor repoHash path
--getDarcsRepoSource repo repoHash path
VCSGit -> notFound VCSGit -> notFound
getRepoBranchSourceR :: KeyHashid Repo -> Text -> [Text] -> Handler Html getRepoBranchSourceR :: KeyHashid Repo -> Text -> [Text] -> Handler Html
getRepoBranchSourceR repoHash branch path = do getRepoBranchSourceR repoHash branch path = do
repoID <- decodeKeyHashid404 repoHash repoID <- decodeKeyHashid404 repoHash
repo <- runDB $ get404 repoID (repo, actor) <- runDB $ do
r <- get404 repoID
(r,) <$> getJust (repoActor r)
case repoVcs repo of case repoVcs repo of
VCSDarcs -> notFound VCSDarcs -> notFound
VCSGit -> error "Temporarily disabled" VCSGit -> getGitRepoSource repo actor repoHash branch path
--getGitRepoSource repo repoHash branch dir
getRepoCommitsR :: KeyHashid Repo -> Handler TypedContent getRepoCommitsR :: KeyHashid Repo -> Handler TypedContent
getRepoCommitsR repoHash = do getRepoCommitsR repoHash = do
@ -855,6 +857,7 @@ getRepoFollowersR shr rp = getFollowersCollection here getFsid
sid <- getKeyBy404 $ UniqueSharer shr sid <- getKeyBy404 $ UniqueSharer shr
r <- getValBy404 $ UniqueRepo rp sid r <- getValBy404 $ UniqueRepo rp sid
return $ repoFollowers r return $ repoFollowers r
-}
getHighlightStyleR :: Text -> Handler TypedContent getHighlightStyleR :: Text -> Handler TypedContent
getHighlightStyleR styleName = getHighlightStyleR styleName =
@ -862,4 +865,3 @@ getHighlightStyleR styleName =
Nothing -> notFound Nothing -> notFound
Just style -> Just style ->
return $ TypedContent typeCss $ toContent $ styleToCss style return $ TypedContent typeCss $ toContent $ styleToCss style
-}

View file

@ -15,8 +15,8 @@
-} -}
module Vervis.Web.Darcs module Vervis.Web.Darcs
( --getDarcsRepoSource ( getDarcsRepoSource
getDarcsRepoChanges , getDarcsRepoChanges
, getDarcsPatch , getDarcsPatch
) )
where where
@ -29,7 +29,7 @@ import Data.Text.Encoding
import Data.Text.Encoding.Error (lenientDecode) import Data.Text.Encoding.Error (lenientDecode)
import Data.Traversable (for) import Data.Traversable (for)
import Database.Esqueleto import Database.Esqueleto
import Network.HTTP.Types (StdMethod (DELETE)) import Network.HTTP.Types
import System.FilePath ((</>), joinPath) import System.FilePath ((</>), joinPath)
import System.Directory (doesFileExist) import System.Directory (doesFileExist)
import Text.Blaze.Html (Html) import Text.Blaze.Html (Html)
@ -48,12 +48,13 @@ import qualified Data.Text.Lazy.Encoding as L (decodeUtf8With)
import Data.MediaType import Data.MediaType
import Development.PatchMediaType import Development.PatchMediaType
import Web.ActivityPub hiding (Repo, Project)
import Yesod.ActivityPub import Yesod.ActivityPub
import Yesod.FedURI import Yesod.FedURI
import Yesod.Hashids import Yesod.Hashids
import Yesod.RenderSource import Yesod.RenderSource
import qualified Web.ActivityPub as AP
import Data.ByteString.Char8.Local (takeLine) import Data.ByteString.Char8.Local (takeLine)
import Data.Paginate.Local import Data.Paginate.Local
import Data.Patch.Local import Data.Patch.Local
@ -72,14 +73,16 @@ import Vervis.SourceTree
import Vervis.Style import Vervis.Style
import Vervis.Time import Vervis.Time
import Vervis.Web.Repo import Vervis.Web.Repo
import Vervis.Widget
import Vervis.Widget.Person
import Vervis.Widget.Repo import Vervis.Widget.Repo
import qualified Vervis.Darcs as D import qualified Vervis.Darcs as D
{- getDarcsRepoSource
getDarcsRepoSource :: (Maybe (Sharer, Project, Workflow, Sharer), Repo) -> ShrIdent -> RpIdent -> [Text] -> Handler Html :: Repo -> Actor -> KeyHashid Repo -> [Text] -> Handler Html
getDarcsRepoSource (mproject, repository) user repo dir = do getDarcsRepoSource repository actor repo dir = do
path <- askRepoDir user repo path <- askRepoDir repo
msv <- liftIO $ D.readSourceView path dir msv <- liftIO $ D.readSourceView path dir
case msv of case msv of
Nothing -> notFound Nothing -> notFound
@ -96,11 +99,7 @@ getDarcsRepoSource (mproject, repository) user repo dir = do
$(widgetFile "repo/source-darcs") $(widgetFile "repo/source-darcs")
where where
followButton = followButton =
followW followW (RepoFollowR repo) (RepoUnfollowR repo) (actorFollowers actor)
(RepoFollowR user repo)
(RepoUnfollowR user repo)
(return $ repoFollowers repository)
-}
getDarcsRepoChanges :: KeyHashid Repo -> Handler TypedContent getDarcsRepoChanges :: KeyHashid Repo -> Handler TypedContent
getDarcsRepoChanges repo = do getDarcsRepoChanges repo = do
@ -119,36 +118,36 @@ getDarcsRepoChanges repo = do
case mpage of case mpage of
Nothing -> do Nothing -> do
(total, pages, _, _) <- getPageAndNavTop getChanges (total, pages, _, _) <- getPageAndNavTop getChanges
let collection = Collection let collection = AP.Collection
{ collectionId = encodeRouteLocal here { AP.collectionId = encodeRouteLocal here
, collectionType = CollectionTypeOrdered , AP.collectionType = AP.CollectionTypeOrdered
, collectionTotalItems = Just total , AP.collectionTotalItems = Just total
, collectionCurrent = Nothing , AP.collectionCurrent = Nothing
, collectionFirst = Just $ pageUrl 1 , AP.collectionFirst = Just $ pageUrl 1
, collectionLast = Just $ pageUrl pages , AP.collectionLast = Just $ pageUrl pages
, collectionItems = [] :: [Text] , AP.collectionItems = [] :: [Text]
} }
provideHtmlAndAP collection $ redirectFirstPage here provideHtmlAndAP collection $ redirectFirstPage here
Just (_total, pages, items, navModel) -> Just (_total, pages, items, navModel) ->
let current = nmCurrent navModel let current = nmCurrent navModel
page = CollectionPage page = AP.CollectionPage
{ collectionPageId = pageUrl current { AP.collectionPageId = pageUrl current
, collectionPageType = CollectionPageTypeOrdered , AP.collectionPageType = AP.CollectionPageTypeOrdered
, collectionPageTotalItems = Nothing , AP.collectionPageTotalItems = Nothing
, collectionPageCurrent = Just $ pageUrl current , AP.collectionPageCurrent = Just $ pageUrl current
, collectionPageFirst = Just $ pageUrl 1 , AP.collectionPageFirst = Just $ pageUrl 1
, collectionPageLast = Just $ pageUrl pages , AP.collectionPageLast = Just $ pageUrl pages
, collectionPagePartOf = encodeRouteLocal here , AP.collectionPagePartOf = encodeRouteLocal here
, collectionPagePrev = , AP.collectionPagePrev =
if current > 1 if current > 1
then Just $ pageUrl $ current - 1 then Just $ pageUrl $ current - 1
else Nothing else Nothing
, collectionPageNext = , AP.collectionPageNext =
if current < pages if current < pages
then Just $ pageUrl $ current + 1 then Just $ pageUrl $ current + 1
else Nothing else Nothing
, collectionPageStartIndex = Nothing , AP.collectionPageStartIndex = Nothing
, collectionPageItems = , AP.collectionPageItems =
map (encodeRouteHome . RepoCommitR repo . leHash) map (encodeRouteHome . RepoCommitR repo . leHash)
items items
} }

View file

@ -15,9 +15,9 @@
-} -}
module Vervis.Web.Git module Vervis.Web.Git
( --getGitRepoSource ( getGitRepoSource
--, getGitRepoBranch --, getGitRepoBranch
getGitRepoChanges , getGitRepoChanges
, getGitPatch , getGitPatch
) )
where where
@ -42,7 +42,7 @@ import Data.Text.Encoding.Error (lenientDecode)
import Data.Traversable (for) import Data.Traversable (for)
import Database.Esqueleto import Database.Esqueleto
import Data.Hourglass (timeConvert) import Data.Hourglass (timeConvert)
import Network.HTTP.Types (StdMethod (DELETE)) import Network.HTTP.Types
import System.Directory (createDirectoryIfMissing) import System.Directory (createDirectoryIfMissing)
import System.Hourglass (dateCurrent) import System.Hourglass (dateCurrent)
import Text.Blaze.Html (Html) import Text.Blaze.Html (Html)
@ -59,7 +59,6 @@ import qualified Data.Text as T
import qualified Data.Text.Lazy.Encoding as L (decodeUtf8With) import qualified Data.Text.Lazy.Encoding as L (decodeUtf8With)
import Data.MediaType import Data.MediaType
import Web.ActivityPub hiding (Commit, Author, Repo, Project)
import Yesod.ActivityPub import Yesod.ActivityPub
import Yesod.FedURI import Yesod.FedURI
import Yesod.Hashids import Yesod.Hashids
@ -88,15 +87,17 @@ import Vervis.SourceTree
import Vervis.Style import Vervis.Style
import Vervis.Time (showDate) import Vervis.Time (showDate)
import Vervis.Web.Repo import Vervis.Web.Repo
import Vervis.Widget
import Vervis.Widget.Person
import Vervis.Widget.Repo import Vervis.Widget.Repo
import qualified Data.ByteString.Lazy as BL (ByteString) import qualified Data.ByteString.Lazy as BL (ByteString)
import qualified Vervis.Git as G import qualified Vervis.Git as G
{- getGitRepoSource
getGitRepoSource :: (Maybe (Sharer, Project, Workflow, Sharer), Repo) -> ShrIdent -> RpIdent -> Text -> [Text] -> Handler Html :: Repo -> Actor -> KeyHashid Repo -> Text -> [Text] -> Handler Html
getGitRepoSource (mproject, repository) user repo ref dir = do getGitRepoSource repository actor repo ref dir = do
path <- askRepoDir user repo path <- askRepoDir repo
(branches, tags, msv) <- liftIO $ G.readSourceView path ref dir (branches, tags, msv) <- liftIO $ G.readSourceView path ref dir
case msv of case msv of
Nothing -> notFound Nothing -> notFound
@ -113,11 +114,7 @@ getGitRepoSource (mproject, repository) user repo ref dir = do
$(widgetFile "repo/source-git") $(widgetFile "repo/source-git")
where where
followButton = followButton =
followW followW (RepoFollowR repo) (RepoUnfollowR repo) (actorFollowers actor)
(RepoFollowR user repo)
(RepoUnfollowR user repo)
(return $ repoFollowers repository)
-}
{- {-
getGitRepoBranch :: ShrIdent -> RpIdent -> Text -> Handler TypedContent getGitRepoBranch :: ShrIdent -> RpIdent -> Text -> Handler TypedContent
@ -153,36 +150,36 @@ getGitRepoChanges repo ref = do
case mpage of case mpage of
Nothing -> do Nothing -> do
(total, pages, _, _) <- getPageAndNavTop getChanges (total, pages, _, _) <- getPageAndNavTop getChanges
let collection = Collection let collection = AP.Collection
{ collectionId = encodeRouteLocal here { AP.collectionId = encodeRouteLocal here
, collectionType = CollectionTypeOrdered , AP.collectionType = AP.CollectionTypeOrdered
, collectionTotalItems = Just total , AP.collectionTotalItems = Just total
, collectionCurrent = Nothing , AP.collectionCurrent = Nothing
, collectionFirst = Just $ pageUrl 1 , AP.collectionFirst = Just $ pageUrl 1
, collectionLast = Just $ pageUrl pages , AP.collectionLast = Just $ pageUrl pages
, collectionItems = [] :: [Text] , AP.collectionItems = [] :: [Text]
} }
provideHtmlAndAP collection $ redirectFirstPage here provideHtmlAndAP collection $ redirectFirstPage here
Just (_total, pages, items, navModel) -> Just (_total, pages, items, navModel) ->
let current = nmCurrent navModel let current = nmCurrent navModel
page = CollectionPage page = AP.CollectionPage
{ collectionPageId = pageUrl current { AP.collectionPageId = pageUrl current
, collectionPageType = CollectionPageTypeOrdered , AP.collectionPageType = AP.CollectionPageTypeOrdered
, collectionPageTotalItems = Nothing , AP.collectionPageTotalItems = Nothing
, collectionPageCurrent = Just $ pageUrl current , AP.collectionPageCurrent = Just $ pageUrl current
, collectionPageFirst = Just $ pageUrl 1 , AP.collectionPageFirst = Just $ pageUrl 1
, collectionPageLast = Just $ pageUrl pages , AP.collectionPageLast = Just $ pageUrl pages
, collectionPagePartOf = encodeRouteLocal here , AP.collectionPagePartOf = encodeRouteLocal here
, collectionPagePrev = , AP.collectionPagePrev =
if current > 1 if current > 1
then Just $ pageUrl $ current - 1 then Just $ pageUrl $ current - 1
else Nothing else Nothing
, collectionPageNext = , AP.collectionPageNext =
if current < pages if current < pages
then Just $ pageUrl $ current + 1 then Just $ pageUrl $ current + 1
else Nothing else Nothing
, collectionPageStartIndex = Nothing , AP.collectionPageStartIndex = Nothing
, collectionPageItems = , AP.collectionPageItems =
map (encodeRouteHome . RepoCommitR repo . leHash) map (encodeRouteHome . RepoCommitR repo . leHash)
items items
} }

View file

@ -13,54 +13,51 @@ $# You should have received a copy of the CC0 Public Domain Dedication along
$# with this software. If not, see $# with this software. If not, see
$# <http://creativecommons.org/publicdomain/zero/1.0/>. $# <http://creativecommons.org/publicdomain/zero/1.0/>.
$maybe (s, j, w, sw) <- mproject $# $maybe (s, j, w, sw) <- mproject
<p> $# <p>
Belongs to project $# Belongs to project
<a href=@{ProjectR (sharerIdent s) (projectIdent j)}> $# <a href=@{ProjectR (sharerIdent s) (projectIdent j)}>
$maybe name <- projectName j $# $maybe name <- projectName j
#{name} $# #{name}
$nothing $# $nothing
#{prj2text $ projectIdent j} $# #{prj2text $ projectIdent j}
$#
$# ^{personNavW $ sharerIdent s}
$#
$# ^{projectNavW j w sw (sharerIdent s) (projectIdent j)}
^{personNavW $ sharerIdent s} <p>#{actorDesc actor}
^{projectNavW j w sw (sharerIdent s) (projectIdent j)} $# ^{personNavW user}
$maybe desc <- repoDesc repository
<p>#{desc}
^{personNavW user}
<div> <div>
<span> <span>
[[ 🗃 [[ 🗃
<a href=@{RepoR user repo}> <a href=@{RepoR repo}>
#{rp2text repo} ^#{keyHashidText repo} #{actorName actor}
]] :: ]] ::
<span> <span>
<a href=@{RepoInboxR user repo}> <a href=@{RepoInboxR repo}>
[📥 Inbox] [📥 Inbox]
<span> <span>
<a href=@{RepoOutboxR user repo}> <a href=@{RepoOutboxR repo}>
[📤 Outbox] [📤 Outbox]
<span> <span>
<a href=@{RepoFollowersR user repo}> <a href=@{RepoFollowersR repo}>
[🐤 Followers] [🐤 Followers]
<span> <span>
<a href=@{RepoDevsR user repo}>
[🤝 Collaborators] [🤝 Collaborators]
<span> <span>
<a href=@{RepoHeadChangesR user repo}> <a href=@{RepoCommitsR repo}>
[🛠 Changes] [🛠 Changes]
<span> <span>
<a href=@{RepoProposalsR user repo}>
[🧩 Patches] [🧩 Patches]
^{followButton} ^{followButton}
<h2>Clone <h2>Clone
<code>darcs clone @{RepoR user repo} <code>darcs clone @{RepoR repo}
<h2>Tags <h2>Tags
@ -68,7 +65,7 @@ $maybe desc <- repoDesc repository
<div> <div>
$forall (piece, piecePath) <- dirs $forall (piece, piecePath) <- dirs
<a href=@{RepoSourceR user repo piecePath}>#{piece} <a href=@{RepoSourceR repo piecePath}>#{piece}
/ # / #
$case sv $case sv
@ -90,15 +87,15 @@ $case sv
$of TypeTree $of TypeTree
🗀 🗀
<td> <td>
<a href=@{RepoSourceR user repo (dir ++ [name])}> <a href=@{RepoSourceR repo (dir ++ [name])}>
#{name} #{name}
$maybe (readmeName, readmeWidget) <- mreadme $maybe (readmeName, readmeWidget) <- mreadme
<h2>#{readmeName} <h2>#{readmeName}
^{readmeWidget} ^{readmeWidget}
<div> <div>
^{buttonW DELETE "Delete this repo" (RepoR user repo)} ^{buttonW POST "Delete this repo" (RepoDeleteR repo)}
<div> <div>
<a href=@?{(RepoR user repo, [("prettyjson","true")])}> <a href=@?{(RepoR repo, [("prettyjson","true")])}>
[See repo JSON] [See repo JSON]

View file

@ -13,74 +13,71 @@ $# You should have received a copy of the CC0 Public Domain Dedication along
$# with this software. If not, see $# with this software. If not, see
$# <http://creativecommons.org/publicdomain/zero/1.0/>. $# <http://creativecommons.org/publicdomain/zero/1.0/>.
$maybe (s, j, w, sw) <- mproject $# $maybe (s, j, w, sw) <- mproject
<p> $# <p>
Belongs to project $# Belongs to project
<a href=@{ProjectR (sharerIdent s) (projectIdent j)}> $# <a href=@{ProjectR (sharerIdent s) (projectIdent j)}>
$maybe name <- projectName j $# $maybe name <- projectName j
#{name} $# #{name}
$nothing $# $nothing
#{prj2text $ projectIdent j} $# #{prj2text $ projectIdent j}
$#
$# ^{personNavW $ sharerIdent s}
$#
$# ^{projectNavW j w sw (sharerIdent s) (projectIdent j)}
^{personNavW $ sharerIdent s} <p>#{actorDesc actor}
^{projectNavW j w sw (sharerIdent s) (projectIdent j)} $# ^{personNavW user}
$maybe desc <- repoDesc repository
<p>#{desc}
^{personNavW user}
<div> <div>
<span> <span>
[[ 🗃 [[ 🗃
<a href=@{RepoR user repo}> <a href=@{RepoR repo}>
#{rp2text repo} ^#{keyHashidText repo} #{actorName actor}
]] :: ]] ::
<span> <span>
<a href=@{RepoInboxR user repo}> <a href=@{RepoInboxR repo}>
[📥 Inbox] [📥 Inbox]
<span> <span>
<a href=@{RepoOutboxR user repo}> <a href=@{RepoOutboxR repo}>
[📤 Outbox] [📤 Outbox]
<span> <span>
<a href=@{RepoFollowersR user repo}> <a href=@{RepoFollowersR repo}>
[🐤 Followers] [🐤 Followers]
<span> <span>
<a href=@{RepoDevsR user repo}>
[🤝 Collaborators] [🤝 Collaborators]
<span> <span>
<a href=@{RepoHeadChangesR user repo}> <a href=@{RepoCommitsR repo}>
[🛠 Commits] [🛠 Commits]
<span> <span>
<a href=@{RepoProposalsR user repo}>
[🧩 Merge Requests] [🧩 Merge Requests]
^{followButton} ^{followButton}
<h2>Clone <h2>Clone
<code>git clone @{RepoR user repo} <code>git clone @{RepoR repo}
<h2>Branches <h2>Branches
<ul> <ul>
$forall branch <- branches $forall branch <- branches
<li> <li>
<a href=@{RepoSourceR user repo [branch]}>#{branch} <a href=@{RepoBranchSourceR repo branch []}>#{branch}
<h2>Tags <h2>Tags
<ul> <ul>
$forall tag <- tags $forall tag <- tags
<li> <li>
<a href=@{RepoSourceR user repo [tag]}>#{tag} <a href=@{RepoBranchSourceR repo tag []}>#{tag}
<div> <div>
<a href=@{RepoSourceR user repo [ref]}>#{ref} <a href=@{RepoBranchSourceR repo ref []}>#{ref}
:: # :: #
$forall (piece, piecePath) <- dirs $forall (piece, piecePath) <- dirs
<a href=@{RepoSourceR user repo (ref : piecePath)}>#{piece} <a href=@{RepoBranchSourceR repo ref piecePath}>#{piece}
/ # / #
$case sv $case sv
@ -102,15 +99,15 @@ $case sv
$of TypeTree $of TypeTree
🗀 🗀
<td> <td>
<a href=@{RepoSourceR user repo (ref : (dir ++ [name]))}> <a href=@{RepoBranchSourceR repo ref (dir ++ [name])}>
#{name} #{name}
$maybe (readmeName, readmeWidget) <- mreadme $maybe (readmeName, readmeWidget) <- mreadme
<h2>#{readmeName} <h2>#{readmeName}
^{readmeWidget} ^{readmeWidget}
<div> <div>
^{buttonW DELETE "Delete this repo" (RepoR user repo)} ^{buttonW POST "Delete this repo" (RepoDeleteR repo)}
<div> <div>
<a href=@?{(RepoR user repo, [("prettyjson","true")])}> <a href=@?{(RepoR repo, [("prettyjson","true")])}>
[See repo JSON] [See repo JSON]

View file

@ -17,7 +17,7 @@
-- Yesod misc -- Yesod misc
-- ---------------------------------------------------------------------------- -- ----------------------------------------------------------------------------
-- /highlight/#Text/style.css HighlightStyleR GET /highlight/#Text/style.css HighlightStyleR GET
-- ---------------------------------------------------------------------------- -- ----------------------------------------------------------------------------
-- Internal -- Internal