pages

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const PageHistoryID = "history_page"
View Source
const PageLoadingID = "loading_page"

PageLoadingID is the unique identifier for the LoadingPage.

View Source
const PageLogID = "log_page"
View Source
const PageMainID = "main_page"

PageMainID is the unique identifier for the MainPage.

View Source
const PageManageModsID = "manage_mods"
View Source
const PageResultID = "result_page"
View Source
const PageSetupID = "setup_page"

PageSetupID is the unique identifier for the SetupPage.

View Source
const PageTestID = "test_page"

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoryPage

type HistoryPage struct {
	*tview.Flex
	// contains filtered or unexported fields
}

HistoryPage displays the bisection history in a master-detail view.

func NewHistoryPage

func NewHistoryPage(app ui.AppInterface) *HistoryPage

NewHistoryPage creates a new page for viewing bisection history.

func (*HistoryPage) GetActionPrompts

func (p *HistoryPage) GetActionPrompts() []ui.ActionPrompt

Page interface implementation

func (*HistoryPage) GetFocusablePrimitives

func (p *HistoryPage) GetFocusablePrimitives() []tview.Primitive

GetFocusablePrimitives implements the Focusable interface.

func (*HistoryPage) GetStatusPrimitive

func (p *HistoryPage) GetStatusPrimitive() *tview.TextView

func (*HistoryPage) OnPageActivated

func (p *HistoryPage) OnPageActivated()

type LoadingPage

type LoadingPage struct {
	*tview.Flex
	// contains filtered or unexported fields
}

LoadingPage displays progress while mods are being loaded.

func NewLoadingPage

func NewLoadingPage(app ui.AppInterface) *LoadingPage

NewLoadingPage creates a new LoadingPage instance.

func (*LoadingPage) GetActionPrompts

func (lp *LoadingPage) GetActionPrompts() []ui.ActionPrompt

GetActionPrompts returns the key actions for the loading page.

func (*LoadingPage) GetStatusPrimitive

func (lp *LoadingPage) GetStatusPrimitive() *tview.TextView

GetStatusPrimitive returns the tview.Primitive that displays the page's status

func (*LoadingPage) StartLoading

func (lp *LoadingPage) StartLoading(modsPath string)

StartLoading prepares the page for the loading process initiated by the App.

func (*LoadingPage) UpdateProgress

func (lp *LoadingPage) UpdateProgress(currentFile string)

UpdateProgress updates the progress bar and text.

type LogPage

type LogPage struct {
	*tview.Flex
	// contains filtered or unexported fields
}

LogPage displays application logs with filtering capabilities.

func NewLogPage

func NewLogPage(app ui.AppInterface) *LogPage

NewLogPage creates a new LogPage instance.

func (*LogPage) GetActionPrompts

func (p *LogPage) GetActionPrompts() []ui.ActionPrompt

GetActionPrompts returns the key actions for the log page.

func (*LogPage) GetStatusPrimitive

func (p *LogPage) GetStatusPrimitive() *tview.TextView

GetStatusPrimitive returns the tview.Primitive that displays the page's status.

func (*LogPage) OnPageActivated

func (p *LogPage) OnPageActivated()

type MainPage

type MainPage struct {
	*tview.Flex
	// contains filtered or unexported fields
}

MainPage is the primary view for the bisection process.

func NewMainPage

func NewMainPage(app ui.AppInterface) *MainPage

NewMainPage creates a new MainPage instance.

func (*MainPage) GetActionPrompts

func (p *MainPage) GetActionPrompts() []ui.ActionPrompt

func (*MainPage) GetFocusablePrimitives

func (p *MainPage) GetFocusablePrimitives() []tview.Primitive

GetFocusablePrimitives implements the Focusable interface for the MainPage.

func (*MainPage) GetStatusPrimitive

func (p *MainPage) GetStatusPrimitive() *tview.TextView

GetStatusPrimitive returns the tview.Primitive that displays the page's status

func (*MainPage) OnPageActivated

func (p *MainPage) OnPageActivated()

Add this new method to the MainPage struct to implement the PageActivator interface.

func (*MainPage) RefreshSearchState

func (p *MainPage) RefreshSearchState()

RefreshSearchState is the main entry point for updating the page's content based on the latest state of the search process.

type ManageModsPage

type ManageModsPage struct {
	*tview.Flex
	// contains filtered or unexported fields
}

ManageModsPage allows viewing and changing the state of all mods.

func NewManageModsPage

func NewManageModsPage(app ui.AppInterface) *ManageModsPage

NewManageModsPage creates a new page for managing mod states.

func (*ManageModsPage) GetActionPrompts

func (p *ManageModsPage) GetActionPrompts() []ui.ActionPrompt

