This commit is contained in:
2026-04-10 01:46:57 +09:00
commit ddd6ecccda
15 changed files with 1370 additions and 0 deletions

36
internal/pages/home.go Normal file
View File

@@ -0,0 +1,36 @@
package pages
type HomePageMsg struct{}
type SettingsPageMsg struct{}
type SelectServerPageMsg struct{}
type VPNStatusMsg struct {
Connected bool
Err error
}
type VPNToggleMsg struct {
Connected bool
Err error
}
type MenuItem struct {
Label string
Key string
}
func HomeMenuItems(connected, hasServers bool) []MenuItem {
var items []MenuItem
if hasServers {
if connected {
items = append(items, MenuItem{Label: "Turn Off", Key: "off"})
} else {
items = append(items, MenuItem{Label: "Turn On", Key: "on"})
}
items = append(items, MenuItem{Label: "Select Server", Key: "select-server"})
}
items = append(items, MenuItem{Label: "Settings", Key: "settings"})
return items
}