summaryrefslogtreecommitdiffstats
path: root/src/mode.rs
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2023-01-16 20:49:33 +0100
committerqkzk <qu3nt1n@gmail.com>2023-01-16 20:49:33 +0100
commit2c32aab22bf1b2ec09676045e122dbf532f529fc (patch)
tree71387e654e312a3fd0151b889fd035c85af867a8 /src/mode.rs
parent52e428ef72126b26dfccc3b353326641751b073f (diff)
menu for crypto devices first step
Diffstat (limited to 'src/mode.rs')
-rw-r--r--src/mode.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mode.rs b/src/mode.rs
index 0eba6dc..d0fe54c 100644
--- a/src/mode.rs
+++ b/src/mode.rs
@@ -52,6 +52,13 @@ impl std::fmt::Display for NeedConfirmation {
}
}
+#[derive(Clone, Copy, Debug)]
+pub enum EncryptedDrive {
+ PickDevices,
+ OpenMount,
+ UmountClose,
+}
+
/// Different modes in which the user is expeted to type something.
/// It may be a new filename, a mode (aka an octal permission),
/// the name of a new file, of a new directory,
@@ -75,6 +82,8 @@ pub enum InputSimple {
Marks(MarkAction),
/// Filter by extension, name, directory or no filter
Filter,
+ ///
+ EncryptedDrive(EncryptedDrive),
}
/// Different modes in which we display a bunch of possible destinations.
@@ -126,6 +135,9 @@ impl fmt::Display for Mode {
Mode::InputSimple(InputSimple::Sort) => {
write!(f, "Sort: Kind Name Modif Size Ext Rev :")
}
+ Mode::InputSimple(InputSimple::EncryptedDrive(EncryptedDrive)) => {
+ write!(f, "{:?}", EncryptedDrive)
+ }
Mode::InputSimple(InputSimple::Marks(_)) => write!(f, "Marks jump:"),
Mode::InputSimple(InputSimple::Filter) => write!(f, "Filter: "),
Mode::InputCompleted(InputCompleted::Exec) => write!(f, "Exec: "),