Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ui/src/lib/svgIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const svgIcons: { [key: string]: string } = {
'<svg width="100%" height="100%" fill="currentColor" viewBox="0 0 19 34" xmlns="http://www.w3.org/2000/svg"><path d="M13.5399 16.6671L0.647818 29.5588C0.247376 29.9764 0.0265009 30.5342 0.0325567 31.1128C0.0386144 31.6913 0.271122 32.2444 0.68022 32.6535C1.08932 33.0626 1.64243 33.2951 2.22095 33.3011C2.79947 33.3072 3.35733 33.0863 3.7749 32.6859L17.7453 18.7151C17.9495 18.6117 18.1441 18.4851 18.3145 18.3146C18.5294 18.0992 18.6972 17.8415 18.8074 17.5578C18.9176 17.2742 18.9676 16.9707 18.9545 16.6667C18.9676 16.3627 18.9176 16.0593 18.8074 15.7756C18.6972 15.492 18.5294 15.2342 18.3145 15.0188C18.1441 14.8488 17.9495 14.7217 17.7453 14.6188L3.7749 0.647555C3.56955 0.442229 3.32576 0.27936 3.05747 0.16825C2.78917 0.0571351 2.50161 -4.34002e-05 2.21122 -2.43521e-05C1.92082 -5.30401e-06 1.63327 0.0572113 1.36499 0.16836C1.0967 0.279509 0.852941 0.442408 0.647613 0.647761C0.442286 0.853117 0.279414 1.0969 0.168303 1.3652C0.0571908 1.6335 1.41874e-05 1.92106 3.32355e-05 2.21145C5.22836e-05 2.50185 0.0572689 2.7894 0.168418 3.05768C0.279565 3.32596 0.442466 3.56973 0.64782 3.77505L13.5399 16.6671Z" /></svg>',
checkMark:
'<svg width="100%" height="100%" fill="currentColor" viewBox="0 0 30 22" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M29.4509 0.568609C30.1831 1.32673 30.183 2.55586 29.4508 3.31395L11.9508 21.4314C11.2186 22.1895 10.0315 22.1895 9.29923 21.4315L0.549234 12.3731C-0.183032 11.6151 -0.183085 10.3859 0.549116 9.6278C1.28132 8.86966 2.4685 8.8696 3.20077 9.62767L10.625 17.3135L26.7992 0.568548C27.5315 -0.18954 28.7186 -0.189512 29.4509 0.568609Z" /></svg>',
doubleCheck:
'<svg width="100%" height="100%" fill="currentColor" viewBox="0 0 41 22" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M29.4509 0.568609C30.1831 1.32673 30.183 2.55586 29.4508 3.31395L11.9508 21.4314C11.2186 22.1895 10.0315 22.1895 9.29923 21.4315L0.549234 12.3731C-0.183032 11.6151 -0.183085 10.3859 0.549116 9.6278C1.28132 8.86966 2.4685 8.8696 3.20077 9.62767L10.625 17.3135L26.7992 0.568548C27.5315 -0.18954 28.7186 -0.189512 29.4509 0.568609Z" /><path transform="translate(11 0)" fill-rule="evenodd" clip-rule="evenodd" d="M29.4509 0.568609C30.1831 1.32673 30.183 2.55586 29.4508 3.31395L11.9508 21.4314C11.2186 22.1895 10.0315 22.1895 9.29923 21.4315L0.549234 12.3731C-0.183032 11.6151 -0.183085 10.3859 0.549116 9.6278C1.28132 8.86966 2.4685 8.8696 3.20077 9.62767L10.625 17.3135L26.7992 0.568548C27.5315 -0.18954 28.7186 -0.189512 29.4509 0.568609Z" /></svg>',
cancel:
'<svg width="100%" height="100%" fill="currentColor" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"><path d="M15 0.75C7.13004 0.75 0.75 7.13004 0.75 15C0.75 22.87 7.13004 29.25 15 29.25C22.87 29.25 29.25 22.87 29.25 15C29.25 7.13004 22.87 0.75 15 0.75ZM15 4.50013C17.1842 4.50013 19.2117 5.16829 20.8924 6.30908L6.30988 20.8916C5.16829 19.2117 4.50092 17.1834 4.50092 14.9992C4.50012 9.20104 9.20104 4.50013 15 4.50013ZM15 25.4999C12.8158 25.4999 10.7883 24.8317 9.10763 23.6909L23.6901 9.10842C24.8317 10.7883 25.4991 12.8166 25.4991 15.0008C25.4999 20.799 20.799 25.4999 15 25.4999Z" /></svg>',
copy: '<svg width="100%" height="100%" fill="currentColor" viewBox="0 0 29 33" xmlns="http://www.w3.org/2000/svg"><path d="M21 0H3C1.3425 0 0 1.3425 0 3V24H3V3H21V0ZM25.5 6H9C7.3425 6 6 7.3425 6 9V30C6 31.6575 7.3425 33 9 33H25.5C27.1575 33 28.5 31.6575 28.5 30V9C28.5 7.3425 27.1575 6 25.5 6ZM25.5 30H9V9H25.5V30Z" /></svg>',
Expand Down
2 changes: 1 addition & 1 deletion ui/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export interface SendMessageInput {

export interface NotifyMessageDeliveryInput {
agent: AgentPubKey;
message_record: MessageRecord;
messageRecord: MessageRecord;
}

export interface DeleteMessageInput {
Expand Down
20 changes: 10 additions & 10 deletions ui/src/routes/conversations/[id]/DeliveryStatusIndicator.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
export let deliveredCount: number = 0;
export let recipientCount: number = 0;

$: showDouble =
status === DeliveryStatus.DeliveredPartial || status === DeliveryStatus.DeliveredAll;
$: icon =
status === DeliveryStatus.DeliveredPartial || status === DeliveryStatus.DeliveredAll
? "doubleCheck"
: "checkMark";

$: colorClass =
status === DeliveryStatus.DeliveredAll
? "text-primary-500"
: "text-secondary-400 dark:text-secondary-300";
$: showCount =
status === DeliveryStatus.DeliveredPartial && recipientCount > 1;

$: showCount = status === DeliveryStatus.DeliveredPartial && recipientCount > 1;
</script>

<span
class="inline-flex items-center gap-0.5 text-xxs {colorClass}"
class="inline-flex items-center gap-0.5 leading-none {colorClass}"
aria-label="delivery status {status}"
>
<SvgIcon icon="checkMark" size="h-2.5 w-2.5" />
{#if showDouble}
<SvgIcon icon="checkMark" size="h-2.5 w-2.5" moreClasses="-ml-1" />
{/if}
<SvgIcon {icon} size="h-3 w-3" />
{#if showCount}
<span class="ml-0.5 text-xxs leading-none">{deliveredCount}/{recipientCount}</span>
<span class="text-xxs leading-none">{deliveredCount}/{recipientCount}</span>
{/if}
</span>
2 changes: 1 addition & 1 deletion ui/src/store/ConversationMessageStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ const paginationState = writable<Record<string, PaginationState>>({});
try {
const delivered = await client.notifyMessageDelivery(cellId, {
agent,
message_record: messageRecord,
messageRecord,
});
return { agentB64: encodeHashToBase64(agent), delivered };
} catch (err) {
Expand Down