contacts: update apps to work with updated %gall gifts

This commit is contained in:
Logan Allen 2020-01-24 15:57:29 -08:00
parent bb4acfc1e8
commit 3244862eaa
5 changed files with 37 additions and 83500 deletions

View File

@ -168,7 +168,7 @@
:_ state(synced (~(del by synced) path.act))
%- zing
:~ (pull-wire [%contacts path.act])
[%give %kick `[%contacts path.act] ~]~
[%give %kick ~[[%contacts path.act]] ~]~
==
?. |(=(u.ship src.bol) (team:title our.bol src.bol))
:: if neither ship = source or source = us, do nothing
@ -245,7 +245,7 @@
::
%remove
:_ state
:- [%give %kick `[%contacts path.fact] `ship.fact]
:- [%give %kick ~[[%contacts path.fact]] `ship.fact]
(give-fact path.fact [%remove path.fact ship.fact])
::
%edit
@ -255,8 +255,7 @@
++ give-fact
|= [=path update=contact-update]
^- (list card)
~& 'give-fact'
[%give %fact `[%contacts path] %contact-update !>(update)]~
[%give %fact ~[[%contacts path]] %contact-update !>(update)]~
::
++ foreign
|= fact=contact-update
@ -318,7 +317,7 @@
%- zing
%+ turn ~(tap in members)
|= =ship
:~ [%give %kick `[%contacts path] `ship]
:~ [%give %kick ~[[%contacts path]] `ship]
(contact-poke [%remove path ship])
==
--

View File

@ -171,17 +171,12 @@
%avatar con(avatar avatar.edit)
==
::
++ update-subscribers
|= [pax=path update=contact-update]
^- (list card)
[%give %fact `pax %contact-update !>(update)]~
::
++ send-diff
|= [pax=path upd=contact-update]
^- (list card)
%- zing
:~ (update-subscribers /all upd)
(update-subscribers /updates upd)
(update-subscribers [%contacts pax] upd)
==
:~ :*
%give %fact
~[/all /updates [%contacts pax]]
%contact-update !>(upd)
== ==
--

View File

@ -2,7 +2,7 @@
:: into semantic actions for the UI
::
/- *group-store, *group-hook, *invite-store, *contact-hook
/+ *server, *contact-json, default-agent
/+ *server, *contact-json, base64, default-agent
/= index
/^ octs
/; as-octs:mimes:html
@ -94,7 +94,7 @@
?+ p.cage.sign (on-agent:def wire sign)
%contact-update
=/ update=json (update-to-json !<(contact-update q.cage.sign))
[[%give %fact `/primary %json !>(update)]~ this]
[[%give %fact ~[/primary] %json !>(update)]~ this]
==
==
::
@ -171,6 +171,24 @@
[%'~contacts' %js %tile ~] (js-response:gen tile-js)
[%'~contacts' %img *]
(png-response:gen (as-octs:mimes:html (~(got by contact-png) `@ta`name)))
::
:: avatar images
::
[%'~contacts' %avatar @ *]
=/ pax=path `path`t.t.site.url
?~ pax not-found:gen
=/ pas `path`(flop pax)
?~ pas not-found:gen
=/ pav `path`(flop t.pas)
~& pav+pav
~& name+name
=/ contact (contact-scry `path`(weld pav [name]~))
?~ contact not-found:gen
?~ avatar.u.contact not-found:gen
=* avatar u.avatar.u.contact
=/ decoded (de:base64 q.octs.avatar)
?~ decoded not-found:gen
[[200 ['content-type' content-type.avatar]~] `u.decoded]
::
[%'~contacts' *] (html-response:gen index)
==
@ -220,4 +238,10 @@
++ all-scry
^- rolodex
.^(rolodex %gx /=contact-store/(scot %da now.bol)/all/noun)
::
++ contact-scry
|= pax=path
^- (unit contact)
=. pax ;:(weld /=contact-store/(scot %da now.bol)/contact pax /noun)
.^((unit contact) %gx pax)
--

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long