feat: Sprint 3 — settings page with tabs/toggles/devices/danger-zone, brief page
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package model
|
||||
|
||||
type Device struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"` // desktop | mobile | tablet
|
||||
OS string `json:"os"`
|
||||
LastSeen string `json:"lastSeen"`
|
||||
Current bool `json:"current"`
|
||||
}
|
||||
|
||||
type DeviceStore struct {
|
||||
Devices []Device
|
||||
}
|
||||
|
||||
func NewDeviceStore() *DeviceStore {
|
||||
return &DeviceStore{Devices: defaultDevices()}
|
||||
}
|
||||
|
||||
func (s *DeviceStore) All() []Device { return s.Devices }
|
||||
|
||||
func defaultDevices() []Device {
|
||||
return []Device{
|
||||
{ID: "d1", Name: "MacBook Pro M4", Type: "desktop", OS: "macOS 15 Sequoia", LastSeen: "Just now", Current: true},
|
||||
{ID: "d2", Name: "iPhone 17 Pro", Type: "mobile", OS: "iOS 20", LastSeen: "2 hours ago", Current: false},
|
||||
{ID: "d3", Name: "iPad Air M3", Type: "tablet", OS: "iPadOS 20", LastSeen: "Yesterday", Current: false},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user