Remove room name entry

Saving this till there's proper room state creation
This commit is contained in:
Correl Roush 2020-05-06 20:18:58 -04:00
parent 8e4a7ff564
commit 6d51fb9632
2 changed files with 1 additions and 19 deletions

View file

@ -86,13 +86,7 @@ updateUrl url model =
(Room.init
{ id = id
, player = model.player
, roomName =
case String.trim entryModel.roomName of
"" ->
"Planning Poker"
trimmed ->
trimmed
, roomName = "Planning Poker"
, playerName = entryModel.playerName
}
)

View file

@ -14,7 +14,6 @@ import PlanningPokerUI as UI
type alias Model =
{ playerName : String
, roomName : String
, player : Maybe String
, error : Maybe String
}
@ -22,7 +21,6 @@ type alias Model =
type Msg
= PlayerNameChanged String
| RoomNameChanged String
| CreateRoom
| JoinedRoom String
@ -30,7 +28,6 @@ type Msg
init : () -> ( Model, Cmd Msg )
init _ =
( { playerName = ""
, roomName = ""
, player = Nothing
, error = Nothing
}
@ -44,8 +41,6 @@ update key msg model =
PlayerNameChanged newName ->
( { model | playerName = newName }, Cmd.none )
RoomNameChanged newName ->
( { model | roomName = newName }, Cmd.none )
CreateRoom ->
let
@ -83,13 +78,6 @@ layout model =
, label = Input.labelHidden "Your name"
, placeholder = Just (Input.placeholder [] (text "Your name"))
}
, el [ centerX ] (text "and what you're up to")
, Input.text [ centerX, width (px 300) ]
{ onChange = RoomNameChanged
, text = model.roomName
, label = Input.labelHidden "Room name"
, placeholder = Just (Input.placeholder [] (text "Planning Poker"))
}
, el [ centerX ] (text "then")
, UI.actionButton [ centerX ]
{ isActive = not (String.isEmpty model.playerName)