move render file up a level
This commit is contained in:
3 files changed
+10
-9
No files matched your search
@@ -17,6 +17,7 @@ mod hot_reloading_file_map;
|
||||
mod logs_tab;
|
||||
mod output;
|
||||
mod proxy;
|
||||
mod render;
|
||||
mod server;
|
||||
mod watcher;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ use tokio::{
|
||||
};
|
||||
use tracing::Level;
|
||||
|
||||
mod render;
|
||||
use super::render;
|
||||
|
||||
// How many lines should be scroll on each mouse scroll or arrow key input.
|
||||
const SCROLL_SPEED: u16 = 2;
|
||||
@@ -47,7 +47,7 @@ const SCROLL_MODIFIER_KEY: KeyModifiers = KeyModifiers::SHIFT;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct BuildProgress {
|
||||
current_builds: HashMap<TargetPlatform, ActiveBuild>,
|
||||
pub(crate) current_builds: HashMap<TargetPlatform, ActiveBuild>,
|
||||
}
|
||||
|
||||
impl BuildProgress {
|
||||
@@ -700,9 +700,9 @@ impl Output {
|
||||
|
||||
#[derive(Default, Debug, PartialEq)]
|
||||
pub struct ActiveBuild {
|
||||
stage: Stage,
|
||||
progress: f64,
|
||||
failed: Option<String>,
|
||||
pub stage: Stage,
|
||||
pub progress: f64,
|
||||
pub failed: Option<String>,
|
||||
}
|
||||
|
||||
impl ActiveBuild {
|
||||
@@ -727,7 +727,7 @@ impl ActiveBuild {
|
||||
}
|
||||
}
|
||||
|
||||
fn make_spans(&self, area: Rect) -> Vec<Span> {
|
||||
pub fn make_spans(&self, area: Rect) -> Vec<Span> {
|
||||
let mut spans = Vec::new();
|
||||
|
||||
let message = match self.stage {
|
||||
@@ -757,7 +757,7 @@ impl ActiveBuild {
|
||||
spans
|
||||
}
|
||||
|
||||
fn max_layout_size(&self) -> u16 {
|
||||
pub fn max_layout_size(&self) -> u16 {
|
||||
let progress_size = 4;
|
||||
let stage_size = self.stage.to_string().len() as u16;
|
||||
let brace_size = 2;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::{BuildProgress, TraceMsg, TraceSrc};
|
||||
use crate::config::Platform;
|
||||
use super::BuildProgress;
|
||||
use crate::{config::Platform, TraceMsg, TraceSrc};
|
||||
use ansi_to_tui::IntoText as _;
|
||||
use ratatui::{
|
||||
layout::{Alignment, Constraint, Direction, Layout, Rect},
|
||||
Reference in new issue
Block a user