repostable

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package repostable is a Model that renders git repo states in a table. Providing functionality like filterning

Index

Constants

View Source
const (
	RepoW        = 40
	BranchW      = 40
	RemoteStateW = 20 //(uncommited files count + aheadW + behindW + 4 space)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table struct {
	Theme theme.Theme
	// contains filtered or unexported fields
}

func (*Table) Blur

func (rt *Table) Blur()

Blur removes focus from table

func (*Table) Cursor

func (rt *Table) Cursor() int

Cursor returns the index of the selected row.

func (*Table) Filter

func (rt *Table) Filter(query string)

Filter filters repo states based on repo name. Then update table based on filtered repos

func (*Table) Focus

func (rt *Table) Focus()

Focus bring focus to table

func (*Table) GetCurrentRepoState

func (rt *Table) GetCurrentRepoState() *report.RepoState

func (*Table) GetRepoStateAt

func (rt *Table) GetRepoStateAt(index int) *report.RepoState

func (Table) Init

func (rt Table) Init() tea.Cmd

func (*Table) InitUI

func (rt *Table) InitUI(
	width int,
	height int,
)

func (*Table) ReposCount added in v1.3.1

func (rt *Table) ReposCount() int

func (*Table) SetReport

func (rt *Table) SetReport(report report.ScanReport)

func (Table) Update

func (rt Table) Update(msg tea.Msg) (Table, tea.Cmd)

func (*Table) UpdateRepoState

func (rt *Table) UpdateRepoState(index int, newState report.RepoState)

func (*Table) UpdateWindowSize

func (rt *Table) UpdateWindowSize(width int, height int)

func (Table) View

func (rt Table) View() string

Jump to

Keyboard shortcuts

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