add very dummy own card controls
This commit is contained in:
parent
107e7507f4
commit
11e65c009c
|
@ -0,0 +1,30 @@
|
||||||
|
package industries.sunshine.planningpoker
|
||||||
|
|
||||||
|
import scala.scalajs.js
|
||||||
|
import com.raquo.laminar.api.L.{*, given}
|
||||||
|
import industries.sunshine.planningpoker.common.Models.*
|
||||||
|
|
||||||
|
object OwnHandControls {
|
||||||
|
def render(roomStateSignal: Signal[RoomStateView]): Element = {
|
||||||
|
val a = 1
|
||||||
|
div(
|
||||||
|
className := "flex flex-row justify-center",
|
||||||
|
renderCard("xs"),
|
||||||
|
renderCard("s"),
|
||||||
|
renderCard("m"),
|
||||||
|
renderCard("l"),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
def renderCard(value: String): Element = {
|
||||||
|
div(
|
||||||
|
className := "w-24 h-48 m-1 rounded flex justify-center items-center m-3",
|
||||||
|
className := "text-black bg-gray-50 border-black border-2",
|
||||||
|
div(
|
||||||
|
className := "-rotate-45 text-xl",
|
||||||
|
value
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -38,6 +38,7 @@ object RoomView {
|
||||||
className := "w-full h-full border-4 border-amber-900 flex flex-col",
|
className := "w-full h-full border-4 border-amber-900 flex flex-col",
|
||||||
OtherPlayers.render(roomStateSignal),
|
OtherPlayers.render(roomStateSignal),
|
||||||
TableView.renderTable(roomStateSignal),
|
TableView.renderTable(roomStateSignal),
|
||||||
|
OwnHandControls.render(roomStateSignal),
|
||||||
wsStream.connect,
|
wsStream.connect,
|
||||||
wsFinalDeathSignal.map(_ => false) --> loggedIn
|
wsFinalDeathSignal.map(_ => false) --> loggedIn
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue