tui

package
v0.0.0-...-b00bfba Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgeFilter

type AgeFilter int
const (
	AgeAny AgeFilter = iota
	Age30Days
	Age90Days
	Age180Days
	Age365Days
)

type App

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

func NewApp

func NewApp(service *gmail.Service, email string) App

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
const (
	StateLoading AppState = iota
	StateLeaderboard
	StateDrilldown
	StateConfirm
)

type ConfirmModel

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

func NewConfirmModel

func NewConfirmModel(sender gmailpkg.SenderGroup, messages []gmailpkg.Message) ConfirmModel

func NewConfirmModelWithAge

func NewConfirmModelWithAge(sender gmailpkg.SenderGroup, messages []gmailpkg.Message, ageFilter AgeFilter) ConfirmModel

func (ConfirmModel) AgeFilter

func (m ConfirmModel) AgeFilter() int

func (ConfirmModel) FilteredMessages

func (m ConfirmModel) FilteredMessages() []gmailpkg.Message

func (ConfirmModel) Update

func (m ConfirmModel) Update(msg tea.Msg) (ConfirmModel, tea.Cmd)

func (ConfirmModel) View

func (m ConfirmModel) View() string

type DrilldownModel

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

func NewDrilldownModel

func NewDrilldownModel(sender gmailpkg.SenderGroup, width, height int) DrilldownModel

func (DrilldownModel) SelectedMessages

func (m DrilldownModel) SelectedMessages() []gmailpkg.Message

func (*DrilldownModel) SetSize

func (m *DrilldownModel) SetSize(width, height int)

func (DrilldownModel) Update

func (m DrilldownModel) Update(msg tea.Msg) (DrilldownModel, tea.Cmd)

func (DrilldownModel) View

func (m DrilldownModel) View() string

type LeaderboardModel

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

func NewLeaderboardModel

func NewLeaderboardModel(snapshot gmailpkg.MailboxSnapshot, email string, width, height int) LeaderboardModel

func (*LeaderboardModel) ApplyPreferences

func (m *LeaderboardModel) ApplyPreferences(sortMode int, filterQuery string)

func (LeaderboardModel) FilterQuery

func (m LeaderboardModel) FilterQuery() string

func (LeaderboardModel) PrefetchCandidates

func (m LeaderboardModel) PrefetchCandidates(window int) []gmailpkg.SenderGroup

func (LeaderboardModel) SelectedIndex

func (m LeaderboardModel) SelectedIndex() int

func (*LeaderboardModel) SetSize

func (m *LeaderboardModel) SetSize(width, height int)

func (LeaderboardModel) SortMode

func (m LeaderboardModel) SortMode() int

func (LeaderboardModel) Update

func (m LeaderboardModel) Update(msg tea.Msg) (LeaderboardModel, tea.Cmd)

func (LeaderboardModel) View

func (m LeaderboardModel) View() string

type LeaderboardSortMode

type LeaderboardSortMode int
const (
	SortBySize LeaderboardSortMode = iota
	SortByCount
	SortBySender
)

Jump to

Keyboard shortcuts

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