this is a lot of work...
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user