[#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 <motor4ik@gmail.com>
This commit is contained in:
andrey 2021-07-23 10:42:22 +02:00
parent e1dfaa4a6b
commit c50130fd4b
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
4 changed files with 33 additions and 31 deletions

View File

@ -14,36 +14,36 @@
(let [input-name (reagent/atom name)] (let [input-name (reagent/atom name)]
(fn [] (fn []
(let [edit? (not new)] (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} [react/view {:flex 1}
[topbar/topbar [quo/text-input
{:modal? true {:container-style {:margin 16 :margin-top 10}
:border-bottom true :accessibility-label :bookmark-input
:title (if edit? (i18n/label :t/edit-favourite) (i18n/label :t/new-favourite))}] :max-length 100
[react/view {:style {:flex 1}} :auto-focus true
[quo/text-input :show-cancel false
{:container-style {:margin 16 :margin-top 10} :label (i18n/label :t/name)
:accessibility-label :bookmark-input :default-value @input-name
:max-length 100 :on-change-text #(reset! input-name %)}]
:auto-focus true [react/text {:style {:margin 16 :color colors/gray}}
:show-cancel false url]]
:label (i18n/label :t/name) [toolbar/toolbar
:default-value @input-name {:show-border? true
:on-change-text #(reset! input-name %)}] :center
[react/text {:style {:margin 16 :color colors/gray}} [quo/button
url]] {:accessibility-label :save-bookmark
[toolbar/toolbar :type :secondary
{:show-border? true :disabled (string/blank? @input-name)
:center :on-press #(do (if edit?
[quo/button (re-frame/dispatch [:browser/update-bookmark {:url url :name @input-name}])
{:accessibility-label :save-bookmark (re-frame/dispatch [:browser/store-bookmark {:url url :name @input-name}]))
:type :secondary (re-frame/dispatch [:navigate-back]))}
:disabled (string/blank? @input-name) (if edit? (i18n/label :t/save) (i18n/label :t/add-favourite))]}]]))))
: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 [] (defn new-bookmark []
[screen @(re-frame/subscribe [:get-screen-params])]) [screen @(re-frame/subscribe [:get-screen-params])])

View File

@ -68,7 +68,7 @@
:icon (if fav? :main-icons/delete :main-icons/favourite) :icon (if fav? :main-icons/delete :main-icons/favourite)
:on-press #(hide-sheet-and-dispatch (if fav? :on-press #(hide-sheet-and-dispatch (if fav?
[:browser/delete-bookmark url] [: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 [quo/list-item
{:theme :accent {:theme :accent
:title (i18n/label :t/share) :title (i18n/label :t/share)

View File

@ -387,6 +387,7 @@
{:name :my-profile {:name :my-profile
:insets {:top false} :insets {:top false}
:options {:topBar {:visible false}}
:component profile.user/my-profile} :component profile.user/my-profile}
{:name :contacts-list {:name :contacts-list
:options {:topBar {:title {:text (i18n/label :t/contacts)}}} :options {:topBar {:title {:text (i18n/label :t/contacts)}}}

View File

@ -246,7 +246,8 @@
(views/letsubs [{:keys [address resolved-address searching]} [:wallet/recipient] (views/letsubs [{:keys [address resolved-address searching]} [:wallet/recipient]
search-filter [:search/recipient-filter]] search-filter [:search/recipient-filter]]
(let [disabled? (or searching (not resolved-address))] (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} [react/view {:flex 1}
[recipient-topbar] [recipient-topbar]
[search-input-wrapper] [search-input-wrapper]