greeter: fix show password for greeter

This commit is contained in:
TornaxO7 2024-10-06 20:45:50 +02:00
parent 8e19b3f791
commit 18e730c7d8
No known key found for this signature in database
GPG key ID: 2BCDBDF404CEDF55

View file

@ -1277,20 +1277,20 @@ impl cosmic::Application for App {
match &self.prompt_opt { match &self.prompt_opt {
Some((prompt, secret, value_opt)) => match value_opt { Some((prompt, secret, value_opt)) => match value_opt {
Some(value) => { Some(value) => {
let mut text_input = let mut text_input = widget::secure_input(
widget::text_input(prompt.clone(), value.clone()) prompt.clone(),
.leading_icon( value.clone(),
widget::icon::from_name("system-lock-screen-symbolic") Some(Message::Prompt(
.into(), prompt.clone(),
) !*secret,
.trailing_icon( Some(value.clone()),
widget::icon::from_name("document-properties-symbolic") )),
.into(), *secret,
) )
.on_input(|value| { .on_input(|value| {
Message::Prompt(prompt.clone(), *secret, Some(value)) Message::Prompt(prompt.clone(), *secret, Some(value))
}) })
.on_submit(Message::Auth(Some(value.clone()))); .on_submit(Message::Auth(Some(value.clone())));
if let Some(text_input_id) = self.text_input_ids.get(&surface_id) { if let Some(text_input_id) = self.text_input_ids.get(&surface_id) {
text_input = text_input.id(text_input_id.clone()); text_input = text_input.id(text_input_id.clone());