@@ -68,26 +68,15 @@ func (self *StatusController) GetKeybindings(opts types.KeybindingsOpts) []*type
68
68
}
69
69
70
70
func (self * StatusController ) GetOnRenderToMain () func () error {
71
- return func () error {
72
- dashboardString := strings .Join (
73
- []string {
74
- lazygitTitle (),
75
- "Copyright 2022 Jesse Duffield" ,
76
- fmt .Sprintf ("Keybindings: %s" , constants .Links .Docs .Keybindings ),
77
- fmt .Sprintf ("Config Options: %s" , constants .Links .Docs .Config ),
78
- fmt .Sprintf ("Tutorial: %s" , constants .Links .Docs .Tutorial ),
79
- fmt .Sprintf ("Raise an Issue: %s" , constants .Links .Issues ),
80
- fmt .Sprintf ("Release Notes: %s" , constants .Links .Releases ),
81
- style .FgMagenta .Sprintf ("Become a sponsor: %s" , constants .Links .Donate ), // caffeine ain't free
82
- }, "\n \n " )
83
-
84
- return self .c .RenderToMainViews (types.RefreshMainOpts {
85
- Pair : self .c .MainViewPairs ().Normal ,
86
- Main : & types.ViewUpdateOpts {
87
- Title : self .c .Tr .StatusTitle ,
88
- Task : types .NewRenderStringTask (dashboardString ),
89
- },
90
- })
71
+ config := self .c .UserConfig .Gui
72
+
73
+ switch config .StatusPanelView {
74
+ case "dashboard" :
75
+ return self .showDashboard
76
+ case "allBranchesLog" :
77
+ return self .showAllBranchLogs
78
+ default :
79
+ return self .showDashboard
91
80
}
92
81
}
93
82
@@ -198,6 +187,28 @@ func (self *StatusController) showAllBranchLogs() error {
198
187
})
199
188
}
200
189
190
+ func (self * StatusController ) showDashboard () error {
191
+ dashboardString := strings .Join (
192
+ []string {
193
+ lazygitTitle (),
194
+ "Copyright 2022 Jesse Duffield" ,
195
+ fmt .Sprintf ("Keybindings: %s" , constants .Links .Docs .Keybindings ),
196
+ fmt .Sprintf ("Config Options: %s" , constants .Links .Docs .Config ),
197
+ fmt .Sprintf ("Tutorial: %s" , constants .Links .Docs .Tutorial ),
198
+ fmt .Sprintf ("Raise an Issue: %s" , constants .Links .Issues ),
199
+ fmt .Sprintf ("Release Notes: %s" , constants .Links .Releases ),
200
+ style .FgMagenta .Sprintf ("Become a sponsor: %s" , constants .Links .Donate ), // caffeine ain't free
201
+ }, "\n \n " )
202
+
203
+ return self .c .RenderToMainViews (types.RefreshMainOpts {
204
+ Pair : self .c .MainViewPairs ().Normal ,
205
+ Main : & types.ViewUpdateOpts {
206
+ Title : self .c .Tr .StatusTitle ,
207
+ Task : types .NewRenderStringTask (dashboardString ),
208
+ },
209
+ })
210
+ }
211
+
201
212
func (self * StatusController ) handleCheckForUpdate () error {
202
213
return self .c .Helpers ().Update .CheckForUpdateInForeground ()
203
214
}
0 commit comments