UI: Browse: Update intro text & list projects' components

This commit is contained in:
Pere Lev 2023-11-21 10:56:09 +02:00
parent 840b13eff1
commit 80a08dea0a
No known key found for this signature in database
GPG key ID: 5252C5C863E5E57D
2 changed files with 57 additions and 21 deletions

View file

@ -51,6 +51,8 @@ import Control.Applicative
import Control.Concurrent.STM.TVar
import Control.Monad
import Control.Monad.Trans.Except
import Data.Bifunctor
import Data.Bitraversable
import Data.List
import Data.Text (Text)
import Data.Time.Clock
@ -90,14 +92,17 @@ import Yesod.Form.Local
import Vervis.API
import Vervis.Client
import Vervis.Data.Actor
import Vervis.Data.Collab
import Vervis.FedURI
import Vervis.Form.Ticket
import Vervis.Foundation
import Vervis.Model
import Vervis.Model.Ident
import Vervis.Persist.Collab
import Vervis.Recipient
import Vervis.Settings
import Vervis.Web.Actor
import Vervis.Widget.Tracker
-- | Account verification email resend form
getResendVerifyEmailR :: Handler Html
@ -201,10 +206,37 @@ getBrowseR = do
E.orderBy [E.asc $ loom E.^. LoomId]
return (loom, actor)
)
<*> (E.select $ E.from $ \ (project `E.InnerJoin` actor) -> do
E.on $ project E.^. ProjectActor E.==. actor E.^. ActorId
E.orderBy [E.asc $ project E.^. ProjectId]
return (project, actor)
<*> (do js <-
E.select $ E.from $ \ (project `E.InnerJoin` actor) -> do
E.on $ project E.^. ProjectActor E.==. actor E.^. ActorId
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

View file

@ -17,15 +17,14 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
Vervis is a work-in-progress federated project and repository hosting and
collaboration platform. Its development is meant to help form the ForgeFed
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>
Vervis is being used for its own development:
<a href="https://vervis.peers.community/repos/WvWbo">
Vervis project page
<p>
Vervis is a <a href="https://peers.community">Peers community</a> project.
Help wanted! Vervis is meant to be just a backend. We're looking for
developers to work on the
<a href="https://codeberg.org/Anvil/Anvil">
Anvil
frontend.
<p>
Vervis is a web application written in the Haskell programming language and
@ -41,22 +40,23 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
<ul>
<li>
Vervis web app
<a href="https://vervis.peers.community/repos/WvWbo">
source code
(it's a <a href="http://darcs.net">Darcs</a> repository)
<a href="https://vervis.peers.community/repos/rjQ3E">
Git repository
with the source code
<li>
<a href="https://codeberg.org/ForgeFed/Vervis">
Mirror on Codeberg
<li>
IRC:
<a href="https://web.libera.chat/#peers">
#peers @ Libera Chat
<a href="https://web.libera.chat/#forgefed">
#forgefed @ Libera Chat
<li>
Matrix:
<a href="https://matrix.to/#/#peers:libera.chat">
#peers:libera.chat
<a href="https://matrix.to/#/#general-forgefed:matrix.batsense.net">
#general-forgefed:matrix.batsense.net
<li>
ForgeFed
<a href="https://forgefed.org">website
and
<a href="https://socialhub.activitypub.rocks/c/software/forgefed">forum
<h2>People
@ -101,7 +101,11 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
<h2>Projects
<ul>
$forall (Entity projectID _, Entity _ actor) <- projects
$forall (Entity projectID _, Entity _ actor, components) <- projects
<li>
<a href=@{ProjectR $ hashProject projectID}>
\$#{keyHashidText $ hashProject projectID} #{actorName actor}
<ul>
$forall c <- components
<li>
^{componentLinkFedW c}