refactor: Unify table styling with comfy-table in status and list modes
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -43,10 +43,9 @@ use crate::modes::common::OutputFormat;
|
||||
use crate::config;
|
||||
use serde_json;
|
||||
use serde_yaml;
|
||||
use comfy_table::{Table, ContentArrangement, Cell, Color};
|
||||
use comfy_table::{Table, ContentArrangement, Cell, Color, Attribute};
|
||||
use comfy_table::presets::UTF8_FULL;
|
||||
use comfy_table::modifiers::UTF8_ROUND_CORNERS;
|
||||
use comfy_table::TableComponent;
|
||||
|
||||
use crate::meta_plugin::{MetaPluginType, get_meta_plugin};
|
||||
use crate::common::status::{MetaPluginInfo, CompressionInfo};
|
||||
@@ -63,9 +62,9 @@ fn build_meta_plugin_table(meta_plugin_info: &std::collections::HashMap<String,
|
||||
}
|
||||
|
||||
meta_plugin_table.set_header(vec![
|
||||
Cell::new("Plugin Name").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Options").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Outputs").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Plugin Name").add_attribute(Attribute::Bold),
|
||||
Cell::new("Options").add_attribute(Attribute::Bold),
|
||||
Cell::new("Outputs").add_attribute(Attribute::Bold),
|
||||
]);
|
||||
|
||||
// Sort meta plugin info by plugin name
|
||||
@@ -131,12 +130,12 @@ fn build_compression_table(compression_info: &Vec<CompressionInfo>) -> Table {
|
||||
}
|
||||
|
||||
compression_table.set_header(vec![
|
||||
Cell::new("Type").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Found").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Enabled").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Binary").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Compress").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Decompress").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Type").add_attribute(Attribute::Bold),
|
||||
Cell::new("Found").add_attribute(Attribute::Bold),
|
||||
Cell::new("Enabled").add_attribute(Attribute::Bold),
|
||||
Cell::new("Binary").add_attribute(Attribute::Bold),
|
||||
Cell::new("Compress").add_attribute(Attribute::Bold),
|
||||
Cell::new("Decompress").add_attribute(Attribute::Bold),
|
||||
]);
|
||||
|
||||
for info in compression_info {
|
||||
@@ -173,9 +172,9 @@ fn build_filter_plugin_table(filter_plugins: &Vec<crate::common::status::FilterP
|
||||
}
|
||||
|
||||
filter_plugin_table.set_header(vec![
|
||||
Cell::new("Plugin Name").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Options").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Description").add_attribute(comfy_table::Attribute::Bold),
|
||||
Cell::new("Plugin Name").add_attribute(Attribute::Bold),
|
||||
Cell::new("Options").add_attribute(Attribute::Bold),
|
||||
Cell::new("Description").add_attribute(Attribute::Bold),
|
||||
]);
|
||||
|
||||
// Sort plugins by name
|
||||
|
||||
Reference in New Issue
Block a user