Refactor milestone tracking: Introduce a new method to determine the next milestone based on total sats accumulated, and update progress calculations accordingly. Adjust frontend to display progress towards the next milestone and enhance user feedback with additional milestone indicators.

This commit is contained in:
padreug 2025-06-22 20:36:46 +02:00
parent 08e5cc20e3
commit 7e030c5d0a
2 changed files with 32 additions and 8 deletions

View file

@ -42,7 +42,7 @@
</div>
<div class="col-12 col-md-4 q-mt-md">
<q-circular-progress
:value="Math.min((dashboardData.total_sats_accumulated / 100000) * 100, 100)"
:value="getMilestoneProgress()"
size="80px"
:thickness="0.2"
color="orange"
@ -50,10 +50,10 @@
class="q-ma-md"
>
<div class="text-caption text-orange-8">
${Math.min(Math.round((dashboardData.total_sats_accumulated / 100000) * 100), 100)}%
${Math.round(getMilestoneProgress())}%
</div>
</q-circular-progress>
<div class="text-caption text-grey-6">to 100k sats</div>
<div class="text-caption text-grey-6">to ${getNextMilestone().name}</div>
</div>
</div>
</q-card-section>
@ -392,6 +392,17 @@
</q-item-section>
</q-item>
<q-item>
<q-item-section avatar>
<div v-if="dashboardData.total_sats_accumulated >= 500000" class="text-positive text-h6"></div>
<div v-else class="text-grey-5 text-h6"></div>
</q-item-section>
<q-item-section>
<q-item-label class="text-body2">500,000 sats</q-item-label>
<q-item-label caption>Half a million! 🔥</q-item-label>
</q-item-section>
</q-item>
<q-item>
<q-item-section avatar>
<div v-if="dashboardData.total_sats_accumulated >= 1000000" class="text-positive text-h6"></div>