mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Add timestamps to DM messages
This commit is contained in:
parent
70fab3cb1a
commit
ee95b0805c
@ -3,7 +3,7 @@
|
||||
import {assoc} from 'ramda'
|
||||
import {renameProp} from 'hurdak/lib/hurdak'
|
||||
import {toHex, displayPerson} from 'src/util/nostr'
|
||||
import {now} from 'src/util/misc'
|
||||
import {now, formatTimestamp} from 'src/util/misc'
|
||||
import {Tags} from 'src/util/nostr'
|
||||
import Channel from 'src/partials/Channel.svelte'
|
||||
import Anchor from 'src/partials/Anchor.svelte'
|
||||
@ -97,11 +97,17 @@
|
||||
'ml-12 justify-end': message.person.pubkey === user.getPubkey(),
|
||||
'mr-12': message.person.pubkey !== user.getPubkey(),
|
||||
})}>
|
||||
<div class={cx('rounded-2xl py-2 px-4 flex max-w-xl', {
|
||||
'bg-light text-black rounded-br-none': message.person.pubkey === user.getPubkey(),
|
||||
<div class={cx('rounded-2xl py-2 px-4 max-w-xl inline-block', {
|
||||
'bg-light text-black rounded-br-none text-end': message.person.pubkey === user.getPubkey(),
|
||||
'bg-dark rounded-bl-none': message.person.pubkey !== user.getPubkey(),
|
||||
})}>
|
||||
{@html renderNote(message, {showEntire: true})}
|
||||
<div>{@html renderNote(message, {showEntire: true})}</div>
|
||||
<small
|
||||
class="mt-1"
|
||||
class:text-dark={message.person.pubkey === user.getPubkey()}
|
||||
class:text-light={message.person.pubkey !== user.getPubkey()}>
|
||||
{formatTimestamp(message.created_at)}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</Channel>
|
||||
|
Loading…
Reference in New Issue
Block a user