|
367 | 367 | res.status, |
368 | 368 | res.statusText, |
369 | 369 | ); |
370 | | - return res.text().then((t) => |
371 | | - console.error("[SSE] Response:", t) |
372 | | - ); |
| 370 | + return res.text().then((t) => console.error("[SSE] Response:", t)); |
373 | 371 | } |
374 | 372 | if (!res.body) { |
375 | 373 | console.error("[SSE] No response body"); |
|
514 | 512 | connectSSE(); |
515 | 513 | renderGrid(); |
516 | 514 | } catch (e) { |
517 | | - state.loginError = |
518 | | - "Connection failed. Is the server running?"; |
| 515 | + state.loginError = "Connection failed. Is the server running?"; |
519 | 516 | state.loginLoading = false; |
520 | 517 | renderAuth(); |
521 | 518 | } |
|
549 | 546 | if (state.connected) { |
550 | 547 | const favCount = state.favorites.size; |
551 | 548 | const favActive = state.showFavoritesOnly; |
552 | | - $("auth-section").innerHTML = |
553 | | - `<div class="flex items-center gap-3"> |
| 549 | + $("auth-section").innerHTML = `<div class="flex items-center gap-3"> |
554 | 550 | <span class="flex items-center gap-1.5 text-sm text-stone-700"> |
555 | 551 | <span class="w-2 h-2 rounded-full bg-emerald-500 inline-block pulse-live"></span> |
556 | 552 | ${esc(state.userName)} |
557 | 553 | </span> |
558 | 554 | <button onclick="toggleFavoritesFilter()" class="flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-sm transition-colors ${ |
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"> |
| 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"> |
563 | 559 | <svg class="w-4 h-4" fill="${ |
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> |
| 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> |
566 | 562 | <span class="font-medium">${favCount}</span> |
567 | 563 | </button> |
568 | 564 | <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> |
|
579 | 575 | 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"> |
580 | 576 | <input id="login-password" type="password" placeholder="Password" required aria-label="Password" |
581 | 577 | 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"> |
582 | | - <button type="submit" ${ |
583 | | - state.loginLoading ? "disabled" : "" |
584 | | - } |
| 578 | + <button type="submit" ${state.loginLoading ? "disabled" : ""} |
585 | 579 | 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"> |
586 | 580 | ${state.loginLoading ? "Signing in..." : "Sign in"} |
587 | 581 | </button> |
@@ -746,14 +740,12 @@ <h3 class="font-display text-sm font-medium text-stone-800 truncate">${ |
746 | 740 | a.sqft ? Number(a.sqft).toLocaleString() + " sqft" : "--" |
747 | 741 | }</span> |
748 | 742 | </div> |
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> |
| 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> |
752 | 746 | ${ |
753 | 747 | a.agent_name |
754 | | - ? `<p class="text-xs text-stone-500">${ |
755 | | - esc(a.agent_name) |
756 | | - }</p>` |
| 748 | + ? `<p class="text-xs text-stone-500">${esc(a.agent_name)}</p>` |
757 | 749 | : "" |
758 | 750 | } |
759 | 751 | </div> |
@@ -903,14 +895,16 @@ <h3 class="font-display text-sm font-medium text-stone-800 truncate">${ |
903 | 895 | <!-- Filters --> |
904 | 896 | <div class="bg-stone-50/80 border-b border-stone-200 shadow-sm"> |
905 | 897 | <form |
906 | | - onsubmit="event.preventDefault(); state.page = 1; fetchProperties();" |
| 898 | + onsubmit="event.preventDefault(); |
| 899 | +state.page = 1; |
| 900 | +fetchProperties()" |
907 | 901 | class="max-w-7xl mx-auto px-4 sm:px-6 py-2.5" |
908 | 902 | > |
909 | 903 | <!-- Mobile: toggle button --> |
910 | 904 | <div class="flex items-center justify-between lg:hidden"> |
911 | 905 | <button |
912 | 906 | type="button" |
913 | | - onclick="document.getElementById('filter-panel').classList.toggle('hidden')" |
| 907 | + onclick='document.getElementById("filter-panel").classList.toggle("hidden")' |
914 | 908 | class="flex items-center gap-2 h-9 px-3 text-sm font-medium text-stone-600 border border-stone-200 rounded-md hover:bg-stone-50 transition-colors" |
915 | 909 | > |
916 | 910 | <svg |
|
0 commit comments