Skip to content

Commit

Permalink
change keycard-logo.svg to png
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryn committed Aug 5, 2019
1 parent 41fa926 commit 187da73
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 20 deletions.
3 changes: 0 additions & 3 deletions resources/icons/main/keycard-logo.svg

This file was deleted.

Binary file added resources/images/ui/keycard-logo-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/ui/keycard-logo-gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/status_im/react_native/resources.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
:keycard-lock (js-require/js-require "./resources/images/ui/keycard-lock.png")
:keycard (js-require/js-require "./resources/images/ui/keycard.png")
:keycard-logo (js-require/js-require "./resources/images/ui/keycard-logo.png")
:keycard-logo-blue (js-require/js-require "./resources/images/ui/keycard-logo-blue.png")
:keycard-logo-gray (js-require/js-require "./resources/images/ui/keycard-logo-gray.png")
:keycard-key (js-require/js-require "./resources/images/ui/keycard-key.png")
:keycard-empty (js-require/js-require "./resources/images/ui/keycard-empty.png")
:keycard-phone (js-require/js-require "./resources/images/ui/keycard-phone.png")
Expand Down
10 changes: 7 additions & 3 deletions src/status_im/ui/components/action_button/action_button.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
[status-im.ui.components.common.common :refer [list-separator]]
[status-im.ui.components.icons.vector-icons :as vi]
[status-im.ui.components.react :as rn]
[status-im.ui.components.colors :as colors]))
[status-im.ui.components.colors :as colors]
[status-im.ui.components.react :as react]
[status-im.react-native.resources :as resources]))

(defn action-button [{:keys [label accessibility-label icon icon-opts on-press label-style cyrcle-color]}]
(defn action-button [{:keys [label accessibility-label icon icon-opts image image-opts on-press label-style cyrcle-color]}]
[rn/touchable-highlight (merge {:on-press on-press
:underlay-color (colors/alpha colors/gray 0.15)}
(when accessibility-label
{:accessibility-label accessibility-label}))
[rn/view {:style st/action-button}
[rn/view {:style (st/action-button-icon-container cyrcle-color)}
[vi/icon icon icon-opts]]
(if image
[react/image (assoc image-opts :source (resources/get-image image))]
[vi/icon icon icon-opts])]
[rn/view st/action-button-label-container
[rn/text {:style (merge st/action-button-label label-style)}
label]]]])
Expand Down
1 change: 0 additions & 1 deletion src/status_im/ui/components/icons/vector_icons.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
:main-icons/in-contacts (js/require "./resources/icons/main/in_contacts.svg")
:main-icons/info (js/require "./resources/icons/main/info.svg")
:main-icons/keycard (js/require "./resources/icons/main/keycard.svg")
:main-icons/keycard-logo (js/require "./resources/icons/main/keycard-logo.svg")
:main-icons/language (js/require "./resources/icons/main/language.svg")
:main-icons/link (js/require "./resources/icons/main/link.svg")
:main-icons/log-level (js/require "./resources/icons/main/mailserver.svg")
Expand Down
25 changes: 16 additions & 9 deletions src/status_im/ui/screens/intro/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@
(utils/get-shortened-address public-key)]]
[radio/radio selected?]]]))])

(defn storage-entry [{:keys [type icon icon-width icon-height title desc]} selected-storage-type]
(defn storage-entry [{:keys [type icon icon-width icon-height
image image-selected image-width image-height
title desc]} selected-storage-type]
(let [selected? (= type selected-storage-type)]
[react/view
[react/view {:style {:padding-top 14 :padding-bottom 4}}
Expand All @@ -140,8 +142,12 @@
:align-items :flex-start
:padding-top 20
:padding-bottom 12)
[vector-icons/icon icon {:color (if selected? colors/blue colors/gray)
:width icon-width :height icon-height}]
(if image
[react/image
{:source (resources/get-image (if selected? image-selected image))
:style {:width image-width :height image-height}}]
[vector-icons/icon icon {:color (if selected? colors/blue colors/gray)
:width icon-width :height icon-height}])
[react/view {:style {:margin-horizontal 16 :flex 1}}
[react/text {:style (assoc styles/wizard-text :font-weight "500" :color colors/black :text-align :left)}
(i18n/label title)]
Expand All @@ -157,12 +163,13 @@
:icon-height 24
:title :this-device
:desc :this-device-desc}
{:type :advanced
:icon :main-icons/keycard-logo
:icon-width 13
:icon-height 22
:title :keycard
:desc :keycard-desc}]]
{:type :advanced
:image :keycard-logo-gray
:image-selected :keycard-logo-blue
:image-width 24
:image-height 24
:title :keycard
:desc :keycard-desc}]]
[react/view {:style {:flex 1
:justify-content :flex-end
;; We have to align top storage entry
Expand Down
6 changes: 2 additions & 4 deletions src/status_im/ui/screens/multiaccounts/recover/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,8 @@
[action-button/action-button
{:label (i18n/label :t/recover-with-keycard)
:accessibility-label :recover-with-keycard-button
:icon :main-icons/keycard-logo
:icon-opts {:color colors/blue
:width 13
:height 22}
:image :keycard-logo-blue
:image-opts {:style {:width 24 :height 24}}
:on-press #(re-frame/dispatch [:recover.ui/recover-with-keycard-pressed])}]]])

(def bottom-sheet
Expand Down

0 comments on commit 187da73

Please sign in to comment.