-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
UI: add warning before downloading secret data #23260
UI: add warning before downloading secret data #23260
Conversation
@stringify={{true}} | ||
aria-label="Download secret value" | ||
{{on "click" (fn (mut this.modalOpen) false)}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zofskeez - There's a click event in the <DownloadButton>
that handles the eventual download. It works fine locally but do you foresee any issue with stacking events like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to pass the action up from the handleDownload
method in DownloadButton
. Something like:
async handleDownload() {
try {
// download was a success
if (this.args.onSuccess) {
this.args.onSuccess();
}
} catch {}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! That's what I was thinking 🤔 Will refactor!
Build Results: |
CI Results: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
|
||
<div id="qunit"></div> | ||
<div id="qunit-fixture"> | ||
<div id="ember-testing-container"> | ||
<div id="ember-testing"></div> | ||
<div id="modal-wormhole"></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! 🎉
In #20431 we added the ability to download a secret value. To prevent accidentally downloading sensitive data, we've added a confirmation modal prompting users to cancel or proceed with the download.
🎥