1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-27 17:14:52 +09:00

UI: In RepoSourceR page, mention SSH clone address

This commit is contained in:
fr33domlover 2022-09-16 14:04:24 +00:00
parent 40f741e504
commit 1c8c6d9d24
4 changed files with 18 additions and 2 deletions

View file

@ -48,9 +48,11 @@ import qualified Data.Text.Lazy.Encoding as L (decodeUtf8With)
import Data.MediaType import Data.MediaType
import Development.PatchMediaType import Development.PatchMediaType
import Network.FedURI
import Yesod.ActivityPub import Yesod.ActivityPub
import Yesod.FedURI import Yesod.FedURI
import Yesod.Hashids import Yesod.Hashids
import Yesod.MonadSite
import Yesod.RenderSource import Yesod.RenderSource
import qualified Web.ActivityPub as AP import qualified Web.ActivityPub as AP
@ -90,6 +92,7 @@ getDarcsRepoSource repository actor repo dir = do
let parent = if null dir then [] else init dir let parent = if null dir then [] else init dir
dirs = zip parent (tail $ inits parent) dirs = zip parent (tail $ inits parent)
defaultLayout $ do defaultLayout $ do
host <- asksSite siteInstanceHost
ms <- lookupGetParam "style" ms <- lookupGetParam "style"
style <- style <-
case ms of case ms of

View file

@ -59,9 +59,11 @@ 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 Network.FedURI
import Yesod.ActivityPub import Yesod.ActivityPub
import Yesod.FedURI import Yesod.FedURI
import Yesod.Hashids import Yesod.Hashids
import Yesod.MonadSite
import Yesod.RenderSource import Yesod.RenderSource
import qualified Web.ActivityPub as AP import qualified Web.ActivityPub as AP
@ -105,6 +107,7 @@ getGitRepoSource repository actor repo ref dir = do
let parent = if null dir then [] else init dir let parent = if null dir then [] else init dir
dirs = zip parent (tail $ inits parent) dirs = zip parent (tail $ inits parent)
defaultLayout $ do defaultLayout $ do
host <- asksSite siteInstanceHost
ms <- lookupGetParam "style" ms <- lookupGetParam "style"
style <- style <-
case ms of case ms of

View file

@ -57,7 +57,12 @@ $# ^{personNavW user}
<h2>Clone <h2>Clone
<code>darcs clone @{RepoR repo} <p>
HTTPS:
<code>darcs clone @{RepoR repo}
<p>
SSH:
<code>darcs clone USERNAME@#{renderAuthority host}:#{keyHashidText repo}
<h2>Tags <h2>Tags

View file

@ -57,7 +57,12 @@ $# ^{personNavW user}
<h2>Clone <h2>Clone
<code>git clone @{RepoR repo} <p>
HTTPS:
<code>git clone @{RepoR repo}
<p>
SSH:
<code>git clone USERNAME@#{renderAuthority host}:#{keyHashidText repo}
<h2>Branches <h2>Branches