Skip to content

Commit fef4ab2

Browse files
committed
Adjusting sizes + using account tags for activity
1 parent 7705cf0 commit fef4ab2

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/lib/components/elements/action.svelte

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import { getContext, type Component } from 'svelte';
1717
import type { ActionSummaryProps, ObjectifiedActionData } from '$lib/types/transaction';
1818
import SquareTerminal from 'lucide-svelte/icons/square-terminal';
19+
import AccountTags from '$lib/components/tags/account.svelte';
1920
import Card from '../layout/box/card.svelte';
2021
2122
import * as m from '$lib/paraglide/messages';
@@ -50,6 +51,8 @@
5051
let advancedMode = $derived(context.settings.data.advancedMode);
5152
5253
let summaryTitle = $derived(summaryTitles[`${action.account}_${action.name}`]);
54+
55+
const tags = $derived(context.meta.getAccountTags(action.account));
5356
</script>
5457

5558
{#snippet KeyValue(key: string | null, value: string)}
@@ -146,20 +149,24 @@
146149
{#snippet Header()}
147150
<Switcher class="items-center gap-x-2 gap-y-2">
148151
<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}
151158
</picture>
152159

153160
<div class="grid gap-px font-mono">
154161
{#if summaryTitle}
155-
<div class="text-on-surface leading-none md:text-2xl">
162+
<div class="text-on-surface leading-none md:text-lg">
156163
{summaryTitle}
157164
</div>
158165
{:else}
159166
<Contract
160167
name={action.account}
161168
action={action.name}
162-
class="text-on-surface leading-none md:text-2xl"
169+
class="text-on-surface leading-none md:text-lg"
163170
>
164171
{action.name}
165172
</Contract>
@@ -181,7 +188,7 @@
181188

182189
<div class="grid gap-1 text-right text-nowrap">
183190
{#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" />
185192
{/if}
186193

187194
{#if datetime}

0 commit comments

Comments
 (0)