mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 18:30:39 +09:00
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:
parent
f7410673fe
commit
9131cc0355
2 changed files with 333 additions and 58 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue