@@ -39,16 +39,16 @@ func NewModeHelper(
39
39
}
40
40
41
41
type ModeStatus struct {
42
- IsActive func () bool
43
- Description func () string
44
- Reset func () error
42
+ IsActive func () bool
43
+ InfoLabel func () string
44
+ Reset func () error
45
45
}
46
46
47
47
func (self * ModeHelper ) Statuses () []ModeStatus {
48
48
return []ModeStatus {
49
49
{
50
50
IsActive : self .c .Modes ().Diffing .Active ,
51
- Description : func () string {
51
+ InfoLabel : func () string {
52
52
return self .withResetButton (
53
53
fmt .Sprintf (
54
54
"%s %s" ,
@@ -62,14 +62,14 @@ func (self *ModeHelper) Statuses() []ModeStatus {
62
62
},
63
63
{
64
64
IsActive : self .c .Git ().Patch .PatchBuilder .Active ,
65
- Description : func () string {
65
+ InfoLabel : func () string {
66
66
return self .withResetButton (self .c .Tr .BuildingPatch , style .FgYellow .SetBold ())
67
67
},
68
68
Reset : self .patchBuildingHelper .Reset ,
69
69
},
70
70
{
71
71
IsActive : self .c .Modes ().Filtering .Active ,
72
- Description : func () string {
72
+ InfoLabel : func () string {
73
73
filterContent := lo .Ternary (self .c .Modes ().Filtering .GetPath () != "" , self .c .Modes ().Filtering .GetPath (), self .c .Modes ().Filtering .GetAuthor ())
74
74
return self .withResetButton (
75
75
fmt .Sprintf (
@@ -84,7 +84,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
84
84
},
85
85
{
86
86
IsActive : self .c .Modes ().MarkedBaseCommit .Active ,
87
- Description : func () string {
87
+ InfoLabel : func () string {
88
88
return self .withResetButton (
89
89
self .c .Tr .MarkedBaseCommitStatus ,
90
90
style .FgCyan ,
@@ -94,7 +94,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
94
94
},
95
95
{
96
96
IsActive : self .c .Modes ().CherryPicking .Active ,
97
- Description : func () string {
97
+ InfoLabel : func () string {
98
98
copiedCount := len (self .c .Modes ().CherryPicking .CherryPickedCommits )
99
99
text := self .c .Tr .CommitsCopied
100
100
if copiedCount == 1 {
@@ -116,7 +116,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
116
116
IsActive : func () bool {
117
117
return ! self .suppressRebasingMode && self .c .Git ().Status .WorkingTreeState ().Any ()
118
118
},
119
- Description : func () string {
119
+ InfoLabel : func () string {
120
120
workingTreeState := self .c .Git ().Status .WorkingTreeState ()
121
121
return self .withResetButton (
122
122
workingTreeState .Title (self .c .Tr ), style .FgYellow ,
@@ -128,7 +128,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
128
128
IsActive : func () bool {
129
129
return self .c .Model ().BisectInfo .Started ()
130
130
},
131
- Description : func () string {
131
+ InfoLabel : func () string {
132
132
return self .withResetButton (self .c .Tr .Bisect .Bisecting , style .FgGreen )
133
133
},
134
134
Reset : self .bisectHelper .Reset ,
0 commit comments