mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-28 17:55:06 +00:00
Add elm-analyse file and fix a few warnings
This commit is contained in:
parent
f747c6146d
commit
852d292d9b
5
elm-analyse.json
Normal file
5
elm-analyse.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"excludedPaths": [
|
||||||
|
"modules/webapp/target/elm-src"
|
||||||
|
]
|
||||||
|
}
|
@ -31,13 +31,6 @@ emptyModel =
|
|||||||
, value = ""
|
, value = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
makeModel: List Contact -> Model
|
|
||||||
makeModel contacts =
|
|
||||||
let
|
|
||||||
em = emptyModel
|
|
||||||
in
|
|
||||||
{ em | items = contacts }
|
|
||||||
|
|
||||||
getContacts: Model -> List Contact
|
getContacts: Model -> List Contact
|
||||||
getContacts model =
|
getContacts model =
|
||||||
List.filter (\c -> c.value /= "") model.items
|
List.filter (\c -> c.value /= "") model.items
|
||||||
@ -108,13 +101,13 @@ view model =
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
[div [class "ui vertical secondary fluid menu"]
|
[div [class "ui vertical secondary fluid menu"]
|
||||||
(List.map (renderItem model) model.items)
|
(List.map renderItem model.items)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
renderItem: Model -> Contact -> Html Msg
|
renderItem: Contact -> Html Msg
|
||||||
renderItem model contact =
|
renderItem contact =
|
||||||
div [class "link item", onClick (Select contact) ]
|
div [class "link item", onClick (Select contact) ]
|
||||||
[i [class "delete icon"][]
|
[i [class "delete icon"][]
|
||||||
,div [class "ui blue label"]
|
,div [class "ui blue label"]
|
||||||
|
@ -18,7 +18,7 @@ import App.View exposing (..)
|
|||||||
|
|
||||||
-- MAIN
|
-- MAIN
|
||||||
|
|
||||||
|
main: Program Flags Model Msg
|
||||||
main =
|
main =
|
||||||
Browser.application
|
Browser.application
|
||||||
{ init = init
|
{ init = init
|
||||||
@ -42,7 +42,7 @@ init flags url key =
|
|||||||
else (im, Page.goto page)
|
else (im, Page.goto page)
|
||||||
sessionCheck =
|
sessionCheck =
|
||||||
case m.flags.account of
|
case m.flags.account of
|
||||||
Just acc -> Api.loginSession flags SessionCheckResp
|
Just _ -> Api.loginSession flags SessionCheckResp
|
||||||
Nothing -> Cmd.none
|
Nothing -> Cmd.none
|
||||||
in
|
in
|
||||||
(m, Cmd.batch [ cmd, Ports.initElements(), Api.versionInfo flags VersionResp, sessionCheck ])
|
(m, Cmd.batch [ cmd, Ports.initElements(), Api.versionInfo flags VersionResp, sessionCheck ])
|
||||||
|
@ -4,7 +4,6 @@ import Api
|
|||||||
import Api.Model.BasicResult exposing (BasicResult)
|
import Api.Model.BasicResult exposing (BasicResult)
|
||||||
import Page.CollectiveSettings.Data exposing (..)
|
import Page.CollectiveSettings.Data exposing (..)
|
||||||
import Data.Flags exposing (Flags)
|
import Data.Flags exposing (Flags)
|
||||||
import Data.Language
|
|
||||||
import Comp.SourceManage
|
import Comp.SourceManage
|
||||||
import Comp.UserManage
|
import Comp.UserManage
|
||||||
import Comp.Settings
|
import Comp.Settings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user