|
16 | 16 | import { getContext, type Component } from 'svelte'; |
17 | 17 | import type { ActionSummaryProps, ObjectifiedActionData } from '$lib/types/transaction'; |
18 | 18 | import SquareTerminal from 'lucide-svelte/icons/square-terminal'; |
| 19 | + import AccountTags from '$lib/components/tags/account.svelte'; |
19 | 20 | import Card from '../layout/box/card.svelte'; |
20 | 21 |
|
21 | 22 | import * as m from '$lib/paraglide/messages'; |
|
50 | 51 | let advancedMode = $derived(context.settings.data.advancedMode); |
51 | 52 |
|
52 | 53 | let summaryTitle = $derived(summaryTitles[`${action.account}_${action.name}`]); |
| 54 | +
|
| 55 | + const tags = $derived(context.meta.getAccountTags(action.account)); |
53 | 56 | </script> |
54 | 57 |
|
55 | 58 | {#snippet KeyValue(key: string | null, value: string)} |
|
146 | 149 | {#snippet Header()} |
147 | 150 | <Switcher class="items-center gap-x-2 gap-y-2"> |
148 | 151 | <div class="flex items-center gap-4"> |
149 | | - <picture class="bg-surface-container-high grid size-14 place-items-center rounded-full"> |
150 | | - <SquareTerminal /> |
| 152 | + <picture class="bg-surface-container-high grid size-10 place-items-center rounded-full"> |
| 153 | + {#if tags.length} |
| 154 | + <AccountTags network={context.network} {tags} /> |
| 155 | + {:else} |
| 156 | + <SquareTerminal /> |
| 157 | + {/if} |
151 | 158 | </picture> |
152 | 159 |
|
153 | 160 | <div class="grid gap-px font-mono"> |
154 | 161 | {#if summaryTitle} |
155 | | - <div class="text-on-surface leading-none md:text-2xl"> |
| 162 | + <div class="text-on-surface leading-none md:text-lg"> |
156 | 163 | {summaryTitle} |
157 | 164 | </div> |
158 | 165 | {:else} |
159 | 166 | <Contract |
160 | 167 | name={action.account} |
161 | 168 | action={action.name} |
162 | | - class="text-on-surface leading-none md:text-2xl" |
| 169 | + class="text-on-surface leading-none md:text-lg" |
163 | 170 | > |
164 | 171 | {action.name} |
165 | 172 | </Contract> |
|
181 | 188 |
|
182 | 189 | <div class="grid gap-1 text-right text-nowrap"> |
183 | 190 | {#if id} |
184 | | - <Transaction {id} class="block font-mono leading-none md:text-2xl" /> |
| 191 | + <Transaction {id} class="block font-mono leading-none md:text-lg" /> |
185 | 192 | {/if} |
186 | 193 |
|
187 | 194 | {#if datetime} |
|
0 commit comments