cli: Use `term::Table::header` where possible
This commit is contained in:
parent
bcba8f5a21
commit
f58af8fef4
|
|
@ -141,7 +141,7 @@ pub fn following(profile: &Profile, alias: Option<Alias>) -> anyhow::Result<()>
|
|||
let store = profile.policies()?;
|
||||
let aliases = profile.aliases();
|
||||
let mut t = term::Table::new(term::table::TableOptions::bordered());
|
||||
t.push([
|
||||
t.header([
|
||||
term::format::default(String::from("DID")),
|
||||
term::format::default(String::from("Alias")),
|
||||
term::format::default(String::from("Policy")),
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|||
let mut revisions =
|
||||
term::Table::<7, term::Label>::new(term::table::TableOptions::bordered());
|
||||
|
||||
revisions.push([
|
||||
revisions.header([
|
||||
term::format::dim(String::from("●")).into(),
|
||||
term::format::bold(String::from("ID")).into(),
|
||||
term::format::bold(String::from("Title")).into(),
|
||||
|
|
|
|||
|
|
@ -682,7 +682,7 @@ where
|
|||
});
|
||||
|
||||
let mut table = term::Table::new(term::table::TableOptions::bordered());
|
||||
table.push([
|
||||
table.header([
|
||||
term::format::dim(String::from("●")).into(),
|
||||
term::format::bold(String::from("ID")).into(),
|
||||
term::format::bold(String::from("Title")).into(),
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|||
if rows.is_empty() {
|
||||
term::print(term::format::italic("Nothing to show."));
|
||||
} else {
|
||||
table.push([
|
||||
table.header([
|
||||
"Name".into(),
|
||||
"RID".into(),
|
||||
"Visibility".into(),
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ pub fn sessions(node: &Node) -> Result<Option<term::Table<4, term::Label>>, node
|
|||
let mut table = term::Table::new(term::table::TableOptions::bordered());
|
||||
let now = LocalTime::now();
|
||||
|
||||
table.push([
|
||||
table.header([
|
||||
term::format::bold("Peer").into(),
|
||||
term::format::bold("Address").into(),
|
||||
term::format::bold("State").into(),
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ pub fn run(
|
|||
..TableOptions::default()
|
||||
});
|
||||
|
||||
table.push([
|
||||
table.header([
|
||||
term::format::dim(String::from("●")).into(),
|
||||
term::format::bold(String::from("ID")).into(),
|
||||
term::format::bold(String::from("Title")).into(),
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ fn sync_status(
|
|||
let local_nid = node.nid()?;
|
||||
let aliases = profile.aliases();
|
||||
|
||||
table.push([
|
||||
table.header([
|
||||
term::format::dim(String::from("●")).into(),
|
||||
term::format::bold(String::from("Node")).into(),
|
||||
term::Label::blank(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue