Extract constants to separate module
This commit is contained in:
parent
6e9216913e
commit
eba68dc7d7
2 changed files with 31 additions and 8 deletions
23
cove-tui/src/chat/tree/constants.rs
Normal file
23
cove-tui/src/chat/tree/constants.rs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
use crossterm::style::{ContentStyle, Stylize};
|
||||
|
||||
pub const TIME_FORMAT: &str = "%H:%M ";
|
||||
pub const TIME_WIDTH: usize = 6;
|
||||
|
||||
pub fn style_time() -> ContentStyle {
|
||||
ContentStyle::default().grey()
|
||||
}
|
||||
|
||||
pub fn style_time_inverted() -> ContentStyle {
|
||||
ContentStyle::default().black().on_white()
|
||||
}
|
||||
|
||||
pub const INDENT: &str = "│ ";
|
||||
pub const INDENT_WIDTH: usize = 2;
|
||||
|
||||
pub fn style_indent() -> ContentStyle {
|
||||
ContentStyle::default().grey()
|
||||
}
|
||||
|
||||
pub fn style_indent_inverted() -> ContentStyle {
|
||||
ContentStyle::default().black().on_white()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue