ui

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ScanPath    string
	ScanOptions scanner.ScanOptions
	ImportPath  string
	ExportPath  string
	Version     string
	// contains filtered or unexported fields
}

App is the root Bubble Tea model.

func NewApp

func NewApp(scanPath string, opts scanner.ScanOptions) *App

NewApp creates a new App model.

func NewAppFromImport

func NewAppFromImport(importPath string) *App

NewAppFromImport creates an App that loads from a JSON file.

func (*App) FatalError added in v1.2.4

func (a *App) FatalError() error

FatalError returns a fatal scan/import error, if any.

func (*App) Init

func (a *App) Init() tea.Cmd

func (*App) Update

func (a *App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*App) View

func (a *App) View() string

type AppState

type AppState int

AppState represents the application state.

const (
	StateScanning AppState = iota
	StateBrowsing
	StateConfirmDelete
	StateHelp
	StateExporting
)

type DeleteDoneMsg

type DeleteDoneMsg struct {
	Deleted []string
	Errors  []error
}

DeleteDoneMsg is sent when deletion completes.

type ExportDoneMsg

type ExportDoneMsg struct {
	Path string
	Err  error
}

ExportDoneMsg is sent when export completes.

type KeyMap

type KeyMap struct {
	Up        key.Binding
	Down      key.Binding
	Left      key.Binding
	Right     key.Binding
	Enter     key.Binding
	Back      key.Binding
	Mark      key.Binding
	Delete    key.Binding
	Export    key.Binding
	Rescan    key.Binding
	Quit      key.Binding
	ForceQuit key.Binding
	Help      key.Binding

	// View switching
	ViewTree     key.Binding
	ViewTreemap  key.Binding
	ViewFileType key.Binding

	// Sort
	SortSize  key.Binding
	SortName  key.Binding
	SortCount key.Binding
	SortMtime key.Binding

	// Toggles
	ToggleApparent key.Binding
	ToggleHidden   key.Binding

	// Confirm dialog
	ConfirmYes key.Binding
	ConfirmNo  key.Binding
}

KeyMap holds all key bindings for the application.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default key bindings.

type ProgressMsg

type ProgressMsg scanner.Progress

ProgressMsg carries scanner progress updates.

type ScanDoneMsg

type ScanDoneMsg struct {
	Root           *model.DirNode
	Err            error
	IncludedHidden bool
}

ScanDoneMsg is sent when scanning completes.

type ViewMode

type ViewMode int

ViewMode represents the current view.

const (
	ViewTree ViewMode = iota
	ViewTreemap
	ViewFileType
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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