diff --git a/modules/webapp/src/main/elm/Comp/ItemMail.elm b/modules/webapp/src/main/elm/Comp/ItemMail.elm index 617325a5..e7a47b80 100644 --- a/modules/webapp/src/main/elm/Comp/ItemMail.elm +++ b/modules/webapp/src/main/elm/Comp/ItemMail.elm @@ -49,6 +49,7 @@ type alias Model = , body : String , attachAll : Bool , formError : FormError + , showCC : Bool } @@ -65,6 +66,7 @@ type Msg | BCCRecipientMsg Comp.EmailInput.Msg | SetBody String | SetSubjectBody String String + | ToggleShowCC | ConnMsg (Comp.Dropdown.Msg String) | ConnResp (Result Http.Error EmailSettingsList) | ToggleAttachAll @@ -97,6 +99,7 @@ emptyModel = , body = "" , attachAll = True , formError = FormErrorNone + , showCC = False } @@ -189,6 +192,9 @@ update flags msg model = ToggleAttachAll -> ( { model | attachAll = not model.attachAll }, Cmd.none, FormNone ) + ToggleShowCC -> + ( { model | showCC = not model.showCC }, Cmd.none, FormNone ) + ConnResp (Ok list) -> let names = @@ -324,9 +330,22 @@ view texts settings cfg model = , div [ class "mb-4" ] [ label [ class S.inputLabel + , class "flex flex-row" ] [ text texts.recipients , B.inputRequired + , a + [ class S.link + , class "justify-end flex flex-grow" + , onClick ToggleShowCC + , href "#" + ] + [ if model.showCC then + text texts.lessRecipients + + else + text texts.moreRecipients + ] ] , Html.map RecipientMsg (Comp.EmailInput.view2 { style = dds, placeholder = appendDots texts.recipients } @@ -334,7 +353,10 @@ view texts settings cfg model = model.recipientsModel ) ] - , div [ class "mb-4" ] + , div + [ class "mb-4" + , classList [ ( "hidden", not model.showCC ) ] + ] [ label [ class S.inputLabel ] [ text texts.ccRecipients ] @@ -344,7 +366,10 @@ view texts settings cfg model = model.ccRecipientsModel ) ] - , div [ class "mb-4" ] + , div + [ class "mb-4" + , classList [ ( "hidden", not model.showCC ) ] + ] [ label [ class S.inputLabel ] [ text texts.bccRecipients ] diff --git a/modules/webapp/src/main/elm/Messages/Comp/ItemMail.elm b/modules/webapp/src/main/elm/Messages/Comp/ItemMail.elm index c3ad7854..f50885bd 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/ItemMail.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/ItemMail.elm @@ -29,6 +29,8 @@ type alias Texts = , includeAllAttachments : String , connectionMissing : String , sendLabel : String + , moreRecipients : String + , lessRecipients : String } @@ -46,6 +48,8 @@ gb = , includeAllAttachments = "Include all item attachments" , connectionMissing = "No E-Mail connections configured. Goto user settings to add one." , sendLabel = "Send" + , moreRecipients = "More…" + , lessRecipients = "Less…" } @@ -63,4 +67,6 @@ de = , includeAllAttachments = "Alle Anhänge mit einfügen" , connectionMissing = "Keine E-Mail-Verbindung definiert. Gehe zu den Benutzereinstellungen und füge eine hinzu." , sendLabel = "Senden" + , moreRecipients = "Weitere…" + , lessRecipients = "Weniger…" }