Mission Control web UI, written with Rabbita
moon test apps/web --target js
moon build apps/web --target js --releasemise run web:bundlepub(all) enum Action {
OpenProject(Project)
AddProject
RemoveProject(Project)
SetPrimarySidebar(PrimarySidebar)
StopApp
} derive(Eq, Debug)pub struct Connection {
client : Client
run : async ((ConnectionState) -> Unit) -> Unit
stopped : () -> Unit
}fn Connection::to_hub(url : String, key : ViewKey, session : async () -> SessionCheck) -> Connectionpub struct Model {
connection : ConnectionState
surface : Surface
instance : InstanceName
info : AppInfo?
projects : ReadOnlyArray[Project]?
open : ProjectId?
dialog : Dialog
primary_sidebar : PrimarySidebar
window : WindowSize
notice : String?
} derive(Eq, Debug)fn Model::Model(surface~ : Surface, instance~ : InstanceName, primary_sidebar~ : PrimarySidebar, window~ : WindowSize) -> Modelpub(all) enum Msg {
ConnectionChanged(ConnectionState)
ConnectionFailed(String)
InfoRead(AppInfo)
ProjectsListed(ReadOnlyArray[Project])
ProjectShown(ShownProject)
AppStopping
HashChanged(ProjectId?)
WindowResized(WindowSize)
ActionChosen(Action)
PaletteOpened
PaletteTyped(String)
PaletteMoved(Direction)
PalettePointed(ActionId)
PaletteEntered(seen~ : ReadOnlyArray[Action])
CloseDialog
DialogClosed(DialogElement)
PathTyped(String)
BrowseChosen
FolderChosen(ChosenFolder)
BrowseFailed(ClientFailure)
AddSubmitted
ProjectAdded(path~ : String, Project)
AddFailed(path~ : String, ClientFailure)
ProjectRemoved(ProjectId)
RemoveFailed(ProjectId, ClientFailure)
StopConfirmed
CallFailed(ClientFailure)
NoticeDismissed
}fn app(connection : Connection, surface~ : Surface, instance~ : InstanceName, primary_sidebar~ : PrimarySidebar, mac~ : Bool) -> Val[Html]fn retry_delay(attempt : Int) -> Int