Add timestamp & edited thing
This commit is contained in:
@@ -5,6 +5,7 @@ import { BackButton } from '@/app/components/BackButton'
|
||||
import { DiscordButton } from '@/app/components/DiscordButton'
|
||||
import { GetIconForUser } from '@/util/bd'
|
||||
import { getCookie } from '@/util/cookie'
|
||||
import { formatHumanTime } from '@/util/time'
|
||||
import { faTrashCan } from '@fortawesome/free-regular-svg-icons'
|
||||
import { faPencil } from '@fortawesome/free-solid-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
@@ -30,6 +31,8 @@ interface Message {
|
||||
birdColor: BirdColor
|
||||
overlayColor: BirdColor
|
||||
customIcon: string | null
|
||||
timestamp: number
|
||||
editedAt: number
|
||||
editing: boolean
|
||||
}
|
||||
|
||||
@@ -233,7 +236,20 @@ export default function BerryDashChatroom () {
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<p>{item.username}</p>
|
||||
<p>
|
||||
{item.username}{' '}
|
||||
<span className='text-[rgb(150,150,200)]'>
|
||||
{formatHumanTime(item.timestamp)}
|
||||
</span>
|
||||
{item.editedAt != 0 && (
|
||||
<>
|
||||
{' '}
|
||||
<span className='text-[rgb(100,100,150)]'>
|
||||
(edited)
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
<p className='w-240 max-w-[calc(100vw-136px)] truncate select-text'>
|
||||
{atob(item.content)}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user