Skip to content

Clear clipboard after certain time#442

Merged
robin-nitrokey merged 1 commit into
Nitrokey:mainfrom
ABuljko:clipboard-clear-after-certain-time
Jun 25, 2026
Merged

Clear clipboard after certain time#442
robin-nitrokey merged 1 commit into
Nitrokey:mainfrom
ABuljko:clipboard-clear-after-certain-time

Conversation

@ABuljko

@ABuljko ABuljko commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
  • Clears the clipboard after 10 seconds of the content being copied
  • Includes the copy icon and the keyboard function 'Crtl+c'

Issue ticket #248

@mmerklinger mmerklinger requested review from a team, daringer, james-knippes, mmerklinger, robin-nitrokey and sosthene-nitrokey and removed request for a team June 22, 2026 10:43

@robin-nitrokey robin-nitrokey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just two minor questions.

Comment thread nitrokeyapp/secrets_tab/__init__.py
Comment thread nitrokeyapp/secrets_tab/__init__.py Outdated
@ABuljko ABuljko requested a review from robin-nitrokey June 22, 2026 21:53
@ABuljko ABuljko requested a review from a team as a code owner June 22, 2026 23:45
@robin-nitrokey robin-nitrokey force-pushed the clipboard-clear-after-certain-time branch from c6ce568 to ef87c3e Compare June 25, 2026 16:57
@robin-nitrokey robin-nitrokey force-pushed the clipboard-clear-after-certain-time branch from ef87c3e to bd71627 Compare June 25, 2026 17:00
@robin-nitrokey robin-nitrokey merged commit bd71627 into Nitrokey:main Jun 25, 2026
32 checks passed
@robin-nitrokey

Copy link
Copy Markdown
Member

Squashed and merged, thanks!

I noticed that there is a race condition where copying the value multiple times does not increase the timeout, so e. g. if you copy a second time nine seconds after the first copy, the value will only be valid for one second. It is not a big issue so I’ve merged anyway. If you want to, you can fix it in a separate PR. It should be possible to fix it by using one timer per field and restarting the timer once a value is copied.

@ABuljko

ABuljko commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

I will keep it noted down, and later down the line in one of my PRs i will incorporate the fix :)

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.

Support clearing up the copied secret from the clipboard after certain time

2 participants