-
Notifications
You must be signed in to change notification settings - Fork 127
ui: Copy deposit address alert #1675
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
Conversation
Nice, I was actually looking out for this :). |
navigator.clipboard.writeText(page.depositAddress.textContent || '') | ||
Doc.show(page.copyAlert) |
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.
We should only show the "Copied!" alert if writeText
says it succeeded.
navigator.clipboard.writeText(textContent).then(() => {
Doc.show(page.copyAlert)
...
}, (reason) => {
console.error('Unable to copy:', reason) // or a different alert, whatever
})
It feels very unsatisfying to click it and have nothing happen haha. |
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.
Working for me, but the alert text is a little close to the address text div. A couple more pixels of margin and I think it would be a little better.
deposit-copy-click.mp4
@@ -92,3 +92,9 @@ table.wallets { | |||
cursor: pointer; | |||
color: #a8a8a8; | |||
} | |||
|
|||
#copyAlert { | |||
margin-left: 9px; |
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.
With 9px it's right up against the div
for me. Maybe 12?
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.
12 looks good.
Oh, trivial conflict though. |
8c82eb9
to
337484a
Compare
Adds a disappearing message confirming that the deposit address has been copied.
337484a
to
12dc2f1
Compare
Adds a disappearing message confirming that the deposit address has been copied.