diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-18 22:19:32 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-18 22:19:32 +1100 |
commit | 865c7c2332d71704b8a6bc22472313daf4997f16 (patch) | |
tree | a21ca94ab87395f99e7ea537e3ad95eb177c4511 /pkg/gui/view_helpers.go | |
parent | 11c7cbe3ac2adf4f6e717640df7a49e5a916d753 (diff) |
minor refactor of credentials panel into its own file
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r-- | pkg/gui/view_helpers.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 4befe1e0d..75270e388 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -313,24 +313,6 @@ func (gui *Gui) resizeCurrentPopupPanel(g *gocui.Gui) error { return nil } -// HandleCredentialsPopup handles the views after executing a command that might ask for credentials -func (gui *Gui) HandleCredentialsPopup(g *gocui.Gui, popupOpened bool, cmdErr error) { - if popupOpened { - _, _ = gui.g.SetViewOnBottom("credentials") - } - if cmdErr != nil { - errMessage := cmdErr.Error() - if strings.Contains(errMessage, "exit status 128") { - errMessage = gui.Tr.SLocalize("PassUnameWrong") - } - // we are not logging this error because it may contain a password - _ = gui.createSpecificErrorPanel(errMessage, gui.getFilesView(gui.g), false) - } else { - _ = gui.closeConfirmationPrompt(g) - _ = gui.refreshSidePanels(g) - } -} - func (gui *Gui) resizePopupPanel(g *gocui.Gui, v *gocui.View) error { // If the confirmation panel is already displayed, just resize the width, // otherwise continue |