fix(fitness/check-in): show "Show more" button in desktop 2-col layout
The button was gated on `showWeightHistory`, which stays false on desktop since the history-list uses CSS (`.collapsed` override at ≥1024 px) instead of the toggle. Move the gating to a `.collapsed` class on the button too, mirroring the list — hidden on mobile until the user expands, always visible on desktop.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homepage",
|
||||
"version": "1.46.9",
|
||||
"version": "1.46.10",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -653,8 +653,8 @@
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{#if showWeightHistory && measurements.length < measurementsTotal}
|
||||
<button type="button" class="show-more" onclick={loadMore} disabled={loadingMore}>
|
||||
{#if measurements.length < measurementsTotal}
|
||||
<button type="button" class="show-more" class:collapsed={!showWeightHistory} onclick={loadMore} disabled={loadingMore}>
|
||||
{loadingMore ? t('saving', lang) : t('show_more', lang)}
|
||||
<span class="show-more-count">({measurements.length}/{measurementsTotal})</span>
|
||||
</button>
|
||||
@@ -1312,6 +1312,7 @@
|
||||
|
||||
/* History collapse (mobile only) */
|
||||
.history-list.collapsed { display: none; }
|
||||
.show-more.collapsed { display: none; }
|
||||
|
||||
/* Inline history edit */
|
||||
.history-item.editing {
|
||||
@@ -1447,6 +1448,7 @@
|
||||
align-self: start;
|
||||
}
|
||||
.history-list.collapsed { display: flex; }
|
||||
.show-more.collapsed { display: inline-flex; }
|
||||
.history-toggle { pointer-events: none; }
|
||||
.history-toggle :global(.chevron) { display: none; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user