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

lockscreen: show device name #826

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Conversation

benma
Copy link
Collaborator

@benma benma commented Nov 3, 2021

It is useful to see the name of the device before you unlock it. For
example, if you have multiple BitBoxes, it is useful to know which one
is inserted before entering long passwords or passphrases.

The device name is not a secret, and can already be queried in the API
at any time, also before unlock.

Users that dislike this can change the device name in the settings to
something generic.

@benma
Copy link
Collaborator Author

benma commented Nov 3, 2021

Truncation here does not work well because the font is not monospace. I tried a monospace font - it wastes a lot of space and looks a bit ugly. It would be best to either autoscroll the name if it is too long, or to truncate based on actual size, not based on the number of chars. I'll try that later.

@benma
Copy link
Collaborator Author

benma commented Nov 9, 2021

I changed the code to take the actual rendered size of the name into account.

It is useful to see the name of the device before you unlock it. For
example, if you have multiple BitBoxes, it is useful to know which one
is inserted before entering long passwords or passphrases.

The device name is not a secret, and can already be queried in the API
at any time, also before unlock.

Users that dislike this can change the device name in the settings to
something generic.
@benma benma force-pushed the lockscreen_name branch from a7575db to 75c079f Compare June 4, 2024 10:43
@benma benma requested a review from asi345 June 4, 2024 10:43
@benma
Copy link
Collaborator Author

benma commented Jun 4, 2024

Rebased.

Copy link
Contributor

@asi345 asi345 left a comment

Choose a reason for hiding this comment

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

works as expected. nice addition! tACK

@benma benma merged commit 1d52702 into BitBoxSwiss:master Jun 6, 2024
1 check passed
@benma benma deleted the lockscreen_name branch June 6, 2024 10:47
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.

2 participants