From bd866af20ce0c772a62b75b30a3330202201ece0 Mon Sep 17 00:00:00 2001 From: qkzk Date: Tue, 17 Jan 2023 21:15:14 +0100 Subject: password input, mount, umount --- src/mode.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mode.rs') diff --git a/src/mode.rs b/src/mode.rs index e2405f6..e13e6ec 100644 --- a/src/mode.rs +++ b/src/mode.rs @@ -1,6 +1,7 @@ use std::fmt; -use crate::{completion::InputCompleted, cryptsetup::PasswordKind}; +use crate::completion::InputCompleted; +use crate::cryptsetup::{EncryptedAction, PasswordKind}; /// Different kind of mark actions. /// Either we jump to an existing mark or we save current path to a mark. @@ -76,7 +77,7 @@ pub enum InputSimple { /// Filter by extension, name, directory or no filter Filter, /// - Password(PasswordKind), + Password(PasswordKind, EncryptedAction), } /// Different modes in which we display a bunch of possible destinations. @@ -132,8 +133,8 @@ impl fmt::Display for Mode { } Mode::InputSimple(InputSimple::Marks(_)) => write!(f, "Marks jump:"), Mode::InputSimple(InputSimple::Filter) => write!(f, "Filter: "), - Mode::InputSimple(InputSimple::Password(password_kind)) => { - write!(f, "Password for {}", password_kind) + Mode::InputSimple(InputSimple::Password(password_kind, _)) => { + write!(f, "{}", password_kind) } Mode::InputCompleted(InputCompleted::Exec) => write!(f, "Exec: "), Mode::InputCompleted(InputCompleted::Goto) => write!(f, "Goto : "), -- cgit v1.2.3