-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added progress bar for transactions status (#199)
[video.webm](https://github.com/user-attachments/assets/e11ce68f-b8d4-4640-8973-10cafcde702b) Resolves #163
- Loading branch information
1 parent
0ea481a
commit c51dcad
Showing
24 changed files
with
591 additions
and
172 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
instances/treasury-devdao.near/widget/components/TransactionLoader.jsx
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,39 @@ | ||
function TransactionLoader({ showInProgress, showError, toggleToast }) { | ||
return showInProgress || showError ? ( | ||
<div class="toast-container position-fixed bottom-0 end-0 p-3"> | ||
<div className={`toast ${showInProgress || showError ? "show" : ""}`}> | ||
<div class="toast-header px-2"> | ||
<strong class="me-auto">Just Now</strong> | ||
{showError && ( | ||
<i | ||
class="bi bi-x-lg h6 mb-0 cursor-pointer" | ||
onClick={() => toggleToast(false)} | ||
></i> | ||
)} | ||
</div> | ||
<div class="toast-body"> | ||
{showInProgress ? ( | ||
<div className="d-flex align-items-center gap-3"> | ||
<img | ||
height={30} | ||
width={30} | ||
src="https://i.gifer.com/origin/34/34338d26023e5515f6cc8969aa027bca.gif" | ||
/> | ||
<div className="flex-1 text-left"> | ||
Processing your request ... | ||
</div> | ||
</div> | ||
) : ( | ||
<div className="d-flex align-items-center gap-3 "> | ||
<i class="bi bi-exclamation-triangle h3 mb-0 warning-icon"></i> | ||
<div className="flex-1 text-left"> | ||
Something went wrong. Please try resubmitting the request. | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
) : null; | ||
} | ||
return { TransactionLoader }; |
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
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.