Answer handling yay
This commit is contained in:
parent
f3020b7cb0
commit
1a410072c2
9 changed files with 79 additions and 42 deletions
|
|
@ -62,18 +62,21 @@ fn view_room_list(items: List(Room)) -> Element(Msg) {
|
|||
|
||||
fn view_enter_pin() -> Element(Msg) {
|
||||
layout("Enter PIN code for room", None, [
|
||||
html.div([class("participant-hidden")], []),
|
||||
|
||||
input_cell("[#ENTER PIN]", True, KeyPin),
|
||||
html.div([class("participant-hidden")], []),
|
||||
])
|
||||
}
|
||||
|
||||
fn view_join_live(room: String, pin: String) -> Element(Msg) {
|
||||
element.fragment([
|
||||
server_component.element(
|
||||
[server_component.route("/socket/live/" <> room)],
|
||||
[server_component.route("/socket/live/" <> room <> "/" <> pin)],
|
||||
[],
|
||||
),
|
||||
server_component.element(
|
||||
[server_component.route("/socket/control/" <> room)],
|
||||
[server_component.route("/socket/control/" <> room <> "/" <> pin)],
|
||||
[],
|
||||
),
|
||||
])
|
||||
|
|
@ -81,7 +84,7 @@ fn view_join_live(room: String, pin: String) -> Element(Msg) {
|
|||
|
||||
fn view_join_single(room: String, pin: String) -> Element(Msg) {
|
||||
server_component.element(
|
||||
[server_component.route("/socket/single/" <> room)],
|
||||
[server_component.route("/socket/single/" <> room <> "/" <> pin)],
|
||||
[],
|
||||
)
|
||||
}
|
||||
|
|
@ -98,7 +101,7 @@ fn input_cell(
|
|||
password: Bool,
|
||||
on_input: fn(String) -> Msg,
|
||||
) -> Element(Msg) {
|
||||
html.div([class("participant-login")], [
|
||||
html.div([class("participant-box")], [
|
||||
html.div([class("participant-name")], [
|
||||
html.p([], [html.text("► " <> header)]),
|
||||
html.div([], [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue