mirror of
https://github.com/urbit/shrub.git
synced 2024-12-30 07:35:19 +03:00
Merge remote-tracking branch 'origin/master' into next/landscape
This commit is contained in:
commit
2fd26e2141
@ -2,8 +2,9 @@
|
||||
/+ *server, agentio, default-agent, multipart, dbug, verb
|
||||
|%
|
||||
+$ card card:agent:gall
|
||||
+$ state-0
|
||||
$: :: local
|
||||
+$ app-state
|
||||
$: %2
|
||||
:: local
|
||||
charges=(map desk charge)
|
||||
==
|
||||
:: $cache: impermanent state
|
||||
@ -11,7 +12,7 @@
|
||||
by-base=(map term desk)
|
||||
::
|
||||
+$ inflated-state
|
||||
[state-0 cache]
|
||||
[app-state cache]
|
||||
:: +lac: toggle verbosity
|
||||
++ lac &
|
||||
::
|
||||
@ -50,12 +51,23 @@
|
||||
++ on-load
|
||||
|= =vase
|
||||
^- (quip card _this)
|
||||
=+ !<(old=state-0 vase)
|
||||
=* cha ~(. ch q.byk.bowl)
|
||||
|^
|
||||
=+ !<(old=app-states vase)
|
||||
=? old ?=(?(~ ^) -.old) [%1 old]
|
||||
=^ cards old
|
||||
?. ?=(%1 -.old) `old
|
||||
=/ rein=cage kiln-rein+!>([%base %.y ~ ~])
|
||||
=/ nuke=cage kiln-uninstall+!>(%hodl)
|
||||
:_ old(- %2)
|
||||
:~ [%pass /rein %agent [our.bowl %hood] %poke rein]
|
||||
[%pass /nuke %agent [our.bowl %hood] %poke nuke]
|
||||
==
|
||||
?> ?=(%2 -.old)
|
||||
=. -.state old
|
||||
:: inflate-cache needs to be called after the state is set
|
||||
::
|
||||
=. +.state inflate-cache
|
||||
`this
|
||||
[cards this]
|
||||
::
|
||||
++ inflate-cache
|
||||
^- cache
|
||||
@ -64,6 +76,22 @@
|
||||
|= [=desk =charge]
|
||||
?. ?=(%glob -.href.docket.charge) ~
|
||||
`:_(desk base.href.docket.charge)
|
||||
::
|
||||
+$ app-states
|
||||
$^ state-0-ket
|
||||
$% state-0-sig
|
||||
state-1
|
||||
app-state
|
||||
==
|
||||
::
|
||||
+$ state-1 [%1 (map desk charge)]
|
||||
+$ state-0-sig
|
||||
$: ~
|
||||
==
|
||||
::
|
||||
+$ state-0-ket
|
||||
$: (map desk charge)
|
||||
==
|
||||
--
|
||||
::
|
||||
++ on-save !>(-.state)
|
||||
@ -182,7 +210,9 @@
|
||||
=^ cards state
|
||||
?+ wire ~&(bad-docket-take+wire `state)
|
||||
~ `state
|
||||
[%kiln ~] take-kiln
|
||||
[%rein ~] ~&(%reined `state)
|
||||
[%nuke ~] ~&(%nuked `state)
|
||||
[%kiln ~] take-kiln
|
||||
[%charge @ *] (take-charge i.t.wire t.t.wire)
|
||||
==
|
||||
[cards this]
|
||||
@ -390,7 +420,7 @@
|
||||
|_ =bowl:gall
|
||||
++ io ~(. agentio bowl)
|
||||
++ pass pass:io
|
||||
++ def ~(. (default-agent state %|) bowl)
|
||||
++ def ~(. (default-agent state %|) bowl)
|
||||
::
|
||||
++ hash-glob sham
|
||||
++ cg
|
||||
|
Loading…
Reference in New Issue
Block a user