From 0a95bae451c1847f4f0b9601e60959f4e8e6b669 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 12 Mar 2026 14:28:08 +0800 Subject: Refactor display utilities --- src/cmds/cmd/sheetedit.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/cmds/cmd/sheetedit.rs') diff --git a/src/cmds/cmd/sheetedit.rs b/src/cmds/cmd/sheetedit.rs index 3e61642..74b0bbe 100644 --- a/src/cmds/cmd/sheetedit.rs +++ b/src/cmds/cmd/sheetedit.rs @@ -10,7 +10,9 @@ use crate::{ }, }; use cli_utils::{ - display::SimpleTable, env::get_default_editor, input::input_with_editor_cutsom, string_vec, + display::table::Table, + legacy::{env::get_default_editor, input::input_with_editor_cutsom}, + string_vec, }; use cmd_system_macros::exec; use just_enough_vcs::system::sheet_system::{mapping::LocalMapping, sheet::SheetData}; @@ -96,7 +98,7 @@ fn render_pretty_mappings(mappings: &Vec) -> String { t!("sheetedit.forward") ]; - let mut simple_table = SimpleTable::new(header); + let mut table = Table::new(header); for mapping in mappings { let mapping_str = mapping @@ -105,7 +107,7 @@ fn render_pretty_mappings(mappings: &Vec) -> String { .into_iter() .map(|s| s.to_string()) .collect::>(); - simple_table.push_item(vec![ + table.push_item(vec![ format!( " {} ", mapping_str.get(0).unwrap_or(&String::default()) @@ -116,7 +118,7 @@ fn render_pretty_mappings(mappings: &Vec) -> String { format!("{} ", mapping_str.get(4).unwrap_or(&String::default())), // Forward ]); } - simple_table.to_string() + table.to_string() } crate::command_template!(); -- cgit