Enhance transaction display in WalletPage with tag badges
- Added a tag badge to the top-left corner of each transaction item for improved visibility of transaction categorization. - Removed redundant tag badges from the transaction details section to streamline the layout. - Adjusted styling for transaction items to maintain a consistent and organized appearance. These changes enhance the user experience by providing clearer transaction information and improving the overall layout of the WalletPage.
This commit is contained in:
parent
bff5a7cb37
commit
c2208ab5d7
1 changed files with 8 additions and 12 deletions
|
|
@ -176,8 +176,12 @@ onMounted(() => {
|
||||||
<div
|
<div
|
||||||
v-for="tx in txs"
|
v-for="tx in txs"
|
||||||
:key="tx.id"
|
:key="tx.id"
|
||||||
class="p-3 rounded-lg border hover:bg-accent/50 transition-colors"
|
class="relative p-3 rounded-lg border hover:bg-accent/50 transition-colors"
|
||||||
>
|
>
|
||||||
|
<!-- Tag badge in top-left corner -->
|
||||||
|
<Badge v-if="tx.tag" variant="outline" class="absolute -top-2.75 left-8 text-xs font-light z-10">
|
||||||
|
{{ tx.tag }}
|
||||||
|
</Badge>
|
||||||
<!-- Mobile Layout: Stack vertically -->
|
<!-- Mobile Layout: Stack vertically -->
|
||||||
<div class="block sm:hidden">
|
<div class="block sm:hidden">
|
||||||
<!-- Header Row: Icon, Amount, Type -->
|
<!-- Header Row: Icon, Amount, Type -->
|
||||||
|
|
@ -231,9 +235,6 @@ onMounted(() => {
|
||||||
|
|
||||||
<!-- Badges Row -->
|
<!-- Badges Row -->
|
||||||
<div class="flex items-center gap-2 flex-wrap">
|
<div class="flex items-center gap-2 flex-wrap">
|
||||||
<Badge v-if="tx.tag" variant="outline" class="text-xs">
|
|
||||||
{{ tx.tag }}
|
|
||||||
</Badge>
|
|
||||||
<span v-if="tx.fee" class="text-xs text-muted-foreground">
|
<span v-if="tx.fee" class="text-xs text-muted-foreground">
|
||||||
Fee: {{ tx.fee }} sats
|
Fee: {{ tx.fee }} sats
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -276,13 +277,8 @@ onMounted(() => {
|
||||||
<!-- Description with flexible width -->
|
<!-- Description with flexible width -->
|
||||||
<div class="min-w-0 flex-1">
|
<div class="min-w-0 flex-1">
|
||||||
<p class="font-medium break-words leading-tight pr-2">{{ tx.description }}</p>
|
<p class="font-medium break-words leading-tight pr-2">{{ tx.description }}</p>
|
||||||
<div class="flex items-center gap-2 text-xs text-muted-foreground mt-1">
|
<div v-if="tx.fee" class="text-xs text-muted-foreground mt-1">
|
||||||
<Badge v-if="tx.tag" variant="outline" class="text-xs">
|
Fee: {{ tx.fee }} sats
|
||||||
{{ tx.tag }}
|
|
||||||
</Badge>
|
|
||||||
<span v-if="tx.fee" class="text-xs text-muted-foreground">
|
|
||||||
Fee: {{ tx.fee }} sats
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue