Merge branch 'master' into alef-testnet

This commit is contained in:
Ted Blackman 2019-08-27 14:06:09 -07:00
commit 0fc1675928
40 changed files with 416 additions and 150 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6c7ad5eec00d0d6a6857ea023c6102999a30d5c99de7411e474b9d1c14a3e7b4
size 9765203
oid sha256:6143926c8a07a3d2a38abf2be0d3d1ef46315bf1ae13b5401113082ddbe481ec
size 12650146

View File

@ -430,7 +430,7 @@
[/ %whom who.ae] :: eny
[//newt/0v1n.2m9vh %born ~]
[//behn/0v1n.2m9vh %born ~]
:+ //term/1 %boot
:^ //term/1 %boot &
?~ keys.ae
[%fake who.ae]
[%dawn u.keys.ae]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -139,6 +139,7 @@
++ made-kiln (wrap take-made):from-kiln
++ mere-kiln (wrap take-mere):from-kiln
++ mere-kiln-sync (wrap take-mere-sync):from-kiln
++ wake-kiln-autocommit (wrap take-wake-autocommit):from-kiln
++ wake-kiln-overload (wrap take-wake-overload):from-kiln
++ wake-helm-automass (wrap take-wake-automass):from-helm
++ onto-drum (wrap take-onto):from-drum
@ -151,6 +152,7 @@
++ poke-drum-unlink (wrap poke-unlink):from-drum
++ poke-drum-exit (wrap poke-exit):from-drum
++ poke-drum-start (wrap poke-start):from-drum
++ poke-drum-set-boot-apps (wrap poke-set-boot-apps):from-drum
++ poke-helm-hi (wrap poke-hi):from-helm
::++ poke-helm-invite (wrap poke-invite):from-helm
++ poke-helm-mass (wrap poke-mass):from-helm
@ -172,6 +174,7 @@
++ poke-kiln-label (wrap poke-label):from-kiln
++ poke-kiln-merge (wrap poke-merge):from-kiln
++ poke-kiln-cancel (wrap poke-cancel):from-kiln
++ poke-kiln-cancel-autocommit (wrap poke-cancel-autocommit):from-kiln
++ poke-kiln-mount (wrap poke-mount):from-kiln
++ poke-kiln-rm (wrap poke-rm):from-kiln
++ poke-kiln-schedule (wrap poke-schedule):from-kiln

View File

@ -81,7 +81,9 @@
:+ %hi
~[~bud ~dev]
;< ~ bind:m (raw-ship ~bud ~)
~& > "BUD DONE"
;< ~ bind:m (raw-ship ~dev ~)
~& > "DEV DONE"
(send-hi ~bud ~dev)
::
:+ %boot-planet

View File

@ -73,6 +73,7 @@
[%publish-collection collection]
[%publish-rumor rumor]
[%publish-update update]
[%export %publish-v0 publish-dir]
==
::
--
@ -1452,6 +1453,95 @@
new+(numb:enjs:format ~(wyt in unread.sat))
==
::
++ poke-import
|= i=*
^- (quip move _this)
?> ?=([%publish-v0 *] i)
=/ dir=publish-dir ;;(publish-dir +.i)
:: make moves to save all files to clay, and
:: make moves to call %serve for each collection
::
=/ out=[mow=(list move) sob=soba:clay]
%+ roll ~(tap by dir)
|= [[pax=path fil=publish-file] mow=(list move) sob=soba:clay]
=/ mis=miso:clay
(feel:space:userlib (weld our-beak pax) -.fil !>(+.fil))
?+ pax
[mow sob]
::
[%web %publish * %publish-info ~]
=/ col=@tas &3.pax
=/ wir=wire /collection/[col]
=/ schema=schematic:ford
:* %bake
%publish-info
*coin
[[our.bol q.byk.bol] /[col]/publish/web]
==
:- [[ost.bol %build wir %.y schema] mow]
[[pax mis] sob]
::
[%web %publish * * %udon ~]
=/ col=@tas &3.pax
=/ pos=@tas &4.pax
=/ post-wir=wire /post/[col]/[pos]
=/ post-schema=schematic:ford
:* %bake
%publish-post
*coin
[[our.bol q.byk.bol] /[pos]/[col]/publish/web]
==
=/ comment-wir=wire /comments/[col]/[pos]
=/ comment-schema=schematic:ford
:* %bake
%publish-comments
*coin
[[our.bol q.byk.bol] /[pos]/[col]/publish/web]
==
:- :+ [ost.bol %build post-wir %.y post-schema]
[ost.bol %build comment-wir %.y comment-schema]
mow
[[pax mis] sob]
::
[%web %publish * * * %publish-comment ~]
:- mow
[[pax mis] sob]
::
==
::
=/ tor=toro:clay
[q.byk.bol %.y sob.out]
:_ this
[[ost.bol %info /import tor] mow.out]
::
++ peer-export
|= pax=path
^- (quip move _this)
=/ pal=(list path) .^((list path) %ct (weld our-beak /web/publish))
::
=/ dir=publish-dir
%+ roll pal
|= [pax=path out=publish-dir]
^- publish-dir
?+ pax
out
::
[%web %publish * %publish-info ~]
=/ fil=collection-info .^(collection-info %cx (welp our-beak pax))
(~(put by out) pax [%publish-info fil])
::
[%web %publish * * %udon ~]
=/ fil=@t .^(@t %cx (welp our-beak pax))
(~(put by out) pax [%udon fil])
::
[%web %publish * * * %publish-comment ~]
=/ fil=comment .^(comment %cx (welp our-beak pax))
(~(put by out) pax [%publish-comment fil])
==
::
:_ this
[ost.bol %diff %export %publish-v0 dir]~
::
++ peer-publishtile
|= wir=wire
^- (quip move _this)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,13 @@
::
:::: /hoon/cancel-autocommit/hood/gen
::
/? 309
::
::::
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
~
~
==
[%kiln-cancel-autocommit ~]

View File

@ -9,7 +9,7 @@
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
{mon/term ~}
~
auto=_|
==
:- %kiln-commit
mon
[mon auto]

View File

@ -73,9 +73,13 @@
:: :: ::
|%
++ deft-apes :: default servers
|= our/ship
|= [our/ship lit/?]
%- ~(gas in *(set well:gall))
^- (list well:gall)
?: lit
:~ [%home %dojo]
[%home %azimuth-tracker]
==
=+ myr=(clan:title our)
::
?: ?=($pawn myr)
@ -121,7 +125,7 @@
%2
sys=~
eel=(deft-fish our)
ray=(deft-apes our)
ray=~
fur=~
bin=~
==
@ -174,6 +178,16 @@
=< se-abet =< se-view
(se-text "[{<src.hid>}, driving {<our.hid>}]")
::
++ poke-set-boot-apps ::
|= lit/?
^- (quip move part)
:: We do not run se-abet:se-view here because that starts the apps,
:: and some apps are not ready to start (eg Talk crashes because the
:: terminal has width 0). It appears the first message to drum must
:: be the peer.
::
[~ +<+.^$(ray (deft-apes our.hid lit))]
::
++ poke-dill-belt :: terminal event
|= bet/dill-belt:dill
=< se-abet =< se-view

View File

@ -19,6 +19,7 @@
cur-arvo/@uvI ::
cur-zuse/@uvI ::
cur-vanes/(map @tas @uvI) ::
commit-timer/{way/wire nex/@da tim/@dr mon=term}
== ::
++ per-desk :: per-desk state
$: auto/? :: escalate on failure
@ -74,6 +75,7 @@
{$wipe wire @ud} ::
[%keep wire compiler-cache-size=@ud build-cache-size=@ud]
{$wait wire @da} ::
{$rest wire @da} ::
{$warp wire ship riff} ::
== ::
++ pear :: poke fruit
@ -100,8 +102,19 @@
~[leaf+"from {<sud>}" leaf+"on {<who>}" leaf+"to {<syd>}"]
::
++ poke-commit
|= mon/kiln-commit
abet:(emit %dirk /commit mon)
|= [mon/kiln-commit auto=?]
=< abet
=. +>.$ (emit %dirk /commit mon)
?. auto
+>.$
=/ recur ~s1
=. commit-timer
[/kiln/autocommit (add now recur) recur mon]
(emit %wait way.commit-timer nex.commit-timer)
::
++ poke-cancel-autocommit
|= ~
abet:(emit %rest way.commit-timer nex.commit-timer)
::
++ poke-mount
|= kiln-mount
@ -361,6 +374,20 @@
~& %wake-overload-deprecated
abet
::
++ take-wake-autocommit
|= [way=wire error=(unit tang)]
?^ error
%- (slog u.error)
~& %kiln-wake-autocommit-fail
abet
=. nex.commit-timer (add now tim.commit-timer)
=< abet
%- emil
:~ [%dirk /commit mon.commit-timer]
[%wait way.commit-timer nex.commit-timer]
==
::
::
++ spam
|= mes/(list tank)
((slog mes) ..spam)

View File

@ -265,15 +265,12 @@
::
++ dawn
|= [who=ship seed=(unit seed:able:jael)]
^- dawn-event
^- dawn-event:able:jael
=/ spon=(list [ship point:azimuth])
|- ^- (list [ship point:azimuth])
=/ =ship (^sein:title who)
=/ a-point=[^ship point:azimuth]
=/ spon-spon
?: ?=(%czar (clan:title ship))
[| ~zod]
[& (^sein:title ship)]
=/ spon-spon [& (^sein:title ship)]
=/ life-rift ~|([ship lives] (~(got by lives) ship))
=/ =life lyfe.life-rift
=/ =rift rut.life-rift

View File

@ -49,7 +49,7 @@
:: Boot ship; don't check it succeeded.
::
++ boot-ship
|= [her=ship keys=(unit dawn-event)]
|= [her=ship keys=(unit dawn-event:able:jael)]
^+ *form:(ph ,~)
|= ph-input
[& (init her keys) %done ~]
@ -96,7 +96,7 @@
:: Boot a ship and verify it booted. Parent must already be booted.
::
++ raw-ship
|= [her=ship keys=(unit dawn-event)]
|= [her=ship keys=(unit dawn-event:able:jael)]
=/ m (ph ,~)
^- form:m
;< ~ bind:m (boot-ship her keys)

View File

@ -16,7 +16,7 @@
:: Start a ship (low-level; prefer +raw-ship)
::
++ init
|= [who=ship keys=(unit dawn-event)]
|= [who=ship keys=(unit dawn-event:able:jael)]
^- (list ph-event)
[%init-ship who keys]~
::

View File

@ -13,19 +13,10 @@
%+ pair wire
$% [%wack p=@]
[%whom p=ship]
[%boot $%([%fake p=ship] [%dawn p=dawn-event])]
[%boot ? $%($>(%fake task:able:jael) $>(%dawn task:able:jael))]
unix-task
==
::
+$ dawn-event
$: =seed:able:jael
spon=(list [=ship point:azimuth])
czar=(map ship [=rift =life =pass])
turf=(list turf)
bloq=@ud
node=(unit purl:eyre)
==
::
++ module-ova
|= sys=path
^- (list [wire [%veer term path cord]])

View File

@ -19,11 +19,10 @@
==
::
+$ unix-event unix-event:pill-lib
+$ dawn-event dawn-event:pill-lib
+$ pill pill:pill-lib
::
+$ aqua-event
$% [%init-ship who=ship keys=(unit dawn-event)]
$% [%init-ship who=ship keys=(unit dawn-event:able:jael)]
[%pause-events who=ship]
[%snap-ships lab=term hers=(list ship)]
[%restore-snap lab=term]

View File

@ -88,6 +88,14 @@
::
+$ rumor delta
::
+$ publish-dir (map path publish-file)
::
+$ publish-file
$% [%udon @t]
[%publish-info collection-info]
[%publish-comment comment]
==
::
+$ collection
$: col=[=bone dat=(each collection-info tang)]
pos=(map @tas [=bone dat=(each [post-info manx @t] tang)])

View File

@ -11505,7 +11505,7 @@
?^(p.sut yad [p.yad [%face p.sut q.yad]])
::
{$fork *}
=+ yed=~(tap in p.sut)
=+ yed=(sort ~(tap in p.sut) aor)
=- [p [%bswt q]]
|- ^- {p/{p/(map type @) q/(map @ wine)} q/(list wine)}
?~ yed

View File

@ -12,6 +12,7 @@
$: $0 ::
hey/(unit duct) :: default duct
dug/(map duct axon) :: conversations
lit/? :: boot in lite mode
$= hef :: other weights
$: a/(unit mass) ::
b/(unit mass) ::
@ -312,6 +313,7 @@
::
(show %kids):(sync %kids our %base)
=. +> autoload
=. +> hood-set-boot-apps
=. +> peer
|- ^+ +>+
?~ myt +>+
@ -328,6 +330,7 @@
::
++ send :: send action
|= bet/dill-belt
^+ +>
?^ tem
+>(tem `[bet u.tem])
%_ +>
@ -335,6 +338,16 @@
:_ moz
[hen %pass ~ %g %deal [our our] ram %poke [%dill-belt -:!>(bet) bet]]
==
::
++ hood-set-boot-apps
%_ .
moz
:_ moz
:* hen %pass ~ %g %deal [our our]
ram %poke %drum-set-boot-apps !>(lit.all)
==
==
::
++ peer
%_ .
moz
@ -493,7 +506,8 @@
~& %dill-no-boot
~& p.task
~| invalid-boot-event+hen !!
:_(..^$ [hen %pass / %j u.boot]~)
=. lit.all lit.task
[[hen %pass / %j u.boot]~ ..^$]
:: we are subsequently initialized. single-home
::
?: ?=(%init -.task)

View File

@ -692,7 +692,7 @@
$~ [%vega ~] ::
$% {$belt p/belt} :: terminal input
{$blew p/blew} :: terminal config
{$boot p/*} :: weird %dill boot
{$boot lit/? p/*} :: weird %dill boot
$>(%crud vane-task) :: error with trace
{$flog p/flog} :: wrapped error
{$flow p/@tas q/(list gill:gall)} :: terminal config
@ -1986,14 +1986,7 @@
::
+= task :: in request ->$
$~ [%vega ~] ::
$% $: %dawn :: boot from keys
=seed:able:jael :: identity params
spon=(list [=ship point:azimuth-types]) ::
czar=(map ship [=rift =life =pass]) :: galaxy table
turf=(list turf) :: domains
bloq=@ud :: block number
node=(unit purl:eyre) :: gateway url
== ::
$% [%dawn dawn-event] :: boot from keys
[%fake =ship] :: fake boot
[%listen whos=(set ship) =source] :: set ethereum source
::TODO %next for generating/putting new private key
@ -2009,6 +2002,15 @@
$>(%plea vane-task) :: ames request
== ::
::
+$ dawn-event
$: =seed
spon=(list [=ship point:azimuth-types])
czar=(map ship [=rift =life =pass])
turf=(list turf)
bloq=@ud
node=(unit purl:eyre)
==
::
++ block
=< block
|%
@ -5277,15 +5279,7 @@
:: :: ++of-wain:format
++ of-wain :: line list to atom
|= tez/(list @t)
=| {our/@ i/@ud}
|- ^- @
?~ tez
our
?: =(%$ i.tez)
$(i +(i), tez t.tez, our (cat 3 our 10))
?: =(0 i)
$(i +(i), tez t.tez, our i.tez)
$(i +(i), tez t.tez, our (cat 3 (cat 3 our 10) i.tez))
(rap 3 (join '\0a' tez))
:: :: ++of-wall:format
++ of-wall :: line list to tape
|= a/wall ^- tape
@ -8837,7 +8831,7 @@
::
++ veri
|= [=seed:able:jael =point:azimuth =live]
^- (each sponsor=ship error=term)
^- (unit error=term)
=/ rac (clan:title who.seed)
=/ cub (nol:nu:crub:crypto key.seed)
?- rac
@ -8845,39 +8839,35 @@
:: a comet address is the fingerprint of the keypair
::
?. =(who.seed `@`fig:ex:cub)
[%| %key-mismatch]
`%key-mismatch
:: a comet can never be breached
::
?^ live
[%| %already-booted]
`%already-booted
:: a comet can never be re-keyed
::
?. ?=(%1 lyf.seed)
[%| %invalid-life]
[%& (^sein:title who.seed)]
`%invalid-life
~
::
%earl
:: the parent must be launched
::
?~ net.point
[%| %parent-not-keyed]
[%& (^sein:title who.seed)]
~
::
*
:: on-chain ships must be launched
::
?~ net.point
[%| %not-keyed]
`%not-keyed
=* net u.net.point
:: boot keys must match the contract
::
?. =(pub:ex:cub pass.net)
~& [%key-mismatch pub:ex:cub pass.net]
[%| %key-mismatch]
`%key-mismatch
:: life must match the contract
::
?. =(lyf.seed life.net)
[%| %life-mismatch]
`%life-mismatch
:: the boot life must be greater than and discontinuous with
:: the last seen life (per the sponsor)
::
@ -8885,12 +8875,28 @@
?| ?=(%| breach.u.live)
(lte life.net life.u.live)
== ==
[%| %already-booted]
`%already-booted
:: produce the sponsor for vere
::
~? !has.sponsor.net
[%no-sponsorship-guarantees-from who.sponsor.net]
[%& who.sponsor.net]
~
==
:: +sponsor:dawn: retreive sponsor from point
::
++ sponsor
|= [who=ship =point:azimuth]
^- (each ship error=term)
?- (clan:title who)
%pawn [%& (^sein:title who)]
%earl [%& (^sein:title who)]
%czar [%& (^sein:title who)]
*
?~ net.point
[%| %not-booted]
?. has.sponsor.u.net.point
[%| %no-sponsor]
[%& who.sponsor.u.net.point]
==
--
-- ::

View File

@ -188,36 +188,36 @@
++ test-veri-good
=/ sed [~zod 1 sec ~]
%+ expect-eq
!> [%& ~zod]
!> ~
!> (veri:dawn sed pot ~)
::
++ test-veri-not-spawned
=/ sed [~zod 1 sec ~]
%+ expect-eq
!> [%| %not-keyed]
!> `%not-keyed
!> (veri:dawn sed =>(pot .(net ~)) ~)
::
++ test-veri-wrong-key
=/ sed [~zod 1 sec:ex:(pit:nu:crub:crypto 24 %foo) ~]
%+ expect-eq
!> [%| %key-mismatch]
!> `%key-mismatch
!> (veri:dawn sed pot ~)
::
++ test-veri-life-mismatch
=/ sed [~zod 2 sec ~]
%+ expect-eq
!> [%| %life-mismatch]
!> `%life-mismatch
!> (veri:dawn sed pot ~)
::
++ test-veri-already-booted
=/ sed [~zod 1 sec ~]
;: weld
%+ expect-eq
!> [%| %already-booted]
!> `%already-booted
!> (veri:dawn sed pot `[1 |])
::
%+ expect-eq
!> [%| %already-booted]
!> `%already-booted
!> (veri:dawn sed pot `[2 &])
==
::
@ -230,7 +230,7 @@
(shaf %earl (sham who 1 pub:ex:cub))
[who 1 sec:ex:cub `sig]
%+ expect-eq
!> [%& (^sein:title who)]
!> ~
!> (veri:dawn sed pot ~)
::
++ test-veri-earl-parent-not-keyed
@ -242,7 +242,7 @@
(shaf %earl (sham who 1 pub:ex:cub))
[who 1 sec:ex:cub `sig]
%+ expect-eq
!> [%| %parent-not-keyed]
!> ~
!> (veri:dawn sed =>(pot .(net ~)) ~)
::
++ test-veri-pawn-good
@ -250,7 +250,7 @@
=/ who=ship `@`fig:ex:cub
=/ sed [who 1 sec:ex:cub ~]
%+ expect-eq
!> [%& ~mittun]
!> ~
!> (veri:dawn sed *point:azimuth-types ~)
::
++ test-veri-pawn-key-mismatch
@ -258,7 +258,7 @@
=/ who=ship `@`fig:ex:cub
=/ sed [who 1 sec:ex:(pit:nu:crub:crypto 24 %bar) ~]
%+ expect-eq
!> [%| %key-mismatch]
!> `%key-mismatch
!> (veri:dawn sed *point:azimuth-types ~)
::
++ test-veri-pawn-invalid-life
@ -266,7 +266,7 @@
=/ who=ship `@`fig:ex:cub
=/ sed [who 2 sec:ex:cub ~]
%+ expect-eq
!> [%| %invalid-life]
!> `%invalid-life
!> (veri:dawn sed *point:azimuth-types ~)
::
++ test-veri-pawn-already-booted
@ -274,6 +274,6 @@
=/ who=ship `@`fig:ex:cub
=/ sed [who 1 sec:ex:cub ~]
%+ expect-eq
!> [%| %already-booted]
!> `%already-booted
!> (veri:dawn sed *point:azimuth-types `[1 |])
--

View File

@ -2,6 +2,8 @@ import React from 'react';
import ReactDOM from 'react-dom';
import _ from 'lodash';
import { uuid } from '/lib/util';
import { store } from '/store';
class UrbitApi {
setAuthTokens(authTokens) {
@ -35,6 +37,18 @@ class UrbitApi {
this.action("hall", "hall-action", data);
}
addPendingMessage(data) {
let pendingMap = store.state.pendingMessages;
if (pendingMap.has(data.aud[0])) {
pendingMap.get(data.aud[0]).push(data)
} else {
pendingMap.set(data.aud[0], [data])
}
store.setState({
pendingMessages: pendingMap
});
}
chat(lis) {
this.action("chat", "chat-action", {
actions: {

View File

@ -20,6 +20,8 @@ export class ChatScreen extends Component {
scrollLocked: false,
};
this.pendingQueue = props.pendingMessages;
this.hasAskedForMessages = false;
this.onScroll = this.onScroll.bind(this);
@ -183,6 +185,18 @@ export class ChatScreen extends Component {
let config = props.configs[state.station] || {};
let messages = props.messages.slice(0);
// Pending messages get pinned to the bottom of the messages queue.
let pendingInRoom =
(this.pendingQueue.has(this.state.station))
? this.pendingQueue.get(this.state.station) : [];
pendingInRoom.map(function(value) {
return value.pending = true;
})
messages = messages.concat(pendingInRoom);
let lastMsgNum = (messages.length > 0) ?
messages[messages.length - 1].num : 0;
@ -195,22 +209,38 @@ export class ChatScreen extends Component {
let chatMessages = reversedMessages.map((msg, i) => {
// Render sigil if previous message is not by the same sender
let gamAut = ['gam', 'aut'];
// Local messages don't have a 'gam' prop, so look for the top level if it doesn't exist.
let aut = msg.aut ? msg.aut : null;
// No gamAut? Return top level author for the same sender check.
let renderSigil =
_.get(reversedMessages[i + 1], gamAut) !== _.get(msg, gamAut);
_.get(reversedMessages[i + 1], gamAut) !== _.get(msg, gamAut, aut);
// More padding top if previous message is not by the same sender
let paddingTop = renderSigil;
// More padding bot if next message is not by the same sender
let paddingBot =
_.get(reversedMessages[i - 1], gamAut) !== _.get(msg, gamAut);
_.get(reversedMessages[i - 1], gamAut) !== _.get(msg, gamAut, aut);
// Non-local ships don't have pending props.
if (!msg.pending) {
var pending = false;
}
// Non-local ships don't have pending props.
if (!pending) {
var pending = false;
}
return (
<Message
key={msg.gam.uid}
msg={msg.gam}
key={msg.gam ? msg.gam.uid : msg.uid}
msg={msg.gam ? msg.gam : msg}
renderSigil={renderSigil}
paddingTop={paddingTop}
paddingBot={paddingBot} />
paddingBot={paddingBot}
pending={!!pending}/>
);
});

View File

@ -263,6 +263,8 @@ export class ChatInput extends Component {
)
};
props.api.addPendingMessage(message);
props.api.hall(
{
convey: [message]
@ -278,11 +280,15 @@ export class ChatInput extends Component {
readOnlyRender() {
return (
<div className="mt2 pa3 cf flex black bt o-50">
<div className="fl" style={{ flexBasis: 35, height: 40 }}>
<div className="fl" style={{
marginTop: 4,
flexBasis: 32,
height: 36
}}>
<Sigil ship={window.ship} size={32} />
</div>
<div className="fr h-100 flex pa2" style={{ flexGrow: 1, height: 40 }}>
<p>This chat is read only and you cannot post.</p>
<p style={{paddingTop: 3}}>This chat is read only and you cannot post.</p>
</div>
</div>
);
@ -310,7 +316,7 @@ export class ChatInput extends Component {
className={'ml2 mt2 mr2 bn ' +
this.getSpeechStyle(state.messageType, state.clipboard)
}
style={{ flexGrow: 1, height: 40, resize: 'none' }}
style={{ flexGrow: 1, height: 40, paddingTop: 3, resize: 'none' }}
ref={this.textareaRef}
placeholder={props.placeholder}
value={state.message}

View File

@ -171,7 +171,7 @@ export class Message extends Component {
render() {
const { props } = this;
let pending = !!props.msg.pending ? ' o-80' : '';
let pending = !!props.msg.pending ? ' o-40' : '';
let datestamp = moment.unix(props.msg.wen / 1000).format('LL');
let paddingTop = props.paddingTop ? 'pt3' : '';

View File

@ -135,7 +135,7 @@ export class Root extends Component {
render={ (props) => {
return (
<Skeleton
sidebar={renderDefaultSidebar(props)}>
sidebar={renderChannelsSidebar(props)}>
<LandingScreen
api={api}
configs={configs}
@ -158,6 +158,7 @@ export class Root extends Component {
api={api}
configs={configs}
messages={messages}
pendingMessages={state.pendingMessages}
peers={state.peers}
subscription={subscription}
{...props}

View File

@ -61,4 +61,3 @@ export function dateToDa(d, mil) {
export function deSig(ship) {
return ship.replace('~', '');
}

View File

@ -6,6 +6,7 @@ export class UpdateReducer {
let data = _.get(json, 'update', false);
if (data) {
this.reduceInbox(_.get(data, 'inbox', false), state);
this.reducePending(_.get(data, 'message', false), state);
this.reduceMessage(_.get(data, 'message', false), state);
this.reduceMessages(_.get(data, 'messages', false), state);
this.reduceConfig(_.get(data, 'config', false), state);
@ -29,6 +30,23 @@ export class UpdateReducer {
}
}
reducePending(message, state) {
if (message && (state.pendingMessages.has(message.envelope.gam.aud[0]))) {
for (let pendingMessage of state.pendingMessages.get(message.envelope.gam.aud[0])) {
// Does the incoming message match a pending one?
if (message.envelope.gam.uid === pendingMessage.uid) {
// Mutating the pendingMessages array.
let pendingMessageMap = state.pendingMessages;
let matchedMessage = pendingMessageMap.get(pendingMessage.aud[0]).indexOf(pendingMessage);
pendingMessageMap.get(pendingMessage.aud[0]).splice(matchedMessage, 1);
state.pendingMessages = pendingMessageMap;
}
}
}
}
reduceMessages(msgs, state) {
if (msgs) {

View File

@ -11,7 +11,8 @@ class Store {
configs: {},
circles: [],
peers: {},
spinner: false
spinner: false,
pendingMessages: new Map([])
};
this.initialReducer = new InitialReducer();

View File

@ -60,8 +60,8 @@ export class Pubs extends Component {
<div className={cls} key={i}>
<div className="fl body-regular-400 mw-336 w-336 pr3">
<Link to={data.url}>
<p className="one-line mw-336">
<span className="ml3">{data.title}</span>
<p className="ml3 mw-336">
<span>{data.title}</span>
</p>
</Link>
</div>
@ -82,7 +82,7 @@ export class Pubs extends Component {
<div>
<HM invites={invites} unread={unread}/>
<div className="absolute w-100" style={{top:124}}>
<div className="flex-col">
<div className="flex-column">
<div className="w-100">
<h2 className="gray-50"
style={{marginLeft: 16, marginTop:32, marginBottom: 16}}>

View File

@ -110,8 +110,8 @@ export class Subs extends Component {
<div className={cls} key={i}>
<div className="fl mw-336" style={{flexBasis: 336}}>
<Link to={data.url}>
<p className="body-regular-400 one-line pr3">
<span className="ml3">{data.title}</span>
<p className="body-regular-400 pr3 ml3">
<span>{data.title}</span>
</p>
</Link>
</div>
@ -133,7 +133,7 @@ export class Subs extends Component {
<div className={cls} key={i}>
<div className="fl body-regular-400" style={{flexBasis: 336}}>
<Link to={data.url}>
<div className="mw-336 one-line pr3">
<div className="mw-336 pr3">
<span className="body-large green-medium"></span>
<span className="body-regular-400">Invite to </span>
<span className="body-regular">
@ -170,7 +170,7 @@ export class Subs extends Component {
<div>
<HM invites={invites} unread={unread}/>
<div className="absolute w-100" style={{top:124}}>
<div className="flex-col">
<div className="flex-column">
<div className="w-100">
<h2 className="gray-50"
style={{marginLeft: 16, marginTop: 32, marginBottom: 16}}>

View File

@ -107,12 +107,12 @@ export default class WeatherTile extends Component {
</a>
{secureCheck}
<p className="label-regular white pt2">
Please enter your <a href="https://latitudeandlongitude.org/" target="_blank">latitude and longitude</a>.</p>
Please enter your <a className="white" href="https://latitudeandlongitude.org/" target="_blank">latitude and longitude</a>.</p>
{error}
<form className="flex absolute" style={{"bottom": 0, "left": 8}}>
<input id="gps"
className="white pa1 bg-transparent outline-0 bn bb-ns b--white"
style={{width: "100%"}}
style={{width: "86%"}}
type="text"
placeholder="29.558107, -95.089023"
onKeyDown={this.keyPress.bind(this)}>

2
pkg/urbit/configure vendored
View File

@ -2,7 +2,7 @@
set -e
URBIT_VERSION=0.8.1
URBIT_VERSION=0.8.2
deps=" \
curl gmp sigsegv argon2 ed25519 ent h2o scrypt sni uv murmur3 secp256k1 \

View File

@ -84,6 +84,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.has = c3y;
u3_Host.ops_u.net = c3y;
u3_Host.ops_u.lit = c3n;
u3_Host.ops_u.nuu = c3n;
u3_Host.ops_u.pro = c3n;
u3_Host.ops_u.qui = c3n;
@ -94,7 +95,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.kno_w = DefaultKernel;
while ( -1 != (ch_i=getopt(argc, argv,
"G:J:B:K:A:H:I:w:u:e:E:f:F:k:p:LjabcCdgqsvxPDRS")) )
"G:J:B:K:A:H:I:w:u:e:E:f:F:k:p:LljabcCdgqsvxPDRS")) )
{
switch ( ch_i ) {
case 'J': {
@ -174,6 +175,7 @@ _main_getopt(c3_i argc, c3_c** argv)
return c3y;
}
case 'L': { u3_Host.ops_u.net = c3n; break; }
case 'l': { u3_Host.ops_u.lit = c3y; break; }
case 'j': { u3_Host.ops_u.tra = c3y; break; }
case 'a': { u3_Host.ops_u.abo = c3y; break; }
case 'b': { u3_Host.ops_u.bat = c3y; break; }

View File

@ -569,6 +569,7 @@
c3_w kno_w; // -K, kernel version
c3_c* key_c; // -k, private key file
c3_o net; // -L, local-only networking
c3_o lit; // -l, lite mode
c3_o pro; // -P, profile
c3_s por_s; // -p, ames port
c3_o qui; // -q, quiet

View File

@ -295,6 +295,25 @@ _dawn_turf(c3_c* dns_c)
return tuf;
}
/* _dawn_sponsor(): retrieve sponsor from point
*/
static u3_noun
_dawn_sponsor(u3_noun who, u3_noun rac, u3_noun pot)
{
u3_noun uni = u3dc("sponsor:dawn", u3k(who), u3k(pot));
if ( c3n == u3h(uni) ) {
_dawn_fail(who, rac, uni);
return u3_none;
}
u3_noun pos = u3k(u3t(uni));
u3z(who); u3z(rac); u3z(pot); u3z(uni);
return pos;
}
/* u3_dawn_vent(): validated boot event
*/
u3_noun
@ -302,7 +321,7 @@ u3_dawn_vent(u3_noun seed)
{
u3_noun url, bok, pos, pon, zar, tuf;
u3_noun ship = u3h(seed);
u3_noun ship = u3k(u3h(seed));
u3_noun rank = u3do("clan:title", u3k(ship));
url = _dawn_purl(rank);
@ -336,27 +355,15 @@ u3_dawn_vent(u3_noun seed)
//
pot = u3v_wish("*point:azimuth");
}
else if ( c3__earl == rank ) {
pot = u3v_wish("*point:azimuth");
}
else {
u3_noun who;
if ( c3__earl == rank ) {
who = u3do("^sein:title", u3k(ship));
{
u3_noun seg = u3dc("scot", 'p', u3k(who));
c3_c* seg_c = u3r_string(seg);
u3l_log("boot: retrieving %s's public keys (for %s)\r\n",
seg_c, u3_Host.ops_u.who_c);
free(seg_c);
u3z(seg);
}
}
else {
who = u3k(ship);
u3l_log("boot: retrieving %s's public keys\r\n",
u3_Host.ops_u.who_c);
}
{
u3_noun oct = u3dc("point:give:dawn", u3k(bok), u3k(who));
@ -382,21 +389,18 @@ u3_dawn_vent(u3_noun seed)
//
u3_noun sas = u3dt("veri:dawn", u3k(seed), u3k(pot), u3k(liv));
if ( c3n == u3h(sas) ) {
if ( u3_nul != sas ) {
// bails, won't return
_dawn_fail(ship, rank, sas);
return u3_none;
}
// ship: sponsor
// produced by +veri:dawn to avoid coupling to +point structure
// XX reconsider
//
pos = u3k(u3t(sas));
u3z(pot); u3z(liv); u3z(sas);
u3l_log("boot: getting sponsor\r\n");
pos = _dawn_sponsor(u3k(ship), u3k(rank), u3k(pot));
u3z(pot); u3z(liv);
}
// (map ship [=life =pass]): galaxy table
//
{
@ -426,22 +430,47 @@ u3_dawn_vent(u3_noun seed)
u3z(oct); u3z(fut);
}
pon = u3_nul;
while (c3__czar != rank) {
u3_noun son;
// print message
//
{
u3l_log("boot: retrieving sponsor keys\r\n");
u3_noun who = u3dc("scot", 'p', u3k(pos));
c3_c* who_c = u3r_string(who);
u3l_log("boot: retrieving keys for sponsor %s\r\n", who_c);
u3z(who);
free(who_c);
}
// retrieve +point:azimuth of pos (sponsor of ship)
//
{
u3_noun oct = u3dc("point:give:dawn", u3k(bok), u3k(pos));
u3_noun luh = _dawn_eth_rpc(url_c, u3k(oct));
pon = _dawn_need_unit(u3dc("point:take:dawn", u3k(pos), u3k(luh)),
son = _dawn_need_unit(u3dc("point:take:dawn", u3k(pos), u3k(luh)),
"boot: failed to retrieve sponsor keys");
pon = u3nc(pos, pon);
// append to sponsor chain list
//
pon = u3nc(u3nc(u3k(pos), u3k(son)), pon);
u3z(oct); u3z(luh);
}
// find next sponsor
//
u3z(ship); u3z(rank);
ship = pos;
rank = u3do("clan:title", u3k(ship));
pos = _dawn_sponsor(u3k(ship), u3k(rank), u3k(son));
u3z(rank);
u3z(son);
}
// [%dawn seed sponsor galaxies domains block eth-url snap]
u3z(rank); u3z(pos); u3z(ship);
// [%dawn seed sponsors galaxies domains block eth-url snap]
//
return u3nc(c3__dawn, u3nq(seed, pon, zar, u3nt(tuf, bok, url)));
}

View File

@ -1485,7 +1485,7 @@ _pier_boot_vent(u3_boot* bot_u)
c3_assert( c3y == u3du(bot_u->ven) );
u3_noun wir = u3nq(u3_blip, c3__term, '1', u3_nul);
u3_noun car = u3nc(c3__boot, u3k(bot_u->ven));
u3_noun car = u3nt(c3__boot, u3_Host.ops_u.lit, u3k(bot_u->ven));
u3_noun ovo = u3nc(wir, car);
_pier_writ_insert_ovum(pir_u, 0, ovo);
@ -1997,9 +1997,9 @@ u3_pier_tank(c3_l tab_l, c3_w pri_w, u3_noun tac)
}
switch ( pri_w ) {
case 3: fprintf(fil_u, ">>> "); break;
case 2: fprintf(fil_u, ">> "); break;
case 1: fprintf(fil_u, "> "); break;
case 3: fprintf(fil_u, "\033[31m>>> "); break;
case 2: fprintf(fil_u, "\033[33m>> "); break;
case 1: fprintf(fil_u, "\033[32m> "); break;
}
// if we have no arvo kernel and can't evaluate nock
@ -2020,6 +2020,7 @@ u3_pier_tank(c3_l tab_l, c3_w pri_w, u3_noun tac)
_pier_wall(fil_u, wol);
}
fprintf(fil_u, "\033[0m");
u3_term_io_loja(0);
u3z(blu);
u3z(tac);