mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-10-22 13:20:12 +00:00
Apply tag colors from settings
This commit is contained in:
@@ -14,6 +14,7 @@ import Comp.OrgForm
|
||||
import Comp.OrgTable
|
||||
import Comp.YesNoDimmer
|
||||
import Data.Flags exposing (Flags)
|
||||
import Data.UiSettings exposing (UiSettings)
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Html.Events exposing (onClick, onInput, onSubmit)
|
||||
@@ -197,13 +198,13 @@ update flags msg model =
|
||||
( m, Api.getOrganizations flags str OrgResp )
|
||||
|
||||
|
||||
view : Model -> Html Msg
|
||||
view model =
|
||||
view : UiSettings -> Model -> Html Msg
|
||||
view settings model =
|
||||
if model.viewMode == Table then
|
||||
viewTable model
|
||||
|
||||
else
|
||||
viewForm model
|
||||
viewForm settings model
|
||||
|
||||
|
||||
viewTable : Model -> Html Msg
|
||||
@@ -248,8 +249,8 @@ viewTable model =
|
||||
]
|
||||
|
||||
|
||||
viewForm : Model -> Html Msg
|
||||
viewForm model =
|
||||
viewForm : UiSettings -> Model -> Html Msg
|
||||
viewForm settings model =
|
||||
let
|
||||
newOrg =
|
||||
model.formModel.org.id == ""
|
||||
@@ -269,7 +270,7 @@ viewForm model =
|
||||
, text model.formModel.org.id
|
||||
]
|
||||
]
|
||||
, Html.map FormMsg (Comp.OrgForm.view model.formModel)
|
||||
, Html.map FormMsg (Comp.OrgForm.view settings model.formModel)
|
||||
, div
|
||||
[ classList
|
||||
[ ( "ui error message", True )
|
||||
|
Reference in New Issue
Block a user