mirror of
https://github.com/fluencelabs/dashboard
synced 2025-03-16 13:30:48 +00:00
send script only once, fix paddings
This commit is contained in:
parent
78e0cf69c3
commit
08ae79feb8
@ -11,7 +11,7 @@ import Palette exposing (classes, redFont)
|
||||
|
||||
view : Model -> Html msg
|
||||
view model =
|
||||
div [ classes "pt4" ]
|
||||
div [ classes "fl w-100 pt4" ]
|
||||
[ div [ redFont, classes "f1 fw4 pt3 pb3" ] [ text "Developer Hub" ]
|
||||
, welcomeText
|
||||
, div [ classes "pt4 f3 fw5 pb4" ] [ text "Featured Blueprints" ]
|
||||
|
@ -57,6 +57,7 @@ init flags url key =
|
||||
, blueprints = Dict.empty
|
||||
, toggledInterface = Nothing
|
||||
, knownPeers = flags.knownPeers
|
||||
, isInitialized = False
|
||||
}
|
||||
in
|
||||
( emptyModel, Route.routeCommand emptyModel r )
|
||||
|
@ -56,4 +56,5 @@ type alias Model =
|
||||
, blueprints : Dict String Blueprint
|
||||
, toggledInterface : Maybe String
|
||||
, knownPeers : List String
|
||||
, isInitialized : Bool
|
||||
}
|
||||
|
@ -60,15 +60,4 @@ getAllCmd peerId relayId knownPeers =
|
||||
|
||||
routeCommand : Model -> Route -> Cmd msg
|
||||
routeCommand m r =
|
||||
case r of
|
||||
Page _ ->
|
||||
getAllCmd m.peerId m.relayId m.knownPeers
|
||||
|
||||
Peer _ ->
|
||||
getAllCmd m.peerId m.relayId m.knownPeers
|
||||
|
||||
Blueprint _ ->
|
||||
getAllCmd m.peerId m.relayId m.knownPeers
|
||||
|
||||
Module _ ->
|
||||
getAllCmd m.peerId m.relayId m.knownPeers
|
||||
if m.isInitialized then Cmd.none else getAllCmd m.peerId m.relayId m.knownPeers
|
||||
|
@ -16,7 +16,6 @@ limitations under the License.
|
||||
|
||||
-}
|
||||
|
||||
import AirScripts.GetAll
|
||||
import Blueprints.Model exposing (Blueprint)
|
||||
import Browser
|
||||
import Browser.Navigation as Nav
|
||||
@ -26,7 +25,6 @@ import Model exposing (Model, PeerData, emptyPeerData)
|
||||
import Modules.Model exposing (Module)
|
||||
import Msg exposing (..)
|
||||
import Nodes.Model exposing (Identify)
|
||||
import Port exposing (sendAir)
|
||||
import Route exposing (getAllCmd)
|
||||
import Service.Model exposing (Service)
|
||||
import Url
|
||||
@ -46,7 +44,7 @@ update msg model =
|
||||
cmd =
|
||||
Route.routeCommand model route
|
||||
in
|
||||
( { model | url = url, page = route, toggledInterface = Nothing }, cmd )
|
||||
( { model | url = url, isInitialized = True, page = route, toggledInterface = Nothing }, cmd )
|
||||
|
||||
LinkClicked urlRequest ->
|
||||
case urlRequest of
|
||||
|
Loading…
x
Reference in New Issue
Block a user