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 (Room.init
{ id = id { id = id
, player = model.player , player = model.player
, roomName = , roomName = "Planning Poker"
case String.trim entryModel.roomName of
"" ->
"Planning Poker"
trimmed ->
trimmed
, playerName = entryModel.playerName , playerName = entryModel.playerName
} }
) )

View file

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