forked from farhoodlabs/paperclip
Restyle issue chat comments for chat-like UX
User messages: right-aligned bubbles (85% max-width) with gray background, no border. Hover reveals short date + copy icon. Agent messages: borderless with avatar, name, date and three-dots in header. Left-aligned action bar with icon-only copy, thumbs up, and thumbs down. Thumbs down opens a floating popover for reason. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -29,6 +29,13 @@ export function formatDateTime(date: Date | string): string {
|
||||
});
|
||||
}
|
||||
|
||||
export function formatShortDate(date: Date | string): string {
|
||||
return new Date(date).toLocaleString("en-US", {
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
});
|
||||
}
|
||||
|
||||
export function relativeTime(date: Date | string): string {
|
||||
const now = Date.now();
|
||||
const then = new Date(date).getTime();
|
||||
|
||||
Reference in New Issue
Block a user