Skip to content

Commit

Permalink
[#19921] fix: reviewer feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen-ghafouri committed May 24, 2024
1 parent 3748e82 commit a560944
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 23 deletions.
21 changes: 15 additions & 6 deletions src/quo/components/drawers/drawer_top/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
(str description " · " (i18n/label :t/on-device))])

(defn- context-tag-subtitle
[{:keys [context-tag-type community-logo community-name account-name emoji customization-color
[{:keys [context-tag-type context icon community-logo community-name account-name emoji
customization-color
full-name profile-picture]}]
(let [tag-type (or context-tag-type :account)]
[rn/view
Expand All @@ -94,7 +95,9 @@
:size 24
:customization-color customization-color
:profile-picture profile-picture
:full-name full-name}]]))
:full-name full-name
:context context
:icon icon}]]))

(defn- description-subtitle
[{:keys [theme blur? description]}]
Expand All @@ -106,7 +109,8 @@

(defn- subtitle
[{:keys [type theme blur? stored networks description community-name community-logo
context-tag-type account-name emoji customization-color full-name profile-picture]}]
context-tag-type account-name emoji customization-color full-name profile-picture context
icon]}]
(cond
(= :keypair type)
[keypair-subtitle
Expand Down Expand Up @@ -136,7 +140,9 @@
:emoji emoji
:customization-color customization-color
:profile-picture profile-picture
:full-name full-name}]
:full-name full-name
:context context
:icon icon}]

(and (not= :label type) description)
[description-subtitle
Expand Down Expand Up @@ -198,7 +204,8 @@
[{:keys [title title-icon type description blur? community-name community-logo button-icon
account-name emoji context-tag-type button-type container-style
on-button-press on-button-long-press profile-picture stored networks label full-name
button-disabled? account-avatar-emoji account-avatar-type customization-color icon-avatar]}]
button-disabled? account-avatar-emoji account-avatar-type customization-color icon-avatar
context icon]}]
(let [theme (quo.theme/use-theme)]
[rn/view {:style (merge style/container container-style)}
(when (left-image-supported-types type)
Expand Down Expand Up @@ -232,7 +239,9 @@
:account-name account-name
:emoji emoji
:full-name full-name
:profile-picture profile-picture}]]
:profile-picture profile-picture
:context context
:icon icon}]]
[right-icon
{:theme theme
:type type
Expand Down
5 changes: 2 additions & 3 deletions src/quo/components/text_combinations/page_top/style.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
:padding-horizontal 20
:row-gap 8})

(defn header
[title-size]
(def header
{:flex-direction :row
:justify-content :space-between
:height (if title-size :auto 32)})
:height 32})

(def header-title
{:flex 1
Expand Down
5 changes: 2 additions & 3 deletions src/quo/components/text_combinations/page_top/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@
(format-counter counter-bottom))]])

(defn- header
[{:keys [title title-size title-accessibility-label input counter-top counter-bottom
[{:keys [title title-accessibility-label input counter-top counter-bottom
title-right title-right-props]
avatar-props :avatar}]
(let [title-props (assoc title-right-props
:title title
:title-size title-size
:right title-right
:accessibility-label title-accessibility-label)]
[rn/view {:style (style/header title-size)}
[rn/view {:style style/header}
[rn/view {:style style/header-title}
(when avatar-props
(let [avatar-props (assoc avatar-props :size :size-32)]
Expand Down
4 changes: 2 additions & 2 deletions src/quo/components/text_combinations/standard_title/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
:icon-color (style/right-tag-icon-color blur? theme)}]))

(defn view
[{:keys [title title-size right accessibility-label container-style] :as props}]
[{:keys [title right accessibility-label container-style] :as props}]
[rn/view {:style (merge style/container container-style)}
[text/text
{:size (or title-size :heading-1)
{:size :heading-1
:weight :semi-bold
:accessibility-label accessibility-label}
title]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@
[:wallet/remove-keypair key-uid])
[key-uid])]
[:<>
[quo/page-top
{:container-style style/header-container
:title (i18n/label :t/remove-key-pair-and-derived-accounts)
:title-size :heading-2
:description :context-tag
:context-tag {:type :icon
:size 24
:context name
:icon :i/seed-phrase}}]
[quo/drawer-top
{:container-style style/header-container
:title (i18n/label :t/remove-key-pair-and-derived-accounts)
:type :context-tag
:context-tag-type :icon
:context name
:icon :i/seed-phrase}]
[rn/view {:style style/content}
[quo/text
{:style {:margin-top 4}
Expand Down

0 comments on commit a560944

Please sign in to comment.