fix last sync time to Asia timezone and high contrast text for moblie dark mode reading
This commit is contained in:
+43
-6
@@ -184,20 +184,47 @@
|
|||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
--header-bg: #1a202c; /* Darker header */
|
--header-bg: #1a202c;
|
||||||
--sticky-bg: #2d3748; /* Dark background for sticky column */
|
--sticky-bg: #2d3748;
|
||||||
--sticky-bg-alt: #1a202c;
|
--sticky-bg-alt: #1a202c;
|
||||||
background-color: #121212; /* Main page background */
|
|
||||||
color: #e2e8f0; /* Light text */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #121212 !important;
|
||||||
|
color: #e2e8f0;
|
||||||
|
}
|
||||||
|
|
||||||
.card, .card-header {
|
.card, .card-header {
|
||||||
background-color: #2d3748 !important;
|
background-color: #2d3748 !important;
|
||||||
color: white;
|
color: white;
|
||||||
|
border-color: #4a5568;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table td {
|
||||||
|
border-color: #4a5568;
|
||||||
|
color: #e2e8f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* HIGH CONTRAST FOR DARK MODE */
|
||||||
|
.text-danger {
|
||||||
|
color: #ff6b6b !important; /* Vibrant Red-Coral */
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.text-success {
|
||||||
|
color: #51cf66 !important; /* Vibrant Mint-Green */
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.text-muted {
|
||||||
|
color: #a0aec0 !important; /* Lightened grey */
|
||||||
}
|
}
|
||||||
.table td { border-color: #4a5568; color: #e2e8f0; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading { display: none; margin-left: 10px; font-size: 0.8rem; color: #666; }
|
#loading {
|
||||||
|
display: none;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@@ -327,6 +354,16 @@
|
|||||||
|
|
||||||
// 1. Update Sync Time
|
// 1. Update Sync Time
|
||||||
if (syncDisplay && result.last_sync) {
|
if (syncDisplay && result.last_sync) {
|
||||||
|
// Create a Date object from the GMT string
|
||||||
|
const gmtDate = new Date(result.last_sync + " UTC");
|
||||||
|
|
||||||
|
// Convert to local browser format (e.g., 14:30:05 or 2:30 PM)
|
||||||
|
const localTime = gmtDate.toLocaleTimeString([], {
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit',
|
||||||
|
second: '2-digit',
|
||||||
|
hour12: false
|
||||||
|
});
|
||||||
syncDisplay.innerText = result.last_sync;
|
syncDisplay.innerText = result.last_sync;
|
||||||
syncDisplay.classList.add('text-success');
|
syncDisplay.classList.add('text-success');
|
||||||
setTimeout(() => syncDisplay.classList.remove('text-success'), 2000);
|
setTimeout(() => syncDisplay.classList.remove('text-success'), 2000);
|
||||||
|
|||||||
Reference in New Issue
Block a user