mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-26 05:37:18 +02:00
707fa37160
When pulling/pushing/fast-forwarding a branch, show this state in the branches list for that branch for as long as the operation takes, to make it easier to see when it's done (without having to stare at the status bar in the lower left). This will hopefully help with making these operations feel more predictable, now that we no longer show a loader panel for them.
24 lines
559 B
Go
24 lines
559 B
Go
package presentation
|
|
|
|
import (
|
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
|
"github.com/jesseduffield/lazygit/pkg/i18n"
|
|
)
|
|
|
|
func itemOperationToString(itemOperation types.ItemOperation, tr *i18n.TranslationSet) string {
|
|
switch itemOperation {
|
|
case types.ItemOperationNone:
|
|
return ""
|
|
case types.ItemOperationPushing:
|
|
return tr.PushingStatus
|
|
case types.ItemOperationPulling:
|
|
return tr.PullingStatus
|
|
case types.ItemOperationFastForwarding:
|
|
return tr.FastForwarding
|
|
case types.ItemOperationDeleting:
|
|
return tr.DeletingStatus
|
|
}
|
|
|
|
return ""
|
|
}
|