Spaces:
Runtime error
Runtime error
Mathias Claude Opus 4.6 commited on
Commit ·
29e7b6b
1
Parent(s): ff7db91
Larger sales feed text, fix timezone offset in relative times
Browse files- Bump sales feed font sizes for better readability
- Append Z to server timestamps so browser correctly treats them as UTC
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- static/index.html +9 -9
static/index.html
CHANGED
|
@@ -250,26 +250,26 @@
|
|
| 250 |
/* ===== SALES FEED ===== */
|
| 251 |
.sales-feed {
|
| 252 |
grid-column: 1 / -1; max-height: 120px; overflow-y: auto;
|
| 253 |
-
border-radius: 8px; padding:
|
| 254 |
background: var(--bg-card); border: 1px solid var(--border);
|
| 255 |
-
font-size: 0.
|
| 256 |
}
|
| 257 |
.sales-feed h4 {
|
| 258 |
-
font-size: 0.
|
| 259 |
margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px;
|
| 260 |
}
|
| 261 |
.sales-feed-empty { color: var(--text-dim); font-style: italic; }
|
| 262 |
.sales-feed-item {
|
| 263 |
display: flex; align-items: center; gap: 8px;
|
| 264 |
-
padding:
|
| 265 |
animation: feedSlideIn 0.3s ease-out;
|
| 266 |
}
|
| 267 |
.sales-feed-item:last-child { border-bottom: none; }
|
| 268 |
-
.sales-feed-icon { font-size:
|
| 269 |
-
.sales-feed-sdr { font-weight: 700; color: var(--primary); }
|
| 270 |
[data-theme="dark"] .sales-feed-sdr { color: var(--lilac-300); }
|
| 271 |
-
.sales-feed-case { color: var(--text-muted); }
|
| 272 |
-
.sales-feed-time { margin-left: auto; color: var(--text-dim); font-size: 0.
|
| 273 |
@keyframes feedSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
|
| 274 |
|
| 275 |
/* ===== ACHIEVERS BANNER ===== */
|
|
@@ -652,7 +652,7 @@
|
|
| 652 |
|
| 653 |
// ===== SALES FEED =====
|
| 654 |
let salesFeedData = [];
|
| 655 |
-
function relativeTime(ts){const d=new Date(ts),now=new Date(),s=Math.round((now-d)/1000);if(s<60)return'just now';if(s<3600)return Math.floor(s/60)+'m ago';if(s<86400)return Math.floor(s/3600)+'h ago';return Math.floor(s/86400)+'d ago';}
|
| 656 |
async function fetchSalesFeed(){try{let u='/api/sales-feed?limit=20';if(currentMonth)u+=`&month=${encodeURIComponent(currentMonth)}`;const r=await fetch(u);if(r.ok)salesFeedData=await r.json();}catch(e){}}
|
| 657 |
function renderSalesFeed(){
|
| 658 |
const el=document.getElementById('salesFeed');if(!el)return;
|
|
|
|
| 250 |
/* ===== SALES FEED ===== */
|
| 251 |
.sales-feed {
|
| 252 |
grid-column: 1 / -1; max-height: 120px; overflow-y: auto;
|
| 253 |
+
border-radius: 8px; padding: 8px 12px;
|
| 254 |
background: var(--bg-card); border: 1px solid var(--border);
|
| 255 |
+
font-size: 0.85rem;
|
| 256 |
}
|
| 257 |
.sales-feed h4 {
|
| 258 |
+
font-size: 0.72rem; font-weight: 800; color: var(--primary);
|
| 259 |
margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px;
|
| 260 |
}
|
| 261 |
.sales-feed-empty { color: var(--text-dim); font-style: italic; }
|
| 262 |
.sales-feed-item {
|
| 263 |
display: flex; align-items: center; gap: 8px;
|
| 264 |
+
padding: 4px 0; border-bottom: 1px solid var(--border);
|
| 265 |
animation: feedSlideIn 0.3s ease-out;
|
| 266 |
}
|
| 267 |
.sales-feed-item:last-child { border-bottom: none; }
|
| 268 |
+
.sales-feed-icon { font-size: 1rem; flex-shrink: 0; }
|
| 269 |
+
.sales-feed-sdr { font-weight: 700; color: var(--primary); font-size: 0.88rem; }
|
| 270 |
[data-theme="dark"] .sales-feed-sdr { color: var(--lilac-300); }
|
| 271 |
+
.sales-feed-case { color: var(--text-muted); font-size: 0.85rem; }
|
| 272 |
+
.sales-feed-time { margin-left: auto; color: var(--text-dim); font-size: 0.75rem; white-space: nowrap; }
|
| 273 |
@keyframes feedSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
|
| 274 |
|
| 275 |
/* ===== ACHIEVERS BANNER ===== */
|
|
|
|
| 652 |
|
| 653 |
// ===== SALES FEED =====
|
| 654 |
let salesFeedData = [];
|
| 655 |
+
function relativeTime(ts){const d=new Date(ts.endsWith('Z')?ts:ts+'Z'),now=new Date(),s=Math.round((now-d)/1000);if(s<60)return'just now';if(s<3600)return Math.floor(s/60)+'m ago';if(s<86400)return Math.floor(s/3600)+'h ago';return Math.floor(s/86400)+'d ago';}
|
| 656 |
async function fetchSalesFeed(){try{let u='/api/sales-feed?limit=20';if(currentMonth)u+=`&month=${encodeURIComponent(currentMonth)}`;const r=await fetch(u);if(r.ok)salesFeedData=await r.json();}catch(e){}}
|
| 657 |
function renderSalesFeed(){
|
| 658 |
const el=document.getElementById('salesFeed');if(!el)return;
|