mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 08:32:39 +03:00
Merge branch 'release/next-js' of https://github.com/urbit/urbit into npm-packages
This commit is contained in:
commit
cf2380bb6c
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:016d6672c471304c7c728913b169a9a938d3fcb1a5f0d47e92e1c1c9ebde8d92
|
||||
size 9282017
|
||||
oid sha256:f4b93e4d91e42c8444bb22447a0ae7d969ec552ba2d0f4b87a8dd20a41709d4e
|
||||
size 9345380
|
||||
|
@ -3,7 +3,7 @@
|
||||
:: data store that holds individual contact data
|
||||
::
|
||||
/- store=contact-store, *resource
|
||||
/+ default-agent, dbug, *migrate, contact
|
||||
/+ default-agent, dbug, *migrate, contact, verb
|
||||
|%
|
||||
+$ card card:agent:gall
|
||||
+$ state-4
|
||||
@ -25,6 +25,7 @@
|
||||
=| state-4
|
||||
=* state -
|
||||
%- agent:dbug
|
||||
%+ verb |
|
||||
^- agent:gall
|
||||
|_ =bowl:gall
|
||||
+* this .
|
||||
|
@ -5,7 +5,7 @@
|
||||
/- glob
|
||||
/+ default-agent, verb, dbug
|
||||
|%
|
||||
++ hash 0v1.grvkp.m0c8p.i7s2g.p5mje.im0qo
|
||||
++ hash 0v3.t4lg5.84a6h.2bi2s.ni2p9.32uor
|
||||
+$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))]
|
||||
+$ all-states
|
||||
$% state-0
|
||||
|
@ -7,6 +7,9 @@
|
||||
|= force=?
|
||||
:~ [%pass /gall %arvo %g %goad force ~]
|
||||
==
|
||||
+$ state
|
||||
$@ ~
|
||||
[%0 ~]
|
||||
--
|
||||
|_ =bowl:gall
|
||||
+* this .
|
||||
@ -31,8 +34,13 @@
|
||||
++ on-fail on-fail:def
|
||||
++ on-init on-init:def
|
||||
++ on-leave on-leave:def
|
||||
++ on-load on-load:def
|
||||
++ on-load
|
||||
|= =vase
|
||||
=+ !<(old=state vase)
|
||||
?^ old `this
|
||||
[(goad &) this]
|
||||
::
|
||||
++ on-peek on-peek:def
|
||||
++ on-save on-save:def
|
||||
++ on-save !>([%0 ~])
|
||||
++ on-watch on-watch:def
|
||||
--
|
||||
|
@ -24,6 +24,6 @@
|
||||
<div id="portal-root"></div>
|
||||
<script src="/~landscape/js/channel.js"></script>
|
||||
<script src="/~landscape/js/session.js"></script>
|
||||
<script src="/~landscape/js/bundle/index.6aee6f22bd32ebb85e0c.js"></script>
|
||||
<script src="/~landscape/js/bundle/index.dcdc4301b299cb03bad0.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -34,12 +34,15 @@
|
||||
^- agent:gall
|
||||
|_ =bowl:gall
|
||||
+* this .
|
||||
def ~(. (default-agent *agent:gall %|) bowl)
|
||||
def ~(. (default-agent this %|) bowl)
|
||||
++ on-init on-init:def
|
||||
++ on-save !>(state)
|
||||
++ on-load
|
||||
|= =vase
|
||||
=+ !<(old=versioned-state vase)
|
||||
=/ m-old=(unit versioned-state)
|
||||
(mole |.(!<(versioned-state vase)))
|
||||
?~ m-old `this
|
||||
=* old u.m-old
|
||||
|^
|
||||
?: ?=(%2 -.old)
|
||||
`this
|
||||
|
@ -20,6 +20,17 @@
|
||||
+$ state-zero
|
||||
[%0 previews=(map resource group-preview:metadata)]
|
||||
::
|
||||
+$ state-one
|
||||
$: %1
|
||||
pending=(set resource)
|
||||
previews=(map resource group-preview:metadata)
|
||||
==
|
||||
::
|
||||
+$ versioned-state
|
||||
$% state-zero
|
||||
state-one
|
||||
==
|
||||
::
|
||||
--
|
||||
::
|
||||
::
|
||||
@ -28,7 +39,7 @@
|
||||
^- agent:gall
|
||||
%- (agent:pull-hook config)
|
||||
^- (pull-hook:pull-hook config)
|
||||
=| state-zero
|
||||
=| state-one
|
||||
=* state -
|
||||
=> |_ =bowl:gall
|
||||
++ def ~(. (default-agent state %|) bowl)
|
||||
@ -53,8 +64,9 @@
|
||||
%fact
|
||||
?> ?=(%invite-update p.cage.sign)
|
||||
=+ !<(=update:invite-store q.cage.sign)
|
||||
:_ state
|
||||
?. ?=(%invite -.update) ~
|
||||
?. ?=(%invite -.update) `state
|
||||
?: (~(has in pending) resource.invite.update) `state
|
||||
:_ state(pending (~(put in pending) resource.invite.update))
|
||||
(get-preview resource.invite.update)^~
|
||||
::
|
||||
%kick [watch-invites^~ state]
|
||||
@ -70,41 +82,64 @@
|
||||
%kick [~[watch-contacts] state]
|
||||
::
|
||||
%fact
|
||||
:_ state
|
||||
?> ?=(%contact-update p.cage.sign)
|
||||
=+ !<(=update:contact q.cage.sign)
|
||||
?+ -.update ~
|
||||
?+ -.update `state
|
||||
%add
|
||||
(check-contact contact.update)
|
||||
=/ missing=(set resource)
|
||||
(check-contact contact.update)
|
||||
=. pending
|
||||
(~(uni in pending) missing)
|
||||
:_ state
|
||||
(get-many-previews missing)
|
||||
|
||||
::
|
||||
%edit
|
||||
?. ?=(%add-group -.edit-field.update) ~
|
||||
%- add-missing-previews
|
||||
(~(gas in *(set resource)) resource.edit-field.update ~)
|
||||
?. ?=(%add-group -.edit-field.update) `state
|
||||
=/ missing=(set resource)
|
||||
%- add-missing-previews
|
||||
(~(gas in *(set resource)) resource.edit-field.update ~)
|
||||
=. pending
|
||||
(~(uni in pending) missing)
|
||||
:_ state
|
||||
(get-many-previews missing)
|
||||
::
|
||||
::
|
||||
%initial
|
||||
^- (list card)
|
||||
%- zing
|
||||
%+ turn ~(tap by rolodex.update)
|
||||
|=([ship =contact:contact] (check-contact contact))
|
||||
=/ missing=(set resource)
|
||||
%- add-missing-previews
|
||||
%+ roll ~(tap by rolodex.update)
|
||||
|= [[ship =contact:contact] out=(set resource)]
|
||||
(~(uni in out) (check-contact contact))
|
||||
=. pending
|
||||
(~(uni in pending) missing)
|
||||
:_ state
|
||||
(get-many-previews missing)
|
||||
==
|
||||
==
|
||||
::
|
||||
++ get-many-previews
|
||||
|= rids=(set resource)
|
||||
(turn ~(tap by rids) get-preview)
|
||||
::
|
||||
++ check-contact
|
||||
|= =contact:contact
|
||||
^- (list card)
|
||||
^- (set resource)
|
||||
(add-missing-previews groups.contact)
|
||||
::
|
||||
++ add-missing-previews
|
||||
|= groups=(set resource)
|
||||
^- (list card)
|
||||
^- (set resource)
|
||||
=/ have=(set resource)
|
||||
(~(uni in ~(key by previews)) pending)
|
||||
=/ missing=(set resource)
|
||||
(~(dif in ~(key by previews)) groups)
|
||||
(~(dif in groups) have)
|
||||
%- ~(gas by *(set resource))
|
||||
%+ murn ~(tap by missing)
|
||||
|= group=resource
|
||||
^- (unit card)
|
||||
^- (unit resource)
|
||||
?^ (peek-metadatum:met %groups group) ~
|
||||
`(get-preview group)
|
||||
`group
|
||||
::
|
||||
++ watch-store
|
||||
(~(watch-our pass:io /store) %metadata-store /all)
|
||||
@ -139,8 +174,19 @@
|
||||
++ on-save !>(state)
|
||||
++ on-load
|
||||
|= =vase
|
||||
=+ !<(old=state-zero vase)
|
||||
`this(state old)
|
||||
=+ !<(old=versioned-state vase)
|
||||
|-
|
||||
?- -.old
|
||||
%1 `this(state old)
|
||||
::
|
||||
%0
|
||||
%_ $
|
||||
old
|
||||
%* . *state-one
|
||||
previews previews.old
|
||||
==
|
||||
==
|
||||
==
|
||||
::
|
||||
++ on-poke
|
||||
|= [=mark =vase]
|
||||
@ -149,7 +195,11 @@
|
||||
=+ !<(=hook-update:metadata vase)
|
||||
?. ?=(%preview -.hook-update)
|
||||
(on-poke:def mark vase)
|
||||
:_ this(previews (~(put by previews) group.hook-update +.hook-update))
|
||||
=: pending (~(del in pending) group.hook-update)
|
||||
previews
|
||||
(~(put by previews) group.hook-update +.hook-update)
|
||||
==
|
||||
:_ this
|
||||
=/ =path
|
||||
preview+(en-path:resource group.hook-update)
|
||||
(fact-kick:io path mark^vase)
|
||||
@ -165,8 +215,10 @@
|
||||
[%preview @ @ @ ~]
|
||||
?. ?=(%poke-ack -.sign)
|
||||
(on-agent:def:hc wire sign)
|
||||
:_ state
|
||||
?~ p.sign ~
|
||||
?~ p.sign `state
|
||||
=/ rid
|
||||
(de-path:resource t.wire)
|
||||
:_ state(pending (~(del in pending) rid))
|
||||
(fact-kick:io wire tang+!>(u.p.sign))
|
||||
==
|
||||
[cards this]
|
||||
@ -182,9 +234,10 @@
|
||||
?^ (peek-metadatum:met %groups rid)
|
||||
(some (get-preview:met rid))
|
||||
(~(get by previews) rid)
|
||||
:_ this
|
||||
?~ prev
|
||||
:_ this(pending (~(put in pending) rid))
|
||||
(get-preview rid)^~
|
||||
:_ this
|
||||
(fact-init:io metadata-hook-update+!>([%preview u.prev]))^~
|
||||
::
|
||||
++ on-leave on-leave:def
|
||||
|
@ -75,7 +75,7 @@ export function Dropdown(props: DropdownProps) {
|
||||
});
|
||||
|
||||
return (
|
||||
<Box flexShrink={1} position={open ? "relative" : "static"} minWidth='0' width={props?.width ? props.width : 'auto'}>
|
||||
<Box flexShrink={props?.flexShrink ? props.flexShrink : 1} position={open ? "relative" : "static"} minWidth='0' width={props?.width ? props.width : 'auto'}>
|
||||
<ClickBox width='100%' ref={anchorRef} onClick={onOpen}>
|
||||
{children}
|
||||
</ClickBox>
|
||||
|
@ -77,9 +77,11 @@ export const SetStatusBarModal = (props) => {
|
||||
)}
|
||||
<Row
|
||||
{...rest}
|
||||
flexShrink={0}
|
||||
onClick={() => setModalShown(true)}>
|
||||
<Text color='black'
|
||||
cursor='pointer'
|
||||
flexShrink={0}
|
||||
fontSize={1}>
|
||||
Set Status
|
||||
</Text>
|
||||
|
@ -107,6 +107,7 @@ const StatusBar = (props) => {
|
||||
width="auto"
|
||||
alignY="top"
|
||||
alignX="right"
|
||||
flexShrink={0}
|
||||
options={
|
||||
<Col
|
||||
mt='6'
|
||||
|
Loading…
Reference in New Issue
Block a user