mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
move render file up a level
This commit is contained in:
parent
5c6b72627b
commit
b25469208f
3 changed files with 10 additions and 9 deletions
|
@ -17,6 +17,7 @@ mod hot_reloading_file_map;
|
||||||
mod logs_tab;
|
mod logs_tab;
|
||||||
mod output;
|
mod output;
|
||||||
mod proxy;
|
mod proxy;
|
||||||
|
mod render;
|
||||||
mod server;
|
mod server;
|
||||||
mod watcher;
|
mod watcher;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ use tokio::{
|
||||||
};
|
};
|
||||||
use tracing::Level;
|
use tracing::Level;
|
||||||
|
|
||||||
mod render;
|
use super::render;
|
||||||
|
|
||||||
// How many lines should be scroll on each mouse scroll or arrow key input.
|
// How many lines should be scroll on each mouse scroll or arrow key input.
|
||||||
const SCROLL_SPEED: u16 = 2;
|
const SCROLL_SPEED: u16 = 2;
|
||||||
|
@ -47,7 +47,7 @@ const SCROLL_MODIFIER_KEY: KeyModifiers = KeyModifiers::SHIFT;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct BuildProgress {
|
pub struct BuildProgress {
|
||||||
current_builds: HashMap<TargetPlatform, ActiveBuild>,
|
pub(crate) current_builds: HashMap<TargetPlatform, ActiveBuild>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BuildProgress {
|
impl BuildProgress {
|
||||||
|
@ -700,9 +700,9 @@ impl Output {
|
||||||
|
|
||||||
#[derive(Default, Debug, PartialEq)]
|
#[derive(Default, Debug, PartialEq)]
|
||||||
pub struct ActiveBuild {
|
pub struct ActiveBuild {
|
||||||
stage: Stage,
|
pub stage: Stage,
|
||||||
progress: f64,
|
pub progress: f64,
|
||||||
failed: Option<String>,
|
pub failed: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActiveBuild {
|
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 mut spans = Vec::new();
|
||||||
|
|
||||||
let message = match self.stage {
|
let message = match self.stage {
|
||||||
|
@ -757,7 +757,7 @@ impl ActiveBuild {
|
||||||
spans
|
spans
|
||||||
}
|
}
|
||||||
|
|
||||||
fn max_layout_size(&self) -> u16 {
|
pub fn max_layout_size(&self) -> u16 {
|
||||||
let progress_size = 4;
|
let progress_size = 4;
|
||||||
let stage_size = self.stage.to_string().len() as u16;
|
let stage_size = self.stage.to_string().len() as u16;
|
||||||
let brace_size = 2;
|
let brace_size = 2;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use super::{BuildProgress, TraceMsg, TraceSrc};
|
use super::BuildProgress;
|
||||||
use crate::config::Platform;
|
use crate::{config::Platform, TraceMsg, TraceSrc};
|
||||||
use ansi_to_tui::IntoText as _;
|
use ansi_to_tui::IntoText as _;
|
||||||
use ratatui::{
|
use ratatui::{
|
||||||
layout::{Alignment, Constraint, Direction, Layout, Rect},
|
layout::{Alignment, Constraint, Direction, Layout, Rect},
|
Loading…
Reference in a new issue