-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial setup of activity log listener and store. (#153)
closes #132 --------- Co-authored-by: Claire Olmstead <[email protected]> Co-authored-by: Wil Wade <[email protected]>
- Loading branch information
1 parent
e12ab77
commit d263d30
Showing
43 changed files
with
556 additions
and
693 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
<script lang="ts"> | ||
import ActivityLogPreviewItem from './ActivityLogPreviewItem.svelte'; | ||
import { activityLog } from '$lib/stores/activityLogStore'; | ||
import type { Activity } from '$lib/storeTypes'; | ||
let recentActivityItem: Activity; | ||
$: { | ||
recentActivityItem = $activityLog[0]; | ||
} | ||
</script> | ||
|
||
<!-- TODO: Connect activities --> | ||
<div></div> | ||
<!-- <div class="min-w-[300px] border-l border-divider pl-5"> | ||
<div class="label border-b border-divider pb-5">Activity Log</div> | ||
<div class="border-b border-divider py-2 text-sm">Activity_Log_Preview</div> | ||
</div> --> | ||
<div class="flex flex-col"> | ||
<div class="min-w-[300px] border-l border-divider pl-5" /> | ||
<div class="label border-b border-divider pb-3">Activity Log</div> | ||
|
||
{#if recentActivityItem} | ||
<ActivityLogPreviewItem activity={recentActivityItem} /> | ||
<a href="/activity-log" class="mt-4 self-end"> | ||
<button class="btn-primary">See all activity</button> | ||
</a> | ||
{:else} | ||
<div class="py-2 text-sm">No activity.</div> | ||
{/if} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<script lang="ts"> | ||
import SuccessIcon from '$lib/assets/SuccessIcon.svelte'; | ||
import LoadingIcon from '$lib/assets/LoadingIcon.svelte'; | ||
import FailureIcon from '$lib/assets/FailureIcon.svelte'; | ||
import { TxnStatus, type Activity } from '$lib/storeTypes'; | ||
export let activity: Activity; | ||
</script> | ||
|
||
<div class="break-anywhere flex gap-2 text-wrap border-b border-divider py-2 text-sm"> | ||
{#if activity.txnStatus === TxnStatus.LOADING} | ||
<LoadingIcon /> | ||
{:else if activity.txnStatus === TxnStatus.SUCCESS} | ||
<SuccessIcon /> | ||
{:else if activity.txnStatus === TxnStatus.FAILURE} | ||
<FailureIcon /> | ||
{/if} | ||
|
||
<div class="text-wrap break-words"> | ||
<div>Hash: {activity.txnId}</div> | ||
<ul class="unordered-list break-words text-sm"> | ||
{#each activity.txnStatusItems as item} | ||
<li>{item}</li> | ||
{/each} | ||
</ul> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.