From c50130fd4bb44a6e0ac0a9b1178ff4a602ed3b5d Mon Sep 17 00:00:00 2001 From: andrey Date: Fri, 23 Jul 2021 10:42:22 +0200 Subject: [PATCH] [#12317] Gaps on 'recipient' screen in Wallet, 'add and edit favourites' screens in Browser, and in Profile after setting up ENS Signed-off-by: andrey --- .../ui/screens/browser/bookmarks/views.cljs | 58 +++++++++---------- .../ui/screens/browser/options/views.cljs | 2 +- src/status_im/ui/screens/screens.cljs | 1 + .../ui/screens/wallet/recipient/views.cljs | 3 +- 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/src/status_im/ui/screens/browser/bookmarks/views.cljs b/src/status_im/ui/screens/browser/bookmarks/views.cljs index 146a8d2f8b..5d68a77fc3 100644 --- a/src/status_im/ui/screens/browser/bookmarks/views.cljs +++ b/src/status_im/ui/screens/browser/bookmarks/views.cljs @@ -14,36 +14,36 @@ (let [input-name (reagent/atom name)] (fn [] (let [edit? (not new)] - [kb-presentation/keyboard-avoiding-view {:style {:flex 1}} + [kb-presentation/keyboard-avoiding-view {:style {:flex 1} + :ignore-offset true} + [topbar/topbar + {:modal? true + :border-bottom true + :title (if edit? (i18n/label :t/edit-favourite) (i18n/label :t/new-favourite))}] [react/view {:flex 1} - [topbar/topbar - {:modal? true - :border-bottom true - :title (if edit? (i18n/label :t/edit-favourite) (i18n/label :t/new-favourite))}] - [react/view {:style {:flex 1}} - [quo/text-input - {:container-style {:margin 16 :margin-top 10} - :accessibility-label :bookmark-input - :max-length 100 - :auto-focus true - :show-cancel false - :label (i18n/label :t/name) - :default-value @input-name - :on-change-text #(reset! input-name %)}] - [react/text {:style {:margin 16 :color colors/gray}} - url]] - [toolbar/toolbar - {:show-border? true - :center - [quo/button - {:accessibility-label :save-bookmark - :type :secondary - :disabled (string/blank? @input-name) - :on-press #(do (if edit? - (re-frame/dispatch [:browser/update-bookmark {:url url :name @input-name}]) - (re-frame/dispatch [:browser/store-bookmark {:url url :name @input-name}])) - (re-frame/dispatch [:navigate-back]))} - (if edit? (i18n/label :t/save) (i18n/label :t/add-favourite))]}]]])))) + [quo/text-input + {:container-style {:margin 16 :margin-top 10} + :accessibility-label :bookmark-input + :max-length 100 + :auto-focus true + :show-cancel false + :label (i18n/label :t/name) + :default-value @input-name + :on-change-text #(reset! input-name %)}] + [react/text {:style {:margin 16 :color colors/gray}} + url]] + [toolbar/toolbar + {:show-border? true + :center + [quo/button + {:accessibility-label :save-bookmark + :type :secondary + :disabled (string/blank? @input-name) + :on-press #(do (if edit? + (re-frame/dispatch [:browser/update-bookmark {:url url :name @input-name}]) + (re-frame/dispatch [:browser/store-bookmark {:url url :name @input-name}])) + (re-frame/dispatch [:navigate-back]))} + (if edit? (i18n/label :t/save) (i18n/label :t/add-favourite))]}]])))) (defn new-bookmark [] [screen @(re-frame/subscribe [:get-screen-params])]) \ No newline at end of file diff --git a/src/status_im/ui/screens/browser/options/views.cljs b/src/status_im/ui/screens/browser/options/views.cljs index 21e809b5f4..09800d7f69 100644 --- a/src/status_im/ui/screens/browser/options/views.cljs +++ b/src/status_im/ui/screens/browser/options/views.cljs @@ -68,7 +68,7 @@ :icon (if fav? :main-icons/delete :main-icons/favourite) :on-press #(hide-sheet-and-dispatch (if fav? [:browser/delete-bookmark url] - [:navigate-to :new-bookmark {:url url :name name :new true}]))}] + [:open-modal :new-bookmark {:url url :name name :new true}]))}] [quo/list-item {:theme :accent :title (i18n/label :t/share) diff --git a/src/status_im/ui/screens/screens.cljs b/src/status_im/ui/screens/screens.cljs index a4505e009e..8375c3bde4 100644 --- a/src/status_im/ui/screens/screens.cljs +++ b/src/status_im/ui/screens/screens.cljs @@ -387,6 +387,7 @@ {:name :my-profile :insets {:top false} + :options {:topBar {:visible false}} :component profile.user/my-profile} {:name :contacts-list :options {:topBar {:title {:text (i18n/label :t/contacts)}}} diff --git a/src/status_im/ui/screens/wallet/recipient/views.cljs b/src/status_im/ui/screens/wallet/recipient/views.cljs index 6b51ffe75e..f8ff73b20f 100644 --- a/src/status_im/ui/screens/wallet/recipient/views.cljs +++ b/src/status_im/ui/screens/wallet/recipient/views.cljs @@ -246,7 +246,8 @@ (views/letsubs [{:keys [address resolved-address searching]} [:wallet/recipient] search-filter [:search/recipient-filter]] (let [disabled? (or searching (not resolved-address))] - [kb-presentation/keyboard-avoiding-view {:style {:flex 1}} + [kb-presentation/keyboard-avoiding-view {:style {:flex 1} + :ignore-offset true} [react/view {:flex 1} [recipient-topbar] [search-input-wrapper]