Documentation
¶
Index ¶
- Constants
- func GetBaseStyleHeight() int
- func GetBaseStyleWidth() int
- type BDPan
- func (m *BDPan) AddFileTask(f *model.File, t TaskType) *Task
- func (m *BDPan) AddOrAppendFileTask(f *model.File, tt TaskType) *Task
- func (m *BDPan) CanSelectFile() bool
- func (m *BDPan) ClearCutSelectFileMap()
- func (m *BDPan) ClearLastKey() *BDPan
- func (m *BDPan) ClearSelectFileMap()
- func (m *BDPan) ConfirmFocused() bool
- func (m *BDPan) DisableLoadingFileList() *BDPan
- func (m *BDPan) DoneTask(t *Task, err error) tea.Cmd
- func (m *BDPan) EnableLoadingFileList() *BDPan
- func (m *BDPan) FileListFocus() *BDPan
- func (m *BDPan) FileListModelIsNil() bool
- func (m *BDPan) FileListModelIsNotNil() bool
- func (m *BDPan) FilesIsNotNil() bool
- func (m *BDPan) GetCenterView() string
- func (m *BDPan) GetConfirmTasks() []*Task
- func (m *BDPan) GetConfirmView() string
- func (m *BDPan) GetCutSelectFilePaths() []string
- func (m *BDPan) GetCutSelectFiles() []*model.File
- func (m *BDPan) GetDirView() string
- func (m *BDPan) GetFileInfoView(f *model.File) string
- func (m *BDPan) GetFileListCursor() int
- func (m *BDPan) GetFileListView() string
- func (m *BDPan) GetHeight() int
- func (m *BDPan) GetHelpView() string
- func (m *BDPan) GetLeftWidth() int
- func (m *BDPan) GetMessageView() string
- func (m *BDPan) GetMidHeight() int
- func (m *BDPan) GetMidView() string
- func (m *BDPan) GetMidWidth() int
- func (m *BDPan) GetQuickByKeyStr(k string) *model.Quick
- func (m *BDPan) GetQuickByPath(p string) *model.Quick
- func (m *BDPan) GetQuickKeys() []key.Binding
- func (m *BDPan) GetRightView() string
- func (m *BDPan) GetRightWidth() int
- func (m *BDPan) GetSelectFile() (*model.File, error)
- func (m *BDPan) GetSelectFilePaths() []string
- func (m *BDPan) GetStatusView() string
- func (m *BDPan) GetTaskByType(tt TaskType) *Task
- func (m *BDPan) GetWidth() int
- func (m *BDPan) Goto(dir string) tea.Cmd
- func (m *BDPan) HasSelectFile() bool
- func (m *BDPan) Init() tea.Cmd
- func (m *BDPan) IsLoadingFileList() bool
- func (m *BDPan) ListenCombKeyMsg(msg tea.Msg) (bool, tea.Cmd)
- func (m *BDPan) ListenKeyMsg(msg tea.Msg) (bool, tea.Cmd)
- func (m *BDPan) ListenOtherMsg(msg tea.Msg) (bool, tea.Cmd)
- func (m *BDPan) MatcheKeys(msg tea.KeyMsg, b ...key.Binding) bool
- func (m *BDPan) MessageIsNotNil() bool
- func (m *BDPan) NewFileList(files []*model.File) *FileList
- func (m *BDPan) PanIsNil() bool
- func (m *BDPan) RefreshQuickSelect() *BDPan
- func (m *BDPan) SendClipboardMessage(msg string) tea.Cmd
- func (m *BDPan) SendDeleteQuick(q *model.Quick) tea.Cmd
- func (m *BDPan) SendGoto(dir string) tea.Cmd
- func (m *BDPan) SendLoadingMessage() tea.Cmd
- func (m *BDPan) SendMessage(msg string, a ...any) tea.Cmd
- func (m *BDPan) SendMsg(msg tea.Msg) tea.Cmd
- func (m *BDPan) SendRefreshPan() tea.Cmd
- func (m *BDPan) SendRefreshQuick() tea.Cmd
- func (m *BDPan) SendRefreshUser() tea.Cmd
- func (m *BDPan) SendRunTask(t *Task) tea.Cmd
- func (m *BDPan) SendShowConfirm(title string, data wtea.ExtData, fromModel wtea.Model) tea.Cmd
- func (m *BDPan) SetFiles(files []*model.File) *BDPan
- func (m *BDPan) SetLastKey(msg tea.KeyMsg) *BDPan
- func (m *BDPan) SetMessage(msg string, args ...any)
- func (m *BDPan) SetQuicks(q []*model.Quick)
- func (m *BDPan) SetSomeTaskMessage()
- func (m *BDPan) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *BDPan) UserIsNil() bool
- func (m *BDPan) View() string
- type BlurMsg
- type ChangeFilesMsg
- type ChangePanMsg
- type ChangeUserMsg
- type Confirm
- func (m *Confirm) Blur() *Confirm
- func (m *Confirm) Focus() *Confirm
- func (m *Confirm) Focused() bool
- func (m *Confirm) GetValue() bool
- func (m *Confirm) Init() tea.Cmd
- func (m *Confirm) SetTask(t *Task) *Confirm
- func (m *Confirm) Update(msg tea.Msg) (*Confirm, tea.Cmd)
- func (m *Confirm) View() string
- func (m *Confirm) Width(w int) *Confirm
- type ConfirmKeyMap
- type DeleteQuickMsg
- type FileInfo
- type FileList
- func (m *FileList) Blur()
- func (m *FileList) Cursor(i int) *FileList
- func (m *FileList) Focus()
- func (m FileList) Focused() bool
- func (m *FileList) GetCursor() int
- func (m FileList) GetKeyMap() FileListKeyMap
- func (m *FileList) GetSelectFile() (*model.File, error)
- func (m *FileList) Init() tea.Cmd
- func (m *FileList) ListenKeyMsg(msg tea.Msg) (bool, tea.Cmd)
- func (m *FileList) Update(msg tea.Msg) (*FileList, tea.Cmd)
- func (m FileList) View() string
- type FileListArg
- type FileListArgType
- type FileListKeyMap
- type FocusMsg
- type GotoMsg
- type KeyMap
- type MessageTimeoutMsg
- type Quick
- func (m *Quick) Blur()
- func (m *Quick) Focus()
- func (m *Quick) Focused() bool
- func (m *Quick) GetKeyMap() QuickKeyMap
- func (m *Quick) GetSelect() *model.Quick
- func (m *Quick) Height(h int) *Quick
- func (m Quick) Init() tea.Cmd
- func (m *Quick) Select(i int) *Quick
- func (m *Quick) SetItems(items []list.Item) *Quick
- func (m *Quick) Update(msg tea.Msg) (*Quick, tea.Cmd)
- func (m Quick) View() string
- func (m *Quick) Width(w int) *Quick
- type QuickKeyMap
- type RefreshPanMsg
- type RefreshQuickMsg
- type RefreshUserMsg
- type RunTaskMsg
- type ShowConfirmMsg
- type Task
- type TaskStatus
- type TaskType
- type Terminal
Constants ¶
View Source
const ( TypeDelete TaskType = iota TypeDownload TypePaste StatusWating TaskStatus = iota StatusRunning StatusSuccess StatusFailed )
Variables ¶
This section is empty.
Functions ¶
func GetBaseStyleHeight ¶
func GetBaseStyleHeight() int
func GetBaseStyleWidth ¶
func GetBaseStyleWidth() int
Types ¶
type BDPan ¶
func (*BDPan) AddOrAppendFileTask ¶
func (*BDPan) CanSelectFile ¶
func (*BDPan) ClearLastKey ¶
func (*BDPan) ConfirmFocused ¶
func (*BDPan) DisableLoadingFileList ¶
func (*BDPan) EnableLoadingFileList ¶
func (*BDPan) FileListFocus ¶
func (*BDPan) FileListModelIsNil ¶
func (*BDPan) FileListModelIsNotNil ¶
func (*BDPan) FilesIsNotNil ¶
func (*BDPan) GetCenterView ¶
func (*BDPan) GetConfirmTasks ¶
func (*BDPan) GetConfirmView ¶
func (*BDPan) GetCutSelectFilePaths ¶
获取剪切选中文件的地址列表
func (*BDPan) GetCutSelectFiles ¶
func (*BDPan) GetDirView ¶
func (*BDPan) GetFileListView ¶
func (*BDPan) GetHelpView ¶
func (*BDPan) GetLeftWidth ¶
func (*BDPan) GetMessageView ¶
func (*BDPan) GetMidHeight ¶
func (*BDPan) GetMidView ¶
func (*BDPan) GetMidWidth ¶
func (*BDPan) GetQuickKeys ¶
func (*BDPan) GetRightView ¶
func (*BDPan) GetRightWidth ¶
func (*BDPan) GetStatusView ¶
func (*BDPan) IsLoadingFileList ¶
func (*BDPan) ListenCombKeyMsg ¶
ListenCombKeyMsg 监听两个键位的组合
func (*BDPan) MessageIsNotNil ¶
func (*BDPan) RefreshQuickSelect ¶
func (*BDPan) SendLoadingMessage ¶
func (*BDPan) SendRefreshPan ¶
func (*BDPan) SendRefreshQuick ¶
func (*BDPan) SendRefreshUser ¶
func (*BDPan) SendShowConfirm ¶
发送显示确认框消息
参数:
- title: 展示标题
- data: 确认框携带的额外信息
- fromModel: 从哪个模型跳转的,方便返回聚焦
func (*BDPan) SetSomeTaskMessage ¶
func (m *BDPan) SetSomeTaskMessage()
type ChangeFilesMsg ¶
type ChangePanMsg ¶
type ChangeUserMsg ¶
type ConfirmKeyMap ¶
type ConfirmKeyMap struct {
Enter key.Binding
Right key.Binding
Left key.Binding
Confirm key.Binding
Cancel key.Binding
}
func DefaultConfirmKeyMap ¶
func DefaultConfirmKeyMap() ConfirmKeyMap
type DeleteQuickMsg ¶
type FileList ¶
type FileList struct {
// contains filtered or unexported fields
}
func NewFileList ¶
func (FileList) GetKeyMap ¶
func (m FileList) GetKeyMap() FileListKeyMap
type FileListArg ¶
type FileListArg struct {
Type FileListArgType
Files []*model.File
}
type FileListArgType ¶
type FileListArgType int
const ( FLTypeSelect FileListArgType = iota FLTypeSelectCut )
type FileListKeyMap ¶
func DefaultFileListKeyMap ¶
func DefaultFileListKeyMap() FileListKeyMap
type KeyMap ¶
type KeyMap struct {
Enter key.Binding
Exit key.Binding
Back key.Binding
Right key.Binding
Left key.Binding
Refresh key.Binding
Space key.Binding // 空格,选中
Delete key.Binding
Cut key.Binding // 剪切
Paste key.Binding // 黏贴
// Pane
MovePaneLeft key.Binding
MovePaneRight key.Binding
// 复制组合键位
CopyPath key.Binding
CopyDir key.Binding
CopyFilename key.Binding
CopyFilenameWithoutExt key.Binding
// Goto 组合键位
GotoRoot key.Binding
}
func DefaultKeyMap ¶
func DefaultKeyMap() KeyMap
func (KeyMap) FullHelp ¶
FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.
func (KeyMap) GetCopyKeys ¶
type MessageTimeoutMsg ¶
type MessageTimeoutMsg struct{}
type Quick ¶
type Quick struct {
// contains filtered or unexported fields
}
func (*Quick) GetKeyMap ¶
func (m *Quick) GetKeyMap() QuickKeyMap
type QuickKeyMap ¶
func DefaultQuickKeyMap ¶
func DefaultQuickKeyMap() QuickKeyMap
type RefreshPanMsg ¶
type RefreshPanMsg struct{}
type RefreshQuickMsg ¶
type RefreshQuickMsg struct{}
type RefreshUserMsg ¶
type RefreshUserMsg struct{}
type RunTaskMsg ¶
type RunTaskMsg struct {
Task *Task
}
type ShowConfirmMsg ¶
type Task ¶
type Task struct {
ID int
File *model.File
Files []*model.File
Dir string
Type TaskType
Status TaskStatus
IsConfirm bool
// contains filtered or unexported fields
}
func (Task) GetStatusString ¶
func (Task) GetTypeString ¶
type TaskStatus ¶
type TaskStatus int
Click to show internal directories.
Click to hide internal directories.