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:
2026-04-23 14:24:02 +02:00
parent 5638913b1d
commit 934d0d981b
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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; }
}