Skip to content

Add PKI backup dialog, add reminder toast to suggest backing up private key. #360

Merged
Hunter275 merged 10 commits into
meshtastic:masterfrom
danditomaso:add_pki_backup_dialog
Jan 23, 2025
Merged

Add PKI backup dialog, add reminder toast to suggest backing up private key. #360
Hunter275 merged 10 commits into
meshtastic:masterfrom
danditomaso:add_pki_backup_dialog

Conversation

@danditomaso

@danditomaso danditomaso commented Jan 3, 2025

Copy link
Copy Markdown
Collaborator
  • Added PKI Backup dialog which provides the ability for the user to download their private key in a text file, or print a copy of their key.

  • The backup dialog can be used at any time from the Security tab, which makes sense given that a user may regenerate their key.

  • This includes adding a toast style reminder to backup their private key, once they go through the backup dialog it sets a cookie which will be read to avoid creating the showing the toast next time. They can also dismiss this dialog which also sets the cookie, I dont believe this change will be that intrusive as it uses a toast to remind the user.

  • I found the toast component didn't appear correctly for any use besides a simple toast with a title, so I made some changes to it to better support dark mode and improve the DX; these changes kept the API of the toast component the same and are most focused on the styling.

Let me know if there are any changes/fixes you'd like me to make.

image image

Fixes #281

@danditomaso

Copy link
Copy Markdown
Collaborator Author

@Hunter275 Here is the PR I was mentioning

@danditomaso danditomaso changed the title feat: Add pki backup dialog Add PKI backup dialog, reminder toast to run backup of key. Jan 4, 2025
@danditomaso danditomaso changed the title Add PKI backup dialog, reminder toast to run backup of key. Add PKI backup dialog, add reminder toast to suggest backing up private key. Jan 4, 2025
@Hunter275

Copy link
Copy Markdown
Member

I think we need to length the amount of time the Toast message appears on screen or it needs to stay on screen until closed or acted upon.

@danditomaso

Copy link
Copy Markdown
Collaborator Author

Sounds good, I was also thinking, does this feature really fully cover what needs to be backed up? Because backing up the private key without backing up the public key is kind of useless. They are a key pair and I believe they need to be backed up together? What are your thoughts?

…ed duration/delay to control length of toast.
@danditomaso

Copy link
Copy Markdown
Collaborator Author
  • Refactor to improve typing of useCookie hook
  • Added delay/duration properties to the Toast hook

@danditomaso

Copy link
Copy Markdown
Collaborator Author

Sounds good, I'll make the changes and tag you when they're ready for review again. Thanks for the feedback.

@Hunter275 Hunter275 added feature request New feature or request minor change This is a minor change labels Jan 19, 2025
@danditomaso

Copy link
Copy Markdown
Collaborator Author

Sorry had forgot to push the latest commit, fixed now

@danditomaso

Copy link
Copy Markdown
Collaborator Author

@Hunter275 let me know if there are any changes you'd like me to make on this PR.

@Hunter275 Hunter275 merged commit be9a07b into meshtastic:master Jan 23, 2025
@danditomaso danditomaso deleted the add_pki_backup_dialog branch January 29, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request minor change This is a minor change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Prompt User to download PKI keys for backups

3 participants