refactor: move copyText and formatBalance into utils (#3584)

This commit is contained in:
dni ⚡
2025-11-27 12:23:42 +01:00
committed by GitHub
parent 9c257aa23d
commit e6ca8a33c6
9 changed files with 53 additions and 24 deletions
@@ -85,7 +85,9 @@
</div>
<div class="row items-center q-pt-sm">
<h6 class="q-my-none ellipsis full-width">
<strong v-text="formatBalance(wallet.sat)"></strong>
<strong
v-text="utils.formatBalance(wallet.sat, g.denomination)"
></strong>
</h6>
</div>
</q-card-section>
@@ -40,7 +40,9 @@
><span v-text="walletRec.name"></span
></q-item-label>
<q-item-label class="q-my-none ellipsis full-width" caption>
<strong v-text="formatBalance(walletRec.sat)"></strong>
<strong
v-text="utils.formatBalance(walletRec.sat, g.denomination)"
></strong>
</q-item-label>
</q-item-section>
<q-item-section
+18 -4
View File
@@ -30,7 +30,9 @@
<div class="col-auto">
<div class="text-h3 q-my-none full-width">
<strong
v-text="formatBalance(g.wallet.sat)"
v-text="
utils.formatBalance(g.wallet.sat, g.denomination)
"
class="text-no-wrap"
:style="{
fontSize: 'clamp(0.75rem, 10vw, 3rem)',
@@ -94,7 +96,13 @@
<span
class="text-h5 text-italic"
style="opacity: 0.75"
v-text="formatBalance(g.wallet.sat)"
v-text="
utils.formatBalance(
g.wallet.sat,
g.denomination,
g.denomination
)
"
>
</span>
</div>
@@ -432,7 +440,9 @@
<div class="column content-center text-center q-mb-md">
<div v-if="!g.isFiatPriority">
<h4 class="q-my-none text-bold">
<span v-text="formatBalance(parse.invoice.sat)"></span>
<span
v-text="utils.formatBalance(parse.invoice.sat, g.denomination)"
></span>
</h4>
</div>
<div v-else>
@@ -454,7 +464,11 @@
<div v-if="g.fiatTracking">
<div v-if="g.isFiatPriority">
<h5 class="q-my-none text-bold">
<span v-text="formatBalance(parse.invoice.sat)"></span>
<span
v-text="
utils.formatBalance(parse.invoice.sat, g.denomination)
"
></span>
</h5>
</div>
<div v-else style="opacity: 0.75">
+6 -1
View File
@@ -93,7 +93,12 @@
<div class="row items-center q-pt-sm">
<h6 class="q-my-none ellipsis full-width">
<strong
v-text="formatBalance(props.row.balance_msat / 1000)"
v-text="
utils.formatBalance(
props.row.balance_msat / 1000,
g.denomination
)
"
></strong>
</h6>
</div>