mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 04:48:00 +03:00
graph-view: fix front-end
This commit is contained in:
parent
ee5e80cf44
commit
299b54baa1
@ -101,6 +101,7 @@
|
||||
%remove-graph
|
||||
:_ this
|
||||
[%give %kick ~[resource+(en-path:resource resource.update)] ~]~
|
||||
::
|
||||
%archive-graph
|
||||
:_ this
|
||||
[%give %kick ~[resource+(en-path:resource resource.update)] ~]~
|
||||
|
@ -80,6 +80,7 @@
|
||||
::
|
||||
:: NOTE: cannot send these updates as pokes
|
||||
::
|
||||
:: TODO: add ~| error message
|
||||
%keys !!
|
||||
%tags !!
|
||||
%tag-queries !!
|
||||
|
@ -209,7 +209,7 @@
|
||||
%all
|
||||
=/ keys (scry-for resources:store /keys)
|
||||
:_ state
|
||||
:- (give con [%graph-view-update !>([%0 [%keys keys]])])
|
||||
:- (give con [%graph-update !>([%0 now.bowl [%keys keys]])])
|
||||
%+ turn ~(tap in keys)
|
||||
|= [=ship =term]
|
||||
(give con [%graph-update !>((add-graph ship term))])
|
||||
@ -218,22 +218,22 @@
|
||||
:_ state
|
||||
:_ ~
|
||||
%+ give con
|
||||
:- %graph-view-update
|
||||
!>([%0 [%keys (scry-for resources:store /keys)]])
|
||||
:- %graph-update
|
||||
!>([%0 now.bowl [%keys (scry-for resources:store /keys)]])
|
||||
::
|
||||
%tags
|
||||
:_ state
|
||||
:_ ~
|
||||
%+ give con
|
||||
:- %graph-view-update
|
||||
!>([%0 [%tags (scry-for (set term) /tags)]])
|
||||
:- %graph-update
|
||||
!>([%0 now.bowl [%tags (scry-for (set term) /tags)]])
|
||||
::
|
||||
%tag-queries
|
||||
:_ state
|
||||
:_ ~
|
||||
%+ give con
|
||||
:- %graph-view-update
|
||||
!>([%0 [%tag-queries (scry-for tag-queries:store /tag-queries)]])
|
||||
:- %graph-update
|
||||
!>([%0 now.bowl [%tag-queries (scry-for tag-queries:store /tag-queries)]])
|
||||
::
|
||||
%graph
|
||||
:_ state
|
||||
|
@ -4,6 +4,37 @@
|
||||
=< [sur .]
|
||||
=, sur
|
||||
|%
|
||||
++ enjs
|
||||
=, enjs:format
|
||||
|%
|
||||
++ update
|
||||
|= upd=^update
|
||||
^- json
|
||||
?> ?=(%0 -.upd)
|
||||
|^ (frond %graph-view-update (pairs ~[(encode +.upd)]))
|
||||
::
|
||||
++ encode
|
||||
|= upd=update-0
|
||||
^- [cord json]
|
||||
?- -.upd
|
||||
%graph-subset
|
||||
[%graph-subset ~]
|
||||
::
|
||||
%node
|
||||
[%node ~]
|
||||
::
|
||||
%post
|
||||
[%post ~]
|
||||
::
|
||||
%node-children
|
||||
[%node-children ~]
|
||||
::
|
||||
%node-children-subset
|
||||
[%node-children-subset ~]
|
||||
==
|
||||
--
|
||||
--
|
||||
::
|
||||
++ dejs
|
||||
=, dejs:format
|
||||
|%
|
||||
|
Loading…
Reference in New Issue
Block a user