Skip to content

Commit 8f54d78

Browse files
committed
Minor fixes
1 parent cffc22e commit 8f54d78

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

webview-ui/src/components/history/TaskItemFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const TaskItemFooter: React.FC<TaskItemFooterProps> = ({ item, variant, isSelect
1919
<div className="flex gap-2 items-center text-vscode-descriptionForeground/60">
2020
{/* Datetime with time-ago format */}
2121
<StandardTooltip content={new Date(item.ts).toLocaleString()}>
22-
<span className="capitalize">{formatTimeAgo(item.ts)}</span>
22+
<span className="first-letter:uppercase">{formatTimeAgo(item.ts)}</span>
2323
</StandardTooltip>
2424
<span>·</span>
2525
{/* Cost */}

webview-ui/src/utils/format.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,13 @@ export const formatDate = (timestamp: number) => {
1717
const date = new Date(timestamp)
1818
const locale = i18next.language || "en"
1919

20-
// Get date format style from translations or use default transformations
21-
const dateStr = date.toLocaleString(locale, {
20+
return date.toLocaleString(locale, {
2221
month: "long",
2322
day: "numeric",
2423
hour: "numeric",
2524
minute: "2-digit",
2625
hour12: true,
2726
})
28-
29-
// Apply transformations based on locale or use default
30-
if (locale === "en") {
31-
return dateStr.replace(", ", " ").replace(" at", ",").toUpperCase()
32-
}
33-
34-
return dateStr.toUpperCase()
3527
}
3628

3729
export const formatTimeAgo = (timestamp: number) => {

0 commit comments

Comments
 (0)