diff --git a/src/lib/components/PaymentModal.svelte b/src/lib/components/PaymentModal.svelte index ada3d92..1830113 100644 --- a/src/lib/components/PaymentModal.svelte +++ b/src/lib/components/PaymentModal.svelte @@ -2,6 +2,7 @@ import { onMount, createEventDispatcher } from 'svelte'; import { goto } from '$app/navigation'; import { page } from '$app/stores'; + import ProfilePicture from './ProfilePicture.svelte'; export let paymentId; @@ -150,10 +151,13 @@ {#each payment.splits as split}
- {split.username} - {#if split.username === session?.user?.nickname} - You - {/if} + +
0}> {#if split.amount > 0} @@ -362,6 +366,12 @@ gap: 0.5rem; } + .split-user .user-info { + display: flex; + align-items: center; + gap: 0.5rem; + } + .username { font-weight: 500; color: #333; diff --git a/src/lib/components/ProfilePicture.svelte b/src/lib/components/ProfilePicture.svelte new file mode 100644 index 0000000..752a897 --- /dev/null +++ b/src/lib/components/ProfilePicture.svelte @@ -0,0 +1,66 @@ + + +
+ {#if !imageError} + {altText} + {:else} +
+ {getInitials(username)} +
+ {/if} +
+ + diff --git a/src/routes/cospend/+layout.svelte b/src/routes/cospend/+layout.svelte index 03fd8de..88a7120 100644 --- a/src/routes/cospend/+layout.svelte +++ b/src/routes/cospend/+layout.svelte @@ -38,38 +38,63 @@
- {#if showModal} -
- showModal = false} /> -
- {/if} +
+ {#if showModal} + + {/if} +