From 4ef19961370a3e7088d78e0802a5e1996dece9da Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Tue, 16 Feb 2021 23:18:40 +0100 Subject: [PATCH] Fix extracted content border --- modules/webapp/src/main/elm/Comp/AttachmentMeta.elm | 12 ++++++------ .../main/elm/Comp/ItemDetail/SingleAttachment.elm | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/webapp/src/main/elm/Comp/AttachmentMeta.elm b/modules/webapp/src/main/elm/Comp/AttachmentMeta.elm index 8b775823..cc6d3c7f 100644 --- a/modules/webapp/src/main/elm/Comp/AttachmentMeta.elm +++ b/modules/webapp/src/main/elm/Comp/AttachmentMeta.elm @@ -220,9 +220,9 @@ renderLabel label = --- View2 -view2 : Model -> Html Msg -view2 model = - div [] +view2 : List (Attribute Msg) -> Model -> Html Msg +view2 attrs model = + div attrs [ h3 [ class S.header3 ] [ text "Extracted Meta Data" ] @@ -252,7 +252,7 @@ viewData2 meta = , div [ class "text-lg font-bold mt-2" ] [ text "Labels" ] - , div [ class "flex fex-row flex-wrap space-x-2" ] + , div [ class "flex fex-row flex-wrap" ] (List.map renderLabelItem2 meta.labels) , div [ class "text-lg font-bold mt-2" ] [ text "Proposals" @@ -354,14 +354,14 @@ renderLabel2 label = in div [ class S.basicLabel - , class "mt-1 text-sm" + , class "mt-1 mr-2 text-sm" , title label.labelType ] [ i [ class icon ] [] , span [ class "ml-2" ] [ text label.label ] - , div [ class "opacity-75 ml-3" ] + , div [ class "opacity-75 ml-3 font-mono" ] [ String.fromInt label.beginPos |> text , text "-" , String.fromInt label.endPos |> text diff --git a/modules/webapp/src/main/elm/Comp/ItemDetail/SingleAttachment.elm b/modules/webapp/src/main/elm/Comp/ItemDetail/SingleAttachment.elm index 63ec841b..fc9a36d8 100644 --- a/modules/webapp/src/main/elm/Comp/ItemDetail/SingleAttachment.elm +++ b/modules/webapp/src/main/elm/Comp/ItemDetail/SingleAttachment.elm @@ -55,7 +55,10 @@ view settings model pos attach = case Dict.get attach.id model.attachMeta of Just am -> Html.map (AttachMetaMsg attach.id) - (Comp.AttachmentMeta.view2 am) + (Comp.AttachmentMeta.view2 + [ class "border-r border-l dark:border-bluegray-600 px-2" ] + am + ) Nothing -> span [ class "hidden" ] []