Skip to content
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

Add "copy by tap" functionality #310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

korve
Copy link

@korve korve commented Jun 26, 2023

Add "copy by tap" functionality

This copies the code when tapping on the code after revealing it (see video)

Fixes #304

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-06-26.at.12.07.28.mp4

This copies the code when tapping on the code after revealing it (see video)

Fixes freeotp#304
@justin-stephenson
Copy link
Collaborator

justin-stephenson commented Jul 10, 2023

Hi,

Thank you for the PR. I would prefer to have an option to enable/disable this feature (as in FreeOTP Android), as some users may not want to enable automatic copy-to-clipboard functionality for security reasons.

I would also suggest removing the "Copied" text. If some visual indication is needed then a small clipboard icon pop-up or notification would be better in my opinion.

@amarshall
Copy link

@justin-stephenson This appears to not be automatic copy, but copying when the user explicitly taps the entry.

@falghamdi125
Copy link
Contributor

falghamdi125 commented Nov 25, 2024

Sounds cool!

The typical Apple iOS method for copying a read-only field is by performing a long press, which brings up a small copy popover that allows you to copy the value to the clipboard.

You can test by going to any read only value. E.g. Settings > General > About > Model Name

image

ESET Secure Authentication uses long press to copy to clipboard which I think is good too.

@justin-stephenson
Copy link
Collaborator

@justin-stephenson This appears to not be automatic copy, but copying when the user explicitly taps the entry.

If I understand correctly, this PR will always copy the token when the token is tapped. My comment is that a user should have the ability to disable this functionality, so that tapping token code will only display the token code and not copy it to clipboard (or it can, if 'copy-to-clipboard' boolean is enabled by the user elsewhere). I am also okay with the suggestion from @falghamdi125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI enhancement: Making "copy to clipboard" more accessible
4 participants