mirror of
https://github.com/correl/planning-poker.git
synced 2024-11-14 19:19:30 +00:00
Remove room name entry
Saving this till there's proper room state creation
This commit is contained in:
parent
8e4a7ff564
commit
6d51fb9632
2 changed files with 1 additions and 19 deletions
|
@ -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
|
||||
}
|
||||
)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue