first commit

This commit is contained in:
XeRo 2025-12-26 17:45:37 +05:00
commit 5203032b83
25 changed files with 2825 additions and 0 deletions

48
setup/fields/compute.go Normal file
View file

@ -0,0 +1,48 @@
package fields
import (
"fmt"
tea "github.com/charmbracelet/bubbletea"
)
type ComputeModel struct {
Label string
value string
}
func NewComputeModel(label, value string) *ComputeModel {
return &ComputeModel{
Label: label,
value: value,
}
}
func (m *ComputeModel) Init() tea.Cmd {
return nil
}
func (m *ComputeModel) Update(msg tea.Msg) (FieldModel, tea.Cmd) {
return m, nil
}
func (m *ComputeModel) View() string {
return fmt.Sprintf("%s: %s", m.Label, m.value)
}
func (m *ComputeModel) Focus() {}
func (m *ComputeModel) Blur() {
}
func (m *ComputeModel) CaptureKeys() bool {
return false
}
func (m *ComputeModel) GetLabel() string {
return m.Label
}
func (m *ComputeModel) GetValue() interface{} {
return m.value
}