mirror of
https://github.com/urbit/shrub.git
synced 2024-08-17 08:00:39 +03:00
cleaned con/nessenger-htmx file and css fix render-messages view
This commit is contained in:
parent
cf9f75e275
commit
5c458203e1
@ -99,11 +99,9 @@
|
||||
;span.hidden: no dms
|
||||
?: (lte 3 (lent pith))
|
||||
;h1.hidden: {<pith>}
|
||||
~& > pith
|
||||
=/ ship
|
||||
?. ?=([%p @p] (rear pith)) *@p
|
||||
+:;;([%p @p] (rear pith))
|
||||
~& > ship
|
||||
^- manx
|
||||
;a.br1.hover.b0.fr.jb.wf.bc1
|
||||
=href "/neo/hawk{(pith-tape here.bowl)}{(pith-tape pith)}"
|
||||
@ -124,7 +122,6 @@
|
||||
=/ org=@p +:;;([%p @p] (snag 1 `(list iota)`pith))
|
||||
=/ members=(list ship) ~(tap in members:!<(groupchat q.q.saga.idea))
|
||||
=/ chat +:;;([%t @t] (rear pith))
|
||||
~& > ['members' members]
|
||||
^- manx
|
||||
;div.wf.br1.fc.g1
|
||||
;div.fr.g1
|
||||
@ -134,83 +131,6 @@
|
||||
;h3.s-1.p2: {(trip chat)}
|
||||
;h3.s-1.p2: {<org>}
|
||||
==
|
||||
;button.br1.hover.bc1.b0.hidden
|
||||
=onclick (weld (trip 'this.parentNode.parentNode.classList.toggle("border"); this.parentNode.parentNode.classList.toggle("p2"); this.previousSibling.classList.toggle("border"); this.classList.toggle("border"); ') (span-toggle "v" "^"))
|
||||
;span: v
|
||||
==
|
||||
==
|
||||
;div.fc.hidden
|
||||
;div.fc.g2
|
||||
;div.fr.je.g2
|
||||
;+ ?. =(our.bowl org)
|
||||
;span.hidden: ~
|
||||
;button.hover.br1.b0.bc1
|
||||
=onclick (span-toggle "+" "x")
|
||||
;span: +
|
||||
==
|
||||
==
|
||||
;+ (add-member chat)
|
||||
==
|
||||
;* %+ turn `(list ship)`members
|
||||
|= =ship
|
||||
?: =(our.bowl ship)
|
||||
;div.fr.jb.g1
|
||||
;span.wf.br1.p2: {<ship>}
|
||||
==
|
||||
;div.fr.jb.g1
|
||||
;span.wf.br1.p1: {<ship>}
|
||||
;button.hover.b0.br1.loader.bc1
|
||||
=hx-post "/neo/hawk{(pith-tape here.bowl)}?stud=groupchat-diff"
|
||||
=hx-target "find .loading"
|
||||
=hx-swap "outerHTML"
|
||||
=head "remove"
|
||||
=ship (scow %p ship)
|
||||
=hx-on--after-request "this.parentNode.remove();"
|
||||
=onmouseover "this.previousSibling.classList.add('b1');"
|
||||
=onmouseout "this.previousSibling.classList.remove('b1');"
|
||||
;span.loaded: x
|
||||
;span.loading
|
||||
;+ loading.feather-icons
|
||||
==
|
||||
==
|
||||
==
|
||||
==
|
||||
==
|
||||
++ add-member
|
||||
|= chat=cord
|
||||
;form.fr.gb.g1.hidden
|
||||
=hx-post "/neo/hawk{(pith-tape here.bowl)}?stud=messenger-diff"
|
||||
=head "invite-to-groupchat"
|
||||
=hx-target "find button .loading"
|
||||
=hx-swap "outerHTML"
|
||||
;input.hidden
|
||||
=type "text"
|
||||
=name "name"
|
||||
=value (trip chat)
|
||||
;
|
||||
==
|
||||
;input.grow.bc1.p2.br1
|
||||
=name "ship"
|
||||
=type "text"
|
||||
=placeholder "~zod, ~bus"
|
||||
=oninput "this.setAttribute('value', this.value);"
|
||||
=autocomplete "off"
|
||||
;
|
||||
==
|
||||
;button.hidden
|
||||
=onclick "this.parentNode.appendChild(document.createElement('input')) "
|
||||
;span: more
|
||||
==
|
||||
;button.loader.hover.br1.b0.bc1
|
||||
;span.loaded: +
|
||||
;span.loading
|
||||
;+ loading.feather-icons
|
||||
==
|
||||
==
|
||||
==
|
||||
::
|
||||
++ span-toggle
|
||||
|= [from=tape to=tape]
|
||||
^- tape
|
||||
"this.parentNode.nextElementSibling.classList.toggle('hidden'); if (this.parentNode.nextElementSibling.classList.contains(\"hidden\"))\{this.innerHTML=\"<span>{from}</span>\"} else \{this.innerHTML=\"<span>{to}</span>\"}"
|
||||
--
|
||||
|
@ -67,6 +67,10 @@
|
||||
=label "Messages"
|
||||
=id "messages"
|
||||
;+ (refresher bowl)
|
||||
;div
|
||||
=style "margin-top: auto"
|
||||
;span.hidden;
|
||||
==
|
||||
;*
|
||||
=/ msgs ~(tap of:neo kids.bowl)
|
||||
%+ turn
|
||||
@ -91,8 +95,7 @@
|
||||
^- manx
|
||||
?: =(our.bowl from.msg)
|
||||
(render-our-message msg)
|
||||
::;div.fc.g2.border.p3.br1.grow.msg
|
||||
;div.fc.g2.grow.msg
|
||||
;div.fc.g2.msg
|
||||
=style "align-self: flex-start;"
|
||||
;div.fr.ac.jb
|
||||
;p.s-2.f3: {(scow %p from.msg)}
|
||||
@ -105,7 +108,7 @@
|
||||
::
|
||||
++ render-our-message
|
||||
|= msg=message
|
||||
;div.fc.g2.grow.msg
|
||||
;div.fc.g2.msg
|
||||
=style "align-self: flex-end;"
|
||||
;div.fr.ac.jb
|
||||
;p.s-2.f3: {(scow %p from.msg)}
|
||||
|
Loading…
Reference in New Issue
Block a user