Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add Toast Notifications #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

kizmt
Copy link

@kizmt kizmt commented Sep 6, 2023

The goal of this PR is to introduce basic toasts/notifications to the Arcana settings page

Screenshot 2023-09-06 144034

When a user uploads an RPC URL or a private key correctly, a toast will appear to acknowledge the information is processing.

Additional goals:

  • Success specific notifications (listening for events from the ArcanaController)
  • A more comprehensive method of delivering toasts

Copy link
Owner

@skynetcap skynetcap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

// Manually submit the form after a short delay to allow the toast to show
setTimeout(() => {
form.submit();
}, 2000); // 2 seconds
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd lower this to maybe 500, or remove entirely.

<script>
document.addEventListener("DOMContentLoaded", function() {
const rpcForm = document.querySelector("form[action='/settings']");
const privateKeyForm = document.querySelector("form[action='/privateKeyPost']");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do the same with the privateKeyUpload (upload file) selector.

@skynetcap
Copy link
Owner

Left minor comments.

@kizmt
Copy link
Author

kizmt commented Sep 7, 2023

Will address minor comments and make the appropriate fixes.
Another update will be provided before ready to merge.

Repository owner deleted a comment from Nitesh639 Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants