Display messages on the bottom of the message div
This commit is contained in:
parent
c4caac3a21
commit
fdd10f7065
@ -123,11 +123,11 @@ impl Component for Home {
|
||||
}
|
||||
<div
|
||||
ref={self.message_container_ref.clone()}
|
||||
class="border rounded flex-grow-1 overflow-auto mb-3"
|
||||
class="d-flex border rounded flex-grow-1 flex-column-reverse overflow-auto mb-3"
|
||||
style="flex-basis: 0"
|
||||
>
|
||||
{ self.messages.iter().map(|msg| html!{
|
||||
<div class="d-flex justify-content-between align-items-start mb-2">
|
||||
{ self.messages.iter().rev().map(|msg| html!{
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div class="me-2">{msg.message.clone()}</div>
|
||||
<div class="me-2 text-nowrap">{msg.time.format("%I:%M:%S %p").to_string()}</div>
|
||||
</div>}
|
||||
|
Loading…
Reference in New Issue
Block a user