feat: show the password on the login screen on request
The password field has an eye at its right end that switches the field between masked and plain text, struck through while the text shows. From a controller, the queue button toggles it while the field is selected, and the hint bar says so. A keyboard types into the field, so it uses the eye instead. It is hidden again each time the login screen opens.
This commit is contained in:
+11
@@ -451,6 +451,7 @@ impl App {
|
||||
self.ui.set_screen(Screen::Login);
|
||||
// Adding a server from inside the app: the bottom button goes back.
|
||||
self.ui.set_login_can_cancel(self.client.is_some());
|
||||
self.ui.set_login_password_shown(false);
|
||||
self.set_login_focus(0);
|
||||
}
|
||||
|
||||
@@ -492,6 +493,12 @@ impl App {
|
||||
Action::Activate if self.login_focus == 4 => self.action(Action::Quit),
|
||||
Action::Activate => self.login_submit(),
|
||||
Action::Back => self.cancel_login(),
|
||||
// The face button that queues elsewhere; a keyboard types into
|
||||
// the field instead, and uses the eye.
|
||||
Action::Queue if self.login_focus == 2 => {
|
||||
self.ui.set_login_password_shown(!self.ui.get_login_password_shown());
|
||||
self.render_hints();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -1671,6 +1678,10 @@ impl App {
|
||||
_ => "Connect",
|
||||
};
|
||||
h(Control::Activate, label);
|
||||
if self.login_focus == 2 && matches!(self.prompts, Prompts::Pad(_)) {
|
||||
let shown = self.ui.get_login_password_shown();
|
||||
h(Control::Queue, if shown { "Hide password" } else { "Show password" });
|
||||
}
|
||||
if adding {
|
||||
h(Control::Back, "Cancel");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user