-
Notifications
You must be signed in to change notification settings - Fork 13
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
Create UI for single use links #1638
Conversation
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.
This looks good overall, just a few suggestions
copied_link: "Download URL, ${text}, copied to clipboard", | ||
copied_link_failed: "Unable to copy download URL, ${text}, to clipboard", |
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 don't think the $
's are necessary, it is displaying a $ in front of the url in the message
this.fadeOutMsg(); | ||
}, | ||
|
||
positionMsg(id) { |
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'm not really sure where its supposed to position the messages. With the Generate button if there's an error it puts the message directly on top of the Generate button. But when copying a link the message is over on the left side of the screen. Is it supposed to display over the "Created link" bubble as well, or off on the left side?
@@ -20,6 +20,9 @@ | |||
<i class="fa fa-search" aria-hidden="true"></i> View</a> | |||
</div> | |||
</template> | |||
<template v-if="hasPermission(recordData, 'viewHidden')"> |
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 add tests to verify that the single-use-link component shows up with viewHidden permissions, and not without them
expect(window.navigator.clipboard.writeText) | ||
.toHaveBeenCalledWith(response_date.link); | ||
}); | ||
}); |
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.
If it's not too much of a pain, it'd be good to also add a test for when it fails to generate a link since there's a decent amount of logic there.
https://unclibrary.atlassian.net/browse/BXC-4363