Add additive KDBX importer
This commit is contained in:
@@ -1200,6 +1200,7 @@ impl App {
|
||||
| Action::InsertEntry
|
||||
| Action::GenerateEntry
|
||||
| Action::Grep
|
||||
| Action::ImportKdbx
|
||||
| Action::RemoveEntry
|
||||
| Action::MoveEntry
|
||||
| Action::CopyEntry
|
||||
@@ -1212,6 +1213,7 @@ impl App {
|
||||
| WorkflowAction::InsertEntry
|
||||
| WorkflowAction::GenerateEntry
|
||||
| WorkflowAction::Grep
|
||||
| WorkflowAction::ImportKdbx
|
||||
| WorkflowAction::RemoveEntry
|
||||
| WorkflowAction::MoveEntry
|
||||
| WorkflowAction::CopyEntry
|
||||
@@ -1626,7 +1628,8 @@ impl App {
|
||||
| CommandInvocation::Storage(request @ CommandRequest::Grep(_))
|
||||
| CommandInvocation::Storage(request @ CommandRequest::Remove(_))
|
||||
| CommandInvocation::Storage(request @ CommandRequest::Move(_))
|
||||
| CommandInvocation::Storage(request @ CommandRequest::Copy(_)) => {
|
||||
| CommandInvocation::Storage(request @ CommandRequest::Copy(_))
|
||||
| CommandInvocation::Storage(request @ CommandRequest::ImportKdbx(_)) => {
|
||||
self.transition(Transition::Dismiss);
|
||||
let workflow = match &request {
|
||||
CommandRequest::Init(_) => WorkflowAction::Initialize,
|
||||
@@ -1636,6 +1639,7 @@ impl App {
|
||||
CommandRequest::Remove(_) => WorkflowAction::RemoveEntry,
|
||||
CommandRequest::Move(_) => WorkflowAction::MoveEntry,
|
||||
CommandRequest::Copy(_) => WorkflowAction::CopyEntry,
|
||||
CommandRequest::ImportKdbx(_) => WorkflowAction::ImportKdbx,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
self.open_workflow(workflow, Some(request));
|
||||
@@ -1727,6 +1731,10 @@ impl App {
|
||||
WorkflowForm::grep(Some(request))
|
||||
}
|
||||
(WorkflowAction::Grep, None) => WorkflowForm::grep(None),
|
||||
(WorkflowAction::ImportKdbx, Some(CommandRequest::ImportKdbx(request))) => {
|
||||
WorkflowForm::kdbx(Some(request))
|
||||
}
|
||||
(WorkflowAction::ImportKdbx, None) => WorkflowForm::kdbx(None),
|
||||
(WorkflowAction::RemoveEntry, Some(CommandRequest::Remove(request))) => {
|
||||
WorkflowForm::remove(Some(request), None)
|
||||
}
|
||||
@@ -2132,6 +2140,7 @@ fn workflow_label(workflow: WorkflowAction) -> &'static str {
|
||||
WorkflowAction::InsertEntry => "entry insertion",
|
||||
WorkflowAction::GenerateEntry => "entry generation",
|
||||
WorkflowAction::Grep => "decrypted grep",
|
||||
WorkflowAction::ImportKdbx => "KDBX import",
|
||||
WorkflowAction::RemoveEntry => "entry removal",
|
||||
WorkflowAction::MoveEntry => "entry move",
|
||||
WorkflowAction::CopyEntry => "entry copy",
|
||||
|
||||
Reference in New Issue
Block a user