on master help sign in
Title button
commitac71122c3aa85b1bbcf988994a7ac870540cf370 authoriko <ilyakooo0@gmail.com> dateTue 9 Aug 2022, 20:25 (4 years ago) parent890ca92
9 files changed+34−25
frontend/Main.elm+2−2 frontend/Page.elm+1−1 frontend/Pages/Captcha.elm+1−1 frontend/Pages/Cipher.elm+1−1 frontend/Pages/Ciphers.elm+16−13 frontend/Pages/Login.elm+1−1 frontend/Pages/MasterPassword.elm+1−1 frontend/Pages/Navigation.elm+6−5 style.css+5
frontend/Main.elm+2−2
@@ -82,7 +82,7 @@ showPage :
8282 String
8383 -> PageModel
8484 ->
85− { title : String
85+ { title : List (Html Msg)
8686 , body : List (Html Msg)
8787 , topButton : Maybe (Navigation.TopButton Msg)
8888 }
@@ -113,7 +113,7 @@ showPage email page =
113113 }
114114
115115 LoadingPage ->
116− { title = ""
116+ { title = []
117117 , body = [ loader ]
118118 , topButton = Just (BackButton PopView)
119119 }
frontend/Page.elm+1−1
@@ -18,5 +18,5 @@ type alias InitializedPage init model imsg emsg =
1818 , view : model -> List (Html emsg)
1919 , update : imsg -> model -> ( Result String model, Cmd emsg )
2020 , subscriptions : model -> Sub emsg
21− , title : model -> String
21+ , title : model -> List (Html emsg)
2222 }
frontend/Pages/Captcha.elm+1−1
@@ -29,7 +29,7 @@ page callbacks liftMsg =
2929 , view = \model -> view model |> List.map (Html.map liftMsg)
3030 , update = \msg model -> update callbacks liftMsg msg model
3131 , subscriptions = \model -> subscriptions model |> Sub.map liftMsg
32− , title = always "Captcha"
32+ , title = always [ text "Captcha" ]
3333 }
3434
3535
frontend/Pages/Cipher.elm+1−1
@@ -32,7 +32,7 @@ page callbacks liftMsg =
3232 , view = \model -> view model |> List.map (Html.map liftMsg)
3333 , update = \msg model -> update callbacks liftMsg msg model
3434 , subscriptions = \model -> subscriptions model |> Sub.map liftMsg
35− , title = \{ cipher } -> cipher.name
35+ , title = \{ cipher } -> [ text cipher.name, span [ Attr.class "u-float-right" ] [ iconButton "edit" (callbacks.copy "") ] ]
3636 }
3737
3838
frontend/Pages/Ciphers.elm+16−13
@@ -98,23 +98,26 @@ page callbacks liftMsg =
9898 , subscriptions = \model -> subscriptions model |> Sub.map liftMsg
9999 , title =
100100 \{ ciphersListFilter } ->
101− case ciphersListFilter of
102− AllCiphers ->
103− "All items"
101+ [ text
102+ (case ciphersListFilter of
103+ AllCiphers ->
104+ "All items"
104105
105− SpecificCiphers cipherType ->
106− case cipherType of
107− Bridge.CardType ->
108− "Cards"
106+ SpecificCiphers cipherType ->
107+ case cipherType of
108+ Bridge.CardType ->
109+ "Cards"
109110
110− Bridge.IdentityType ->
111− "Identities"
111+ Bridge.IdentityType ->
112+ "Identities"
112113
113− Bridge.LoginType ->
114− "Passwords"
114+ Bridge.LoginType ->
115+ "Passwords"
115116
116− Bridge.NoteType ->
117− "Notes"
117+ Bridge.NoteType ->
118+ "Notes"
119+ )
120+ ]
118121 }
119122
120123
frontend/Pages/Login.elm+1−1
@@ -32,7 +32,7 @@ page callbacks liftMsg =
3232 , view = \model -> view model |> List.map (Html.map liftMsg)
3333 , update = \msg model -> update callbacks liftMsg msg model
3434 , subscriptions = \model -> subscriptions model |> Sub.map liftMsg
35− , title = always "Log into bitwarden"
35+ , title = always [ text "Log into bitwarden" ]
3636 }
3737
3838
frontend/Pages/MasterPassword.elm+1−1
@@ -32,7 +32,7 @@ page callbacks liftMsg =
3232 , view = \model -> view model |> List.map (Html.map liftMsg)
3333 , update = \msg model -> update callbacks liftMsg msg model
3434 , subscriptions = \model -> subscriptions model |> Sub.map liftMsg
35− , title = always "Enter master password"
35+ , title = always [ text "Enter master password" ]
3636 }
3737
3838
frontend/Pages/Navigation.elm+6−5
@@ -24,7 +24,7 @@ type TopButton msg
2424
2525type alias Config msg =
2626 { topButton : Maybe (TopButton msg)
27− , title : String
27+ , title : List (Html msg)
2828 }
2929
3030
@@ -40,7 +40,7 @@ navigation { topButton, title } =
4040 )
4141 ++ [ nav [ Attr.class "p-tabs p-tabs__list no-scroll-bar" ]
4242 [ h3 []
43− [ case topButton of
43+ ([ case topButton of
4444 Nothing ->
4545 button
4646 [ Attr.class "p-button--base is-inline u-no-margin", Attr.style "visibility" "hidden" ]
@@ -55,8 +55,9 @@ navigation { topButton, title } =
5555 button
5656 [ Attr.class "p-button--base is-inline u-no-margin", Ev.onClick cfg.toggle ]
5757 [ i [ Attr.class "p-icon--menu" ] [] ]
58− , text title
59− ]
58+ ]
59+ ++ title
60+ )
6061 ]
6162 ]
6263 )
@@ -143,7 +144,7 @@ showNavigationView :
143144 ->
144145 (model
145146 ->
146− { title : String
147+ { title : List (Html msg)
147148 , body : List (Html msg)
148149 , topButton : Maybe (TopButton msg)
149150 }
style.css+5
@@ -13,10 +13,15 @@ nav.p-tabs__list {
1313 position: sticky;
1414 background-color: white;
1515 padding-bottom: 1rem;
16+ padding-right: 1rem;
1617 padding-bottom: 0;
1718 z-index: 10;
1819}
1920
21+nav h3 {
22+ width: 100%;
23+}
24+
2025.ninety-counter {
2126 transform: rotate(90deg);
2227}