on master help sign in
Actually normalize everything
commit884ecf5246b52c3a476b73d58b16d2e0720ffb8c authoriko <ilyakooo0@gmail.com> dateSun 14 Aug 2022, 07:04 (4 years ago) parentd1758ff
2 files changed+6−2
frontend/Logic/Cipher.elm+1−1 frontend/Pages/EditCipher.elm+5−1
frontend/Logic/Cipher.elm+1−1
@@ -49,7 +49,7 @@ normalizeIdentityCipher { address1, address2, address3, city, company, country,
4949 , ssn = normalizeStringMaybe ssn
5050 , state = normalizeStringMaybe state
5151 , title = normalizeStringMaybe title
52− , username = username
52+ , username = normalizeStringMaybe username
5353 }
5454
5555
frontend/Pages/EditCipher.elm+5−1
@@ -5,6 +5,7 @@ import GlobalEvents
55import Html exposing (..)
66import Html.Attributes as Attr
77import Html.Events as Ev
8+import Logic.Cipher exposing (normalizeCipher)
89import Modal exposing (modal)
910import Page exposing (..)
1011import Pages.PasswordGenerator as PasswordGenerator
@@ -43,7 +44,10 @@ page liftMsg =
4344 , title =
4445 \{ fullCipher, callbacks } ->
4546 [ text fullCipher.name
46− , span [ Attr.class "u-float-right" ] [ iconButton "task-outstanding" (callbacks.save fullCipher) ]
47+ , span [ Attr.class "u-float-right" ]
48+ [ iconButton "task-outstanding"
49+ (callbacks.save { fullCipher | cipher = normalizeCipher fullCipher.cipher })
50+ ]
4751 ]
4852 , event =
4953 \model ev ->