Documentation ¶
Index ¶
- func Main()
- type ClearGrains
- type ClearPackages
- type CloseGrain
- type Cmd
- type EditEmailLogin
- type EditEmailToken
- type Focus
- type Grain
- type HaveSharingToken
- type LoginForm
- type LoginSessionResult
- type Model
- type Msg
- type Navigate
- type NewAppPkgFile
- type NewError
- type OpenGrain
- type RemoveGrain
- type RemovePackage
- type ServerAddr
- type Sessions
- type ShareGrain
- type SpawnGrain
- type SubmitEmailLogin
- type SubmitEmailToken
- type UpsertGrain
- type UpsertPackage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClearGrains ¶
type ClearGrains struct{}
func (ClearGrains) Update ¶
func (ClearGrains) Update(m *Model) Cmd
type ClearPackages ¶
type ClearPackages struct{}
func (ClearPackages) Update ¶
func (ClearPackages) Update(m *Model) Cmd
type CloseGrain ¶
func (CloseGrain) Update ¶
func (msg CloseGrain) Update(m *Model) Cmd
type EditEmailLogin ¶
type EditEmailLogin struct {
NewValue string
}
func (EditEmailLogin) Update ¶
func (msg EditEmailLogin) Update(m *Model) Cmd
type EditEmailToken ¶
type EditEmailToken struct {
NewValue string
}
func (EditEmailToken) Update ¶
func (msg EditEmailToken) Update(m *Model) Cmd
type Focus ¶
type Focus int
const ( FocusGrainList Focus = iota FocusApps FocusOpenGrain InitialFocus = FocusGrainList )
type Grain ¶
type Grain struct { Title string SessionToken string Subdomain string Controller external.UiView_Controller }
type HaveSharingToken ¶
func (HaveSharingToken) Update ¶
func (msg HaveSharingToken) Update(m *Model) Cmd
type LoginForm ¶
type LoginForm struct { TokenSent bool // Whether we've already sent a token: EmailInput string // The email the user has entered TokenInput string // The token the user has entered }
Model for the email login form
type LoginSessionResult ¶
func (LoginSessionResult) Update ¶
func (msg LoginSessionResult) Update(m *Model) Cmd
type Model ¶
type Model struct { L10N intl.L10N ServerAddr ServerAddr CurrentFocus Focus FocusedGrain types.GrainID // ID for the currently focused grain // Errors to display to the user. As the UI evolves, we will // probably want more out of this, but YAGNI. Errors []error Grains map[types.GrainID]Grain OpenGrains map[types.GrainID]OpenGrain Packages map[types.ID[external.Package]]external.Package // Keeps track of the order we need to display grain iframes in. // Grain iframes must never change order or be detached from the // DOM, or they will reload the page within them, losing state. // So we keep them in a stable order, rendering empty slots // as dummyNode, and hiding everything but the active grain // with CSS (display: none). GrainDomOrder poolslice.PoolSlice[types.GrainID] API external.ExternalApi LoginSessions maybe.Maybe[orerr.OrErr[Sessions]] LoginForm LoginForm }
func (*Model) FocusGrain ¶
type Navigate ¶
type Navigate struct {
The URL has changed. We never send this one explicitly from UI code; instead we set up an event listener for the "hashchange" event in our main function. All of our URLs start with #, so this covers everything.
type NewAppPkgFile ¶
type NewAppPkgFile struct { Name string Size int Reader streams.ReadableStreamDefaultReader }
The user has selected an spk file to upload & install
func (NewAppPkgFile) Update ¶
func (msg NewAppPkgFile) Update(m *Model) Cmd
type RemoveGrain ¶
func (RemoveGrain) Update ¶
func (msg RemoveGrain) Update(m *Model) Cmd
type RemovePackage ¶
func (RemovePackage) Update ¶
func (msg RemovePackage) Update(m *Model) Cmd
type ServerAddr ¶
func (ServerAddr) Root ¶
func (sa ServerAddr) Root() url.URL
type Sessions ¶
type Sessions struct { Visitor external.VisitorSession User external.UserSession }
type ShareGrain ¶
type ShareGrain struct {
}func (ShareGrain) Update ¶
func (msg ShareGrain) Update(m *Model) Cmd
type SpawnGrain ¶
func (SpawnGrain) Update ¶
func (msg SpawnGrain) Update(m *Model) Cmd
type SubmitEmailLogin ¶
type SubmitEmailLogin struct { }
func (SubmitEmailLogin) Update ¶
func (msg SubmitEmailLogin) Update(m *Model) Cmd
type SubmitEmailToken ¶
type SubmitEmailToken struct { }
func (SubmitEmailToken) Update ¶
func (msg SubmitEmailToken) Update(m *Model) Cmd
type UpsertGrain ¶
func (UpsertGrain) Update ¶
func (msg UpsertGrain) Update(m *Model) Cmd
Click to show internal directories.
Click to hide internal directories.