add value bar

This commit is contained in:
🪞👃🪞 2025-03-23 23:10:04 +02:00
parent 2ebf2c6cef
commit 41b6a0cd57
6 changed files with 64 additions and 39 deletions

View file

@ -6,7 +6,7 @@ mod metadata; pub use self::metadata::*;
pub struct Taggart {
pub _root: PathBuf,
pub paths: Vec<Entry>,
pub entries: Vec<Entry>,
pub cursor: usize,
pub offset: usize,
pub column: usize,
@ -16,7 +16,7 @@ pub struct Taggart {
}
impl Taggart {
pub fn new (root: &impl AsRef<Path>, paths: Vec<Entry>) -> Usually<Self> {
pub fn new (root: &impl AsRef<Path>, entries: Vec<Entry>) -> Usually<Self> {
Ok(Self {
_root: root.as_ref().into(),
cursor: 0,
@ -25,12 +25,12 @@ impl Taggart {
display: Measure::new(),
editing: None,
columns: Columns::default(),
paths,
entries,
})
}
}
pub(crate) fn paths_under (
pub(crate) fn entries_under (
entries: &mut [Entry], index: usize
) -> Option<Vec<Arc<RwLock<Metadata>>>> {
let path = if let Some(Entry { path, info, .. }) = entries.get(index)