Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Use `term::Table::header` where possible
Lorenz Leutgeb committed 1 year ago
commit f58af8fef4831d2096ce3a083e1d33f1988b2eb2
parent bcba8f5a210999e73d56ac0878dee1c679cd48f5
7 files changed +7 -7
modified radicle-cli/src/commands/follow.rs
@@ -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")),
modified radicle-cli/src/commands/id.rs
@@ -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(),
modified radicle-cli/src/commands/issue.rs
@@ -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(),
modified radicle-cli/src/commands/ls.rs
@@ -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(),
modified radicle-cli/src/commands/node/control.rs
@@ -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(),
modified radicle-cli/src/commands/patch/list.rs
@@ -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(),
modified radicle-cli/src/commands/sync.rs
@@ -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(),