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",
|
"name": "homepage",
|
||||||
"version": "1.46.9",
|
"version": "1.46.10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -653,8 +653,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{#if showWeightHistory && measurements.length < measurementsTotal}
|
{#if measurements.length < measurementsTotal}
|
||||||
<button type="button" class="show-more" onclick={loadMore} disabled={loadingMore}>
|
<button type="button" class="show-more" class:collapsed={!showWeightHistory} onclick={loadMore} disabled={loadingMore}>
|
||||||
{loadingMore ? t('saving', lang) : t('show_more', lang)}
|
{loadingMore ? t('saving', lang) : t('show_more', lang)}
|
||||||
<span class="show-more-count">({measurements.length}/{measurementsTotal})</span>
|
<span class="show-more-count">({measurements.length}/{measurementsTotal})</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -1312,6 +1312,7 @@
|
|||||||
|
|
||||||
/* History collapse (mobile only) */
|
/* History collapse (mobile only) */
|
||||||
.history-list.collapsed { display: none; }
|
.history-list.collapsed { display: none; }
|
||||||
|
.show-more.collapsed { display: none; }
|
||||||
|
|
||||||
/* Inline history edit */
|
/* Inline history edit */
|
||||||
.history-item.editing {
|
.history-item.editing {
|
||||||
@@ -1447,6 +1448,7 @@
|
|||||||
align-self: start;
|
align-self: start;
|
||||||
}
|
}
|
||||||
.history-list.collapsed { display: flex; }
|
.history-list.collapsed { display: flex; }
|
||||||
|
.show-more.collapsed { display: inline-flex; }
|
||||||
.history-toggle { pointer-events: none; }
|
.history-toggle { pointer-events: none; }
|
||||||
.history-toggle :global(.chevron) { display: none; }
|
.history-toggle :global(.chevron) { display: none; }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user