mirror of
https://github.com/urbit/shrub.git
synced 2024-09-11 20:27:19 +03:00
dm-htmx progress, doesn't display kids correctly
This commit is contained in:
parent
fcc4789239
commit
193eb4e3d2
19
pkg/arvo/neo/cod/std/src/con/dm-htmx.hoon
Normal file
19
pkg/arvo/neo/cod/std/src/con/dm-htmx.hoon
Normal file
@ -0,0 +1,19 @@
|
||||
/@ message
|
||||
/- feather-icons
|
||||
/- messages
|
||||
:- [%ship %$ %htmx]
|
||||
|= =ship
|
||||
|= =bowl:neo
|
||||
^- manx
|
||||
::~& > bowl :: this sigpam results in endless http spinning
|
||||
;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])
|
||||
==
|
||||
==
|
@ -4,5 +4,4 @@
|
||||
:- [%node %$ %txt]
|
||||
|= nod=node
|
||||
^- txt
|
||||
(~(vol manx-utils nod) "text")
|
||||
|
||||
(~(vol manx-utils nod) "text")
|
61
pkg/arvo/neo/cod/std/src/lib/messages.hoon
Normal file
61
pkg/arvo/neo/cod/std/src/lib/messages.hoon
Normal file
@ -0,0 +1,61 @@
|
||||
/@ message
|
||||
|%
|
||||
++ render-messages
|
||||
|= =bowl:neo
|
||||
^- manx
|
||||
;div
|
||||
=label "Messages"
|
||||
;*
|
||||
%+ turn
|
||||
%+ 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)
|
||||
render-message
|
||||
==
|
||||
::
|
||||
++ render-message
|
||||
|= [pax=pith =idea:neo]
|
||||
=/ msg !<(message q.pail.idea)
|
||||
^- manx
|
||||
;div.fc.g2.border.p3.br1
|
||||
;div.fr.ac.jb
|
||||
;p.s-2.f3: {(scow %p from.msg)}
|
||||
;p.s-2.f3: {(scow %da now.msg)}
|
||||
==
|
||||
;p: {(trip contents.msg)}
|
||||
==
|
||||
::
|
||||
++ render-sender
|
||||
|= [=bowl:neo location=pith]
|
||||
^- manx
|
||||
;form.fc.g2
|
||||
=hx-post "{(en-tape:pith:neo :(welp /neo/hawk here.bowl location))}?stud=txt"
|
||||
=hx-on-submit "this.reset()"
|
||||
=hx-target "find button .loading"
|
||||
=hx-swap "outerHTML"
|
||||
=head "msg"
|
||||
;textarea.p2.border.br1
|
||||
=name "text"
|
||||
=placeholder ". . ."
|
||||
=oninput "this.setAttribute('value', this.value)"
|
||||
=rows "4"
|
||||
=required ""
|
||||
=autocomplete "off"
|
||||
;
|
||||
==
|
||||
;button.p2.b1.br1.bd1.wfc.hover.loader
|
||||
;span.loaded.s2: create
|
||||
;span.loading
|
||||
;+ loading.feather-icons
|
||||
==
|
||||
==
|
||||
==
|
||||
::
|
||||
--
|
Loading…
Reference in New Issue
Block a user