feat: add message timestamps with smart formatting
- Added timestamp field to Message struct in Rust backend - Timestamps automatically captured on message creation - Smart relative time formatting (Just now, Xm ago, time, date) - Timestamps display below message content with subtle styling - Fixed avatar squishing issue with flex-shrink: 0 - Backward compatible with existing messages via serde(default) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -86,6 +86,7 @@ body {
|
||||
border: 1px solid var(--border);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.avatar-circle-large {
|
||||
@@ -287,6 +288,24 @@ body {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
/* Message timestamp */
|
||||
.message-timestamp {
|
||||
font-size: 10px;
|
||||
color: var(--text-secondary);
|
||||
opacity: 0.6;
|
||||
margin-top: 4px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.message.user .message-timestamp {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.message.assistant .message-timestamp {
|
||||
text-align: left;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
/* Message action buttons */
|
||||
.message-actions {
|
||||
position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user