ui

package
v0.0.0-...-db02e39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableColumnPadding = 2
	MaxSummaryColWidth = 45
	MaxStatusColWidth  = 12
)
View Source
const (
	MessageCreateNewWorkspace        = "Create new workspace "
	MessageEditWorkspace             = "Edit workspace "
	MessageEnterUsername             = "Jira username/email: "
	MessageEnterJiraUrl              = "Jira URL: "
	MessageEnterJiraUrlExample       = "[ex. https://my-jira.atlassian.net]: "
	MessageSelectWorkspace           = "Select workspace or ESC to cancel"
	MessageSelectWorkspaceSuccess    = "Workspace has been successfully switched to %s"
	MessageQuestionMark              = "? "
	MessageEnterJiraApiToken         = "Jira Api Token: "
	MessageEnterJiraTokenType        = "Jira Token Type: "
	MessageEnterJiraTokenNumber      = "Enter a number (Default is 1): "
	MessageProjectLabel              = "Project: "
	MessageIssueLabel                = "Issue: "
	MessageLabelStatus               = "Status: "
	MessageTypeStatus                = "Type: "
	MessageLabelAssignee             = "Assignee: "
	MessageLabelLabel                = "Label: "
	MessageLabelReporter             = "Reporter: "
	MessageJqlLabel                  = "JQL: "
	MessageSearchIssuesLoading       = "Fetching"
	MessageSearchLabelsLoading       = "Fetching"
	MessageSearchBoardsLoading       = "Fetching"
	MessageSelectIssue               = "Select issue or ESC to cancel"
	MessageSelectUser                = "Select user or ESC to cancel"
	MessageSelectLabel               = "Select label or ESC to cancel"
	MessageSelectBoard               = "Select board or ESC to cancel"
	MessageSelectFilter              = "Select filter or ESC to cancel"
	MessageSearchProjectsLoading     = "Fetching projects"
	MessageSelectProject             = "Select project or ESC to exit"
	MessageChangingAssigneeTo        = "Are you sure about changing %s assignee to [%s]?"
	MessageCannotAssignUser          = "Cannot assign user %s to ticket %s. Reason: %s AccountId: %s"
	MessageCannotAddLabel            = "Cannot add label %s to ticket %s. Reason: %s"
	MessageCannotAddComment          = "Cannot add comment to ticket %s. Reason: %s"
	MessageAssignSuccess             = "User %s has been successfully assigned to issue %s."
	MessageAddLabelSuccess           = "Label %s has been successfully added to issue %s."
	MessageCommentSuccess            = "Comment has been successfully added to issue %s."
	MessageUsersFuzzyFind            = "Select new assignee or ESC to cancel"
	MessageLabelFuzzyFind            = "Select existing label or type new one or ESC to cancel"
	MessageCannotFindStatusForColumn = "Cannot find valid transition status."
	MessageAssigningUser             = "Assigning user"
	MessageAddingLabel               = "Adding label"
	MessageAddingComment             = "Adding comment"
	MessageUnassigned                = "Unassigned"
	MessageChangingStatusTo          = "Are you sure about changing %s status to [%s]?"
	MessageStatusFuzzyFind           = "Select status or ESC to cancel"
	MessageChangingStatus            = "Changing status"
	MessageChangeStatusSuccess       = "Status for issue %s has been successfully changed to %s."
	MessageAll                       = "All"
	MessageTypeCommentAndSave        = "Type new comment, and press F1 to save:"
	MessageTypeJqlAndSave            = "Type new JQL, and press F1 to save:"
	MessageSummary                   = "Summary"
	MessageDescription               = "Description"
	MessageLabels                    = "Labels"
	MessageChangeStatus              = "Change status "
	MessageByStatus                  = "by status "
	MessageByAssignee                = "by assignee "
	MessageByLabel                   = "by label "
	MessageBoards                    = "boards"
	MessageAssignUser                = "Assign user "
	MessageComment                   = "Comment "
	MessageLabel                     = "Label "
	MessageYes                       = "Yes "
	MessageOpen                      = "Open "
	MessageSave                      = "Save "
	MessageScroll                    = "Scroll "
	MessageNavigate                  = "Navigate "
	MessageMoveIssue                 = "Move issue "
	MessageSelect                    = "Select "
	MessageUnselect                  = "Unselect "
	MessageNew                       = "New "
	MessageDelete                    = "Delete "
	MessageJqlFuzzyFind              = "Select or type new jql or ESC to cancel"
	MessageJqlAddNew                 = "Are you sure about adding a new JQL [%s] ?"
	MessageJqlRemoveConfirm          = "Do you really want to remove JQL [%s] ?"
	MessageCannotAddNewJql           = "Cannot add new jql. Reason: %s"
	MessageJqlAddSuccess             = "New JQL has been successfully added to your workspace."
	MessageJqlRemoveSuccess          = "JQL has been successfully removed from your workspace."
	MessageCustomJql                 = "Custom JQL"
)
View Source
const (
	ActionAssigneeChange app.ActionBarAction = iota
	ActionStatusChange
	ActionSearchByStatus
	ActionSearchByAssignee
	ActionSearchByLabel
	ActionBoards
	ActionComment
	ActionCancel
	ActionOpen
	ActionYes
	ActionAddLabel
	ActionSelect
	ActionUnselect
)

