|
367 | 367 | res.status, |
368 | 368 | res.statusText, |
369 | 369 | ); |
370 | | - return res.text().then((t) => console.error("[SSE] Response:", t)); |
| 370 | + return res.text().then((t) => |
| 371 | + console.error("[SSE] Response:", t) |
| 372 | + ); |
371 | 373 | } |
372 | 374 | if (!res.body) { |
373 | 375 | console.error("[SSE] No response body"); |
|
512 | 514 | connectSSE(); |
513 | 515 | renderGrid(); |
514 | 516 | } catch (e) { |
515 | | - state.loginError = "Connection failed. Is the server running?"; |
| 517 | + state.loginError = |
| 518 | + "Connection failed. Is the server running?"; |
516 | 519 | state.loginLoading = false; |
517 | 520 | renderAuth(); |
518 | 521 | } |
|
546 | 549 | if (state.connected) { |
547 | 550 | const favCount = state.favorites.size; |
548 | 551 | const favActive = state.showFavoritesOnly; |
549 | | - $("auth-section").innerHTML = `<div class="flex items-center gap-3"> |
| 552 | + $("auth-section").innerHTML = |
| 553 | + `<div class="flex items-center gap-3"> |
550 | 554 | <span class="flex items-center gap-1.5 text-sm text-stone-700"> |
551 | 555 | <span class="w-2 h-2 rounded-full bg-emerald-500 inline-block pulse-live"></span> |
552 | 556 | ${esc(state.userName)} |
553 | 557 | </span> |
554 | 558 | <button onclick="toggleFavoritesFilter()" class="flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-sm transition-colors ${ |
555 | | - favActive |
556 | | - ? "bg-red-50 text-red-600" |
557 | | - : "text-stone-500 hover:text-red-500 hover:bg-stone-50" |
558 | | - }" aria-label="Filter favorites"> |
| 559 | + favActive |
| 560 | + ? "bg-red-50 text-red-600" |
| 561 | + : "text-stone-500 hover:text-red-500 hover:bg-stone-50" |
| 562 | + }" aria-label="Filter favorites"> |
559 | 563 | <svg class="w-4 h-4" fill="${ |
560 | | - favActive ? "currentColor" : "none" |
561 | | - }" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"/></svg> |
| 564 | + favActive ? "currentColor" : "none" |
| 565 | + }" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"/></svg> |
562 | 566 | <span class="font-medium">${favCount}</span> |
563 | 567 | </button> |
564 | 568 | <button onclick="disconnect()" class="px-2.5 py-1.5 text-sm text-stone-500 hover:text-stone-700 hover:bg-stone-100 rounded-md transition-colors">Sign out</button> |
|
575 | 579 | class="flex-1 min-w-[120px] px-3 py-1.5 text-sm border border-stone-200 rounded-lg bg-white focus:outline-none focus:ring-2 focus:ring-amber-400/50 focus:border-amber-400"> |
576 | 580 | <input id="login-password" type="password" placeholder="Password" required aria-label="Password" |
577 | 581 | class="flex-1 min-w-[100px] px-3 py-1.5 text-sm border border-stone-200 rounded-lg bg-white focus:outline-none focus:ring-2 focus:ring-amber-400/50 focus:border-amber-400"> |
578 | | - <button type="submit" ${state.loginLoading ? "disabled" : ""} |
| 582 | + <button type="submit" ${ |
| 583 | + state.loginLoading ? "disabled" : "" |
| 584 | + } |
579 | 585 | class="px-3.5 py-1.5 text-sm font-medium bg-amber-500 text-white rounded-lg hover:bg-amber-600 transition-colors disabled:opacity-50 whitespace-nowrap"> |
580 | 586 | ${state.loginLoading ? "Signing in..." : "Sign in"} |
581 | 587 | </button> |
@@ -740,12 +746,14 @@ <h3 class="font-display text-sm font-medium text-stone-800 truncate">${ |
740 | 746 | a.sqft ? Number(a.sqft).toLocaleString() + " sqft" : "--" |
741 | 747 | }</span> |
742 | 748 | </div> |
743 | | - <p class="text-xs text-stone-500 line-clamp-2">${esc(a.address)}, ${ |
744 | | - esc(a.city) |
745 | | - }, ${esc(a.state)} ${esc(a.zip_code)}</p> |
| 749 | + <p class="text-xs text-stone-500 line-clamp-2">${ |
| 750 | + esc(a.address) |
| 751 | + }, ${esc(a.city)}, ${esc(a.state)} ${esc(a.zip_code)}</p> |
746 | 752 | ${ |
747 | 753 | a.agent_name |
748 | | - ? `<p class="text-xs text-stone-500">${esc(a.agent_name)}</p>` |
| 754 | + ? `<p class="text-xs text-stone-500">${ |
| 755 | + esc(a.agent_name) |
| 756 | + }</p>` |
749 | 757 | : "" |
750 | 758 | } |
751 | 759 | </div> |
|
0 commit comments