app

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthErrorMsg

type AuthErrorMsg struct {
	Err error
}

AuthErrorMsg is sent when the Telegram client fails during authentication.

type AuthStateChangedMsg

type AuthStateChangedMsg struct {
	State int
	Hint  string
}

AuthStateChangedMsg is sent from the authorizer callback.

type AuthenticatedMsg

type AuthenticatedMsg struct {
	UserId    int64
	FirstName string
	LastName  string
}

AuthenticatedMsg signals that authentication is complete.

type ErrorMsg

type ErrorMsg struct {
	Err error
}

ErrorMsg carries an error to display.

type FocusChangedMsg

type FocusChangedMsg struct {
	Panel FocusPanel
}

FocusChangedMsg signals a focus panel change.

type FocusPanel

type FocusPanel int

FocusPanel identifies which UI panel has focus.

const (
	PanelChatList FocusPanel = iota
	PanelChatView
	PanelComposer
	PanelSearch
	PanelContacts
	PanelGroupInfo
)

type Model

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

func New

func New(cfg *config.Config, tg *telegram.Client, s *store.Store, authorizer *telegram.TUIAuthorizer) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() tea.View

type ScreenState

type ScreenState int

ScreenState identifies the current top-level screen.

const (
	ScreenAuth ScreenState = iota
	ScreenLoading
	ScreenMain
)

Jump to

Keyboard shortcuts

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