mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 01:18:21 +00:00
give blame a more apropriate place in command list
This commit is contained in:
parent
82c52cec37
commit
d50e17b353
3 changed files with 34 additions and 20 deletions
|
|
@ -388,11 +388,14 @@ impl Component for FileTreeComponent {
|
|||
)
|
||||
.order(order::NAV),
|
||||
);
|
||||
out.push(CommandInfo::new(
|
||||
strings::commands::blame_file(&self.key_config),
|
||||
self.selection_file().is_some(),
|
||||
self.focused || force_all,
|
||||
));
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
strings::commands::blame_file(&self.key_config),
|
||||
self.selection_file().is_some(),
|
||||
self.focused || force_all,
|
||||
)
|
||||
.order(order::RARE_ACTION),
|
||||
);
|
||||
|
||||
CommandBlocking::PassingOn
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use crate::keys::SharedKeyConfig;
|
||||
|
||||
pub mod order {
|
||||
pub static NAV: i8 = 1;
|
||||
pub static NAV: i8 = 2;
|
||||
pub static RARE_ACTION: i8 = 1;
|
||||
}
|
||||
|
||||
pub static PUSH_POPUP_MSG: &str = "Push";
|
||||
|
|
@ -585,7 +586,7 @@ pub mod commands {
|
|||
pub fn edit_item(key_config: &SharedKeyConfig) -> CommandText {
|
||||
CommandText::new(
|
||||
format!(
|
||||
"Edit Item [{}]",
|
||||
"Edit [{}]",
|
||||
key_config.get_hint(key_config.edit_file),
|
||||
),
|
||||
"edit the currently selected file in an external editor",
|
||||
|
|
@ -595,7 +596,7 @@ pub mod commands {
|
|||
pub fn stage_item(key_config: &SharedKeyConfig) -> CommandText {
|
||||
CommandText::new(
|
||||
format!(
|
||||
"Stage Item [{}]",
|
||||
"Stage [{}]",
|
||||
key_config.get_hint(key_config.enter),
|
||||
),
|
||||
"stage currently selected file or entire path",
|
||||
|
|
@ -615,7 +616,7 @@ pub mod commands {
|
|||
pub fn unstage_item(key_config: &SharedKeyConfig) -> CommandText {
|
||||
CommandText::new(
|
||||
format!(
|
||||
"Unstage Item [{}]",
|
||||
"Unstage [{}]",
|
||||
key_config.get_hint(key_config.enter),
|
||||
),
|
||||
"unstage currently selected file or entire path",
|
||||
|
|
@ -635,7 +636,7 @@ pub mod commands {
|
|||
pub fn reset_item(key_config: &SharedKeyConfig) -> CommandText {
|
||||
CommandText::new(
|
||||
format!(
|
||||
"Reset Item [{}]",
|
||||
"Reset [{}]",
|
||||
key_config.get_hint(key_config.status_reset_item),
|
||||
),
|
||||
"revert changes in selected file or entire path",
|
||||
|
|
|
|||
|
|
@ -516,16 +516,26 @@ impl Component for Status {
|
|||
},
|
||||
self.visible || force_all,
|
||||
));
|
||||
out.push(CommandInfo::new(
|
||||
strings::commands::diff_focus_left(&self.key_config),
|
||||
true,
|
||||
(self.visible && focus_on_diff) || force_all,
|
||||
));
|
||||
out.push(CommandInfo::new(
|
||||
strings::commands::diff_focus_right(&self.key_config),
|
||||
self.can_focus_diff(),
|
||||
(self.visible && !focus_on_diff) || force_all,
|
||||
));
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
strings::commands::diff_focus_left(
|
||||
&self.key_config,
|
||||
),
|
||||
true,
|
||||
(self.visible && focus_on_diff) || force_all,
|
||||
)
|
||||
.order(strings::order::NAV),
|
||||
);
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
strings::commands::diff_focus_right(
|
||||
&self.key_config,
|
||||
),
|
||||
self.can_focus_diff(),
|
||||
(self.visible && !focus_on_diff) || force_all,
|
||||
)
|
||||
.order(strings::order::NAV),
|
||||
);
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
strings::commands::select_staging(
|
||||
|
|
|
|||
Loading…
Reference in a new issue