fix(frontend): change time format to 12-hour with AM/PM
- Change time locale from zh-CN to en-US to properly display AM/PM - Increase letter-spacing for better readability (0.08em → 0.12em) - Update all time displays to use 12-hour format consistently
This commit is contained in:
@@ -2155,7 +2155,7 @@
|
|||||||
.jarvis-time {
|
.jarvis-time {
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 0.08em;
|
letter-spacing: 0.12em;
|
||||||
color: rgba(224, 248, 255, 0.86);
|
color: rgba(224, 248, 255, 0.86);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export function useClientTime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function formatClientClock(date: Date) {
|
function formatClientClock(date: Date) {
|
||||||
return date.toLocaleTimeString('zh-CN', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' })
|
return date.toLocaleTimeString('en-US', { hour12: true, hour: '2-digit', minute: '2-digit', second: '2-digit' })
|
||||||
}
|
}
|
||||||
|
|
||||||
function weatherCodeLabel(code: number | null | undefined) {
|
function weatherCodeLabel(code: number | null | undefined) {
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ function renderMarkdown(content: string) {
|
|||||||
<div class="jarvis-date-row">
|
<div class="jarvis-date-row">
|
||||||
<div class="jarvis-date-meta">
|
<div class="jarvis-date-meta">
|
||||||
<div class="jarvis-month">{{ clientTime.toLocaleString('zh-CN', { month: 'long' }) }} {{ clientTime.getFullYear() }}</div>
|
<div class="jarvis-month">{{ clientTime.toLocaleString('zh-CN', { month: 'long' }) }} {{ clientTime.getFullYear() }}</div>
|
||||||
<div class="jarvis-time">{{ clientTime.toLocaleTimeString('zh-CN', { hour12: false }) }}</div>
|
<div class="jarvis-time">{{ clientTime.toLocaleTimeString('en-US', { hour12: true }) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="jarvis-location">
|
<div class="jarvis-location">
|
||||||
<div class="location-info">
|
<div class="location-info">
|
||||||
|
|||||||
Reference in New Issue
Block a user