mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Refactoring the code to allow for any list item, not just branches/tags, to have an inline status.
24 lines
565 B
Go
24 lines
565 B
Go
package presentation
|
|
|
|
import (
|
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
|
"github.com/jesseduffield/lazygit/pkg/i18n"
|
|
)
|
|
|
|
func refOperationToString(refOperation types.ItemOperation, tr *i18n.TranslationSet) string {
|
|
switch refOperation {
|
|
case types.ItemOperationNone:
|
|
return ""
|
|
case types.ItemOperationPushing:
|
|
return tr.PushingStatus
|
|
case types.ItemOperationPulling:
|
|
return tr.PullingStatus
|
|
case types.ItemOperationFastForwarding:
|
|
return tr.FastForwardingOperation
|
|
case types.ItemOperationDeleting:
|
|
return tr.DeletingStatus
|
|
}
|
|
|
|
return ""
|
|
}
|