refine: shorten pull action stages

This commit is contained in:
openclaw 2026-07-25 01:53:09 +08:00
parent 39bf725200
commit 45ecb39359
2 changed files with 9 additions and 7 deletions

View File

@ -783,7 +783,8 @@ input:focus-visible {
.ledger-pull-space { display:flex; align-items:center; justify-content:center; gap:5px; flex:0 0 auto; color:#7d8c88; font-size:11px; opacity:var(--pull-progress); pointer-events:none; overflow:hidden; }
.ledger-pull-space.top { margin:0 -16px; }
.ledger-pull-space.bottom { margin:0 -16px; }
.ledger-pull-space.refresh,.ledger-pull-space.previous { color:#087f72; }
.ledger-pull-space.refresh { color:#087f72; }
.ledger-pull-space.previous { color:#b05f22; }
.ledger-pull-space.next { color:#3478e5; }
.conversion-notice span { display:flex; align-items:center; gap:6px; }

View File

@ -152,20 +152,20 @@ onBeforeUnmount(() => loadMoreObserver?.disconnect());
const pullAction = computed(() => {
if (pullEdge.value === "bottom") return pullDistance.value >= 72 ? "next" : null;
if (pullEdge.value !== "top") return null;
if (pullDistance.value >= 112) return "previous";
if (pullDistance.value >= 52) return "refresh";
if (pullDistance.value >= 88) return "previous";
if (pullDistance.value >= 44) return "refresh";
return null;
});
const pullLabel = computed(() => {
if (pullAction.value === "previous") return "松开以加载上一月流水";
if (pullAction.value === "refresh") return "松开以刷新流水";
if (pullAction.value === "previous") return "加载上一月流水";
if (pullAction.value === "refresh") return "刷新流水";
if (pullEdge.value === "bottom") return "继续上拉加载下一月流水";
return "继续下拉刷新流水";
});
const pullProgress = computed(() => {
const threshold = pullEdge.value === "bottom" ? 72 : pullDistance.value < 52 ? 52 : 112;
const threshold = pullEdge.value === "bottom" ? 72 : pullDistance.value < 44 ? 44 : 88;
return Math.min(1, pullDistance.value / threshold);
});
@ -521,7 +521,8 @@ async function shareLedger() {
:style="{ height: `${pullDistance}px`, '--pull-progress': pullProgress }"
role="status"
>
<RefreshCw :size="15" :class="{ spinning: pullLoading }" />
<RefreshCw v-if="pullAction !== 'previous'" :size="15" :class="{ spinning: pullLoading }" />
<ChevronDown v-else :size="15" />
<span>{{ pullLoading ? "正在加载" : pullLabel }}</span>
</div>