apps: more merge fixes for chat and publish

This commit is contained in:
Logan Allen 2020-06-01 14:17:14 -04:00
parent 8a3d0adb57
commit b863dca773
5 changed files with 11 additions and 34 deletions

View File

@ -10,9 +10,9 @@
state-two
==
::
+$ state-zero [%0 =inbox]
+$ state-one [%1 =inbox]
+$ state-two [%2 =inbox]
+$ state-zero [%0 =inbox:store]
+$ state-one [%1 =inbox:store]
+$ state-two [%2 =inbox:store]
--
::
=| state-two

View File

@ -2125,7 +2125,7 @@
%- json-response:gen
%- json-to-octs
%+ frond:enjs:format %publish-response
(notebooks-map our.bol books)
(notebooks-map:enjs our.bol books)
::
:: notes pagination
[[[~ %json] [%'publish-view' %notes @ @ @ @ ~]] ~]
@ -2170,7 +2170,7 @@
%- json-response:gen
%- json-to-octs
%+ frond:enjs:format %publish-response
(comments-page comments.u.note u.start u.length)
(comments-page:enjs comments.u.note u.start u.length)
::
:: single notebook with initial 50 notes in short form, as json
[[[~ %json] [%'publish-view' @ @ ~]] ~]
@ -2180,7 +2180,7 @@
=/ book-name i.t.t.site.url
=/ book=(unit notebook) (~(get by books) u.host book-name)
?~ book not-found:gen
=/ notebook-json (notebook-full-json u.host book-name u.book)
=/ notebook-json (notebook-full:enjs u.host book-name u.book)
?> ?=(%o -.notebook-json)
=. p.notebook-json
(~(uni by p.notebook-json) (notes-page:enjs notes.u.book 0 50))
@ -2203,7 +2203,7 @@
?~ note not-found:gen
=/ jon=json
%+ frond %publish-response:enjs:format
o+(note-presentation-json u.book note-name u.note)
o+(note-presentation:enjs u.book note-name u.note)
(json-response:gen (json-to-octs jon))
==
::

View File

@ -1,3 +1,4 @@
/- sur=chat-store
^?
=< [sur .]
@ -55,16 +56,6 @@
[%read (numb read.config)]
==
::
++ configs
|= cfg=^configs
^- json
%+ frond %chat-configs
%- pairs
%+ turn ~(tap by cfg)
|= [pax=^path =^config]
^- [cord json]
[(spat pax) (^config config)]
::
++ inbox
|= box=^inbox
^- json
@ -105,12 +96,6 @@
[%create (pairs [%path (path path.upd)]~)]
?: ?=(%delete -.upd)
[%delete (pairs [%path (path path.upd)]~)]
?: ?=(%config -.upd)
:- %config
%- pairs
:~ [%path (path path.upd)]
[%config (config config.upd)]
==
[*@t *json]
==
--
@ -208,14 +193,6 @@
--
--
::
++ inbox-to-configs
|= =inbox
^- configs
%- ~(run by inbox)
|= =mailbox
^- config
config.mailbox
::
++ eval
|= [=bowl:gall =hoon]
^- (list tank)

View File

@ -133,7 +133,7 @@
snippet+s+snippet.note
file+s+file.note
num-comments+(numb ~(wyt by comments.note))
comments+(comments-page comments.note 0 50)
comments+(comments-page:enjs comments.note 0 50)
read+b+read.note
pending+b+pending.note
==

View File

@ -29,7 +29,7 @@
::
+$ inbox (map path mailbox)
::
+$ chat-base
+$ diff
$% [%create =path] :: %create: create a mailbox at path
[%delete =path] :: %delete: delete a mailbox at path
[%message =path =envelope] :: %message: append a message to mailbox
@ -43,7 +43,7 @@
diff
==
::
+$ chat-update
+$ update
$% [%initial =inbox]
[%keys keys=(set path)]
[%messages =path start=@ud end=@ud envelopes=(list envelope)]