Use password TextEdit to hide the password

This commit is contained in:
Sofía Aritz 2023-02-27 15:35:44 +01:00
parent e1dc5f2d36
commit d801350eb2

View file

@ -5,7 +5,7 @@ use std::fs;
use std::time::SystemTime;
use directories::ProjectDirs;
use eframe::Frame;
use egui::{Context, RichText};
use egui::{Context, RichText, TextEdit, Widget};
use log::info;
use simple_logger::SimpleLogger;
use crate::notes::{Note, NoteMetadata};
@ -172,7 +172,7 @@ impl eframe::App for App {
ui.label(RichText::new("after starting the app, the password will be tested against the latest note").italics());
ui.add_space(10.0);
ui.text_edit_singleline(&mut self.password_buffer);
TextEdit::singleline(&mut self.password_buffer).password(true).ui(ui);
if ui.button("start app").clicked() {
self.password = Some(self.password_buffer.clone());