You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
902 B
39 lines
902 B
package nova.monadic_sfx.pages
|
|
import nova.monadic_sfx.AppTypes
|
|
import scalafx.scene.control.TextField
|
|
import scalafx.scene.control._
|
|
import scalafx.scene.layout.VBox
|
|
import scalafx.scene.Node
|
|
import scalafx.Includes._
|
|
import scalafx.scene.layout.HBox
|
|
import scalafx.scene.text.Text
|
|
import scalafx.scene.Parent
|
|
import scalafx.application.JFXApp.PrimaryStage
|
|
|
|
class HomePage(
|
|
backend: AppTypes.HttpBackend,
|
|
system: akka.actor.ActorSystem,
|
|
onLogout: () => Unit
|
|
) {
|
|
private lazy val root = new HBox {
|
|
children = List(
|
|
new Text {
|
|
text = "hello"
|
|
},
|
|
new Button {
|
|
text = "logout"
|
|
onAction = () => onLogout()
|
|
}
|
|
)
|
|
}
|
|
def render = root
|
|
}
|
|
|
|
object HomePage {
|
|
def apply(
|
|
backend: AppTypes.HttpBackend,
|
|
system: akka.actor.ActorSystem,
|
|
onLogout: () => Unit
|
|
): Parent =
|
|
new HomePage(backend, system, onLogout).render
|
|
}
|