Variables

This section is empty.

Functions

func CreateArrowsNavigateItem

func CreateArrowsNavigateItem() *app.ActionBarItem

func CreateBottomActionBar

func CreateBottomActionBar(text1 string, text2 string) *app.ActionBar

func CreateBottomActionBarWithItems

func CreateBottomActionBarWithItems(items []NavItemConfig) *app.ActionBar

func CreateBottomLeftBar

func CreateBottomLeftBar() *app.ActionBar

func CreateIssueTopBar

func CreateIssueTopBar(issue *jira.Issue) *app.ActionBar

func CreateMoveArrowsItem

func CreateMoveArrowsItem() *app.ActionBarItem

func CreateScrollBarItem

func CreateScrollBarItem() *app.ActionBarItem

func CreateSelectItem

func CreateSelectItem() *app.ActionBarItem

func CreateTopActionBar

func CreateTopActionBar(text1 string, text2 string) *app.ActionBar

func CreateTopActionBarWithItems

func CreateTopActionBarWithItems(items []NavItemConfig) *app.ActionBar

func CreateUnSelectItem

func CreateUnSelectItem() *app.ActionBarItem

func NewCancelBarItem

func NewCancelBarItem() *app.ActionBarItem

func NewOpenBarItem

func NewOpenBarItem() *app.ActionBarItem

func NewSaveBarItem

func NewSaveBarItem() *app.ActionBarItem

func NewTextWriterView

func NewTextWriterView(args *TextWriterArgs) app.View

func NewYesBarItem

func NewYesBarItem() *app.ActionBarItem

func RegisterGoTo

func RegisterGoTo()

Types

type NavItemConfig struct {
	Text1  string
	Text2  string
	Action app.ActionBarAction
	Key    tcell.Key
	Rune   rune
}

type TextWriterArgs

type TextWriterArgs struct {
	MaxLength    int
	TextConsumer func(string)
	GoBack       func()
	Header       string
}

type TextWriterView

type TextWriterView struct {
	app.View
	// contains filtered or unexported fields
}

TODO - should be here?

func (*TextWriterView) Destroy

func (view *TextWriterView) Destroy()

func (*TextWriterView) Draw

func (view *TextWriterView) Draw(screen tcell.Screen)

func (*TextWriterView) HandleKeyEvent

func (view *TextWriterView) HandleKeyEvent(ev *tcell.EventKey)

func (*TextWriterView) Init

func (view *TextWriterView) Init()

func (*TextWriterView) Resize

func (view *TextWriterView) Resize(screenX, screenY int)

func (*TextWriterView) Update

func (view *TextWriterView) Update()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL