Documentation
¶
Index ¶
- Constants
- func FormatReports(reports []string, indent string) (lines []string)
- func GetStyleAltStr(option StyleOption, trueStr, falseStr string) string
- func GetStyleAttrMask(element StyleElement) tcell.AttrMask
- func GetStyleAttrName(element StyleElement) string
- func GetStyleColor(element StyleElement) tcell.Color
- func GetStyleColorName(element StyleElement) string
- func GetStyleMarker(text, fill, attr StyleElement) string
- func GetStyleOption(option StyleOption) bool
- func HighlightTrailingSpace(text, style string, offset uint) string
- func LoadStyleConfig() error
- func Modal(p tview.Primitive, width, height int) tview.Primitive
- func SaveStyleConfig() error
- func TrimEllipsisFront(data string, maxlen int) string
- type ActionEntry
- type ActionHandler
- func (actmap *ActionHandler) FormatSummary(names ...string) string
- func (actmap *ActionHandler) GetContext() string
- func (actmap *ActionHandler) GetShortcuts(name string) []ActionKey
- func (actmap *ActionHandler) HandleInput(event *tcell.EventKey) *tcell.EventKey
- func (actmap *ActionHandler) InvokeAction(name string) bool
- func (actmap *ActionHandler) ListActions() []string
- func (actmap *ActionHandler) RegisterAction(name, title string, impl ActionImpl, shortcuts ...ActionKey)
- func (actmap *ActionHandler) SetShortcuts(name string, shortcuts ...ActionKey) error
- type ActionImpl
- type ActionKey
- type ActionMap
- type AddProjectForm
- type AddProjectFormListener
- type ChoosePasswordForm
- type ChoosePasswordFormListener
- type CommentForm
- type CommentFormListener
- type ConfirmForm
- type ConfirmFormListener
- type DetailPage
- func (page *DetailPage) Activate()
- func (page *DetailPage) CommentFormCancel()
- func (page *DetailPage) CommentFormSave(text string, standAlone bool)
- func (page *DetailPage) GetKeyShortcuts() string
- func (page *DetailPage) GetName() string
- func (page *DetailPage) Refresh(mreq *model.MergeReq)
- func (page *DetailPage) SelectPatch(num int)
- func (page *DetailPage) SwitchVersion(version int)
- type DetailPageListener
- type Display
- func (display *Display) AddProjectFormAutoFillToken(server, project string) string
- func (display *Display) AddProjectFormCancel()
- func (display *Display) AddProjectFormConfirm(repo model.Repo)
- func (display *Display) ChoosePasswordFormConfirm(password string)
- func (display *Display) ConfirmFormResult(confirmed, dontaskagain bool)
- func (display *Display) DetailPageAcceptMergeReq(mreq *model.MergeReq)
- func (display *Display) DetailPageAddMergeReqComment(mreq *model.MergeReq, text string, standAlone bool, ...)
- func (display *Display) DetailPageAddMergeReqReply(mreq *model.MergeReq, thread, text string)
- func (display *Display) DetailPageApproveMergeReq(mreq *model.MergeReq)
- func (display *Display) DetailPageChangePatch(num int)
- func (display *Display) DetailPageLoadMergeReqCommitDiffs(mreq *model.MergeReq, commit *model.Commit)
- func (display *Display) DetailPageLoadMergeReqSeriesPatches(mreq *model.MergeReq, series *model.Series)
- func (display *Display) DetailPagePickVersion()
- func (display *Display) DetailPageQuit()
- func (display *Display) DetailPageRefreshMergeRequest(mreq *model.MergeReq)
- func (display *Display) DetailPageResolveMergeReqThread(mreq *model.MergeReq, thread string, resolved bool)
- func (display *Display) DetailPageRunCommand(mreq *model.MergeReq, ver *model.Series, patch *model.Commit)
- func (display *Display) DetailPageUnapproveMergeReq(mreq *model.MergeReq)
- func (display *Display) EditProjectFormCancel()
- func (display *Display) EditProjectFormConfirm(repo model.Repo)
- func (display *Display) FilterFormCancel()
- func (display *Display) FilterFormConfirm(info filter.FilterInfo)
- func (display *Display) IndexPagePickFilter()
- func (display *Display) IndexPagePickQuickFilter()
- func (display *Display) IndexPagePickSort()
- func (display *Display) IndexPageQuit()
- func (display *Display) IndexPageRefreshMergeRequests()
- func (display *Display) IndexPageRunCommand(mreq *model.MergeReq, ver *model.Series)
- func (display *Display) IndexPageViewMergeRequest(mreq model.MergeReq)
- func (display *Display) IndexPageViewMessages()
- func (display *Display) IndexPageViewProjects()
- func (display *Display) IndexPageViewReports()
- func (display *Display) MergeRequestNotify(mreq *model.MergeReq)
- func (display *Display) MessagesPageQuit()
- func (display *Display) OverviewPageAcceptMergeReq(mreq *model.MergeReq)
- func (display *Display) OverviewPageApproveMergeReq(mreq *model.MergeReq)
- func (display *Display) OverviewPageChangePatch(num int)
- func (display *Display) OverviewPagePickVersion()
- func (display *Display) OverviewPageQuit()
- func (display *Display) OverviewPageRefreshMergeRequest(mreq *model.MergeReq)
- func (display *Display) OverviewPageRunCommand(mreq *model.MergeReq, ver *model.Series, patch *model.Commit)
- func (display *Display) OverviewPageUnapproveMergeReq(mreq *model.MergeReq)
- func (display *Display) PacmanGameFinished()
- func (display *Display) PasswordFormConfirm(password string) error
- func (display *Display) ProjectsPageAddRepo()
- func (display *Display) ProjectsPageEditRepo(repo model.Repo)
- func (display *Display) ProjectsPageQuit()
- func (display *Display) RepoAdded(repo model.Repo)
- func (display *Display) RepoRemoved(repo model.Repo)
- func (display *Display) ReportFormCancel()
- func (display *Display) ReportFormConfirm(report model.Report)
- func (display *Display) ReportsPageAddReport()
- func (display *Display) ReportsPageApplyReport(report model.Report)
- func (display *Display) ReportsPageDeleteReport(report model.Report)
- func (display *Display) ReportsPageEditReport(report model.Report)
- func (display *Display) ReportsPageQuit()
- func (display *Display) ReportsPageSetDefault(report model.Report)
- func (display *Display) Run() error
- func (display *Display) RunCommandFormCancel()
- func (display *Display) RunCommandFormConfirm(cmdargs, cmdenv []string)
- func (display *Display) SnakeGameFinished()
- func (display *Display) SortFormCancel()
- func (display *Display) SortFormConfirm(info sorter.SorterInfo)
- func (display *Display) Status(msg string)
- func (display *Display) VersionFormCancel()
- func (display *Display) VersionFormConfirm(version int)
- type EditProjectForm
- type EditProjectFormListener
- type FilterForm
- type FilterFormListener
- type Form
- type IndexPage
- type IndexPageListener
- type Keymap
- type KeymapEntry
- type KeymapGroup
- type MergeReqListBatch
- type MessageBar
- type Messages
- type MessagesPage
- type MessagesPageListener
- type OverviewPage
- type OverviewPageListener
- type Page
- type PasswordForm
- type PasswordFormListener
- type PatchRegion
- type ProjectsPage
- type ProjectsPageListener
- type QuickFilterForm
- type ReportForm
- type ReportFormListener
- type ReportsPage
- type ReportsPageListener
- type RunCommandForm
- type RunCommandFormListener
- type SortForm
- type SortFormListener
- type StyleElement
- type StyleOption
- type VersionForm
- type VersionFormListener
Constants ¶
View Source
const BATCH_TIMER = time.Millisecond * 555
Variables ¶
This section is empty.
Functions ¶
func FormatReports ¶
func GetStyleAltStr ¶
func GetStyleAltStr(option StyleOption, trueStr, falseStr string) string
func GetStyleAttrMask ¶
func GetStyleAttrMask(element StyleElement) tcell.AttrMask
func GetStyleAttrName ¶
func GetStyleAttrName(element StyleElement) string
func GetStyleColor ¶
func GetStyleColor(element StyleElement) tcell.Color
func GetStyleColorName ¶
func GetStyleColorName(element StyleElement) string
func GetStyleMarker ¶
func GetStyleMarker(text, fill, attr StyleElement) string
func GetStyleOption ¶
func GetStyleOption(option StyleOption) bool
func HighlightTrailingSpace ¶
func LoadStyleConfig ¶
func LoadStyleConfig() error
func SaveStyleConfig ¶
func SaveStyleConfig() error
func TrimEllipsisFront ¶
Types ¶
type ActionEntry ¶
type ActionEntry struct { Title string Impl ActionImpl Shortcuts []ActionKey }
type ActionHandler ¶
type ActionHandler struct { Context string Actions map[string]ActionEntry Filter func(event *tcell.EventKey) bool }
func (*ActionHandler) FormatSummary ¶
func (actmap *ActionHandler) FormatSummary(names ...string) string
func (*ActionHandler) GetContext ¶
func (actmap *ActionHandler) GetContext() string
func (*ActionHandler) GetShortcuts ¶
func (actmap *ActionHandler) GetShortcuts(name string) []ActionKey
func (*ActionHandler) HandleInput ¶
func (actmap *ActionHandler) HandleInput(event *tcell.EventKey) *tcell.EventKey
func (*ActionHandler) InvokeAction ¶
func (actmap *ActionHandler) InvokeAction(name string) bool
func (*ActionHandler) ListActions ¶
func (actmap *ActionHandler) ListActions() []string
func (*ActionHandler) RegisterAction ¶
func (actmap *ActionHandler) RegisterAction(name, title string, impl ActionImpl, shortcuts ...ActionKey)
func (*ActionHandler) SetShortcuts ¶
func (actmap *ActionHandler) SetShortcuts(name string, shortcuts ...ActionKey) error
type ActionImpl ¶
type ActionImpl func() bool
type ActionKey ¶
type ActionKey struct { Key tcell.Key Modifiers tcell.ModMask Rune rune }
func NewActionKey ¶
func NewActionKey(key tcell.Key, mods tcell.ModMask) ActionKey
func NewActionRune ¶
type ActionMap ¶
type ActionMap interface { RegisterAction(name, title string, impl ActionImpl, shortcuts ...ActionKey) SetShortcuts(name string, shortcut ...ActionKey) error InvokeAction(name string) bool HandleInput(event *tcell.EventKey) *tcell.EventKey FormatSummary(name ...string) string GetContext() string ListActions() []string GetShortcuts(name string) []ActionKey }
func NewActionHandler ¶
type AddProjectForm ¶
type AddProjectForm struct { tview.Primitive Form *tview.Form Application *tview.Application Listener AddProjectFormListener Directory *tview.InputField Remote *tview.InputField NickName *tview.InputField Server *tview.InputField Project *tview.InputField Token *tview.InputField Global *tview.Checkbox }
func NewAddProjectForm ¶
func NewAddProjectForm(app *tview.Application, listener AddProjectFormListener) *AddProjectForm
func (*AddProjectForm) GetName ¶
func (form *AddProjectForm) GetName() string
func (*AddProjectForm) LoadLocalProject ¶
func (form *AddProjectForm) LoadLocalProject()
type AddProjectFormListener ¶
type ChoosePasswordForm ¶
type ChoosePasswordForm struct { tview.Primitive Layout *tview.Flex Info *tview.TextView Form *tview.Form Warning *tview.TextView Listener ChoosePasswordFormListener Password string PasswordAgain string }
func NewChoosePasswordForm ¶
func NewChoosePasswordForm(listener ChoosePasswordFormListener) *ChoosePasswordForm
func (*ChoosePasswordForm) GetName ¶
func (form *ChoosePasswordForm) GetName() string
type ChoosePasswordFormListener ¶
type ChoosePasswordFormListener interface {
ChoosePasswordFormConfirm(password string)
}
type CommentForm ¶
type CommentForm struct { *tview.Form Message *tview.TextView Text *tview.TextArea Listener CommentFormListener StartThread *tview.Checkbox Context *model.CommentContext }
func NewCommentForm ¶
func NewCommentForm(listener CommentFormListener) *CommentForm
func (*CommentForm) Activate ¶
func (form *CommentForm) Activate(app *tview.Application, context *model.CommentContext, reply int, allowStandalone bool)
func (*CommentForm) IsEditFocused ¶
func (form *CommentForm) IsEditFocused() bool
type CommentFormListener ¶
type ConfirmForm ¶
type ConfirmForm struct { tview.Primitive Name string Layout *tview.Flex Info *tview.TextView Form *tview.Form Listener ConfirmFormListener DontAskAgain bool }
func NewConfirmForm ¶
func NewConfirmForm(name, msg string, listener ConfirmFormListener) *ConfirmForm
func (*ConfirmForm) GetName ¶
func (form *ConfirmForm) GetName() string
type ConfirmFormListener ¶
type ConfirmFormListener interface {
ConfirmFormResult(confirmed, dontaskagain bool)
}
type DetailPage ¶
type DetailPage struct { *tview.Flex ActionMap Application *tview.Application Listener DetailPageListener Patches *tview.Table Header *tview.Frame Patch *model.Commit Content *tview.TextView ContentLine int ContentScroll int ContentLen int ContentRegions []PatchRegion CommentText *tview.TextArea CommentForm *CommentForm CommentFrame *tview.Frame CommentEdit bool CommentRegion *PatchRegion CommentOffset uint CommentShow bool MergeReq *model.MergeReq Version int }
func NewDetailPage ¶
func NewDetailPage(app *tview.Application, listener DetailPageListener) *DetailPage
func (*DetailPage) Activate ¶
func (page *DetailPage) Activate()
func (*DetailPage) CommentFormCancel ¶
func (page *DetailPage) CommentFormCancel()
func (*DetailPage) CommentFormSave ¶
func (page *DetailPage) CommentFormSave(text string, standAlone bool)
func (*DetailPage) GetKeyShortcuts ¶
func (page *DetailPage) GetKeyShortcuts() string
func (*DetailPage) GetName ¶
func (page *DetailPage) GetName() string
func (*DetailPage) Refresh ¶
func (page *DetailPage) Refresh(mreq *model.MergeReq)
func (*DetailPage) SelectPatch ¶
func (page *DetailPage) SelectPatch(num int)
func (*DetailPage) SwitchVersion ¶
func (page *DetailPage) SwitchVersion(version int)
type DetailPageListener ¶
type DetailPageListener interface { DetailPageQuit() DetailPageRefreshMergeRequest(mreq *model.MergeReq) DetailPageAddMergeReqComment(mreq *model.MergeReq, text string, standAlone bool, context *model.CommentContext) DetailPageAddMergeReqReply(mreq *model.MergeReq, thread, text string) DetailPageResolveMergeReqThread(mreq *model.MergeReq, thread string, resolved bool) DetailPageLoadMergeReqSeriesPatches(mreq *model.MergeReq, series *model.Series) DetailPageLoadMergeReqCommitDiffs(mreq *model.MergeReq, commit *model.Commit) DetailPageAcceptMergeReq(mreq *model.MergeReq) DetailPageApproveMergeReq(mreq *model.MergeReq) DetailPageUnapproveMergeReq(mreq *model.MergeReq) DetailPagePickVersion() DetailPageChangePatch(num int) DetailPageRunCommand(mreq *model.MergeReq, series *model.Series, commit *model.Commit) }
type Display ¶
type Display struct { *tview.Application TokenKey [32]byte Config *config.AppConfig Keymap *Keymap Engine controller.Engine MergeReqs MergeReqListBatch Repos []model.Repo Users []string Layout *tview.Flex KeyShortcuts *tview.TextView StatusBar *tview.TextView MessageBar *MessageBar Pages *tview.Pages IndexPage *IndexPage OverviewPage *OverviewPage DetailPage *DetailPage ProjectsPage *ProjectsPage ReportsPage *ReportsPage MessagesPage *MessagesPage ThisPage Page Snake *snake.Game Pacman *pacman.Game FormActive bool AddProjectForm *AddProjectForm EditProjectForm *EditProjectForm ChoosePasswordForm *ChoosePasswordForm PasswordForm *PasswordForm SortForm *SortForm FilterForm *FilterForm QuickFilterForm *QuickFilterForm VersionForm *VersionForm ExitConfirmForm *ConfirmForm ReportForm *ReportForm RunCommandForm *RunCommandForm CtrlC bool Filter filter.FilterInfo Sorter sorter.SorterInfo ReportsList model.Reports }
func (*Display) AddProjectFormAutoFillToken ¶
func (*Display) AddProjectFormCancel ¶
func (display *Display) AddProjectFormCancel()
func (*Display) AddProjectFormConfirm ¶
func (*Display) ChoosePasswordFormConfirm ¶
func (*Display) ConfirmFormResult ¶
func (*Display) DetailPageAcceptMergeReq ¶
func (*Display) DetailPageAddMergeReqComment ¶
func (*Display) DetailPageAddMergeReqReply ¶
func (*Display) DetailPageApproveMergeReq ¶
func (*Display) DetailPageChangePatch ¶
func (*Display) DetailPageLoadMergeReqCommitDiffs ¶
func (*Display) DetailPageLoadMergeReqSeriesPatches ¶
func (*Display) DetailPagePickVersion ¶
func (display *Display) DetailPagePickVersion()
func (*Display) DetailPageQuit ¶
func (display *Display) DetailPageQuit()
func (*Display) DetailPageRefreshMergeRequest ¶
func (*Display) DetailPageResolveMergeReqThread ¶
func (*Display) DetailPageRunCommand ¶
func (*Display) DetailPageUnapproveMergeReq ¶
func (*Display) EditProjectFormCancel ¶
func (display *Display) EditProjectFormCancel()
func (*Display) EditProjectFormConfirm ¶
func (*Display) FilterFormCancel ¶
func (display *Display) FilterFormCancel()
func (*Display) FilterFormConfirm ¶
func (display *Display) FilterFormConfirm(info filter.FilterInfo)
func (*Display) IndexPagePickFilter ¶
func (display *Display) IndexPagePickFilter()
func (*Display) IndexPagePickQuickFilter ¶
func (display *Display) IndexPagePickQuickFilter()
func (*Display) IndexPagePickSort ¶
func (display *Display) IndexPagePickSort()
func (*Display) IndexPageQuit ¶
func (display *Display) IndexPageQuit()
func (*Display) IndexPageRefreshMergeRequests ¶
func (display *Display) IndexPageRefreshMergeRequests()
func (*Display) IndexPageRunCommand ¶
func (*Display) IndexPageViewMergeRequest ¶
func (*Display) IndexPageViewMessages ¶
func (display *Display) IndexPageViewMessages()
func (*Display) IndexPageViewProjects ¶
func (display *Display) IndexPageViewProjects()
func (*Display) IndexPageViewReports ¶
func (display *Display) IndexPageViewReports()
func (*Display) MergeRequestNotify ¶
func (*Display) MessagesPageQuit ¶
func (display *Display) MessagesPageQuit()
func (*Display) OverviewPageAcceptMergeReq ¶
func (*Display) OverviewPageApproveMergeReq ¶
func (*Display) OverviewPageChangePatch ¶
func (*Display) OverviewPagePickVersion ¶
func (display *Display) OverviewPagePickVersion()
func (*Display) OverviewPageQuit ¶
func (display *Display) OverviewPageQuit()
func (*Display) OverviewPageRefreshMergeRequest ¶
func (*Display) OverviewPageRunCommand ¶
func (*Display) OverviewPageUnapproveMergeReq ¶
func (*Display) PacmanGameFinished ¶
func (display *Display) PacmanGameFinished()
func (*Display) PasswordFormConfirm ¶
func (*Display) ProjectsPageAddRepo ¶
func (display *Display) ProjectsPageAddRepo()
func (*Display) ProjectsPageEditRepo ¶
func (*Display) ProjectsPageQuit ¶
func (display *Display) ProjectsPageQuit()
func (*Display) RepoRemoved ¶
func (*Display) ReportFormCancel ¶
func (display *Display) ReportFormCancel()
func (*Display) ReportFormConfirm ¶
func (*Display) ReportsPageAddReport ¶
func (display *Display) ReportsPageAddReport()
func (*Display) ReportsPageApplyReport ¶
func (*Display) ReportsPageDeleteReport ¶
func (*Display) ReportsPageEditReport ¶
func (*Display) ReportsPageQuit ¶
func (display *Display) ReportsPageQuit()
func (*Display) ReportsPageSetDefault ¶
func (*Display) RunCommandFormCancel ¶
func (display *Display) RunCommandFormCancel()
func (*Display) RunCommandFormConfirm ¶
func (*Display) SnakeGameFinished ¶
func (display *Display) SnakeGameFinished()
func (*Display) SortFormCancel ¶
func (display *Display) SortFormCancel()
func (*Display) SortFormConfirm ¶
func (display *Display) SortFormConfirm(info sorter.SorterInfo)
func (*Display) VersionFormCancel ¶
func (display *Display) VersionFormCancel()
func (*Display) VersionFormConfirm ¶
type EditProjectForm ¶
type EditProjectForm struct { tview.Primitive Form *tview.Form Application *tview.Application Listener EditProjectFormListener Directory *tview.InputField Remote *tview.InputField NickName *tview.InputField Server *tview.InputField Project *tview.InputField Token *tview.InputField Global *tview.Checkbox State *tview.DropDown Repo model.Repo }
func NewEditProjectForm ¶
func NewEditProjectForm(app *tview.Application, listener EditProjectFormListener) *EditProjectForm
func (*EditProjectForm) GetName ¶
func (form *EditProjectForm) GetName() string
func (*EditProjectForm) SetRepo ¶
func (form *EditProjectForm) SetRepo(repo model.Repo)
type EditProjectFormListener ¶
type FilterForm ¶
type FilterForm struct { tview.Primitive Form *tview.Form Listener FilterFormListener Projects *tview.DropDown Authors *tview.DropDown StateOpen bool StateClosed bool StateLocked bool StateMerged bool StatusNew bool StatusUpdated bool StatusOld bool StatusRead bool Project string AgeUnit string AgeVal time.Duration Author string Label string WIP *bool }
func NewFilterForm ¶
func NewFilterForm(listener FilterFormListener) *FilterForm
func (*FilterForm) GetName ¶
func (form *FilterForm) GetName() string
type FilterFormListener ¶
type FilterFormListener interface { FilterFormConfirm(info filter.FilterInfo) FilterFormCancel() }
type IndexPage ¶
type IndexPage struct { *tview.Frame ActionMap Application *tview.Application Listener IndexPageListener MergeReqs *tview.Table }
func NewIndexPage ¶
func NewIndexPage(app *tview.Application, listener IndexPageListener) *IndexPage
func (*IndexPage) GetKeyShortcuts ¶
func (*IndexPage) GetSelectedMergeRequest ¶
func (*IndexPage) SelectNextNewishMergeRequest ¶
func (page *IndexPage) SelectNextNewishMergeRequest()
type IndexPageListener ¶
type IndexPageListener interface { IndexPageQuit() IndexPageViewMergeRequest(mreq model.MergeReq) IndexPageViewProjects() IndexPageViewReports() IndexPageViewMessages() IndexPageRefreshMergeRequests() IndexPagePickSort() IndexPagePickFilter() IndexPagePickQuickFilter() IndexPageRunCommand(mreq *model.MergeReq, series *model.Series) }
type Keymap ¶
type Keymap struct {
Groups map[string]KeymapGroup
}
func (*Keymap) LoadConfig ¶
func (*Keymap) SaveConfig ¶
type KeymapEntry ¶
type KeymapGroup ¶
type KeymapGroup struct {
Entries map[string]KeymapEntry
}
type MergeReqListBatch ¶
type MergeReqListBatch struct { model.MergeReqList // Invoked from controller background goroutine Notify func([]*model.MergeReq) Pending chan *model.MergeReq }
func NewMergeReqListBatch ¶
func NewMergeReqListBatch(notify func([]*model.MergeReq)) MergeReqListBatch
func (*MergeReqListBatch) InsertBatch ¶
func (mbatch *MergeReqListBatch) InsertBatch(mreqs []*model.MergeReq)
Invoked from tview main goroutine
func (*MergeReqListBatch) InsertDelayed ¶
func (mbatch *MergeReqListBatch) InsertDelayed(mreq *model.MergeReq)
Invoked from controller background goroutine
type MessageBar ¶
type MessageBar struct { App *tview.Application Text *tview.TextView Expiry *time.Time Clear chan time.Duration }
func NewMessageBar ¶
func NewMessageBar(app *tview.Application) *MessageBar
func (*MessageBar) Info ¶
func (msgbar *MessageBar) Info(msg string)
type MessagesPage ¶
type MessagesPage struct { *tview.Frame ActionMap Application *tview.Application Listener MessagesPageListener Content *tview.TextView }
func NewMessagesPage ¶
func NewMessagesPage(app *tview.Application, listener MessagesPageListener) *MessagesPage
func (*MessagesPage) Activate ¶
func (page *MessagesPage) Activate()
func (*MessagesPage) GetKeyShortcuts ¶
func (page *MessagesPage) GetKeyShortcuts() string
func (*MessagesPage) GetName ¶
func (page *MessagesPage) GetName() string
func (*MessagesPage) Info ¶
func (page *MessagesPage) Info(msg string)
type MessagesPageListener ¶
type MessagesPageListener interface {
MessagesPageQuit()
}
type OverviewPage ¶
type OverviewPage struct { *tview.Frame ActionMap Application *tview.Application Listener OverviewPageListener Patches *tview.Table MergeReq *model.MergeReq Version int }
func NewOverviewPage ¶
func NewOverviewPage(app *tview.Application, listener OverviewPageListener) *OverviewPage
func (*OverviewPage) Activate ¶
func (page *OverviewPage) Activate()
func (*OverviewPage) GetKeyShortcuts ¶
func (page *OverviewPage) GetKeyShortcuts() string
func (*OverviewPage) GetName ¶
func (page *OverviewPage) GetName() string
func (*OverviewPage) Refresh ¶
func (page *OverviewPage) Refresh(mreq *model.MergeReq)
func (*OverviewPage) SelectPatch ¶
func (page *OverviewPage) SelectPatch(num int)
func (*OverviewPage) SwitchVersion ¶
func (page *OverviewPage) SwitchVersion(version int)
type OverviewPageListener ¶
type OverviewPageListener interface { OverviewPageQuit() OverviewPageRefreshMergeRequest(mreq *model.MergeReq) OverviewPageAcceptMergeReq(mreq *model.MergeReq) OverviewPageApproveMergeReq(mreq *model.MergeReq) OverviewPageUnapproveMergeReq(mreq *model.MergeReq) OverviewPagePickVersion() OverviewPageChangePatch(num int) OverviewPageRunCommand(mreq *model.MergeReq, series *model.Series, commit *model.Commit) }
type PasswordForm ¶
type PasswordForm struct { tview.Primitive Layout *tview.Flex Info *tview.TextView Form *tview.Form Warning *tview.TextView Listener PasswordFormListener Password string }
func NewPasswordForm ¶
func NewPasswordForm(listener PasswordFormListener) *PasswordForm
func (*PasswordForm) GetName ¶
func (form *PasswordForm) GetName() string
type PasswordFormListener ¶
type PatchRegion ¶
type PatchRegion struct { IDStart int IDEnd int Type diff.DiffLineType OldFile string OldLine uint NewFile string NewLine uint Thread string ThreadIdx int }
func FormatCommit ¶
func FormatCommit(commit *model.Commit, series *model.Series, commentShow bool, threads []model.CommentThread) ([]string, []PatchRegion, error)
func FormatThreads ¶
func FormatThreads(threads []model.CommentThread, threadidxs []int, filemarkers bool, endsep bool, region *int, indent string) (lines []string, regions []PatchRegion)
type ProjectsPage ¶
type ProjectsPage struct { *tview.Frame ActionMap Application *tview.Application Listener ProjectsPageListener Projects *tview.Table }
func NewProjectsPage ¶
func NewProjectsPage(app *tview.Application, listener ProjectsPageListener) *ProjectsPage
func (*ProjectsPage) Activate ¶
func (page *ProjectsPage) Activate()
func (*ProjectsPage) GetKeyShortcuts ¶
func (page *ProjectsPage) GetKeyShortcuts() string
func (*ProjectsPage) GetName ¶
func (page *ProjectsPage) GetName() string
func (*ProjectsPage) Refresh ¶
func (page *ProjectsPage) Refresh(repos model.Repos)
type ProjectsPageListener ¶
type QuickFilterForm ¶
type QuickFilterForm struct { tview.Primitive Form *tview.Form Listener FilterFormListener Error *tview.TextView Filter *tview.InputField FilterString string }
func NewQuickFilterForm ¶
func NewQuickFilterForm(listener FilterFormListener) *QuickFilterForm
func (*QuickFilterForm) GetName ¶
func (form *QuickFilterForm) GetName() string
func (*QuickFilterForm) SetMergeReqFilter ¶
func (form *QuickFilterForm) SetMergeReqFilter(filterexpr string)
type ReportForm ¶
type ReportForm struct { tview.Primitive Form *tview.Form Listener ReportFormListener Error *tview.TextView Name *tview.InputField Filter *tview.InputField Sorter *tview.InputField Report model.Report }
func NewReportForm ¶
func NewReportForm(listener ReportFormListener) *ReportForm
func (*ReportForm) GetName ¶
func (form *ReportForm) GetName() string
func (*ReportForm) SetReport ¶
func (form *ReportForm) SetReport(report model.Report)
type ReportFormListener ¶
type ReportsPage ¶
type ReportsPage struct { *tview.Frame ActionMap Application *tview.Application Listener ReportsPageListener Reports *tview.Table }
func NewReportsPage ¶
func NewReportsPage(app *tview.Application, listener ReportsPageListener) *ReportsPage
func (*ReportsPage) Activate ¶
func (page *ReportsPage) Activate()
func (*ReportsPage) GetKeyShortcuts ¶
func (page *ReportsPage) GetKeyShortcuts() string
func (*ReportsPage) GetName ¶
func (page *ReportsPage) GetName() string
func (*ReportsPage) Refresh ¶
func (page *ReportsPage) Refresh(reports model.Reports)
type ReportsPageListener ¶
type RunCommandForm ¶
type RunCommandForm struct { tview.Primitive Form *tview.Form Listener RunCommandFormListener Error *tview.TextView Command *tview.InputField UseShell *tview.Checkbox MergeReq *model.MergeReq Version *model.Series Patch *model.Commit }
func NewRunCommandForm ¶
func NewRunCommandForm(listener RunCommandFormListener) *RunCommandForm
func (*RunCommandForm) GetName ¶
func (form *RunCommandForm) GetName() string
func (*RunCommandForm) SetContext ¶
type RunCommandFormListener ¶
type RunCommandFormListener interface { RunCommandFormConfirm(cmdargs, cmdenv []string) RunCommandFormCancel() }
type SortForm ¶
type SortForm struct { tview.Primitive Form *tview.Form Listener SortFormListener Order int Reverse bool }
func NewSortForm ¶
func NewSortForm(listener SortFormListener) *SortForm
type SortFormListener ¶
type SortFormListener interface { SortFormConfirm(info sorter.SorterInfo) SortFormCancel() }
type StyleElement ¶
type StyleElement int
const ( ELEMENT_PRIMITIVE_FILL StyleElement = iota ELEMENT_CONTRAST_FILL ELEMENT_MORE_CONTRAST_FILL ELEMENT_PRIMARY_TEXT ELEMENT_SECONDARY_TEXT ELEMENT_TERTIARY_TEXT ELEMENT_INVERSE_TEXT ELEMENT_CONTRAST_SECONDARY_TEXT ELEMENT_BORDER ELEMENT_TITLE ELEMENT_GRAPHICS ELEMENT_STATUS_TEXT ELEMENT_STATUS_FILL ELEMENT_STATUS_ATTR ELEMENT_SHORTCUTS_TEXT ELEMENT_SHORTCUTS_FILL ELEMENT_SHORTCUTS_ATTR ELEMENT_MREQS_ACTIVE_TEXT ELEMENT_MREQS_ACTIVE_FILL ELEMENT_MREQS_ACTIVE_ATTR ELEMENT_MREQS_INACTIVE_TEXT ELEMENT_MREQS_INACTIVE_FILL ELEMENT_MREQS_INACTIVE_ATTR ELEMENT_HEADER_TEXT ELEMENT_HEADER_FILL ELEMENT_HEADER_ATTR ELEMENT_SUMMARY_SEPARATOR_TEXT ELEMENT_SUMMARY_SEPARATOR_FILL ELEMENT_SUMMARY_SEPARATOR_ATTR ELEMENT_SUMMARY_HEADER_TEXT ELEMENT_SUMMARY_HEADER_FILL ELEMENT_SUMMARY_HEADER_ATTR ELEMENT_SUMMARY_TITLE_TEXT ELEMENT_SUMMARY_TITLE_FILL ELEMENT_SUMMARY_TITLE_ATTR ELEMENT_SUMMARY_DATE_TEXT ELEMENT_SUMMARY_DATE_FILL ELEMENT_SUMMARY_DATE_ATTR ELEMENT_SUMMARY_AUTHOR_TEXT ELEMENT_SUMMARY_AUTHOR_FILL ELEMENT_SUMMARY_AUTHOR_ATTR ELEMENT_COMMENT_QUOTED_TEXT ELEMENT_COMMENT_QUOTED_FILL ELEMENT_COMMENT_QUOTED_ATTR ELEMENT_PROJECTS_ACTIVE_TEXT ELEMENT_PROJECTS_ACTIVE_FILL ELEMENT_PROJECTS_ACTIVE_ATTR ELEMENT_PROJECTS_INACTIVE_TEXT ELEMENT_PROJECTS_INACTIVE_FILL ELEMENT_PROJECTS_INACTIVE_ATTR ELEMENT_REPORTS_ACTIVE_TEXT ELEMENT_REPORTS_ACTIVE_FILL ELEMENT_REPORTS_ACTIVE_ATTR ELEMENT_REPORTS_INACTIVE_TEXT ELEMENT_REPORTS_INACTIVE_FILL ELEMENT_REPORTS_INACTIVE_ATTR ELEMENT_DIFF_PREAMBLE_TEXT ELEMENT_DIFF_PREAMBLE_FILL ELEMENT_DIFF_PREAMBLE_ATTR ELEMENT_DIFF_HUNK_TEXT ELEMENT_DIFF_HUNK_FILL ELEMENT_DIFF_HUNK_ATTR ELEMENT_DIFF_LINE_TEXT ELEMENT_DIFF_LINE_FILL ELEMENT_DIFF_LINE_ATTR ELEMENT_DIFF_CONTEXT_TEXT ELEMENT_DIFF_CONTEXT_FILL ELEMENT_DIFF_CONTEXT_ATTR ELEMENT_DIFF_ADDED_TEXT ELEMENT_DIFF_ADDED_FILL ELEMENT_DIFF_ADDED_ATTR ELEMENT_DIFF_REMOVED_TEXT ELEMENT_DIFF_REMOVED_FILL ELEMENT_DIFF_REMOVED_ATTR ELEMENT_DIFF_ALERT_TEXT ELEMENT_DIFF_ALERT_FILL ELEMENT_DIFF_ALERT_ATTR ELEMENT_DIFF_WHITESPACE_FILL ELEMENT_MESSAGES_TEXT ELEMENT_MESSAGES_FILL ELEMENT_MESSAGES_ATTR )
type VersionForm ¶
type VersionForm struct { tview.Primitive Form *tview.Form Listener VersionFormListener MergeReq *model.MergeReq Version *tview.DropDown VersionSearchNum int VersionSearchLast time.Time // contains filtered or unexported fields }
func NewVersionForm ¶
func NewVersionForm(listener VersionFormListener) *VersionForm
func (*VersionForm) Focus ¶
func (form *VersionForm) Focus(delegate func(p tview.Primitive))
func (*VersionForm) GetName ¶
func (form *VersionForm) GetName() string
func (*VersionForm) Refresh ¶
func (form *VersionForm) Refresh(mreq *model.MergeReq)
type VersionFormListener ¶
type VersionFormListener interface { VersionFormConfirm(version int) VersionFormCancel() }
Source Files
¶
- actionmap.go
- addprojectform.go
- choosepasswordform.go
- comment.go
- commentform.go
- confirmform.go
- detailpage.go
- display.go
- editprojectform.go
- filterform.go
- formhelpers.go
- indexpage.go
- keymap.go
- mergereqbatch.go
- messagebar.go
- messages.go
- messagespage.go
- overviewpage.go
- page.go
- passwordform.go
- patch.go
- projectspage.go
- quickfilterform.go
- reportform.go
- reportspage.go
- runcommandform.go
- sortform.go
- style.go
- utils.go
- versionform.go
Click to show internal directories.
Click to hide internal directories.