mirror of
https://github.com/urbit/shrub.git
synced 2024-09-11 20:27:19 +03:00
display all grandchild messages from sub and pub
This commit is contained in:
parent
e6a2a10fe7
commit
11d21bc25c
19
pkg/arvo/neo/cod/std/src/con/groupchat-htmx.hoon
Normal file
19
pkg/arvo/neo/cod/std/src/con/groupchat-htmx.hoon
Normal file
@ -0,0 +1,19 @@
|
||||
/@ message
|
||||
/@ groupchat
|
||||
/- feather-icons
|
||||
/- messages
|
||||
:- [%groupchat %$ %htmx]
|
||||
|= =groupchat
|
||||
|= =bowl:neo
|
||||
^- manx
|
||||
;div.p2
|
||||
=label "Chat"
|
||||
;div.ma.fc.g2
|
||||
=style "max-width: 650px;"
|
||||
;div.fc.g2
|
||||
=id "children"
|
||||
;+ (render-messages:messages bowl)
|
||||
==
|
||||
;+ (render-sender:messages [bowl /pub])
|
||||
==
|
||||
==
|
10
pkg/arvo/neo/cod/std/src/con/messenger-htmx.hoon
Normal file
10
pkg/arvo/neo/cod/std/src/con/messenger-htmx.hoon
Normal file
@ -0,0 +1,10 @@
|
||||
/@ message
|
||||
/@ groupchat
|
||||
/- feather-icons
|
||||
/- messages
|
||||
:- [%sig %$ %htmx]
|
||||
|= =groupchat
|
||||
|= =bowl:neo
|
||||
^- manx
|
||||
;div.p2
|
||||
==
|
@ -24,7 +24,7 @@
|
||||
:: XX - maybe move ordering is unpredictable here
|
||||
?~ old
|
||||
:_ :- %groupchat
|
||||
!>([(sy our.bowl ~) ~ (snoc here.bowl %pub)])
|
||||
!>([(sy our.bowl ~) ~ here.bowl])
|
||||
:~ :- (snoc here.bowl %pub)
|
||||
[%make %message-pub ~ ~]
|
||||
::
|
||||
|
@ -1,6 +1,9 @@
|
||||
/@ message
|
||||
/- feather-icons
|
||||
|%
|
||||
:: This arm expects messages to be stored at
|
||||
:: ~[%pub [%da ~2024.1.1]] or ~[%sub [%da ~2024.1.1]]
|
||||
:: relative to here.bowl.
|
||||
++ render-messages
|
||||
|= =bowl:neo
|
||||
^- manx
|
||||
@ -8,25 +11,22 @@
|
||||
=label "Messages"
|
||||
;*
|
||||
%+ turn
|
||||
::%+ sort
|
||||
:: %+ murn
|
||||
%+ sort
|
||||
%+ murn
|
||||
~(tap of:neo kids.bowl)
|
||||
:: |= [=pith =idea:neo]
|
||||
:: ?~ pith ~
|
||||
:: ?@ -.pith ~
|
||||
:: ?. =(-<.pith %da) ~
|
||||
:: `[pith idea]
|
||||
:: |= [a=[=pith *] b=[=pith *]]
|
||||
:: (lth ->.pith.a ->.pith.b)
|
||||
|= [=pith =idea:neo]
|
||||
?~ pith ~
|
||||
?. =(%message p.pail.idea) ~
|
||||
`[pith idea]
|
||||
|= [a=[=pith *] b=[=pith *]]
|
||||
=/ adate +:(snag 1 pith.a)
|
||||
=/ bdate +:(snag 1 pith.b)
|
||||
(lth adate bdate)
|
||||
render-message
|
||||
==
|
||||
::
|
||||
++ render-message
|
||||
|= [pax=pith =idea:neo]
|
||||
?. =(%message p.pail.idea)
|
||||
?@ p.pail.idea
|
||||
;p: {(en-tape:pith:neo pax)}
|
||||
;p: {(trip mark.p.pail.idea)}
|
||||
=/ msg !<(message q.pail.idea)
|
||||
^- manx
|
||||
;div.fc.g2.border.p3.br1
|
||||
|
Loading…
Reference in New Issue
Block a user