UI: Browse: Update intro text & list projects' components
This commit is contained in:
parent
840b13eff1
commit
80a08dea0a
2 changed files with 57 additions and 21 deletions
|
@ -51,6 +51,8 @@ import Control.Applicative
|
||||||
import Control.Concurrent.STM.TVar
|
import Control.Concurrent.STM.TVar
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Trans.Except
|
import Control.Monad.Trans.Except
|
||||||
|
import Data.Bifunctor
|
||||||
|
import Data.Bitraversable
|
||||||
import Data.List
|
import Data.List
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Data.Time.Clock
|
import Data.Time.Clock
|
||||||
|
@ -90,14 +92,17 @@ import Yesod.Form.Local
|
||||||
import Vervis.API
|
import Vervis.API
|
||||||
import Vervis.Client
|
import Vervis.Client
|
||||||
import Vervis.Data.Actor
|
import Vervis.Data.Actor
|
||||||
|
import Vervis.Data.Collab
|
||||||
import Vervis.FedURI
|
import Vervis.FedURI
|
||||||
import Vervis.Form.Ticket
|
import Vervis.Form.Ticket
|
||||||
import Vervis.Foundation
|
import Vervis.Foundation
|
||||||
import Vervis.Model
|
import Vervis.Model
|
||||||
import Vervis.Model.Ident
|
import Vervis.Model.Ident
|
||||||
|
import Vervis.Persist.Collab
|
||||||
import Vervis.Recipient
|
import Vervis.Recipient
|
||||||
import Vervis.Settings
|
import Vervis.Settings
|
||||||
import Vervis.Web.Actor
|
import Vervis.Web.Actor
|
||||||
|
import Vervis.Widget.Tracker
|
||||||
|
|
||||||
-- | Account verification email resend form
|
-- | Account verification email resend form
|
||||||
getResendVerifyEmailR :: Handler Html
|
getResendVerifyEmailR :: Handler Html
|
||||||
|
@ -201,10 +206,37 @@ getBrowseR = do
|
||||||
E.orderBy [E.asc $ loom E.^. LoomId]
|
E.orderBy [E.asc $ loom E.^. LoomId]
|
||||||
return (loom, actor)
|
return (loom, actor)
|
||||||
)
|
)
|
||||||
<*> (E.select $ E.from $ \ (project `E.InnerJoin` actor) -> do
|
<*> (do js <-
|
||||||
E.on $ project E.^. ProjectActor E.==. actor E.^. ActorId
|
E.select $ E.from $ \ (project `E.InnerJoin` actor) -> do
|
||||||
E.orderBy [E.asc $ project E.^. ProjectId]
|
E.on $ project E.^. ProjectActor E.==. actor E.^. ActorId
|
||||||
return (project, actor)
|
E.orderBy [E.asc $ project E.^. ProjectId]
|
||||||
|
return (project, actor)
|
||||||
|
for js $ \ (j@(Entity projectID _), jactor) -> do
|
||||||
|
cs <-
|
||||||
|
E.select $ E.from $ \ (comp `E.InnerJoin` enable) -> do
|
||||||
|
E.on $ comp E.^. ComponentId E.==. enable E.^. ComponentEnableComponent
|
||||||
|
E.where_ $ comp E.^. ComponentProject E.==. E.val projectID
|
||||||
|
return comp
|
||||||
|
cs' <- for cs $ \ (Entity cid _) -> do
|
||||||
|
byKeyOrRaid <- bimap snd snd <$> getComponentIdent cid
|
||||||
|
bitraverse
|
||||||
|
(\ byKey -> do
|
||||||
|
actorID <-
|
||||||
|
case byKey of
|
||||||
|
ComponentRepo k -> repoActor <$> getJust k
|
||||||
|
ComponentDeck k -> deckActor <$> getJust k
|
||||||
|
ComponentLoom k -> loomActor <$> getJust k
|
||||||
|
actor <- getJust actorID
|
||||||
|
return (byKey, actor)
|
||||||
|
)
|
||||||
|
(\ remoteActorID -> do
|
||||||
|
remoteActor <- getJust remoteActorID
|
||||||
|
remoteObject <- getJust $ remoteActorIdent remoteActor
|
||||||
|
inztance <- getJust $ remoteObjectInstance remoteObject
|
||||||
|
return (inztance, remoteObject, remoteActor)
|
||||||
|
)
|
||||||
|
byKeyOrRaid
|
||||||
|
return (j, jactor, cs')
|
||||||
)
|
)
|
||||||
{-
|
{-
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
|
|
|
@ -17,15 +17,14 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
Vervis is a work-in-progress federated project and repository hosting and
|
Vervis is a work-in-progress federated project and repository hosting and
|
||||||
collaboration platform. Its development is meant to help form the ForgeFed
|
collaboration platform. Its development is meant to help form the ForgeFed
|
||||||
specification for project hosting platform federation, and hopefully get
|
specification for project hosting platform federation, and hopefully get
|
||||||
existing platforms (such as Gitea, Gogs, GitLab CE, etc.) to support it.
|
existing platforms (such as Forgejo, Gitea, GitLab CE, etc.) to support it.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Vervis is being used for its own development:
|
Help wanted! Vervis is meant to be just a backend. We're looking for
|
||||||
<a href="https://vervis.peers.community/repos/WvWbo">
|
developers to work on the
|
||||||
Vervis project page
|
<a href="https://codeberg.org/Anvil/Anvil">
|
||||||
|
Anvil
|
||||||
<p>
|
frontend.
|
||||||
Vervis is a <a href="https://peers.community">Peers community</a> project.
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Vervis is a web application written in the Haskell programming language and
|
Vervis is a web application written in the Haskell programming language and
|
||||||
|
@ -41,22 +40,23 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
Vervis web app
|
Vervis web app
|
||||||
<a href="https://vervis.peers.community/repos/WvWbo">
|
<a href="https://vervis.peers.community/repos/rjQ3E">
|
||||||
source code
|
Git repository
|
||||||
(it's a <a href="http://darcs.net">Darcs</a> repository)
|
with the source code
|
||||||
|
<li>
|
||||||
|
<a href="https://codeberg.org/ForgeFed/Vervis">
|
||||||
|
Mirror on Codeberg
|
||||||
<li>
|
<li>
|
||||||
IRC:
|
IRC:
|
||||||
<a href="https://web.libera.chat/#peers">
|
<a href="https://web.libera.chat/#forgefed">
|
||||||
#peers @ Libera Chat
|
#forgefed @ Libera Chat
|
||||||
<li>
|
<li>
|
||||||
Matrix:
|
Matrix:
|
||||||
<a href="https://matrix.to/#/#peers:libera.chat">
|
<a href="https://matrix.to/#/#general-forgefed:matrix.batsense.net">
|
||||||
#peers:libera.chat
|
#general-forgefed:matrix.batsense.net
|
||||||
<li>
|
<li>
|
||||||
ForgeFed
|
ForgeFed
|
||||||
<a href="https://forgefed.org">website
|
<a href="https://forgefed.org">website
|
||||||
and
|
|
||||||
<a href="https://socialhub.activitypub.rocks/c/software/forgefed">forum
|
|
||||||
|
|
||||||
<h2>People
|
<h2>People
|
||||||
|
|
||||||
|
@ -101,7 +101,11 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
<h2>Projects
|
<h2>Projects
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
$forall (Entity projectID _, Entity _ actor) <- projects
|
$forall (Entity projectID _, Entity _ actor, components) <- projects
|
||||||
<li>
|
<li>
|
||||||
<a href=@{ProjectR $ hashProject projectID}>
|
<a href=@{ProjectR $ hashProject projectID}>
|
||||||
\$#{keyHashidText $ hashProject projectID} #{actorName actor}
|
\$#{keyHashidText $ hashProject projectID} #{actorName actor}
|
||||||
|
<ul>
|
||||||
|
$forall c <- components
|
||||||
|
<li>
|
||||||
|
^{componentLinkFedW c}
|
||||||
|
|
Loading…
Reference in a new issue