ui

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	App                *tview.Application
	MainFlex           *tview.Flex
	ProgressBar        *tview.TextView
	LogView            *tview.TextView
	StatusBar          *tview.TextView
	CommitDetails      *tview.TextView
	LastCommitDetails  *tview.TextView
	TotalCommits       int
	ProcessedCommits   int
	ConfirmationResult bool
	ConfirmationDone   bool
)

TUI components

Functions

func LogError

func LogError(format string, args ...interface{})

LogError logs an error message

func LogInfo

func LogInfo(format string, args ...interface{})

LogInfo logs an informational message

func LogSuccess

func LogSuccess(format string, args ...interface{})

LogSuccess logs a success message

func MoveToLastCommit

func MoveToLastCommit()

MoveToLastCommit moves the current commit details to the last commit details panel

func SetupTUI

func SetupTUI()

SetupTUI initializes the terminal UI components

func ShowConfirmationDialog

func ShowConfirmationDialog(message string) bool

ShowConfirmationDialog displays a confirmation dialog and waits for user input

func UpdateCommitDetails

func UpdateCommitDetails(id string, totalFiles int, old, new string)

UpdateCommitDetails updates the details of the current commit being processed

func UpdateProgressBar

func UpdateProgressBar()

UpdateProgressBar updates the progress bar with the current status

func UpdateStatus

func UpdateStatus(text string)

UpdateStatus updates the status bar text

Types

type TextView

type TextView interface {
	Clear()
	SetText(text string)
	GetText(bool) string
}

TextView defines an interface for text view components This allows for easier mocking in tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