mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
map: renamed NodeInfoView and NodeIdList to InfoPanel and IdPanel
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::{
|
||||
list::NodeIdList,
|
||||
list::IdPanel,
|
||||
node_info::{NodeInfo, NodeInfoView},
|
||||
};
|
||||
//use smol::Timer;
|
||||
@@ -10,7 +10,7 @@ use crate::{
|
||||
// arc reference
|
||||
#[derive(Clone)]
|
||||
pub struct App {
|
||||
pub node_list: NodeIdList,
|
||||
pub node_list: IdPanel,
|
||||
pub node_info: NodeInfoView,
|
||||
}
|
||||
|
||||
@@ -59,13 +59,13 @@ impl App {
|
||||
infos[4].id.clone(),
|
||||
];
|
||||
|
||||
let node_list = NodeIdList::new(ids);
|
||||
let node_list = IdPanel::new(ids);
|
||||
|
||||
//let infos = Vec::new();
|
||||
//let ids = Vec::new();
|
||||
|
||||
//let node_info = NodeInfoView::new(infos);
|
||||
//let node_list = NodeIdList::new(ids);
|
||||
//let node_list = IdPanel::new(ids);
|
||||
App { node_list, node_info }
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
use tui::widgets::ListState;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct NodeIdList {
|
||||
pub struct IdPanel {
|
||||
pub state: ListState,
|
||||
pub node_id: Vec<String>,
|
||||
}
|
||||
|
||||
impl NodeIdList {
|
||||
pub fn new(node_id: Vec<String>) -> NodeIdList {
|
||||
NodeIdList { state: ListState::default(), node_id }
|
||||
impl IdPanel {
|
||||
pub fn new(node_id: Vec<String>) -> IdPanel {
|
||||
IdPanel { state: ListState::default(), node_id }
|
||||
}
|
||||
|
||||
pub fn next(&mut self) {
|
||||
|
||||
@@ -78,11 +78,7 @@ async fn main() -> Result<()> {
|
||||
|
||||
terminal.clear()?;
|
||||
|
||||
// let current_state = get_current_state.await;
|
||||
// let mut app = app.lock();
|
||||
// app.current_state = current_state;
|
||||
let app = Arc::new(Mutex::new(App::new()));
|
||||
//let app = App::new();
|
||||
|
||||
let nthreads = num_cpus::get();
|
||||
let (signal, shutdown) = async_channel::unbounded::<()>();
|
||||
|
||||
Reference in New Issue
Block a user