marks: add graph-view marks

This commit is contained in:
Liam Fitzgerald 2020-09-04 00:12:12 +10:00
parent 2a9c1bf3fa
commit ff1219bbda
5 changed files with 95 additions and 7 deletions

View File

@ -0,0 +1,62 @@
/- sur=graph-view
/+ resource, group-store
^?
=< [sur .]
=, sur
|%
++ app-to-mark
|= app=app-name
?+ app !!
%chat %graph-validator-chat
==
++ dejs
=, dejs:format
|%
++ action
|^
^- $-(json ^action)
%- of
:~ create+create
delete+delete
join+join
::groupify+groupify
::invite+invite
==
::
++ create
%- ot
:~ resource+dejs:resource
title+so
description+so
app+app
associated+associated
==
++ app
|= jon=json
^- app-name
?> ?=(%s -.jon)
~! app-name
%chat
::
++ delete
%- ot
:~ resource+dejs:resource
==
::
++ join
%- ot
:~ resource+dejs:resource
ship+(su ;~(pfix sig fed:ag))
==
::
++ groupify !!
++ invite !!
++ associated
%- of
:~ group+dejs:resource
policy+policy:dejs:group-store
==
--
--
--

View File

@ -243,7 +243,8 @@
::
++ scry
|* [=mold =path]
=/ m (strand mold)
=/ m (strand ,mold)
^- form:m
?> ?=(^ path)
?> ?=(^ t.path)
;< =bowl:spider bind:m get-bowl

View File

@ -1,7 +1,9 @@
/+ *graph-store
|_ upd=update
++ grad %noun
++ grow
|%
++ noun upd
++ json (update:enjs upd)
--
::

View File

@ -0,0 +1,13 @@
/+ *graph-view
|_ act=action
++ grad %noun
++ grow
|%
++ noun act
--
++ grab
|%
++ noun action
++ json action:dejs
--
--

View File

@ -1,7 +1,17 @@
/- group
/- *group
/+ resource
^?
|%
:: $associated: A group to associate, or a policy if it is unmanaged
::
+$ associated
$% [%group rid=resource]
[%policy =policy]
==
:: $app: An app that is associated to a graph-store mark
::
+$ app-name ?(%chat %publish %links)
::
:: $error: An error from a graph-view poke
::
:: %offline: Ship is offline
@ -24,13 +34,13 @@
rid=resource
title=@t
description=@t
mark=(unit mark)
associated=(each resource policy:group)
app=app-name
=associated
==
[%delete rid=resource ~]
[%delete rid=resource]
[%join rid=resource =ship]
[%invite rid=resource ships=(set ship)]
[%groupify rid=resource title=@t description=@t]
::[%invite rid=resource ships=(set ship)]
:: [%groupify rid=resource title=@t description=@t]
==
--