Draft: feat login

This commit is contained in:
2025-09-05 03:59:25 +08:00
parent 6d7074198f
commit ca49efac87
43 changed files with 2023 additions and 91 deletions

30
plays/base.go Normal file
View File

@@ -0,0 +1,30 @@
package plays
import (
"time"
tea "github.com/charmbracelet/bubbletea"
"github.com/go-resty/resty/v2"
)
const (
tick = 100 * time.Millisecond
)
type TickMsg time.Time
func Tick() tea.Cmd {
return tea.Tick(tick, func(t time.Time) tea.Msg {
return TickMsg(t)
})
}
type Base struct {
client *resty.Client
}
func NewBase(client *resty.Client) *Base {
return &Base{
client: client,
}
}