2020-11-23 11:07:07 +03:00
|
|
|
module Main exposing (..)
|
|
|
|
|
|
|
|
{-| Copyright 2020 Fluence Labs Limited
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
import Browser exposing (Document)
|
|
|
|
import Config exposing (Flags)
|
|
|
|
import Model exposing (Model, emptyModel)
|
2020-11-23 14:27:33 +03:00
|
|
|
import Msg exposing (Msg(..))
|
2020-11-23 11:07:07 +03:00
|
|
|
import Subscriptions exposing (subscriptions)
|
|
|
|
import Update exposing (update)
|
|
|
|
import View exposing (view)
|
2020-11-23 14:27:33 +03:00
|
|
|
import Url
|
|
|
|
import Browser.Navigation as Navigation
|
2020-11-23 11:07:07 +03:00
|
|
|
|
|
|
|
main =
|
2020-11-23 14:27:33 +03:00
|
|
|
Browser.application
|
2020-11-23 11:07:07 +03:00
|
|
|
{ init = init
|
|
|
|
, view = view
|
|
|
|
, update = update
|
|
|
|
, subscriptions = subscriptions
|
2020-11-23 14:27:33 +03:00
|
|
|
, onUrlChange = UrlChange
|
|
|
|
, onUrlRequest = Request
|
2020-11-23 11:07:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-23 14:27:33 +03:00
|
|
|
init : Flags -> Url.Url -> Navigation.Key -> ( Model, Cmd Msg )
|
|
|
|
init flags _ _ =
|
2020-11-23 11:07:07 +03:00
|
|
|
let
|
|
|
|
( em, initCmd ) =
|
|
|
|
emptyModel flags
|
|
|
|
in
|
|
|
|
( em, initCmd )
|