shared

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyPrintIssue

func PrettyPrintIssue(details *discussion.Details, width int, height int) string

PrettyPrintIssue renders the passed discussion as markdown.

func SelectConfig

func SelectConfig(details []repository.Details, u *url.URL) (*configuration.Config, error)

SelectConfig returns the config associated with the URL if a URL is passed. Otherwise, a remote.Details is returned.

func ViewportInitSize

func ViewportInitSize(msg *tea.WindowSizeMsg, issueID string) viewport.Model

ViewportInitSize creates a viewport with the given size.

func ViewportSetSize

func ViewportSetSize(vp *viewport.Model, msg *tea.WindowSizeMsg, issueID string)

ViewportSetSize sets the size of the viewport with regard to its margins.

func ViewportView

func ViewportView(vp *viewport.Model, issueID string) string

ViewportView renders the passed viewport.

Types

type Shared

type Shared struct {
	IssueID string
	URL     *url.URL
	Details []repository.Details
	Spinner spinner.Model
}

Shared contains data that is used by the all issue and single issue TUI.

Jump to

Keyboard shortcuts

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