feat: implement filter
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-05-10 23:23:47 +02:00
parent 63420d9187
commit 07b768d0be
2 changed files with 42 additions and 13 deletions

View File

@@ -12,6 +12,23 @@ use super::{
render_graph::summarize::SummarizeRenderGraph,
};
#[derive(Clone)]
pub enum FilterBy {
NotDone,
None,
}
impl Default for FilterBy {
fn default() -> Self {
Self::NotDone
}
}
#[derive(Default, Clone)]
pub struct DisplayOptions {
pub filter_by: FilterBy,
}
pub struct GraphExplorer<'a> {
state: SharedState,
@@ -24,6 +41,8 @@ pub struct GraphExplorerState<'a> {
current_path: Option<&'a str>,
current_position: Vec<usize>,
display_options: DisplayOptions,
graph: Option<GraphItem>,
}
@@ -36,6 +55,7 @@ impl<'a> GraphExplorer<'a> {
current_path: None,
current_position: Vec::new(),
graph: None,
display_options: DisplayOptions::default(),
},
}
}