Documentation
¶
Index ¶
- Variables
- func ClearKittyGraphics()
- func RebuildStyles()
- func ThemedTextAreaStyles() textarea.Styles
- func ThemedTextInputStyles() textinput.Styles
- type AccountAddedMsg
- type AccountDeletedMsg
- type AccountTab
- type AddAccountMsg
- type AllEmailsFetchedMsg
- type ArchiveEmailMsg
- type AttachmentDownloadedMsg
- type BackToInboxMsg
- type BackToMailboxMsg
- type CachedEmailsLoadedMsg
- type CancelFilePickerMsg
- type Choice
- type ChooseServiceMsg
- type ClearStatusMsg
- type Composer
- func (m *Composer) GetAttachmentPaths() []string
- func (m *Composer) GetBody() string
- func (m *Composer) GetDraftID() string
- func (m *Composer) GetInReplyTo() string
- func (m *Composer) GetQuotedText() string
- func (m *Composer) GetReferences() []string
- func (m *Composer) GetSelectedAccountID() string
- func (m *Composer) GetSignature() string
- func (m *Composer) GetSubject() string
- func (m *Composer) GetTo() string
- func (m *Composer) Init() tea.Cmd
- func (m *Composer) ResetConfirmation()
- func (m *Composer) SetAccounts(accounts []config.Account)
- func (m *Composer) SetBody(body string)
- func (m *Composer) SetDraftID(id string)
- func (m *Composer) SetPluginStatus(status string)
- func (m *Composer) SetQuotedText(text string)
- func (m *Composer) SetReplyContext(inReplyTo string, references []string)
- func (m *Composer) SetSelectedAccount(accountID string)
- func (m *Composer) ToDraft() config.Draft
- func (m *Composer) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Composer) View() tea.View
- type Credentials
- type DeleteAccountMsg
- type DeleteEmailMsg
- type DeleteSavedDraftMsg
- type DiscardDraftMsg
- type DownloadAttachmentMsg
- type DraftDeletedMsg
- type DraftSavedMsg
- type Drafts
- type DraftsLoadedMsg
- type EditorFinishedMsg
- type EmailActionDoneMsg
- type EmailBodyFetchedMsg
- type EmailMarkedReadMsg
- type EmailMovedMsg
- type EmailResultMsg
- type EmailView
- type EmailsAppendedMsg
- type EmailsFetchedMsg
- type EmailsRefreshedMsg
- type FetchErr
- type FetchFolderMoreEmailsMsg
- type FetchMoreEmailsMsg
- type FetchingMoreEmailsMsg
- type FilePicker
- type FileSelectedMsg
- type FolderEmailsAppendedMsg
- type FolderEmailsFetchedMsg
- type FolderInbox
- func (m *FolderInbox) AdditionalShortHelpKeys() []key.Binding
- func (m *FolderInbox) GetAccounts() []config.Account
- func (m *FolderInbox) GetCurrentFolder() string
- func (m *FolderInbox) GetFolders() []string
- func (m *FolderInbox) GetInbox() *Inbox
- func (m *FolderInbox) Init() tea.Cmd
- func (m *FolderInbox) RemoveEmail(uid uint32, accountID string)
- func (m *FolderInbox) SetEmails(emails []fetcher.Email, accounts []config.Account)
- func (m *FolderInbox) SetFolders(folders []string)
- func (m *FolderInbox) SetLoadingEmails(loading bool)
- func (m *FolderInbox) SetRefreshing(refreshing bool)
- func (m *FolderInbox) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *FolderInbox) View() tea.View
- type FoldersFetchedMsg
- type ForwardEmailMsg
- type GoToAccountListMsg
- type GoToAddAccountMsg
- type GoToAddMailingListMsg
- type GoToChoiceMenuMsg
- type GoToDraftsMsg
- type GoToEditAccountMsg
- type GoToEditMailingListMsg
- type GoToFilePickerMsg
- type GoToInboxMsg
- type GoToSendMsg
- type GoToSentInboxMsg
- type GoToSettingsMsg
- type GoToSignatureEditorMsg
- type GoToTrashArchiveMsg
- type IdleNewMailMsg
- type Inbox
- func NewArchiveInbox(emails []fetcher.Email, accounts []config.Account) *Inbox
- func NewInbox(emails []fetcher.Email, accounts []config.Account) *Inbox
- func NewInboxSingleAccount(emails []fetcher.Email) *Inbox
- func NewInboxWithMailbox(emails []fetcher.Email, accounts []config.Account, mailbox MailboxKind) *Inbox
- func NewSentInbox(emails []fetcher.Email, accounts []config.Account) *Inbox
- func NewTrashInbox(emails []fetcher.Email, accounts []config.Account) *Inbox
- func (m *Inbox) GetCurrentAccountID() string
- func (m *Inbox) GetEmailAtIndex(index int) *fetcher.Email
- func (m *Inbox) GetMailbox() MailboxKind
- func (m *Inbox) Init() tea.Cmd
- func (m *Inbox) MarkEmailAsRead(uid uint32, accountID string)
- func (m *Inbox) RemoveEmail(uid uint32, accountID string)
- func (m *Inbox) SetEmails(emails []fetcher.Email, accounts []config.Account)
- func (m *Inbox) SetFolderName(name string)
- func (m *Inbox) SetPluginStatus(status string)
- func (m *Inbox) SetSize(width, height int)
- func (m *Inbox) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Inbox) View() tea.View
- type LoadDraftsMsg
- type Login
- func (m *Login) GetAccountID() string
- func (m *Login) Init() tea.Cmd
- func (m *Login) IsEditMode() bool
- func (m *Login) SetEditMode(accountID, provider, name, email, fetchEmail, imapServer string, imapPort int, ...)
- func (m *Login) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Login) View() tea.View
- type MailboxKind
- type MailingListEditor
- type MarkEmailAsReadMsg
- type MoveEmailMsg
- type MoveEmailToFolderMsg
- type OAuth2CompleteMsg
- type OpenDraftMsg
- type OpenEditorMsg
- type PluginNotifyMsg
- type RefreshingEmailsMsg
- type ReplyToEmailMsg
- type RequestRefreshMsg
- type RestoreViewMsg
- type SaveDraftMsg
- type SaveMailingListMsg
- type SendEmailMsg
- type SetComposerCursorToStartMsg
- type Settings
- type SettingsState
- type SignatureEditor
- type StartOAuth2Msg
- type Status
- type SwitchAccountMsg
- type SwitchFolderMsg
- type SwitchFromAccountMsg
- type TrashArchive
- func (m *TrashArchive) AdditionalShortHelpKeys() []key.Binding
- func (m *TrashArchive) GetActiveInbox() *Inbox
- func (m *TrashArchive) GetActiveMailbox() MailboxKind
- func (m *TrashArchive) Init() tea.Cmd
- func (m *TrashArchive) RemoveEmail(uid uint32, accountID string, mailbox MailboxKind)
- func (m *TrashArchive) SetArchiveEmails(emails []fetcher.Email, accounts []config.Account)
- func (m *TrashArchive) SetTrashEmails(emails []fetcher.Email, accounts []config.Account)
- func (m *TrashArchive) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *TrashArchive) View() tea.View
- type ViewEmailMsg
Constants ¶
This section is empty.
Variables ¶
var ( DialogBoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(lipgloss.Color("#25A065")). Padding(1, 2). BorderTop(true). BorderLeft(true). BorderRight(true). BorderBottom(true) HelpStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("240")) TipStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("214")).Italic(true) SuccessStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("42")).Bold(true) InfoStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("42")).Bold(true) H1Style = lipgloss.NewStyle(). Foreground(lipgloss.Color("42")). Bold(true). Align(lipgloss.Center) H2Style = lipgloss.NewStyle(). Foreground(lipgloss.Color("42")). Bold(false). Align(lipgloss.Center) BodyStyle = lipgloss.NewStyle(). Bold(true) // A bit bold )
var DocStyle = lipgloss.NewStyle().Margin(1, 2)
Functions ¶
func ClearKittyGraphics ¶ added in v0.21.1
func ClearKittyGraphics()
ClearKittyGraphics sends the Kitty graphics protocol delete command directly to stdout.
func RebuildStyles ¶ added in v0.24.0
func RebuildStyles()
RebuildStyles updates all package-level style variables to match the active theme. This must be called after theme.SetTheme() and at startup.
func ThemedTextAreaStyles ¶ added in v0.27.3
ThemedTextAreaStyles returns textarea.Styles using the active theme colors.
func ThemedTextInputStyles ¶ added in v0.27.3
ThemedTextInputStyles returns textinput.Styles using the active theme colors.
Types ¶
type AccountAddedMsg ¶ added in v0.8.0
AccountAddedMsg signals that an account was successfully added.
type AccountDeletedMsg ¶ added in v0.8.0
AccountDeletedMsg signals that an account was successfully deleted.
type AccountTab ¶ added in v0.8.0
AccountTab represents a tab for an account
type AddAccountMsg ¶ added in v0.8.0
type AddAccountMsg struct {
Credentials Credentials
}
AddAccountMsg signals that a new account should be added.
type AllEmailsFetchedMsg ¶ added in v0.8.0
type AllEmailsFetchedMsg struct {
EmailsByAccount map[string][]fetcher.Email
Mailbox MailboxKind
}
AllEmailsFetchedMsg signals that emails from all accounts have been fetched.
type ArchiveEmailMsg ¶
type ArchiveEmailMsg struct {
UID uint32
AccountID string
Mailbox MailboxKind
}
type AttachmentDownloadedMsg ¶
type BackToInboxMsg ¶
type BackToInboxMsg struct{}
type BackToMailboxMsg ¶ added in v0.10.0
type BackToMailboxMsg struct {
Mailbox MailboxKind
}
type CachedEmailsLoadedMsg ¶ added in v0.8.0
type CachedEmailsLoadedMsg struct {
Cache *config.EmailCache
}
CachedEmailsLoadedMsg signals that cached emails were loaded from disk.
type CancelFilePickerMsg ¶
type CancelFilePickerMsg struct{}
type Choice ¶
type ChooseServiceMsg ¶
type ChooseServiceMsg struct {
Service string
}
type ClearStatusMsg ¶
type ClearStatusMsg struct{}
type Composer ¶
type Composer struct {
// contains filtered or unexported fields
}
Composer model holds the state of the email composition UI.
func NewComposer ¶
NewComposer initializes a new composer model.
func NewComposerFromDraft ¶ added in v0.8.0
NewComposerFromDraft creates a composer from an existing draft.
func NewComposerWithAccounts ¶ added in v0.8.0
func NewComposerWithAccounts(accounts []config.Account, selectedAccountID string, to, subject, body string, hideTips bool) *Composer
NewComposerWithAccounts initializes a composer with multiple account support.
func (*Composer) GetAttachmentPaths ¶ added in v0.21.0
GetAttachmentPaths returns the current attachment paths.
func (*Composer) GetDraftID ¶ added in v0.8.0
GetDraftID returns the draft ID for this composer.
func (*Composer) GetInReplyTo ¶ added in v0.8.0
GetInReplyTo returns the In-Reply-To header value.
func (*Composer) GetQuotedText ¶ added in v0.13.5
GetQuotedText returns the hidden quoted text.
func (*Composer) GetReferences ¶ added in v0.8.0
GetReferences returns the References header values.
func (*Composer) GetSelectedAccountID ¶ added in v0.8.0
GetSelectedAccountID returns the ID of the currently selected account.
func (*Composer) GetSignature ¶ added in v0.15.0
GetSignature returns the current signature value.
func (*Composer) GetSubject ¶ added in v0.8.0
GetSubject returns the current Subject field value.
func (*Composer) ResetConfirmation ¶
func (m *Composer) ResetConfirmation()
ResetConfirmation ensures a restored draft isnt stuck in the exit prompt.
func (*Composer) SetAccounts ¶ added in v0.8.0
SetAccounts sets the available accounts for sending.
func (*Composer) SetDraftID ¶ added in v0.8.0
SetDraftID sets the draft ID (for loading existing drafts).
func (*Composer) SetPluginStatus ¶ added in v0.28.0
SetPluginStatus sets a persistent status string from plugins, shown in the help bar.
func (*Composer) SetQuotedText ¶ added in v0.13.5
SetQuotedText sets the hidden quoted text that will be appended when sending.
func (*Composer) SetReplyContext ¶ added in v0.8.0
SetReplyContext sets the reply context for the draft.
func (*Composer) SetSelectedAccount ¶ added in v0.8.0
SetSelectedAccount sets the selected account by ID.
type Credentials ¶
type Credentials struct {
Provider string
Name string
Host string // Host (this was the previous "Email Address" field in the UI)
FetchEmail string // Single email address to fetch messages for. If empty, code should default this to Host when creating the account.
Password string
IMAPServer string
IMAPPort int
SMTPServer string
SMTPPort int
AuthMethod string // "password" or "oauth2"
}
type DeleteAccountMsg ¶ added in v0.8.0
type DeleteAccountMsg struct {
AccountID string
}
DeleteAccountMsg signals that an account should be deleted.
type DeleteEmailMsg ¶
type DeleteEmailMsg struct {
UID uint32
AccountID string
Mailbox MailboxKind
}
type DeleteSavedDraftMsg ¶ added in v0.8.0
type DeleteSavedDraftMsg struct {
DraftID string
}
DeleteDraftMsg signals that a draft should be deleted.
type DiscardDraftMsg ¶
type DiscardDraftMsg struct {
ComposerState *Composer
}
DiscardDraftMsg signals that a draft should be cached.
type DownloadAttachmentMsg ¶
type DraftDeletedMsg ¶ added in v0.8.0
DraftDeletedMsg signals that a draft was deleted.
type DraftSavedMsg ¶ added in v0.8.0
DraftSavedMsg signals that a draft was saved successfully.
type Drafts ¶ added in v0.8.0
type Drafts struct {
// contains filtered or unexported fields
}
Drafts is the model for the drafts list view
type DraftsLoadedMsg ¶ added in v0.8.0
DraftsLoadedMsg signals that drafts were loaded from disk.
type EditorFinishedMsg ¶ added in v0.28.0
EditorFinishedMsg signals that the external editor has closed.
type EmailActionDoneMsg ¶
type EmailActionDoneMsg struct {
UID uint32
AccountID string
Mailbox MailboxKind
Err error
}
type EmailBodyFetchedMsg ¶
type EmailBodyFetchedMsg struct {
UID uint32
Body string
Attachments []fetcher.Attachment
Err error
AccountID string
Mailbox MailboxKind
}
type EmailMarkedReadMsg ¶ added in v0.26.0
EmailMarkedReadMsg signals that an email was marked as read.
type EmailMovedMsg ¶ added in v0.22.0
type EmailMovedMsg struct {
UID uint32
AccountID string
SourceFolder string
DestFolder string
Err error
}
EmailMovedMsg signals that an email was moved to a folder.
type EmailResultMsg ¶
type EmailResultMsg struct {
Err error
}
type EmailView ¶
type EmailView struct {
// contains filtered or unexported fields
}
func NewEmailView ¶
func (*EmailView) GetAccountID ¶ added in v0.8.0
GetAccountID returns the account ID for this email
func (*EmailView) SetPluginStatus ¶ added in v0.28.0
SetPluginStatus sets a persistent status string from plugins, shown in the help bar.
type EmailsAppendedMsg ¶
type EmailsAppendedMsg struct {
Emails []fetcher.Email
AccountID string
Mailbox MailboxKind
}
type EmailsFetchedMsg ¶
type EmailsFetchedMsg struct {
Emails []fetcher.Email
AccountID string
Mailbox MailboxKind
}
type EmailsRefreshedMsg ¶ added in v0.8.0
type EmailsRefreshedMsg struct {
EmailsByAccount map[string][]fetcher.Email
Mailbox MailboxKind
}
EmailsRefreshedMsg signals that fresh emails have been fetched in the background.
type FetchFolderMoreEmailsMsg ¶ added in v0.22.0
type FetchFolderMoreEmailsMsg struct {
Offset uint32
AccountID string
FolderName string
Limit uint32
}
FetchFolderMoreEmailsMsg signals a request to fetch more emails from a folder (pagination).
type FetchMoreEmailsMsg ¶
type FetchMoreEmailsMsg struct {
Offset uint32
AccountID string
Mailbox MailboxKind
Limit uint32
}
type FetchingMoreEmailsMsg ¶
type FetchingMoreEmailsMsg struct{}
type FilePicker ¶
type FilePicker struct {
// contains filtered or unexported fields
}
func NewFilePicker ¶
func NewFilePicker(startPath string) *FilePicker
func (*FilePicker) Init ¶
func (m *FilePicker) Init() tea.Cmd
func (*FilePicker) View ¶
func (m *FilePicker) View() tea.View
type FileSelectedMsg ¶
type FileSelectedMsg struct {
Path string
}
type FolderEmailsAppendedMsg ¶ added in v0.22.0
FolderEmailsAppendedMsg signals that more emails from a folder have been fetched (pagination).
type FolderEmailsFetchedMsg ¶ added in v0.22.0
FolderEmailsFetchedMsg signals that emails from a folder have been fetched.
type FolderInbox ¶ added in v0.22.0
type FolderInbox struct {
// contains filtered or unexported fields
}
FolderInbox combines a folder sidebar with an email list.
func NewFolderInbox ¶ added in v0.22.0
func NewFolderInbox(folders []string, accounts []config.Account) *FolderInbox
NewFolderInbox creates a new FolderInbox with the given folders and accounts.
func (*FolderInbox) AdditionalShortHelpKeys ¶ added in v0.22.0
func (m *FolderInbox) AdditionalShortHelpKeys() []key.Binding
AdditionalShortHelpKeys returns help key bindings for the folder inbox.
func (*FolderInbox) GetAccounts ¶ added in v0.22.0
func (m *FolderInbox) GetAccounts() []config.Account
GetAccounts returns the accounts.
func (*FolderInbox) GetCurrentFolder ¶ added in v0.22.0
func (m *FolderInbox) GetCurrentFolder() string
GetCurrentFolder returns the currently selected folder name.
func (*FolderInbox) GetFolders ¶ added in v0.22.0
func (m *FolderInbox) GetFolders() []string
GetFolders returns the current folder list.
func (*FolderInbox) GetInbox ¶ added in v0.22.0
func (m *FolderInbox) GetInbox() *Inbox
GetInbox returns the embedded inbox.
func (*FolderInbox) Init ¶ added in v0.22.0
func (m *FolderInbox) Init() tea.Cmd
func (*FolderInbox) RemoveEmail ¶ added in v0.22.0
func (m *FolderInbox) RemoveEmail(uid uint32, accountID string)
RemoveEmail removes an email from the embedded inbox.
func (*FolderInbox) SetEmails ¶ added in v0.22.0
func (m *FolderInbox) SetEmails(emails []fetcher.Email, accounts []config.Account)
SetEmails updates the inbox emails.
func (*FolderInbox) SetFolders ¶ added in v0.22.0
func (m *FolderInbox) SetFolders(folders []string)
SetFolders updates the folder list.
func (*FolderInbox) SetLoadingEmails ¶ added in v0.22.0
func (m *FolderInbox) SetLoadingEmails(loading bool)
SetLoadingEmails sets the loading state.
func (*FolderInbox) SetRefreshing ¶ added in v0.23.1
func (m *FolderInbox) SetRefreshing(refreshing bool)
SetRefreshing sets the refreshing state (used when user presses "r").
func (*FolderInbox) View ¶ added in v0.22.0
func (m *FolderInbox) View() tea.View
type FoldersFetchedMsg ¶ added in v0.22.0
type FoldersFetchedMsg struct {
FoldersByAccount map[string][]fetcher.Folder // accountID -> folders
MergedFolders []fetcher.Folder // unique folders across all accounts
}
FoldersFetchedMsg signals that IMAP folders have been fetched for all accounts.
type ForwardEmailMsg ¶ added in v0.17.0
type GoToAccountListMsg ¶ added in v0.8.0
type GoToAccountListMsg struct{}
GoToAccountListMsg signals navigation to the account list in settings.
type GoToAddAccountMsg ¶ added in v0.8.0
type GoToAddAccountMsg struct{}
GoToAddAccountMsg signals navigation to the add account screen.
type GoToAddMailingListMsg ¶ added in v0.20.0
type GoToAddMailingListMsg struct{}
GoToAddMailingListMsg signals navigation to the add mailing list screen.
type GoToChoiceMenuMsg ¶
type GoToChoiceMenuMsg struct{}
type GoToDraftsMsg ¶ added in v0.8.0
type GoToDraftsMsg struct{}
GoToDraftsMsg signals navigation to the drafts list.
type GoToEditAccountMsg ¶ added in v0.26.0
type GoToEditAccountMsg struct {
AccountID string
Provider string
Name string
Email string
FetchEmail string
IMAPServer string
IMAPPort int
SMTPServer string
SMTPPort int
}
GoToEditAccountMsg signals navigation to edit an existing account.
type GoToEditMailingListMsg ¶ added in v0.26.0
GoToEditMailingListMsg signals navigation to edit an existing mailing list.
type GoToFilePickerMsg ¶
type GoToFilePickerMsg struct{}
type GoToInboxMsg ¶
type GoToInboxMsg struct{}
type GoToSendMsg ¶
type GoToSentInboxMsg ¶ added in v0.10.0
type GoToSentInboxMsg struct{}
type GoToSettingsMsg ¶
type GoToSettingsMsg struct{}
type GoToSignatureEditorMsg ¶ added in v0.15.0
type GoToSignatureEditorMsg struct{}
type GoToTrashArchiveMsg ¶ added in v0.16.0
type GoToTrashArchiveMsg struct{}
type IdleNewMailMsg ¶ added in v0.28.0
IdleNewMailMsg signals that IMAP IDLE detected new mail for an account/folder.
type Inbox ¶
type Inbox struct {
// contains filtered or unexported fields
}
func NewArchiveInbox ¶ added in v0.16.0
func NewInboxSingleAccount ¶ added in v0.8.0
NewInboxSingleAccount creates an inbox for a single account (legacy support)
func NewInboxWithMailbox ¶ added in v0.10.0
func NewSentInbox ¶ added in v0.10.0
func NewTrashInbox ¶ added in v0.16.0
func (*Inbox) GetCurrentAccountID ¶ added in v0.8.0
GetCurrentAccountID returns the currently selected account ID
func (*Inbox) GetEmailAtIndex ¶ added in v0.8.0
GetEmailAtIndex returns the email at the given index for the current view
func (*Inbox) GetMailbox ¶ added in v0.10.0
func (m *Inbox) GetMailbox() MailboxKind
func (*Inbox) MarkEmailAsRead ¶ added in v0.26.0
MarkEmailAsRead marks an email as read by UID and account ID, updating it in all stores.
func (*Inbox) RemoveEmail ¶ added in v0.8.0
RemoveEmail removes an email by UID and account ID
func (*Inbox) SetFolderName ¶ added in v0.22.0
SetFolderName sets a custom folder name for the inbox title.
func (*Inbox) SetPluginStatus ¶ added in v0.28.0
SetPluginStatus sets a persistent status string from plugins, shown in the title.
type LoadDraftsMsg ¶ added in v0.8.0
type LoadDraftsMsg struct{}
LoadDraftsMsg signals a request to load all saved drafts.
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
Login holds the state for the login/add account form.
func (*Login) GetAccountID ¶ added in v0.8.0
GetAccountID returns the account ID being edited (if in edit mode).
func (*Login) IsEditMode ¶ added in v0.8.0
IsEditMode returns whether the form is in edit mode.
func (*Login) SetEditMode ¶ added in v0.8.0
func (m *Login) SetEditMode(accountID, provider, name, email, fetchEmail, imapServer string, imapPort int, smtpServer string, smtpPort int)
SetEditMode sets the login form to edit an existing account.
type MailboxKind ¶ added in v0.10.0
type MailboxKind string
const ( MailboxInbox MailboxKind = "inbox" MailboxSent MailboxKind = "sent" MailboxTrash MailboxKind = "trash" MailboxArchive MailboxKind = "archive" )
type MailingListEditor ¶ added in v0.20.0
type MailingListEditor struct {
// contains filtered or unexported fields
}
MailingListEditor displays the screen to add or edit a mailing list.
func NewMailingListEditor ¶ added in v0.20.0
func NewMailingListEditor() *MailingListEditor
NewMailingListEditor creates a new mailing list editor model.
func (*MailingListEditor) Init ¶ added in v0.20.0
func (m *MailingListEditor) Init() tea.Cmd
Init initializes the mailing list editor model.
func (*MailingListEditor) SetEditMode ¶ added in v0.26.0
func (m *MailingListEditor) SetEditMode(index int, name, addresses string)
SetEditMode sets the editor to edit an existing mailing list.
func (*MailingListEditor) Update ¶ added in v0.20.0
Update handles messages for the mailing list editor model.
func (*MailingListEditor) View ¶ added in v0.20.0
func (m *MailingListEditor) View() tea.View
View renders the mailing list editor screen.
type MarkEmailAsReadMsg ¶ added in v0.26.0
MarkEmailAsReadMsg signals that an email should be marked as read on the server.
type MoveEmailMsg ¶ added in v0.22.0
MoveEmailMsg signals a request to show the move-to-folder picker.
type MoveEmailToFolderMsg ¶ added in v0.22.0
type MoveEmailToFolderMsg struct {
UID uint32
AccountID string
SourceFolder string
DestFolder string
}
MoveEmailToFolderMsg signals that an email should be moved to a folder.
type OAuth2CompleteMsg ¶ added in v0.28.0
OAuth2CompleteMsg is sent when OAuth2 authorization completes.
type OpenDraftMsg ¶ added in v0.8.0
OpenDraftMsg signals that a specific draft should be opened in the composer.
type OpenEditorMsg ¶ added in v0.28.0
type OpenEditorMsg struct{}
OpenEditorMsg signals that the composer body should be opened in $EDITOR.
type PluginNotifyMsg ¶ added in v0.28.0
PluginNotifyMsg signals that a plugin wants to show a notification.
type RefreshingEmailsMsg ¶ added in v0.8.0
type RefreshingEmailsMsg struct {
Mailbox MailboxKind
}
RefreshingEmailsMsg signals that a background refresh is in progress.
type ReplyToEmailMsg ¶
type RequestRefreshMsg ¶ added in v0.13.0
type RequestRefreshMsg struct {
Mailbox MailboxKind
Counts map[string]int
FolderName string
}
RequestRefreshMsg signals a request to refresh emails from the server.
type RestoreViewMsg ¶
type RestoreViewMsg struct{}
type SaveDraftMsg ¶ added in v0.8.0
SaveDraftMsg signals that the current draft should be saved to disk.
type SaveMailingListMsg ¶ added in v0.20.0
type SaveMailingListMsg struct {
Name string
Addresses string
EditIndex int // -1 means new, >= 0 means editing existing
}
SaveMailingListMsg signals that a new or edited mailing list should be saved.
type SendEmailMsg ¶
type SendEmailMsg struct {
To string
Cc string // Cc recipient(s)
Bcc string // Bcc recipient(s)
Subject string
Body string
AttachmentPaths []string
InReplyTo string
References []string
AccountID string // ID of the account to send from
QuotedText string // Hidden quoted text appended when sending
Signature string // Signature to append to email body
SignSMIME bool // Whether to sign the email using S/MIME
EncryptSMIME bool // Whether to encrypt the email using S/MIME
}
type SetComposerCursorToStartMsg ¶
type SetComposerCursorToStartMsg struct{}
type Settings ¶ added in v0.8.0
type Settings struct {
// contains filtered or unexported fields
}
Settings displays the settings screen.
func NewSettings ¶ added in v0.8.0
NewSettings creates a new settings model.
func (*Settings) UpdateConfig ¶ added in v0.18.0
UpdateConfig updates the configuration (used when accounts are deleted).
type SettingsState ¶ added in v0.18.0
type SettingsState int
const ( SettingsMain SettingsState = iota SettingsAccounts SettingsMailingLists SettingsSMIMEConfig SettingsTheme )
type SignatureEditor ¶ added in v0.15.0
type SignatureEditor struct {
// contains filtered or unexported fields
}
SignatureEditor displays the signature editing screen.
func NewSignatureEditor ¶ added in v0.15.0
func NewSignatureEditor() *SignatureEditor
NewSignatureEditor creates a new signature editor model.
func (*SignatureEditor) Init ¶ added in v0.15.0
func (m *SignatureEditor) Init() tea.Cmd
Init initializes the signature editor model.
func (*SignatureEditor) Update ¶ added in v0.15.0
Update handles messages for the signature editor model.
func (*SignatureEditor) View ¶ added in v0.15.0
func (m *SignatureEditor) View() tea.View
View renders the signature editor screen.
type StartOAuth2Msg ¶ added in v0.28.0
type StartOAuth2Msg struct {
Email string
}
StartOAuth2Msg is sent when the user requests OAuth2 authorization for a Gmail account.
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
A simple model for showing a status message
type SwitchAccountMsg ¶ added in v0.8.0
type SwitchAccountMsg struct {
AccountID string // Empty string means "ALL" accounts
}
SwitchAccountMsg signals switching to view a specific account's inbox.
type SwitchFolderMsg ¶ added in v0.22.0
SwitchFolderMsg signals switching to a different IMAP folder.
type SwitchFromAccountMsg ¶ added in v0.8.0
type SwitchFromAccountMsg struct {
AccountID string
}
SwitchFromAccountMsg signals changing the "From" account in composer.
type TrashArchive ¶ added in v0.16.0
type TrashArchive struct {
// contains filtered or unexported fields
}
TrashArchive is a combined view for trash and archive emails with a toggle
func NewTrashArchive ¶ added in v0.16.0
func NewTrashArchive(trashEmails, archiveEmails []fetcher.Email, accounts []config.Account) *TrashArchive
NewTrashArchive creates a new combined trash/archive view
func (*TrashArchive) AdditionalShortHelpKeys ¶ added in v0.16.0
func (m *TrashArchive) AdditionalShortHelpKeys() []key.Binding
AdditionalShortHelpKeys returns additional help keys for the trash/archive view
func (*TrashArchive) GetActiveInbox ¶ added in v0.16.0
func (m *TrashArchive) GetActiveInbox() *Inbox
GetActiveInbox returns the currently active inbox
func (*TrashArchive) GetActiveMailbox ¶ added in v0.16.0
func (m *TrashArchive) GetActiveMailbox() MailboxKind
GetActiveMailbox returns the currently active mailbox kind
func (*TrashArchive) Init ¶ added in v0.16.0
func (m *TrashArchive) Init() tea.Cmd
func (*TrashArchive) RemoveEmail ¶ added in v0.16.0
func (m *TrashArchive) RemoveEmail(uid uint32, accountID string, mailbox MailboxKind)
RemoveEmail removes an email from the appropriate inbox
func (*TrashArchive) SetArchiveEmails ¶ added in v0.16.0
func (m *TrashArchive) SetArchiveEmails(emails []fetcher.Email, accounts []config.Account)
SetArchiveEmails updates the archive emails
func (*TrashArchive) SetTrashEmails ¶ added in v0.16.0
func (m *TrashArchive) SetTrashEmails(emails []fetcher.Email, accounts []config.Account)
SetTrashEmails updates the trash emails
func (*TrashArchive) View ¶ added in v0.16.0
func (m *TrashArchive) View() tea.View
type ViewEmailMsg ¶
type ViewEmailMsg struct {
Index int
UID uint32
AccountID string
Mailbox MailboxKind
}