this is a lot of work...

This commit is contained in:
2019-11-29 16:20:07 +01:00
parent c50cb37900
commit dbc99830d6
12 changed files with 1941 additions and 1474 deletions

View File

@@ -0,0 +1,49 @@
module Page.Dashboard exposing (Model, Msg, init, update, view)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Page.Chest as Chest exposing (Chest)
import Session exposing (Session)
type alias Model =
{ session : Session
, chest : Mode
}
type Mode
= View Chest
init : Session -> ( Model, Cmd Msg )
init session =
( Model session (View Chest.init)
, Cmd.none
)
view : Model -> ( Html Msg, List (Html Msg) )
view model =
case Session.user model.session of
Session.Player player _ ->
( text ""
, [ if player.id == 0 then
p [] [ text "Groupe" ]
else
p [] [ text "Joueur" ]
]
)
Session.Admin ->
( text "", [ p [] [ text "Joueur" ] ] )
type Msg
= Msg
update msg model =
( model, Cmd.none )