mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-25 16:45:05 +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 = ""
|
||||
}
|
||||
|
||||
makeModel: List Contact -> Model
|
||||
makeModel contacts =
|
||||
let
|
||||
em = emptyModel
|
||||
in
|
||||
{ em | items = contacts }
|
||||
|
||||
getContacts: Model -> List Contact
|
||||
getContacts model =
|
||||
List.filter (\c -> c.value /= "") model.items
|
||||
@ -108,13 +101,13 @@ view model =
|
||||
]
|
||||
]
|
||||
[div [class "ui vertical secondary fluid menu"]
|
||||
(List.map (renderItem model) model.items)
|
||||
(List.map renderItem model.items)
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
renderItem: Model -> Contact -> Html Msg
|
||||
renderItem model contact =
|
||||
renderItem: Contact -> Html Msg
|
||||
renderItem contact =
|
||||
div [class "link item", onClick (Select contact) ]
|
||||
[i [class "delete icon"][]
|
||||
,div [class "ui blue label"]
|
||||
|
@ -18,7 +18,7 @@ import App.View exposing (..)
|
||||
|
||||
-- MAIN
|
||||
|
||||
|
||||
main: Program Flags Model Msg
|
||||
main =
|
||||
Browser.application
|
||||
{ init = init
|
||||
@ -42,7 +42,7 @@ init flags url key =
|
||||
else (im, Page.goto page)
|
||||
sessionCheck =
|
||||
case m.flags.account of
|
||||
Just acc -> Api.loginSession flags SessionCheckResp
|
||||
Just _ -> Api.loginSession flags SessionCheckResp
|
||||
Nothing -> Cmd.none
|
||||
in
|
||||
(m, Cmd.batch [ cmd, Ports.initElements(), Api.versionInfo flags VersionResp, sessionCheck ])
|
||||
|
@ -4,7 +4,6 @@ import Api
|
||||
import Api.Model.BasicResult exposing (BasicResult)
|
||||
import Page.CollectiveSettings.Data exposing (..)
|
||||
import Data.Flags exposing (Flags)
|
||||
import Data.Language
|
||||
import Comp.SourceManage
|
||||
import Comp.UserManage
|
||||
import Comp.Settings
|
||||
|
Loading…
x
Reference in New Issue
Block a user