GetActionPrompts returns the key actions for the page.

func (*ManageModsPage) GetFocusablePrimitives

func (p *ManageModsPage) GetFocusablePrimitives() []tview.Primitive

GetFocusablePrimitives implements the Focusable interface.

func (*ManageModsPage) GetStatusPrimitive

func (p *ManageModsPage) GetStatusPrimitive() *tview.TextView

GetStatusPrimitive returns the tview.Primitive that displays the page's status.

func (*ManageModsPage) OnPageActivated

func (p *ManageModsPage) OnPageActivated()

func (*ManageModsPage) RefreshSearchState

func (p *ManageModsPage) RefreshSearchState()

RefreshSearchState implements the SearchStateObserver interface.

func (*ManageModsPage) RefreshState

func (p *ManageModsPage) RefreshState()

RefreshState updates the lists with the current mod states using the ViewModel.

type ManagementSession

type ManagementSession struct {
	// contains filtered or unexported fields
}

ManagementSession holds a temporary, mutable copy of the mod statuses for the duration of the user's visit to the ManageModsPage.

func NewManagementSession

func NewManagementSession(state *mods.StateManager) *ManagementSession

NewManagementSession creates a new session initialized with the current state.

func (*ManagementSession) CalculateChanges

func (s *ManagementSession) CalculateChanges() (enabled, disabled, omitted, normal []string)

CalculateChanges determines which mods changed state and returns them in categorized lists.

func (*ManagementSession) HasChanges

func (s *ManagementSession) HasChanges() bool

HasChanges compares the session's state to the original state to see if anything changed.

func (*ManagementSession) ToggleForceDisable

func (s *ManagementSession) ToggleForceDisable(modID string, isBulk bool)

ToggleForceDisable toggles the force-disabled state.

func (*ManagementSession) ToggleForceEnable

func (s *ManagementSession) ToggleForceEnable(modID string, isBulk bool)

ToggleForceEnable toggles the force-enabled state.

func (*ManagementSession) ToggleOmitted

func (s *ManagementSession) ToggleOmitted(modID string, isBulk bool)

ToggleOmitted toggles the omitted state.

type ResultPage

type ResultPage struct {
	*tview.Flex
	// contains filtered or unexported fields
}

ResultPage displays the final or intermediate results of the bisection search.

func NewResultPage

func NewResultPage(app ui.AppInterface) *ResultPage

NewResultPage creates a new ResultPage.

func (*ResultPage) GetActionPrompts

func (p *ResultPage) GetActionPrompts() []ui.ActionPrompt

GetActionPrompts returns the key actions for the page.

func (*ResultPage) GetFocusablePrimitives

func (p *ResultPage) GetFocusablePrimitives() []tview.Primitive

GetStatusPrimitive returns the tview.Primitive that displays the page's status

func (*ResultPage) GetStatusPrimitive

func (p *ResultPage) GetStatusPrimitive() *tview.TextView

GetStatusPrimitive returns the tview.Primitive that displays the page's status

type SetupPage

type SetupPage struct {
	*tview.Flex
	// contains filtered or unexported fields
}

SetupPage represents the initial setup screen.

func NewSetupPage

func NewSetupPage(app ui.AppInterface) *SetupPage

NewSetupPage creates a new SetupPage instance.

func (*SetupPage) GetActionPrompts

func (p *SetupPage) GetActionPrompts() []ui.ActionPrompt

GetActionPrompts returns the key actions for the setup page.

func (*SetupPage) GetFocusablePrimitives

func (p *SetupPage) GetFocusablePrimitives() []tview.Primitive

func (*SetupPage) GetStatusPrimitive

func (p *SetupPage) GetStatusPrimitive() *tview.TextView

GetStatusPrimitive returns the tview.Primitive that displays the page's status

type TestPage

type TestPage struct {
	*tview.Flex
	// contains filtered or unexported fields
}

TestPage instructs the user to perform a manual test.

func NewTestPage

func NewTestPage(app ui.AppInterface, isVerification bool, onSuccess, onFailure, onCancel func()) *TestPage

NewTestPage creates a new TestPage.

func (*TestPage) GetActionPrompts

func (p *TestPage) GetActionPrompts() []ui.ActionPrompt

GetActionPrompts returns the key actions for the test page.

func (*TestPage) GetFocusablePrimitives

func (p *TestPage) GetFocusablePrimitives() []tview.Primitive

GetFocusablePrimitives implements the Focusable interface for the MainPage.

func (*TestPage) GetStatusPrimitive

func (p *TestPage) GetStatusPrimitive() *tview.TextView

GetStatusPrimitive returns the tview.Primitive that displays the page's status

Jump to

Keyboard shortcuts

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