mirror of
https://github.com/urbit/shrub.git
synced 2025-01-01 17:16:47 +03:00
settings: add mark for scry result for frontend scry json conversion
This commit is contained in:
parent
78bdcbf020
commit
026b7b09ce
@ -76,13 +76,13 @@
|
||||
^- (unit (unit cage))
|
||||
?+ pax (on-peek:def pax)
|
||||
[%x %all ~]
|
||||
``noun+!>(settings)
|
||||
``settings-data+!>(all+settings)
|
||||
::
|
||||
[%x %bucket @ ~]
|
||||
=* buc i.t.t.pax
|
||||
=/ bucket=(unit bucket) (~(get by settings) buc)
|
||||
?~ bucket [~ ~]
|
||||
``noun+!>(u.bucket)
|
||||
``settings-data+!>(bucket+u.bucket)
|
||||
::
|
||||
[%x %entry @ @ ~]
|
||||
=* buc i.t.t.pax
|
||||
@ -90,7 +90,7 @@
|
||||
=/ =bucket (fall (~(get by settings) buc) ~)
|
||||
=/ entry=(unit val) (~(get by bucket) key)
|
||||
?~ entry [~ ~]
|
||||
``noun+!>(u.entry)
|
||||
``settings-data+!>(entry+u.entry)
|
||||
==
|
||||
::
|
||||
++ on-agent on-agent:def
|
||||
|
@ -3,6 +3,21 @@
|
||||
++ enjs
|
||||
=, enjs:format
|
||||
|%
|
||||
++ data
|
||||
|= dat=^data
|
||||
^- json
|
||||
%+ frond -.dat
|
||||
?- -.dat
|
||||
%all (settings +.dat)
|
||||
%bucket (bucket +.dat)
|
||||
%entry (value +.dat)
|
||||
==
|
||||
::
|
||||
++ settings
|
||||
|= s=^settings
|
||||
^- json
|
||||
[%o (~(run by s) bucket)]
|
||||
::
|
||||
++ event
|
||||
|= evt=^event
|
||||
^- json
|
||||
|
13
pkg/arvo/mar/settings/data.hoon
Normal file
13
pkg/arvo/mar/settings/data.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
/+ *settings
|
||||
|_ dat=data
|
||||
++ grad %noun
|
||||
++ grow
|
||||
|%
|
||||
++ noun dat
|
||||
++ json (data:enjs dat)
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ noun data
|
||||
--
|
||||
--
|
@ -13,4 +13,9 @@
|
||||
[%put-entry buc=key =key =val]
|
||||
[%del-entry buc=key =key]
|
||||
==
|
||||
+$ data
|
||||
$% [%all =settings]
|
||||
[%bucket =bucket]
|
||||
[%entry =val]
|
||||
==
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user