-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
feat: Adding the possibility of copying the link by clicking text and icons #171
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.
Thank you, this is a nice addition!
In the file frontend/src/components/share/modals/showCompletedReverseShareModal.tsx
is the exact same component, it would be nice if you can change it there too because else the design is inconsistent.
The best way would be if your create a new component e.g CopyTextField
and use it in showCompletedReverseShareModal.tsx
and showCreateUploadModal.tsx
.
frontend/src/components/upload/modals/showCompletedUploadModal.tsx
Outdated
Show resolved
Hide resolved
….tsx Co-authored-by: Elias Schneider <[email protected]>
… and Shaere Modal
…if the user wants to select it
@stonith404, I've made the requested changes, let me know what you think about it |
Awesome, thank you! Just one thing; when I want to copy the link again, by pressing on the |
Yes, you can only copy the text itself once because if the user want to select it anyway, it would notificate 3x or more, so it selects only once on the text, but he can always click on the clipboard if he wants to copy it again. I found disturbing that it displays multiple notifications if we only wanted to select the link. I can change it if you want, it's only two lines : const [textClicked, setTextClicked] = useState(false);
if (!textClicked) {
copyLink();
setTextClicked(true);
} |
Makes absolutely sense! |
Are you able to merge the PR or do I have to do it? |
No I don't have write access, even with a review, I can't. |
I added the possibility to copy the link just by clicking the text on the upload dialog, and I also added a small check icon when the copying is done.
Tell me if you think something can be changed. I'll be happy to help for other things on this project, I've already used quite a lot TypeScript with React and also Vanilla NodeJS.