mirror of
https://github.com/fluencelabs/dashboard
synced 2025-03-16 13:30:48 +00:00
module description, styles
This commit is contained in:
parent
518b0942d9
commit
4378d2aa33
30
src/Info.elm
Normal file
30
src/Info.elm
Normal file
@ -0,0 +1,30 @@
|
||||
module Info exposing (..)
|
||||
|
||||
|
||||
|
||||
import Dict exposing (Dict)
|
||||
|
||||
type alias ModuleDescription =
|
||||
{ site: String
|
||||
, description: String
|
||||
}
|
||||
|
||||
getSite : String -> String
|
||||
getSite name =
|
||||
modulesDescription |> Dict.get name |> Maybe.map .site |> Maybe.withDefault ""
|
||||
|
||||
getDescription : String -> String
|
||||
getDescription name =
|
||||
modulesDescription |> Dict.get name |> Maybe.map .description |> Maybe.withDefault "Awesome module without description"
|
||||
|
||||
modulesDescription : Dict String ModuleDescription
|
||||
modulesDescription =
|
||||
Dict.fromList
|
||||
[ ("sqlite3", { site = "https://github.com/fluencelabs/sqlite", description = "A database that ported on Wasm"})
|
||||
, ("history", { site = "https://github.com/fluencelabs/aqua-demo/tree/master/services/history", description = "Middleware that stores history (i.e. chat messages) in sqlite"})
|
||||
, ("user-list", { site = "https://github.com/fluencelabs/aqua-demo/tree/master/services/user-list", description = "Middleware that stores users with their auth (i.e. chat members) in sqlite"})
|
||||
, ("redis", { site = "https://github.com/fluencelabs/redis", description = "A database that ported on Wasm"})
|
||||
, ("curl", { site = "https://github.com/fluencelabs/fce/tree/master/examples/url-downloader/curl", description = "Module that call 'curl' command"})
|
||||
, ("facade", { site = "https://github.com/fluencelabs/fce/tree/master/examples/url-downloader/facade", description = "An API facade for Url-Downloader app"})
|
||||
, ("local_storage", { site = "https://github.com/fluencelabs/fce/tree/master/examples/url-downloader/local_storage", description = "Could be used to store data"})
|
||||
]
|
@ -1,7 +1,9 @@
|
||||
module ModulePage.View exposing (..)
|
||||
|
||||
import Dict exposing (Dict)
|
||||
import Html exposing (Html, article, div, h3, span, text)
|
||||
import Html exposing (Html, a, article, div, h3, span, text)
|
||||
import Html.Attributes exposing (attribute)
|
||||
import Info exposing (getDescription, getSite, modulesDescription)
|
||||
import Instances.View
|
||||
import Interface.View exposing (interfaceView)
|
||||
import Model exposing (Model)
|
||||
@ -59,9 +61,9 @@ moduleToInfo modules id =
|
||||
{ name = name
|
||||
, id = id
|
||||
, author = "Fluence Labs"
|
||||
, authorPeerId = "fluence_labs_peer_id"
|
||||
, description = "Excelent module"
|
||||
, website = "https://github.com/fluencelabs/"
|
||||
, authorPeerId = ""
|
||||
, description = getDescription m.name
|
||||
, website = getSite m.name
|
||||
, moduleInfo = m
|
||||
}
|
||||
)
|
||||
@ -74,6 +76,8 @@ viewInfo moduleInfo =
|
||||
article [ classes "cf" ]
|
||||
[ div [ classes "fl w-30 gray mv1" ] [ text "AUTHOR" ]
|
||||
, div [ classes "fl w-70 mv1" ] [ span [ classes "fl w-100 black b" ] [ text moduleInfo.author ], span [ classes "fl w-100 black" ] [ text moduleInfo.authorPeerId ] ]
|
||||
, div [ classes "fl w-30 gray mv1" ] [ text "WEBSITE" ]
|
||||
, div [ classes "fl w-70 mv1" ] [ a [ attribute "href" moduleInfo.website, classes "fl w-100 black" ] [ text moduleInfo.website ] ]
|
||||
, div [ classes "fl w-30 gray mv1" ] [ text "DESCRIPTION" ]
|
||||
, div [ classes "fl w-70 mv1" ] [ span [ classes "fl w-100 black" ] [ text moduleInfo.description ] ]
|
||||
, div [ classes "fl w-30 gray mv1" ] [ text "INTERFACE" ]
|
||||
|
@ -22,11 +22,11 @@ import { registerService } from 'fluence/dist/globalState';
|
||||
import { ServiceOne } from 'fluence/dist/service';
|
||||
import * as serviceWorker from './serviceWorker';
|
||||
import { Elm } from './Main.elm';
|
||||
import { faasNet } from './environments';
|
||||
import {faasNet, stage} from './environments';
|
||||
|
||||
const relayIdx = 1;
|
||||
|
||||
export const relays: { peerId: string; multiaddr: string }[] = faasNet;
|
||||
export const relays: { peerId: string; multiaddr: string }[] = stage;
|
||||
|
||||
function genFlags(peerId: string): any {
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user