mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 05:57:38 -04:00
Nothing routes to the explorer contexts after line actions and file entry moved into the normal main pair. Delete their contexts, views, main-pair wiring, discovery API, test drivers, and selection-state package so the surviving diff view is the only implementation. Their names go from the contexts a custom command may bind to as well, so that a config still naming one is reported as the config error it now is rather than taken as a context we simply failed to find. Co-Authored-By: GitHub Copilot <copilot@github.com>
144 lines
3.0 KiB
Go
144 lines
3.0 KiB
Go
package components
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/jesseduffield/lazygit/pkg/gocui"
|
|
)
|
|
|
|
type Views struct {
|
|
t *TestDriver
|
|
}
|
|
|
|
func (self *Views) Main() *ViewDriver {
|
|
return &ViewDriver{
|
|
context: "main view",
|
|
getView: func() *gocui.View { return self.t.gui.MainView() },
|
|
t: self.t,
|
|
}
|
|
}
|
|
|
|
func (self *Views) Secondary() *ViewDriver {
|
|
return &ViewDriver{
|
|
context: "secondary view",
|
|
getView: func() *gocui.View { return self.t.gui.SecondaryView() },
|
|
t: self.t,
|
|
}
|
|
}
|
|
|
|
func (self *Views) regularView(viewName string) *ViewDriver {
|
|
return &ViewDriver{
|
|
context: fmt.Sprintf("%s view", viewName),
|
|
getView: func() *gocui.View { return self.t.gui.View(viewName) },
|
|
t: self.t,
|
|
}
|
|
}
|
|
|
|
func (self *Views) MergeConflicts() *ViewDriver {
|
|
return self.regularView("mergeConflicts")
|
|
}
|
|
|
|
func (self *Views) Commits() *ViewDriver {
|
|
return self.regularView("commits")
|
|
}
|
|
|
|
func (self *Views) Files() *ViewDriver {
|
|
return self.regularView("files")
|
|
}
|
|
|
|
func (self *Views) Worktrees() *ViewDriver {
|
|
return self.regularView("worktrees")
|
|
}
|
|
|
|
func (self *Views) Status() *ViewDriver {
|
|
return self.regularView("status")
|
|
}
|
|
|
|
func (self *Views) Submodules() *ViewDriver {
|
|
return self.regularView("submodules")
|
|
}
|
|
|
|
func (self *Views) Information() *ViewDriver {
|
|
return self.regularView("information")
|
|
}
|
|
|
|
func (self *Views) AppStatus() *ViewDriver {
|
|
return self.regularView("appStatus")
|
|
}
|
|
|
|
func (self *Views) Branches() *ViewDriver {
|
|
return self.regularView("localBranches")
|
|
}
|
|
|
|
func (self *Views) Remotes() *ViewDriver {
|
|
return self.regularView("remotes")
|
|
}
|
|
|
|
func (self *Views) RemoteBranches() *ViewDriver {
|
|
return self.regularView("remoteBranches")
|
|
}
|
|
|
|
func (self *Views) Tags() *ViewDriver {
|
|
return self.regularView("tags")
|
|
}
|
|
|
|
func (self *Views) ReflogCommits() *ViewDriver {
|
|
return self.regularView("reflogCommits")
|
|
}
|
|
|
|
func (self *Views) SubCommits() *ViewDriver {
|
|
return self.regularView("subCommits")
|
|
}
|
|
|
|
func (self *Views) CommitFiles() *ViewDriver {
|
|
return self.regularView("commitFiles")
|
|
}
|
|
|
|
func (self *Views) Stash() *ViewDriver {
|
|
return self.regularView("stash")
|
|
}
|
|
|
|
func (self *Views) Menu() *ViewDriver {
|
|
return self.regularView("menu")
|
|
}
|
|
|
|
func (self *Views) MenuFilter() *ViewDriver {
|
|
return self.regularView("menuFilter")
|
|
}
|
|
|
|
func (self *Views) MenuFilterFrame() *ViewDriver {
|
|
return self.regularView("menuFilterFrame")
|
|
}
|
|
|
|
func (self *Views) Confirmation() *ViewDriver {
|
|
return self.regularView("confirmation")
|
|
}
|
|
|
|
func (self *Views) Prompt() *ViewDriver {
|
|
return self.regularView("prompt")
|
|
}
|
|
|
|
func (self *Views) CommitMessage() *ViewDriver {
|
|
return self.regularView("commitMessage")
|
|
}
|
|
|
|
func (self *Views) CommitDescription() *ViewDriver {
|
|
return self.regularView("commitDescription")
|
|
}
|
|
|
|
func (self *Views) Suggestions() *ViewDriver {
|
|
return self.regularView("suggestions")
|
|
}
|
|
|
|
func (self *Views) Search() *ViewDriver {
|
|
return self.regularView("search")
|
|
}
|
|
|
|
func (self *Views) Tooltip() *ViewDriver {
|
|
return self.regularView("tooltip")
|
|
}
|
|
|
|
func (self *Views) Options() *ViewDriver {
|
|
return self.regularView("options")
|
|
}
|