mirror of
https://github.com/urbit/shrub.git
synced 2024-12-11 11:02:25 +03:00
Merge branch 'master' into next/groups
This commit is contained in:
commit
5a946c666b
@ -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
|
||||
|
@ -141,6 +141,18 @@ export function dateToDa(d: Date, mil: boolean = false): string {
|
||||
);
|
||||
}
|
||||
|
||||
export function preSig(ship: string): string {
|
||||
if (!ship) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (ship.trim().startsWith('~')) {
|
||||
return ship.trim();
|
||||
}
|
||||
|
||||
return '~'.concat(ship.trim());
|
||||
}
|
||||
|
||||
export function deSig(ship: string): string | null {
|
||||
if (!ship) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user