diff --git a/src/Vervis/Handler/Client.hs b/src/Vervis/Handler/Client.hs
index 02070a0..492da48 100644
--- a/src/Vervis/Handler/Client.hs
+++ b/src/Vervis/Handler/Client.hs
@@ -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
diff --git a/templates/browse.hamlet b/templates/browse.hamlet
index 09e8b30..bb9ca14 100644
--- a/templates/browse.hamlet
+++ b/templates/browse.hamlet
@@ -17,15 +17,14 @@ $#
- Vervis is being used for its own development:
-
- Vervis project page
-
-
- Vervis is a Peers community project.
+ Help wanted! Vervis is meant to be just a backend. We're looking for
+ developers to work on the
+
+ Anvil
+ frontend.
Vervis is a web application written in the Haskell programming language and
@@ -41,22 +40,23 @@ $#
People
@@ -101,7 +101,11 @@ $#
Projects
- $forall (Entity projectID _, Entity _ actor) <- projects
+ $forall (Entity projectID _, Entity _ actor, components) <- projects
+ $forall c <- components
+