|
185 | 185 | Back to Dashboard |
186 | 186 | </button> |
187 | 187 | </div> |
| 188 | + {:else if selectedPet} |
| 189 | + <div class="flex space-x-2"> |
| 190 | + <button |
| 191 | + class="nav-button px-3 py-1 rounded-md text-sm" |
| 192 | + data-active={currentView === 'dashboard'} |
| 193 | + disabled={!selectedPet || isArchived(selectedPet)} |
| 194 | + on:click={() => uiHelpers.setView('dashboard')} |
| 195 | + > |
| 196 | + Dashboard |
| 197 | + </button> |
| 198 | + <button |
| 199 | + class="nav-button px-3 py-1 rounded-md text-sm" |
| 200 | + data-active={currentView === 'journal'} |
| 201 | + disabled={!selectedPet || isArchived(selectedPet)} |
| 202 | + on:click={() => uiHelpers.setView('journal')} |
| 203 | + > |
| 204 | + New Entry |
| 205 | + </button> |
| 206 | + <button |
| 207 | + class="nav-button px-3 py-1 rounded-md text-sm" |
| 208 | + data-active={currentView === 'history'} |
| 209 | + disabled={!selectedPet || isArchived(selectedPet)} |
| 210 | + on:click={() => uiHelpers.setView('history')} |
| 211 | + > |
| 212 | + History |
| 213 | + </button> |
| 214 | + </div> |
188 | 215 | {/if} |
189 | 216 | </div> |
190 | 217 | </div> |
|
447 | 474 | <!-- Actions --> |
448 | 475 | <div class="flex justify-end space-x-3"> |
449 | 476 | <button |
450 | | - on:click={() => (currentView = 'dashboard')} |
| 477 | + on:click={() => uiHelpers.setView('dashboard')} |
451 | 478 | class="button-secondary" |
452 | 479 | disabled={isSubmitting} |
453 | 480 | > |
|
483 | 510 | <div class="empty-state text-center py-12"> |
484 | 511 | <Calendar size={48} style="color: var(--petalytics-subtle);" class="mx-auto mb-4" /> |
485 | 512 | <p class="text-lg mb-2" style="color: var(--petalytics-text);">No entries yet</p> |
486 | | - <button on:click={() => (currentView = 'journal')} class="button"> |
| 513 | + <button on:click={() => uiHelpers.setView('journal')} class="button"> |
487 | 514 | Write First Entry |
488 | 515 | </button> |
489 | 516 | </div> |
|
548 | 575 | opacity: 0.8; |
549 | 576 | background: var(--petalytics-highlight-low); |
550 | 577 | } |
| 578 | +
|
| 579 | + .nav-button[data-active="true"] { |
| 580 | + background: var(--petalytics-highlight-med); |
| 581 | + border: 1px solid var(--petalytics-accent); |
| 582 | + } |
| 583 | +
|
| 584 | + .nav-button:disabled { |
| 585 | + opacity: 0.5; |
| 586 | + cursor: not-allowed; |
| 587 | + } |
551 | 588 | </style> |
0 commit comments