Refactored types
This commit is contained in:
+13
-8
@@ -21,8 +21,9 @@ use pulse_ui::{
|
||||
|
||||
use crate::formatting::{Formatted, apply_padding};
|
||||
|
||||
use pulse_wire::terminal::{
|
||||
ActivePosition, EventLog, InspectTarget, MarketOverview, Signal, Status, WatchListItem,
|
||||
use pulse_wire::{
|
||||
general::{EventLog, Position, Signal},
|
||||
terminal::{InspectTarget, MarketItem, MarketOverview, Status},
|
||||
};
|
||||
|
||||
pub struct PulseTradeApp {
|
||||
@@ -34,8 +35,8 @@ pub struct PulseTradeApp {
|
||||
market_overview: State<Option<MarketOverview>>,
|
||||
status: State<Option<Status>>,
|
||||
|
||||
watch_list: State<Vec<WatchListItem>>,
|
||||
active_positions: State<Vec<ActivePosition>>,
|
||||
watch_list: State<Vec<MarketItem>>,
|
||||
active_positions: State<Vec<Position>>,
|
||||
logs: State<Vec<EventLog>>,
|
||||
signals: State<Vec<Signal>>,
|
||||
inspect: State<InspectTarget>,
|
||||
@@ -130,15 +131,19 @@ impl App for PulseTradeApp {
|
||||
(
|
||||
LayoutItem::Widget(Size::Flex(1)),
|
||||
Box::new(
|
||||
advanced_draw(&self.scroll, 1, "ACTIVE POSITIONS", &self.active_positions)
|
||||
.await,
|
||||
advanced_draw(&self.scroll, 1, "POSITIONS", &self.active_positions).await,
|
||||
),
|
||||
),
|
||||
(
|
||||
LayoutItem::Widget(Size::Flex(1)),
|
||||
Box::new(
|
||||
advanced_option_draw(&self.scroll, 2, "MARKET OVERVIEW", &self.market_overview)
|
||||
.await,
|
||||
advanced_option_draw(
|
||||
&self.scroll,
|
||||
2,
|
||||
"MARKET OVERVIEW",
|
||||
&self.market_overview,
|
||||
)
|
||||
.await,
|
||||
),
|
||||
),
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user