Documentation
¶
Overview ¶
Package screen containing of TUI screens.
Index ¶
- Constants
- func DataCmd(d models.Data) tea.Cmd
- type ActionResult
- type Form
- type FormFields
- type FormText
- func (m *FormText) Fields() tea.Msg
- func (m *FormText) FieldsStr() []string
- func (m *FormText) FocusInput() bool
- func (m *FormText) FocusNext()
- func (m *FormText) FocusSubmit() bool
- func (m *FormText) FocusText() bool
- func (m *FormText) Init() tea.Cmd
- func (m *FormText) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *FormText) View() string
- type FormView
- type FormViewComponent
- type FormViewInit
- type InputParam
- type Login
- type Register
- type SecretAddText
- func (m *SecretAddText) FocusName() bool
- func (m *SecretAddText) FocusNext()
- func (m *SecretAddText) FocusSubmit() bool
- func (m *SecretAddText) FocusText() bool
- func (m *SecretAddText) Init() tea.Cmd
- func (m *SecretAddText) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *SecretAddText) View() string
- type SecretChoose
- type SecretChooseInit
- type Secrets
- type Welcome
Constants ¶
const ( SecretTypeCredentials int32 = iota SecretTypeText SecretTypeBinary SecretTypeBankCard )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionResult ¶
ActionResult type for transfer result of action.
type Form ¶
type Form struct {
// contains filtered or unexported fields
}
Form screen for form fields.
func NewForm ¶
func NewForm(st *state.State, name string, modelBack tea.Model, modelSubmit tea.Model, ips []InputParam, callback func([]string) tea.Cmd, ) *Form
NewForm creates form with fields.
type FormFields ¶
type FormFields []string
type FormText ¶
type FormText struct {
// contains filtered or unexported fields
}
FormText struct for form with name and text.
func NewFormText ¶
func NewFormText(st *state.State, name, placeholder string, modelBack tea.Model, modelSubmit tea.Model, callback func([]string) tea.Cmd, ) *FormText
NewFormText returns new form text.
func (*FormText) FocusInput ¶
FocusInput - is focus on secret name.
func (*FormText) FocusSubmit ¶
FocusSubmit - is focus on submit button.
type FormView ¶
type FormView struct {
// contains filtered or unexported fields
}
FormView - struct for readonly form.
type FormViewComponent ¶
type FormViewComponent struct {
Name, Value string
}
FormViewComponent settings for input component.
type FormViewInit ¶
type FormViewInit struct {
Name string
ModelBack tea.Model
TextName string
Text string
Components []FormViewComponent
}
FormViewInit struct with initialization for screen FormView.
type InputParam ¶
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
Login struct for login form.
type Register ¶
type Register struct {
// contains filtered or unexported fields
}
Register struct for registration form.
func NewRegister ¶
NewRegister returns registration form.
type SecretAddText ¶
type SecretAddText struct {
// contains filtered or unexported fields
}
func NewSecretAddText ¶
func NewSecretAddText(st *state.State) *SecretAddText
NewSecretAddText creates screen for input long text.
func (*SecretAddText) FocusName ¶
func (m *SecretAddText) FocusName() bool
FocusName is name focused.
func (*SecretAddText) FocusNext ¶
func (m *SecretAddText) FocusNext()
FocusNext - moves focus to next element.
func (*SecretAddText) FocusSubmit ¶
func (m *SecretAddText) FocusSubmit() bool
FocusSubmit - is submit button focused.
func (*SecretAddText) FocusText ¶
func (m *SecretAddText) FocusText() bool
FocusText is text focused.
type SecretChoose ¶
type SecretChoose struct {
// contains filtered or unexported fields
}
func NewSecretChoose ¶
func NewSecretChoose(st *state.State) *SecretChoose
type Secrets ¶
type Secrets struct {
// contains filtered or unexported fields
}
Secrets screen with secret list.
func NewSecrets ¶
NewSecrets creates new secrets.