Documentation
¶
Index ¶
- Constants
- type HistoryPage
- type LoadingPage
- type LogPage
- type MainPage
- type ManageModsPage
- func (p *ManageModsPage) GetActionPrompts() []ui.ActionPrompt
- func (p *ManageModsPage) GetFocusablePrimitives() []tview.Primitive
- func (p *ManageModsPage) GetStatusPrimitive() *tview.TextView
- func (p *ManageModsPage) OnPageActivated()
- func (p *ManageModsPage) RefreshSearchState()
- func (p *ManageModsPage) RefreshState()
- type ManagementSession
- func (s *ManagementSession) CalculateChanges() (enabled, disabled, omitted, normal []string)
- func (s *ManagementSession) HasChanges() bool
- func (s *ManagementSession) ToggleForceDisable(modID string, isBulk bool)
- func (s *ManagementSession) ToggleForceEnable(modID string, isBulk bool)
- func (s *ManagementSession) ToggleOmitted(modID string, isBulk bool)
- type ResultPage
- type SetupPage
- type TestPage
Constants ¶
const PageHistoryID = "history_page"
const PageLoadingID = "loading_page"
PageLoadingID is the unique identifier for the LoadingPage.
const PageLogID = "log_page"
const PageMainID = "main_page"
PageMainID is the unique identifier for the MainPage.
const PageManageModsID = "manage_mods"
const PageResultID = "result_page"
const PageSetupID = "setup_page"
PageSetupID is the unique identifier for the SetupPage.
const PageTestID = "test_page"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistoryPage ¶
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 ¶
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 ¶
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 ¶
GetStatusPrimitive returns the tview.Primitive that displays the page's status.
func (*LogPage) OnPageActivated ¶
func (p *LogPage) OnPageActivated()
type MainPage ¶
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 ¶
GetFocusablePrimitives implements the Focusable interface for the MainPage.
func (*MainPage) GetStatusPrimitive ¶
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 ¶
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 ¶
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 ¶
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 (*SetupPage) GetStatusPrimitive ¶
GetStatusPrimitive returns the tview.Primitive that displays the page's status
type TestPage ¶
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 ¶
GetFocusablePrimitives implements the Focusable interface for the MainPage.
func (*TestPage) GetStatusPrimitive ¶
GetStatusPrimitive returns the tview.Primitive that displays the page's status