diff --git a/resources/images/mock/coinbase@2x.png b/resources/images/mock2/coinbase@2x.png similarity index 100% rename from resources/images/mock/coinbase@2x.png rename to resources/images/mock2/coinbase@2x.png diff --git a/resources/images/mock/collectible.png b/resources/images/mock2/collectible.png similarity index 100% rename from resources/images/mock/collectible.png rename to resources/images/mock2/collectible.png diff --git a/resources/images/mock/community-banner@2x.png b/resources/images/mock2/community-banner@2x.png similarity index 100% rename from resources/images/mock/community-banner@2x.png rename to resources/images/mock2/community-banner@2x.png diff --git a/resources/images/ui/community-cover.png b/resources/images/mock2/community-cover.png similarity index 100% rename from resources/images/ui/community-cover.png rename to resources/images/mock2/community-cover.png diff --git a/resources/images/mock/community-logo@2x.png b/resources/images/mock2/community-logo@2x.png similarity index 100% rename from resources/images/mock/community-logo@2x.png rename to resources/images/mock2/community-logo@2x.png diff --git a/resources/images/mock/gif@2x.png b/resources/images/mock2/gif@2x.png similarity index 100% rename from resources/images/mock/gif@2x.png rename to resources/images/mock2/gif@2x.png diff --git a/resources/images/mock/photo1@2x.png b/resources/images/mock2/photo1@2x.png similarity index 100% rename from resources/images/mock/photo1@2x.png rename to resources/images/mock2/photo1@2x.png diff --git a/resources/images/mock/photo2@2x.png b/resources/images/mock2/photo2@2x.png similarity index 100% rename from resources/images/mock/photo2@2x.png rename to resources/images/mock2/photo2@2x.png diff --git a/resources/images/mock/photo3@2x.png b/resources/images/mock2/photo3@2x.png similarity index 100% rename from resources/images/mock/photo3@2x.png rename to resources/images/mock2/photo3@2x.png diff --git a/resources/images/mock/ring.png b/resources/images/mock2/ring.png similarity index 100% rename from resources/images/mock/ring.png rename to resources/images/mock2/ring.png diff --git a/resources/images/mock/small_opt_card_icon.png b/resources/images/mock2/small_opt_card_icon.png similarity index 100% rename from resources/images/mock/small_opt_card_icon.png rename to resources/images/mock2/small_opt_card_icon.png diff --git a/resources/images/mock/small_opt_card_main.png b/resources/images/mock2/small_opt_card_main.png similarity index 100% rename from resources/images/mock/small_opt_card_main.png rename to resources/images/mock2/small_opt_card_main.png diff --git a/resources/images/mock2/status-logo.png b/resources/images/mock2/status-logo.png new file mode 100644 index 0000000000..126d535113 Binary files /dev/null and b/resources/images/mock2/status-logo.png differ diff --git a/resources/images/mock/sticker@2x.png b/resources/images/mock2/sticker@2x.png similarity index 100% rename from resources/images/mock/sticker@2x.png rename to resources/images/mock2/sticker@2x.png diff --git a/resources/images/mock/user_picture_female2@2x.png b/resources/images/mock2/user_picture_female2@2x.png similarity index 100% rename from resources/images/mock/user_picture_female2@2x.png rename to resources/images/mock2/user_picture_female2@2x.png diff --git a/resources/images/mock/user_picture_male4@2x.png b/resources/images/mock2/user_picture_male4@2x.png similarity index 100% rename from resources/images/mock/user_picture_male4@2x.png rename to resources/images/mock2/user_picture_male4@2x.png diff --git a/resources/images/mock/user_picture_male5@2x.png b/resources/images/mock2/user_picture_male5@2x.png similarity index 100% rename from resources/images/mock/user_picture_male5@2x.png rename to resources/images/mock2/user_picture_male5@2x.png diff --git a/resources/images/ui/add-contact@2x.png b/resources/images/ui2/add-contact@2x.png similarity index 100% rename from resources/images/ui/add-contact@2x.png rename to resources/images/ui2/add-contact@2x.png diff --git a/resources/images/ui/add-contact@3x.png b/resources/images/ui2/add-contact@3x.png similarity index 100% rename from resources/images/ui/add-contact@3x.png rename to resources/images/ui2/add-contact@3x.png diff --git a/resources/images/ui/lifestyle@2x.png b/resources/images/ui2/lifestyle@2x.png similarity index 100% rename from resources/images/ui/lifestyle@2x.png rename to resources/images/ui2/lifestyle@2x.png diff --git a/resources/images/ui/lifestyle@3x.png b/resources/images/ui2/lifestyle@3x.png similarity index 100% rename from resources/images/ui/lifestyle@3x.png rename to resources/images/ui2/lifestyle@3x.png diff --git a/resources/images/ui/music@2x.png b/resources/images/ui2/music@2x.png similarity index 100% rename from resources/images/ui/music@2x.png rename to resources/images/ui2/music@2x.png diff --git a/resources/images/ui/music@3x.png b/resources/images/ui2/music@3x.png similarity index 100% rename from resources/images/ui/music@3x.png rename to resources/images/ui2/music@3x.png diff --git a/resources/images/ui/podcasts@2x.png b/resources/images/ui2/podcasts@2x.png similarity index 100% rename from resources/images/ui/podcasts@2x.png rename to resources/images/ui2/podcasts@2x.png diff --git a/resources/images/ui/podcasts@3x.png b/resources/images/ui2/podcasts@3x.png similarity index 100% rename from resources/images/ui/podcasts@3x.png rename to resources/images/ui2/podcasts@3x.png diff --git a/resources/images/ui/sync-new-device-cover-background@2x.png b/resources/images/ui2/sync-new-device-cover-background@2x.png similarity index 100% rename from resources/images/ui/sync-new-device-cover-background@2x.png rename to resources/images/ui2/sync-new-device-cover-background@2x.png diff --git a/resources/images/ui/sync-new-device-cover-background@3x.png b/resources/images/ui2/sync-new-device-cover-background@3x.png similarity index 100% rename from resources/images/ui/sync-new-device-cover-background@3x.png rename to resources/images/ui2/sync-new-device-cover-background@3x.png diff --git a/resources/images/ui2/welcome-1.png b/resources/images/ui2/welcome-1.png new file mode 100644 index 0000000000..ebd1bef7e9 Binary files /dev/null and b/resources/images/ui2/welcome-1.png differ diff --git a/resources/images/ui2/welcome-1@2x.png b/resources/images/ui2/welcome-1@2x.png new file mode 100644 index 0000000000..3323782472 Binary files /dev/null and b/resources/images/ui2/welcome-1@2x.png differ diff --git a/src/status_im/react_native/resources.cljs b/src/status_im/react_native/resources.cljs index 914cf2a748..d8a9326573 100644 --- a/src/status_im/react_native/resources.cljs +++ b/src/status_im/react_native/resources.cljs @@ -5,7 +5,6 @@ {:empty-chats-header (js/require "../resources/images/ui/empty-chats-header.png") :welcome (js/require "../resources/images/ui/welcome.jpg") :welcome-dark (js/require "../resources/images/ui/welcome-dark.jpg") - :add-new-contact (js/require "../resources/images/ui/add-contact.png") :chat (js/require "../resources/images/ui/chat.jpg") :chat-dark (js/require "../resources/images/ui/chat-dark.jpg") :wallet (js/require "../resources/images/ui/wallet.jpg") @@ -49,29 +48,9 @@ :hand-wave (js/require "../resources/images/ui/hand-wave.png") :graph (js/require "../resources/images/ui/graph.png") :discover (js/require "../resources/images/ui/discover.png") - :community-cover (js/require "../resources/images/ui/community-cover.png") - :lifestyle (js/require "../resources/images/ui/lifestyle.png") - :music (js/require "../resources/images/ui/music.png") - :podcasts (js/require "../resources/images/ui/podcasts.png") :no-contacts (js/require "../resources/images/ui/no-contacts.png") :no-contacts-dark (js/require "../resources/images/ui/no-contacts-dark.png")}) -(def mock-images - {:photo1 (js/require "../resources/images/mock/photo1.png") - :photo2 (js/require "../resources/images/mock/photo2.png") - :photo3 (js/require "../resources/images/mock/photo3.png") - :community-banner (js/require "../resources/images/mock/community-banner.png") - :community-logo (js/require "../resources/images/mock/community-logo.png") - :gif (js/require "../resources/images/mock/gif.png") - :sticker (js/require "../resources/images/mock/sticker.png") - :user-picture-female2 (js/require "../resources/images/mock/user_picture_female2.png") - :user-picture-male4 (js/require "../resources/images/mock/user_picture_male4.png") - :user-picture-male5 (js/require "../resources/images/mock/user_picture_male5.png") - :coinbase (js/require "../resources/images/mock/coinbase.png") - :small-opt-card-icon (js/require "../resources/images/mock/small_opt_card_icon.png") - :small-opt-card-main (js/require "../resources/images/mock/small_opt_card_main.png") - :ring (js/require "../resources/images/mock/ring.png")}) - (defn get-theme-image [k] (get ui (when (colors/dark?) (keyword (str (name k) "-dark"))) (get ui k))) @@ -87,15 +66,6 @@ (get ui k)) k))) -(defn get-mock-image - [k] - (if (contains? @loaded-images k) - (get @loaded-images k) - (get (swap! loaded-images assoc - k - (get mock-images k)) - k))) - (def reactions-old {:love (js/require "../resources/images/reactions/love.png") :angry (js/require "../resources/images/reactions/angry.png") diff --git a/src/status_im2/common/resources.cljs b/src/status_im2/common/resources.cljs new file mode 100644 index 0000000000..ab71d2da9b --- /dev/null +++ b/src/status_im2/common/resources.cljs @@ -0,0 +1,49 @@ +(ns status-im2.common.resources) + +(def ui + {:add-new-contact (js/require "../resources/images/ui2/add-contact.png") + :lifestyle (js/require "../resources/images/ui2/lifestyle.png") + :music (js/require "../resources/images/ui2/music.png") + :podcasts (js/require "../resources/images/ui2/podcasts.png") + :sync-device (js/require "../resources/images/ui2/sync-new-device-cover-background.png")}) + +(def mock-images + {:coinbase (js/require "../resources/images/mock2/coinbase.png") + :collectible (js/require "../resources/images/mock2/collectible.png") + :community-banner (js/require "../resources/images/mock2/community-banner.png") + :community-logo (js/require "../resources/images/mock2/community-logo.png") + :community-cover (js/require "../resources/images/mock2/community-cover.png") + :gif (js/require "../resources/images/mock2/gif.png") + :photo1 (js/require "../resources/images/mock2/photo1.png") + :photo2 (js/require "../resources/images/mock2/photo2.png") + :photo3 (js/require "../resources/images/mock2/photo3.png") + :small-opt-card-icon (js/require "../resources/images/mock2/small_opt_card_icon.png") + :small-opt-card-main (js/require "../resources/images/mock2/small_opt_card_main.png") + :status-logo (js/require "../resources/images/mock2/status-logo.png") + :sticker (js/require "../resources/images/mock2/sticker.png") + :ring (js/require "../resources/images/mock2/ring.png") + :user-picture-female2 (js/require "../resources/images/mock2/user_picture_female2.png") + :user-picture-male4 (js/require "../resources/images/mock2/user_picture_male4.png") + :user-picture-male5 (js/require "../resources/images/mock2/user_picture_male5.png")}) + +(def tokens + {:eth (js/require "../resources/images/tokens/mainnet/ETH.png") + :knc (js/require "../resources/images/tokens/mainnet/KNC.png") + :mana (js/require "../resources/images/tokens/mainnet/MANA.png") + :rare (js/require "../resources/images/tokens/mainnet/RARE.png") + :dai (js/require "../resources/images/tokens/mainnet/DAI.png") + :fxc (js/require "../resources/images/tokens/mainnet/FXC.png") + :usdt (js/require "../resources/images/tokens/mainnet/USDT.png") + :snt (js/require "../resources/images/tokens/mainnet/SNT.png")}) + +(defn get-mock-image + [k] + (get mock-images k)) + +(defn get-image + [k] + (get ui k)) + +(defn get-token + [k] + (get tokens k)) diff --git a/src/status_im2/contexts/add_new_contact/views.cljs b/src/status_im2/contexts/add_new_contact/views.cljs index e67f54f750..88333a040d 100644 --- a/src/status_im2/contexts/add_new_contact/views.cljs +++ b/src/status_im2/contexts/add_new_contact/views.cljs @@ -4,7 +4,7 @@ [quo2.core :as quo] [react-native.core :as rn] [react-native.clipboard :as clipboard] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im.qr-scanner.core :as qr-scanner] [status-im2.contexts.add-new-contact.style :as style] [utils.debounce :as debounce] diff --git a/src/status_im2/contexts/communities/discover/view.cljs b/src/status_im2/contexts/communities/discover/view.cljs index 83f0c38f7d..89487eec95 100644 --- a/src/status_im2/contexts/communities/discover/view.cljs +++ b/src/status_im2/contexts/communities/discover/view.cljs @@ -5,7 +5,7 @@ [quo2.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.contexts.communities.menus.community-options.view :as options] [status-im.ui.screens.communities.community :as community] [status-im.ui.components.react :as react] @@ -18,10 +18,10 @@ {:data {:community-color "#0052FF" :status :gated :locked? true - :cover (resources/get-image :community-cover) + :cover (resources/get-mock-image :community-cover) :tokens [{:id 1 :group [{:id 1 - :token-icon (resources/get-image :status-logo)}]}] + :token-icon (resources/get-mock-image :status-logo)}]}] :tags [{:id 1 :tag-label (i18n/label :t/music) :resource (resources/get-image :music)} @@ -248,4 +248,4 @@ {:style (style/discover-screen-container (colors/theme-colors colors/white colors/neutral-95))} - [discover-screen-content featured-communities]])) \ No newline at end of file + [discover-screen-content featured-communities]])) diff --git a/src/status_im2/contexts/quo_preview/avatars/user_avatar.cljs b/src/status_im2/contexts/quo_preview/avatars/user_avatar.cljs index 2ffde75cad..0ac7273036 100644 --- a/src/status_im2/contexts/quo_preview/avatars/user_avatar.cljs +++ b/src/status_im2/contexts/quo_preview/avatars/user_avatar.cljs @@ -3,7 +3,7 @@ [quo2.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.contexts.quo-preview.preview :as preview])) (def descriptor diff --git a/src/status_im2/contexts/quo_preview/community/community_card_view.cljs b/src/status_im2/contexts/quo_preview/community/community_card_view.cljs index 7a92fbd7c2..cf60cb9ebc 100644 --- a/src/status_im2/contexts/quo_preview/community/community_card_view.cljs +++ b/src/status_im2/contexts/quo_preview/community/community_card_view.cljs @@ -5,7 +5,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [utils.i18n :as i18n] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.constants :as constants] [status-im2.contexts.quo-preview.preview :as preview])) @@ -14,10 +14,10 @@ :name "Status" :description "Status is a secure messaging app, crypto wallet and web3 browser built with the state of the art technology" - :cover (resources/get-image :community-cover) - :community-icon (resources/get-image :status-logo) + :cover (resources/get-mock-image :community-cover) + :community-icon (resources/get-mock-image :status-logo) :color (rand-nth quo.colors/chat-colors) - :tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}] + :tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}] :tags [{:id 1 :tag-label (i18n/label :t/music) :resource (resources/get-image :music)} {:id 2 :tag-label (i18n/label :t/lifestyle) diff --git a/src/status_im2/contexts/quo_preview/community/data.cljs b/src/status_im2/contexts/quo_preview/community/data.cljs index 645ada6cc2..d5731ec6aa 100644 --- a/src/status_im2/contexts/quo_preview/community/data.cljs +++ b/src/status_im2/contexts/quo_preview/community/data.cljs @@ -1,7 +1,7 @@ (ns status-im2.contexts.quo-preview.community.data (:require [quo.design-system.colors :as quo.colors] [utils.i18n :as i18n] - [status-im.react-native.resources :as resources])) + [status-im2.common.resources :as resources])) (def thumbnail "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII") @@ -13,7 +13,7 @@ "Status is a secure messaging app, crypto wallet and web3 browser built with the state of the art technology" :community-icon thumbnail :color (rand-nth quo.colors/chat-colors) - :tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}] + :tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}] :tags [{:id 1 :tag-label (i18n/label :t/music) :resource (resources/get-image :music)} {:id 2 :tag-label (i18n/label :t/lifestyle) diff --git a/src/status_im2/contexts/quo_preview/community/token_gating.cljs b/src/status_im2/contexts/quo_preview/community/token_gating.cljs index 43482a8d8c..5b35e01b08 100644 --- a/src/status_im2/contexts/quo_preview/community/token_gating.cljs +++ b/src/status_im2/contexts/quo_preview/community/token_gating.cljs @@ -4,7 +4,7 @@ [quo2.components.community.token-gating :as quo2] [quo2.foundations.colors :as colors] [reagent.core :as reagent] - [status-im.utils.utils :as utils])) + [status-im2.common.resources :as resources])) (def styles {:container-sandbox {:flex 1 @@ -30,54 +30,45 @@ :key :membership-request-denied? :type :boolean}]) -(def eth-token-img (js/require "../resources/images/tokens/mainnet/ETH.png")) -(def knc-token-img (js/require "../resources/images/tokens/mainnet/KNC.png")) -(def mana-token-img (js/require "../resources/images/tokens/mainnet/MANA.png")) -(def rare-token-img (js/require "../resources/images/tokens/mainnet/RARE.png")) -(def dai-token-img (js/require "../resources/images/tokens/mainnet/DAI.png")) -(def fxc-token-img (js/require "../resources/images/tokens/mainnet/FXC.png")) -(def usdt-token-img (js/require "../resources/images/tokens/mainnet/USDT.png")) -(def snt-token-img (js/require "../resources/images/tokens/mainnet/SNT.png")) - (defn join-gate-options-base [is-sufficient? many-tokens?] (into [{:token "KNC" - :token-img-src knc-token-img + :token-img-src (resources/get-token :knc) :amount 200 :is-sufficient? true} {:token "MANA" - :token-img-src mana-token-img + :token-img-src (resources/get-token :mana) :amount 10 :is-sufficient? is-sufficient? :is-purchasable? true} {:token "RARE" - :token-img-src rare-token-img + :token-img-src (resources/get-token :rare) :amount 10 :is-sufficient? is-sufficient?}] (when many-tokens? [{:token "FXC" - :token-img-src fxc-token-img + :token-img-src (resources/get-token :fxc) :amount 20 :is-sufficient? true} {:token "SNT" - :token-img-src snt-token-img + :token-img-src (resources/get-token :snt) :amount 10000 :is-sufficient? is-sufficient?}]))) (defn write-gate-options-base [is-sufficient?] [{:token "KNC" - :token-img-src knc-token-img + :token-img-src (resources/get-token :knc) :amount 200 :is-sufficient? true} {:token "DAI" - :token-img-src dai-token-img + :token-img-src (resources/get-token :dai) :amount 20 :is-purchasable? true :is-sufficient? is-sufficient?} {:token "ETH" - :token-img-src eth-token-img + :token-img-src (resources/get-token :eth) :amount 0.5 :is-sufficient? is-sufficient?}]) @@ -87,68 +78,67 @@ (if (= type :community) {:community {:name "Ethereum" :community-color "#14044d" - :community-avatar-img-src eth-token-img + :community-avatar-img-src (resources/get-token :eth) :gates {:join (if many-tokens? [(join-gate-options-base is-sufficient? many-tokens?) [{:token "FXC" - :token-img-src fxc-token-img + :token-img-src (resources/get-token :fxc) :amount 20 :is-sufficient? true} {:token "USDT" - :token-img-src usdt-token-img + :token-img-src (resources/get-token :usdt) :amount 20 :is-sufficient? false}]] (join-gate-options-base is-sufficient? many-tokens?))}}} - {:channel {:name "onboarding" - :community-color (colors/custom-color :pink 50) - :community-text-color colors/white - :emoji "🍑" - :emoji-background-color "#F38888" - :on-enter-channel #(utils/show-popup - "Entered channel" - "Wuhuu!! You successfully entered the channel :)") + {:channel {:name "onboarding" + :community-color (colors/custom-color :pink 50) + :community-text-color colors/white + :emoji "🍑" + :emoji-background-color "#F38888" + :on-enter-channel #(js/alert + "Entered channel - Wuhuu!! You successfully entered the channel :)") :membership-request-denied? membership-request-denied? - :gates {:read (into [{:token "KNC" - :token-img-src knc-token-img - :amount 200 - :is-sufficient? true} - {:token "MANA" - :token-img-src mana-token-img - :amount 10 - :is-sufficient? is-sufficient? - :is-purchasable? true} - {:token "RARE" - :token-img-src rare-token-img - :amount 10 - :is-sufficient? is-sufficient?}] - (when many-tokens? - [{:token "FXC" - :token-img-src fxc-token-img - :amount 20 - :is-sufficient? true} - {:token "SNT" - :token-img-src snt-token-img - :amount 10000 - :is-sufficient? is-sufficient?}])) - :write (if - many-tokens? - [(write-gate-options-base is-sufficient?) - [{:token "FXC" - :token-img-src fxc-token-img - :amount 20 - :is-sufficient? true} - {:token "MANA" - :token-img-src mana-token-img - :amount 10 - :is-sufficient? is-sufficient?} - {:token "USDT" - :token-img-src usdt-token-img - :amount 20 - :is-sufficient? false}]] - (write-gate-options-base is-sufficient?))}}}))) + :gates {:read (into [{:token "KNC" + :token-img-src (resources/get-token :knc) + :amount 200 + :is-sufficient? true} + {:token "MANA" + :token-img-src (resources/get-token :mana) + :amount 10 + :is-sufficient? is-sufficient? + :is-purchasable? true} + {:token "RARE" + :token-img-src (resources/get-token :rare) + :amount 10 + :is-sufficient? is-sufficient?}] + (when many-tokens? + [{:token "FXC" + :token-img-src (resources/get-token :fxc) + :amount 20 + :is-sufficient? true} + {:token "SNT" + :token-img-src (resources/get-token :snt) + :amount 10000 + :is-sufficient? is-sufficient?}])) + :write (if + many-tokens? + [(write-gate-options-base is-sufficient?) + [{:token "FXC" + :token-img-src (resources/get-token :fxc) + :amount 20 + :is-sufficient? true} + {:token "MANA" + :token-img-src (resources/get-token :mana) + :amount 10 + :is-sufficient? is-sufficient?} + {:token "USDT" + :token-img-src (resources/get-token :usdt) + :amount 20 + :is-sufficient? false}]] + (write-gate-options-base is-sufficient?))}}}))) (def state (reagent/atom {:type :channel diff --git a/src/status_im2/contexts/quo_preview/drawers/permission_drawers.cljs b/src/status_im2/contexts/quo_preview/drawers/permission_drawers.cljs index dfa8e14031..0abdf36535 100644 --- a/src/status_im2/contexts/quo_preview/drawers/permission_drawers.cljs +++ b/src/status_im2/contexts/quo_preview/drawers/permission_drawers.cljs @@ -2,7 +2,7 @@ (:require [quo2.core :as quo] [quo2.foundations.colors :as colors] [react-native.core :as rn] - [status-im.react-native.resources :as resources])) + [status-im2.common.resources :as resources])) (defn example-1 [] @@ -12,11 +12,11 @@ {:size 24 :locked false :tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)} - {:id 5 :token-icon (resources/get-image :status-logo)}]}] + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)} + {:id 5 :token-icon (resources/get-mock-image :status-logo)}]}] :background-color (colors/theme-colors colors/neutral-10 colors/neutral-80)}] @@ -27,11 +27,11 @@ {:size 24 :locked false :tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)} - {:id 5 :token-icon (resources/get-image :status-logo)}]}] + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)} + {:id 5 :token-icon (resources/get-mock-image :status-logo)}]}] :background-color (colors/theme-colors colors/neutral-10 colors/neutral-80)}] @@ -43,7 +43,7 @@ [quo/text {:style {:margin-right 4}} "Hold"] [quo/token-tag {:size :small - :token-img-src (js/require "../resources/images/tokens/mainnet/ETH.png")} "ETH"] + :token-img-src (resources/get-token :eth)} "ETH"] [quo/text {:style {:margin-left 4}} "To post"]]) (defn example-3 diff --git a/src/status_im2/contexts/quo_preview/list_items/preview_lists.cljs b/src/status_im2/contexts/quo_preview/list_items/preview_lists.cljs index 46d5484984..857d27593e 100644 --- a/src/status_im2/contexts/quo_preview/list_items/preview_lists.cljs +++ b/src/status_im2/contexts/quo_preview/list_items/preview_lists.cljs @@ -4,7 +4,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [utils.i18n :as i18n] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.contexts.quo-preview.preview :as preview])) (def descriptor diff --git a/src/status_im2/contexts/quo_preview/messages/system_message.cljs b/src/status_im2/contexts/quo_preview/messages/system_message.cljs index b52cf703db..e7945bd11b 100644 --- a/src/status_im2/contexts/quo_preview/messages/system_message.cljs +++ b/src/status_im2/contexts/quo_preview/messages/system_message.cljs @@ -4,7 +4,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [utils.i18n :as i18n] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.contexts.quo-preview.preview :as preview])) (def descriptor diff --git a/src/status_im2/contexts/quo_preview/onboarding/small_option_card.cljs b/src/status_im2/contexts/quo_preview/onboarding/small_option_card.cljs index 15c63d1795..c582d42150 100644 --- a/src/status_im2/contexts/quo_preview/onboarding/small_option_card.cljs +++ b/src/status_im2/contexts/quo_preview/onboarding/small_option_card.cljs @@ -4,7 +4,7 @@ [quo2.components.onboarding.small-option-card.view :as quo2] [quo2.foundations.colors :as colors] [reagent.core :as reagent] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.contexts.quo-preview.preview :as preview])) (def descriptor diff --git a/src/status_im2/contexts/quo_preview/profile/collectible.cljs b/src/status_im2/contexts/quo_preview/profile/collectible.cljs index 9bb8728a4f..64a87456a4 100644 --- a/src/status_im2/contexts/quo_preview/profile/collectible.cljs +++ b/src/status_im2/contexts/quo_preview/profile/collectible.cljs @@ -3,9 +3,10 @@ [quo2.components.profile.collectible.view :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im2.contexts.quo-preview.preview :as preview])) + [status-im2.contexts.quo-preview.preview :as preview] + [status-im2.common.resources :as resources])) -(defonce test-image (js/require "../resources/images/mock/collectible.png")) +(defonce test-image (resources/get-mock-image :collectible)) (def test-images (repeat 10 test-image)) (def descriptor diff --git a/src/status_im2/contexts/quo_preview/profile/profile_card.cljs b/src/status_im2/contexts/quo_preview/profile/profile_card.cljs index 463e8f3bbf..1c53cbe3ed 100644 --- a/src/status_im2/contexts/quo_preview/profile/profile_card.cljs +++ b/src/status_im2/contexts/quo_preview/profile/profile_card.cljs @@ -3,7 +3,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [quo2.core :as quo] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.contexts.quo-preview.preview :as preview])) (def descriptor diff --git a/src/status_im2/contexts/quo_preview/profile/select_profile.cljs b/src/status_im2/contexts/quo_preview/profile/select_profile.cljs index b92d02bcff..2460841ae7 100644 --- a/src/status_im2/contexts/quo_preview/profile/select_profile.cljs +++ b/src/status_im2/contexts/quo_preview/profile/select_profile.cljs @@ -3,7 +3,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [quo2.core :as quo] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.contexts.quo-preview.preview :as preview])) (def descriptor diff --git a/src/status_im2/contexts/quo_preview/switcher/switcher_cards.cljs b/src/status_im2/contexts/quo_preview/switcher/switcher_cards.cljs index 67e5616cf7..a5c87d320a 100644 --- a/src/status_im2/contexts/quo_preview/switcher/switcher_cards.cljs +++ b/src/status_im2/contexts/quo_preview/switcher/switcher_cards.cljs @@ -3,7 +3,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [status-im2.constants :as constants] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.contexts.quo-preview.preview :as preview] [status-im2.contexts.shell.cards.view :as switcher-cards] [status-im2.contexts.shell.constants :as shell.constants])) diff --git a/src/status_im2/contexts/quo_preview/tags/context_tags.cljs b/src/status_im2/contexts/quo_preview/tags/context_tags.cljs index 29b78b89eb..56518918d9 100644 --- a/src/status_im2/contexts/quo_preview/tags/context_tags.cljs +++ b/src/status_im2/contexts/quo_preview/tags/context_tags.cljs @@ -3,7 +3,7 @@ [quo2.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im.multiaccounts.core :as multiaccounts] [status-im2.contexts.quo-preview.preview :as preview])) diff --git a/src/status_im2/contexts/quo_preview/tags/permission_tag.cljs b/src/status_im2/contexts/quo_preview/tags/permission_tag.cljs index e27f64ccc0..67366e2e30 100644 --- a/src/status_im2/contexts/quo_preview/tags/permission_tag.cljs +++ b/src/status_im2/contexts/quo_preview/tags/permission_tag.cljs @@ -3,7 +3,7 @@ [quo2.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im2.contexts.quo-preview.preview :as preview])) (def descriptor @@ -19,153 +19,153 @@ :type :boolean}]) (def community-tokens - [{:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}]} + [{:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 1 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)}]}]} - {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} - {:id 2 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}]} - {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)}]}]} + {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} + {:id 2 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}]} + {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 1 :token-icon (resources/get-image :status-logo)}]}]} - {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 1 :token-icon (resources/get-mock-image :status-logo)}]}]} + {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)}]}]} - {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)}]}]} + {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)}]}]} - {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)}]}]} + {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)} - {:id 5 :token-icon (resources/get-image :status-logo)} - {:id 6 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)} + {:id 5 :token-icon (resources/get-mock-image :status-logo)} + {:id 6 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 1 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 1 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)} - {:id 5 :token-icon (resources/get-image :status-logo)} - {:id 6 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)} + {:id 5 :token-icon (resources/get-mock-image :status-logo)} + {:id 6 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)} - {:id 5 :token-icon (resources/get-image :status-logo)} - {:id 6 :token-icon (resources/get-image :status-logo)}]}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)} + {:id 5 :token-icon (resources/get-mock-image :status-logo)} + {:id 6 :token-icon (resources/get-mock-image :status-logo)}]}]} {:tokens [{:id 1 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)} - {:id 5 :token-icon (resources/get-image :status-logo)} - {:id 6 :token-icon (resources/get-image :status-logo)}]}]} - {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} - {:id 2 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} - {:id 3 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}]} - {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)} + {:id 5 :token-icon (resources/get-mock-image :status-logo)} + {:id 6 :token-icon (resources/get-mock-image :status-logo)}]}]} + {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} + {:id 2 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} + {:id 3 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}]} + {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)}]} {:id 3 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)} - {:id 5 :token-icon (resources/get-image :status-logo)} - {:id 6 :token-icon (resources/get-image :status-logo)}]}]} - {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} - {:id 2 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} - {:id 3 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}]} - {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)} + {:id 5 :token-icon (resources/get-mock-image :status-logo)} + {:id 6 :token-icon (resources/get-mock-image :status-logo)}]}]} + {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} + {:id 2 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} + {:id 3 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}]} + {:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]} {:id 2 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)}]} + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)}]} {:id 3 - :group [{:id 1 :token-icon (resources/get-image :status-logo)} - {:id 2 :token-icon (resources/get-image :status-logo)} - {:id 3 :token-icon (resources/get-image :status-logo)} - {:id 4 :token-icon (resources/get-image :status-logo)} - {:id 5 :token-icon (resources/get-image :status-logo)} - {:id 6 :token-icon (resources/get-image :status-logo)}]}]}]) + :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)} + {:id 2 :token-icon (resources/get-mock-image :status-logo)} + {:id 3 :token-icon (resources/get-mock-image :status-logo)} + {:id 4 :token-icon (resources/get-mock-image :status-logo)} + {:id 5 :token-icon (resources/get-mock-image :status-logo)} + {:id 6 :token-icon (resources/get-mock-image :status-logo)}]}]}]) (defn cool-preview [] diff --git a/src/status_im2/contexts/quo_preview/tags/tag.cljs b/src/status_im2/contexts/quo_preview/tags/tag.cljs index b2db5dbe53..7de9489e6d 100644 --- a/src/status_im2/contexts/quo_preview/tags/tag.cljs +++ b/src/status_im2/contexts/quo_preview/tags/tag.cljs @@ -4,7 +4,7 @@ [quo2.foundations.colors :as colors] [quo2.components.tags.tag :as tag] [status-im.ui.components.react :as react] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [reagent.core :as reagent])) (def descriptor @@ -56,7 +56,7 @@ {:style {:flex 1 :height 100}} [react/image - {:source (resources/get-image :community-cover) + {:source (resources/get-mock-image :community-cover) :style {:flex 1 :width "100%" :border-radius 16}}] diff --git a/src/status_im2/contexts/quo_preview/tags/tags.cljs b/src/status_im2/contexts/quo_preview/tags/tags.cljs index 90ec83a6e1..3941f0f092 100644 --- a/src/status_im2/contexts/quo_preview/tags/tags.cljs +++ b/src/status_im2/contexts/quo_preview/tags/tags.cljs @@ -3,7 +3,7 @@ [quo2.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.react-native.resources :as resources] + [status-im2.common.resources :as resources] [status-im.ui.components.react :as react] [status-im2.contexts.quo-preview.preview :as preview])) @@ -69,7 +69,7 @@ :height 100 :border-radius 16} [react/image - {:source (resources/get-image :community-cover) + {:source (resources/get-mock-image :community-cover) :style {:flex 1 :width "100%" :border-radius 16}}] diff --git a/src/status_im2/contexts/quo_preview/tags/token_tag.cljs b/src/status_im2/contexts/quo_preview/tags/token_tag.cljs index 89f7b465e7..dc6c7d36f5 100644 --- a/src/status_im2/contexts/quo_preview/tags/token_tag.cljs +++ b/src/status_im2/contexts/quo_preview/tags/token_tag.cljs @@ -3,7 +3,8 @@ [quo2.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im2.contexts.quo-preview.preview :as preview])) + [status-im2.contexts.quo-preview.preview :as preview] + [status-im2.common.resources :as resources])) (def descriptor [{:label "Size:" @@ -48,8 +49,8 @@ {:key "SNT" :value "SNT"}]}]) -(def eth-token (js/require "../resources/images/tokens/mainnet/ETH.png")) -(def snt-token (js/require "../resources/images/tokens/mainnet/SNT.png")) +(def eth-token (resources/get-token :eth)) +(def snt-token (resources/get-token :snt)) (defn cool-preview [] diff --git a/src/status_im2/contexts/quo_preview/wallet/token_overview.cljs b/src/status_im2/contexts/quo_preview/wallet/token_overview.cljs index 82c99464ae..52887d633f 100644 --- a/src/status_im2/contexts/quo_preview/wallet/token_overview.cljs +++ b/src/status_im2/contexts/quo_preview/wallet/token_overview.cljs @@ -5,7 +5,8 @@ [reagent.core :as reagent] [utils.i18n :as i18n] [status-im.utils.currency :as currencies] - [status-im2.contexts.quo-preview.preview :as preview])) + [status-im2.contexts.quo-preview.preview :as preview] + [status-im2.common.resources :as resources])) (def descriptor [{:label "Token:" @@ -33,8 +34,8 @@ {:key :eur :value "€"}]}]) -(def eth-token (js/require "../resources/images/tokens/mainnet/ETH.png")) -(def snt-token (js/require "../resources/images/tokens/mainnet/SNT.png")) +(def eth-token (resources/get-token :eth)) +(def snt-token (resources/get-token :snt)) (defn cool-preview [] diff --git a/src/status_im2/contexts/syncing/sheets/sync_device_notice/view.cljs b/src/status_im2/contexts/syncing/sheets/sync_device_notice/view.cljs index e0d4b14e36..b4e712db67 100644 --- a/src/status_im2/contexts/syncing/sheets/sync_device_notice/view.cljs +++ b/src/status_im2/contexts/syncing/sheets/sync_device_notice/view.cljs @@ -4,14 +4,15 @@ [status-im2.contexts.syncing.sheets.enter-password.view :as enter-password] [status-im2.contexts.syncing.sheets.sync-device-notice.styles :as styles] [utils.i18n :as i18n] - [utils.re-frame :as rf])) + [utils.re-frame :as rf] + [status-im2.common.resources :as resources])) (defn sheet [] [:<> [rn/view {:style styles/sync-devices-header} [rn/image - {:source (js/require "../resources/images/ui/sync-new-device-cover-background.png") + {:source (resources/get-image :sync-device) :style styles/sync-devices-header-image}]] [rn/view {:style styles/sync-devices-body-container} [quo/text diff --git a/src/status_im2/subs/shell.cljs b/src/status_im2/subs/shell.cljs index fe01636555..99ad44c911 100644 --- a/src/status_im2/subs/shell.cljs +++ b/src/status_im2/subs/shell.cljs @@ -2,17 +2,15 @@ (:require [re-frame.core :as re-frame] [utils.datetime :as datetime] [status-im2.constants :as constants] - [status-im.react-native.resources :as resources])) + [status-im2.common.resources :as resources])) (defn community-avatar [community] (let [images (:images community)] - (if (= (:id community) constants/status-community-id) - (resources/get-image :status-logo) - (when images - {:uri (:uri (or (:thumbnail images) - (:large images) - (first images)))})))) + (when images + {:uri (:uri (or (:thumbnail images) + (:large images) + (first images)))}))) (defn get-card-content [chat communities]