Работа над стилями, работа над модальными окнами, изменение списка приложений, работа с размерами окон
This commit is contained in:
parent
5203032b83
commit
ada7db46cf
12 changed files with 1161 additions and 130 deletions
10
types/modal.go
Normal file
10
types/modal.go
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package types
|
||||
|
||||
type ModalType string
|
||||
|
||||
const (
|
||||
ModalInfo ModalType = "info"
|
||||
ModalWarning ModalType = "warning"
|
||||
ModalError ModalType = "error"
|
||||
ModalConfirm ModalType = "confirm"
|
||||
)
|
||||
21
types/msg.go
21
types/msg.go
|
|
@ -1,9 +1,13 @@
|
|||
package types
|
||||
|
||||
import tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
type SelectedAppMsg struct {
|
||||
Index int
|
||||
App PackageApplication
|
||||
}
|
||||
|
||||
type BackToListMsg struct{}
|
||||
|
||||
type SelectedOptionMsg struct {
|
||||
FieldIndex int
|
||||
Value string
|
||||
|
|
@ -27,3 +31,18 @@ type SelectedFileMsg struct {
|
|||
Filename string
|
||||
Index int
|
||||
}
|
||||
|
||||
type ShowModalMsg struct {
|
||||
Type ModalType
|
||||
Title string
|
||||
Message string
|
||||
ModalButtons []ModalButton
|
||||
OnResult func(result any) tea.Cmd
|
||||
}
|
||||
|
||||
type ModalButton struct {
|
||||
Text string
|
||||
Value any
|
||||
}
|
||||
|
||||
type CloseModalMsg struct{}
|
||||
|
|
|
|||
4
types/names.go
Normal file
4
types/names.go
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
package types
|
||||
|
||||
const SectionAbout = "abouta"
|
||||
const SectionFinal = "final"
|
||||
Loading…
Add table
Add a link
Reference in a new issue