Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6239ab7b9d | ||
|
|
b84cc6c54e | ||
|
|
bc168cb94e | ||
|
|
294913c05b | ||
|
|
1b42c9d58e | ||
|
|
3c6e6e19c7 | ||
|
|
e7b8f188e1 | ||
|
|
b8d51a404e | ||
|
|
027f35906b | ||
|
|
d513690290 | ||
|
|
7101be0dac | ||
|
|
7d12f75977 | ||
|
|
35b2cc582d | ||
|
|
ca648e7153 | ||
|
|
e12a0d1596 | ||
|
|
7a8c0ab724 | ||
|
|
8f9d78d359 |
Binary file not shown.
|
After Width: | Height: | Size: 731 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.avatars.group-avatar.view
|
(ns quo2.components.avatars.group-avatar.view
|
||||||
(:require [quo2.components.icon :as icon]
|
(:require [quo2.components.icon :as icon]
|
||||||
[quo2.theme :as theme]
|
[quo2.theme :as quo.theme]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo2.foundations.colors :as colors]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.fast-image :as fast-image]
|
[react-native.fast-image :as fast-image]
|
||||||
@@ -20,10 +20,11 @@
|
|||||||
|
|
||||||
(defn- view-internal
|
(defn- view-internal
|
||||||
[_]
|
[_]
|
||||||
(fn [{:keys [size theme customization-color picture]
|
(fn [{:keys [size theme customization-color picture icon-name]
|
||||||
:or {size :x-small
|
:or {size :x-small
|
||||||
customization-color :blue
|
customization-color :blue
|
||||||
picture nil}}]
|
picture nil
|
||||||
|
icon-name :i/group}}]
|
||||||
(let [container-size (get-in sizes [:container size])
|
(let [container-size (get-in sizes [:container size])
|
||||||
icon-size (get-in sizes [:icon size])]
|
icon-size (get-in sizes [:icon size])]
|
||||||
[rn/view
|
[rn/view
|
||||||
@@ -35,8 +36,8 @@
|
|||||||
{:source picture
|
{:source picture
|
||||||
:style {:width container-size
|
:style {:width container-size
|
||||||
:height container-size}}]
|
:height container-size}}]
|
||||||
[icon/icon :i/members
|
[icon/icon icon-name
|
||||||
{:size icon-size
|
{:size icon-size
|
||||||
:color colors/white-opa-70}])])))
|
:color colors/white-opa-70}])])))
|
||||||
|
|
||||||
(def view (theme/with-theme view-internal))
|
(def view (quo.theme/with-theme view-internal))
|
||||||
|
|||||||
@@ -17,6 +17,11 @@
|
|||||||
:status-indicator 12
|
:status-indicator 12
|
||||||
:status-indicator-border 2
|
:status-indicator-border 2
|
||||||
:font-size :paragraph-2}
|
:font-size :paragraph-2}
|
||||||
|
28 {:outer 28
|
||||||
|
:inner 28
|
||||||
|
:status-indicator 0
|
||||||
|
:status-indicator-border 0
|
||||||
|
:font-size :paragraph-2}
|
||||||
:xs {:outer 24
|
:xs {:outer 24
|
||||||
:inner 24
|
:inner 24
|
||||||
:status-indicator 0
|
:status-indicator 0
|
||||||
|
|||||||
@@ -21,6 +21,12 @@
|
|||||||
:hole-size 26
|
:hole-size 26
|
||||||
:hole-x 19
|
:hole-x 19
|
||||||
:hole-y -1}
|
:hole-y -1}
|
||||||
|
20 {:border-radius {:circular 11 :rounded 8}
|
||||||
|
:hole-radius {:circular 10 :rounded 9}
|
||||||
|
:margin-left -4
|
||||||
|
:hole-size 22
|
||||||
|
:hole-x 15
|
||||||
|
:hole-y -1}
|
||||||
16 {:border-radius {:circular 8 :rounded 8}
|
16 {:border-radius {:circular 8 :rounded 8}
|
||||||
:hole-radius {:circular 9 :rounded 9}
|
:hole-radius {:circular 9 :rounded 9}
|
||||||
:margin-left -4
|
:margin-left -4
|
||||||
@@ -38,6 +44,7 @@
|
|||||||
:size (case size
|
:size (case size
|
||||||
32 :small
|
32 :small
|
||||||
24 :xs
|
24 :xs
|
||||||
|
20 :xxs
|
||||||
16 :xxxs)}
|
16 :xxxs)}
|
||||||
item)]
|
item)]
|
||||||
(:photo :collectible) [fast-image/fast-image
|
(:photo :collectible) [fast-image/fast-image
|
||||||
@@ -47,11 +54,10 @@
|
|||||||
:border-radius border-radius}}]))
|
:border-radius border-radius}}]))
|
||||||
|
|
||||||
(defn list-item
|
(defn list-item
|
||||||
[index type size item list-size margin-left
|
[index type size item list-size margin-left hole-size hole-radius hole-x hole-y border-radius]
|
||||||
hole-size hole-radius hole-x hole-y border-radius]
|
(let [last-item? (= index (dec list-size))]
|
||||||
(let [last-item? (= index (- list-size 1))]
|
|
||||||
[hole-view/hole-view
|
[hole-view/hole-view
|
||||||
{:style {:margin-left (if (= index 0) 0 margin-left)}
|
{:style {:margin-left (if (zero? index) 0 margin-left)}
|
||||||
:holes (if last-item?
|
:holes (if last-item?
|
||||||
[]
|
[]
|
||||||
[{:x hole-x
|
[{:x hole-x
|
||||||
@@ -122,8 +128,7 @@
|
|||||||
items preview list items (only 4 items is required for preview)
|
items preview list items (only 4 items is required for preview)
|
||||||
"
|
"
|
||||||
[{:keys [type size list-size transparent? theme more-than-99-label]} items]
|
[{:keys [type size list-size transparent? theme more-than-99-label]} items]
|
||||||
(let [items-arr (into [] items)
|
(let [list-size (or list-size (count items))
|
||||||
list-size (or list-size (count items))
|
|
||||||
margin-left (get-in params [size :margin-left])
|
margin-left (get-in params [size :margin-left])
|
||||||
hole-size (get-in params [size :hole-size])
|
hole-size (get-in params [size :hole-size])
|
||||||
border-radius (get-in params [size :border-radius (border-type type)])
|
border-radius (get-in params [size :border-radius (border-type type)])
|
||||||
@@ -133,7 +138,7 @@
|
|||||||
[rn/view {:style {:flex-direction :row}}
|
[rn/view {:style {:flex-direction :row}}
|
||||||
(for [index (range (if (> list-size 4) 3 list-size))]
|
(for [index (range (if (> list-size 4) 3 list-size))]
|
||||||
^{:key (str index list-size)}
|
^{:key (str index list-size)}
|
||||||
[list-item index type size (get items-arr index) list-size
|
[list-item index type size (get (vec items) index) list-size
|
||||||
margin-left hole-size hole-radius hole-x hole-y border-radius])
|
margin-left hole-size hole-radius hole-x hole-y border-radius])
|
||||||
(when (> list-size 4)
|
(when (> list-size 4)
|
||||||
[overflow-label
|
[overflow-label
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
(ns quo2.components.markdown.list.view
|
(ns quo2.components.markdown.list.view
|
||||||
(:require [react-native.core :as rn]
|
(:require [quo2.components.counter.step.view :as step]
|
||||||
[quo2.components.markdown.text :as text]
|
|
||||||
[quo2.components.counter.step.view :as step]
|
|
||||||
[quo2.components.markdown.list.style :as style]
|
|
||||||
[quo2.components.icon :as icon]
|
[quo2.components.icon :as icon]
|
||||||
|
[quo2.components.markdown.list.style :as style]
|
||||||
|
[quo2.components.markdown.text :as text]
|
||||||
|
[quo2.components.tags.context-tag.view :as context-tag]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo2.foundations.colors :as colors]
|
||||||
[quo2.theme :as theme]
|
[quo2.theme :as theme]
|
||||||
[quo2.components.tags.context-tag.view :as context-tag]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn get-colors
|
(defn get-colors
|
||||||
[theme blur?]
|
[theme blur?]
|
||||||
@@ -27,7 +27,11 @@
|
|||||||
:size :paragraph-2}
|
:size :paragraph-2}
|
||||||
description]
|
description]
|
||||||
[rn/view {:style {:margin-left 4}}
|
[rn/view {:style {:margin-left 4}}
|
||||||
[context-tag/context-tag {:blur? blur?} tag-picture tag-name]]
|
[context-tag/view
|
||||||
|
{:blur? blur?
|
||||||
|
:size 24
|
||||||
|
:profile-picture tag-picture
|
||||||
|
:full-name tag-name}]]
|
||||||
[text/text
|
[text/text
|
||||||
{:style {:margin-left 4}
|
{:style {:margin-left 4}
|
||||||
:accessibility-label :list-item-description-after-tag
|
:accessibility-label :list-item-description-after-tag
|
||||||
|
|||||||
@@ -1,31 +1,11 @@
|
|||||||
(ns quo2.components.tags.context-tag.style
|
(ns quo2.components.tags.context-tag.style
|
||||||
(:require [quo2.foundations.colors :as colors]))
|
(:require [quo2.foundations.colors :as colors]))
|
||||||
|
|
||||||
(defn base-tag
|
|
||||||
[override-theme blur?]
|
|
||||||
{:border-radius 100
|
|
||||||
:padding-vertical 3
|
|
||||||
:flex-direction :row
|
|
||||||
:padding-right 8
|
|
||||||
:padding-left 8
|
|
||||||
:background-color (if blur?
|
|
||||||
(colors/theme-colors colors/neutral-80-opa-5 colors/white-opa-5 override-theme)
|
|
||||||
(colors/theme-colors colors/neutral-10 colors/neutral-90 override-theme))})
|
|
||||||
|
|
||||||
(defn context-tag-icon-color
|
(defn context-tag-icon-color
|
||||||
[blur?]
|
[theme blur?]
|
||||||
(if blur?
|
(if blur?
|
||||||
(colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40)
|
(colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40 theme)
|
||||||
(colors/theme-colors colors/neutral-50 colors/neutral-40)))
|
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme)))
|
||||||
|
|
||||||
(def context-tag-text-container
|
|
||||||
{:align-items :center
|
|
||||||
:margin-left 4
|
|
||||||
:flex-direction :row})
|
|
||||||
|
|
||||||
(def audio-tag-container
|
|
||||||
{:padding-left 2
|
|
||||||
:padding-vertical 2})
|
|
||||||
|
|
||||||
(def audio-tag-icon-container
|
(def audio-tag-icon-container
|
||||||
{:width 20
|
{:width 20
|
||||||
@@ -37,21 +17,91 @@
|
|||||||
|
|
||||||
(def audio-tag-icon-color colors/white)
|
(def audio-tag-icon-color colors/white)
|
||||||
|
|
||||||
(defn audio-tag-text-color
|
(defn container
|
||||||
[override-theme]
|
[{:keys [theme type size state blur? customization-color]}]
|
||||||
(colors/theme-colors colors/neutral-100 colors/white override-theme))
|
(let [background-color (if blur?
|
||||||
|
(colors/theme-colors colors/neutral-80-opa-5 colors/white-opa-5 theme)
|
||||||
|
(colors/theme-colors colors/neutral-10 colors/neutral-90 theme))
|
||||||
|
border-radius (cond
|
||||||
|
(not (#{:account :collectible} type)) 16
|
||||||
|
(= size 24) 8
|
||||||
|
:else 10)
|
||||||
|
border-color (colors/theme-colors
|
||||||
|
(colors/custom-color customization-color 50)
|
||||||
|
(colors/custom-color customization-color 60)
|
||||||
|
theme)]
|
||||||
|
(cond-> {:padding 2
|
||||||
|
:flex-direction :row
|
||||||
|
:align-items :center
|
||||||
|
:height size
|
||||||
|
:background-color background-color
|
||||||
|
:border-radius border-radius}
|
||||||
|
(= state :selected) (assoc :height (+ size 2)
|
||||||
|
:border-color border-color
|
||||||
|
:border-width 1))))
|
||||||
|
|
||||||
(def community-tag
|
(defn tag-container
|
||||||
{:padding-vertical 2
|
[size]
|
||||||
:padding-left 2})
|
{:margin-right (if (= size 24) 6 10)
|
||||||
|
|
||||||
(def community-tag-text-container
|
|
||||||
{:margin-left 4
|
|
||||||
:flex 1
|
|
||||||
:flex-direction :row
|
:flex-direction :row
|
||||||
:align-items :center})
|
:align-items :center})
|
||||||
|
|
||||||
(defn community-tag-text
|
(defn tag-spacing
|
||||||
[override-theme]
|
[size]
|
||||||
{:margin-left 2
|
{:margin-left (if (= size 24) 4 8)})
|
||||||
:color (colors/theme-colors colors/neutral-100 colors/white override-theme)})
|
|
||||||
|
(defn text
|
||||||
|
[theme]
|
||||||
|
{:color (colors/theme-colors colors/neutral-100 colors/white theme)})
|
||||||
|
|
||||||
|
(defn circle-logo
|
||||||
|
[size]
|
||||||
|
(if (= size 24)
|
||||||
|
{:width 20 :height 20 :border-radius 10}
|
||||||
|
{:width 28 :height 28 :border-radius 14}))
|
||||||
|
|
||||||
|
(defn rounded-logo
|
||||||
|
[size]
|
||||||
|
(if (= size 24)
|
||||||
|
{:width 20
|
||||||
|
:height 20
|
||||||
|
:border-radius 6}
|
||||||
|
{:width 28
|
||||||
|
:height 28
|
||||||
|
:border-radius 8}))
|
||||||
|
|
||||||
|
(defn address
|
||||||
|
[size]
|
||||||
|
(if (= size 24)
|
||||||
|
{:margin-horizontal 6
|
||||||
|
:margin-vertical 1
|
||||||
|
:flex-direction :row
|
||||||
|
:align-items :center}
|
||||||
|
{:margin-horizontal 10
|
||||||
|
:margin-vertical 3
|
||||||
|
:flex-direction :row
|
||||||
|
:align-items :center}))
|
||||||
|
|
||||||
|
(defn icon
|
||||||
|
[size]
|
||||||
|
(if (= size 24)
|
||||||
|
{:margin-horizontal 6
|
||||||
|
:margin-vertical 1
|
||||||
|
:flex-direction :row
|
||||||
|
:align-items :center}
|
||||||
|
{:margin-left 8
|
||||||
|
:margin-right 10
|
||||||
|
:margin-vertical 3
|
||||||
|
:flex-direction :row
|
||||||
|
:align-items :center}))
|
||||||
|
|
||||||
|
(defn icon-spacing
|
||||||
|
[size]
|
||||||
|
(if (= size 24)
|
||||||
|
{:margin-left 4}
|
||||||
|
{:margin-left 2}))
|
||||||
|
|
||||||
|
(def audio
|
||||||
|
{:margin-right 6
|
||||||
|
:flex-direction :row
|
||||||
|
:align-items :center})
|
||||||
|
|||||||
@@ -1,105 +1,212 @@
|
|||||||
(ns quo2.components.tags.context-tag.view
|
(ns quo2.components.tags.context-tag.view
|
||||||
(:require [quo2.components.avatars.group-avatar.view :as group-avatar]
|
(:require [quo2.components.avatars.account-avatar.view :as account-avatar]
|
||||||
[quo2.components.avatars.user-avatar.style :as user-avatar-style]
|
[quo2.components.avatars.group-avatar.view :as group-avatar]
|
||||||
[quo2.components.avatars.user-avatar.view :as user-avatar]
|
[quo2.components.avatars.user-avatar.view :as user-avatar]
|
||||||
[quo2.components.icon :as icons]
|
[quo2.components.icon :as icons]
|
||||||
|
[quo2.components.list-items.preview-list :as preview-list]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo2.components.markdown.text :as text]
|
||||||
[quo2.components.tags.context-tag.style :as style]
|
[quo2.components.tags.context-tag.style :as style]
|
||||||
|
[quo2.foundations.colors :as colors]
|
||||||
|
[quo2.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn trim-public-key
|
(defn- tag-skeleton
|
||||||
|
[{:keys [theme size text] :or {size 24}} logo-component]
|
||||||
|
[rn/view {:style (style/tag-container size)}
|
||||||
|
logo-component
|
||||||
|
[rn/view {:style (style/tag-spacing size)}
|
||||||
|
[text/text
|
||||||
|
{:style (style/text theme)
|
||||||
|
:weight :medium
|
||||||
|
:size (if (= size 24) :paragraph-2 :paragraph-1)}
|
||||||
|
text]]])
|
||||||
|
|
||||||
|
(defn- communities-tag
|
||||||
|
[{:keys [theme size community-logo community-name blur? channel? channel-name]}]
|
||||||
|
(let [text-size (if (= size 24) :paragraph-2 :paragraph-1)
|
||||||
|
icon-size (if (= size 24) 16 20)]
|
||||||
|
[rn/view {:style (style/tag-container size)}
|
||||||
|
[rn/image {:style (style/circle-logo size) :source community-logo}]
|
||||||
|
[rn/view {:style (style/tag-spacing size)}
|
||||||
|
[text/text
|
||||||
|
{:style (style/text theme)
|
||||||
|
:weight :medium
|
||||||
|
:size text-size}
|
||||||
|
community-name]]
|
||||||
|
(when channel?
|
||||||
|
[:<>
|
||||||
|
[icons/icon :i/chevron-right
|
||||||
|
{:color (style/context-tag-icon-color theme blur?)
|
||||||
|
:size icon-size}]
|
||||||
|
[text/text
|
||||||
|
{:style (style/text theme)
|
||||||
|
:weight :medium
|
||||||
|
:size text-size}
|
||||||
|
(str "# " channel-name)]])]))
|
||||||
|
|
||||||
|
(defn- trim-public-key
|
||||||
[pk]
|
[pk]
|
||||||
(str (subs pk 0 6) "..." (subs pk (- (count pk) 3))))
|
(str (subs pk 0 5) "..." (subs pk (- (count pk) 3))))
|
||||||
|
|
||||||
(defn base-tag
|
(defn- address-tag
|
||||||
[{:keys [override-theme style blur?]} & children]
|
[{:keys [theme size address]}]
|
||||||
(into
|
[rn/view {:style (style/address size)}
|
||||||
[rn/view {:style (merge (style/base-tag override-theme blur?) style)}]
|
|
||||||
children))
|
|
||||||
|
|
||||||
(defn group-avatar-tag
|
|
||||||
[label opts]
|
|
||||||
[base-tag
|
|
||||||
(-> opts
|
|
||||||
(select-keys [:override-theme :style :blur?])
|
|
||||||
(assoc-in [:style :padding-left] 3)
|
|
||||||
(assoc-in [:style :padding-vertical] 2))
|
|
||||||
[group-avatar/view opts]
|
|
||||||
[text/text
|
[text/text
|
||||||
{:weight :medium
|
{:style (style/text theme)
|
||||||
:size :paragraph-2
|
:weight :monospace ;; TODO: fix this style (issue #17009)
|
||||||
:style (:text-style opts)}
|
:size (if (= size 24) :paragraph-2 :paragraph-1)}
|
||||||
(str " " label)]])
|
(trim-public-key address)]])
|
||||||
|
|
||||||
(defn public-key-tag
|
(defn- icon-tag
|
||||||
[params public-key]
|
[{:keys [theme size icon blur? context]}]
|
||||||
[base-tag params
|
[rn/view {:style (style/icon size)}
|
||||||
[text/text
|
[icons/icon icon
|
||||||
{:weight :monospace
|
{:color (style/context-tag-icon-color theme blur?)
|
||||||
:size :paragraph-2}
|
:size (if (= size 24) 12 20)}]
|
||||||
(trim-public-key public-key)]])
|
[rn/view {:style (style/icon-spacing size)}
|
||||||
|
[text/text
|
||||||
|
{:style (style/text theme)
|
||||||
|
:weight :medium
|
||||||
|
:size (if (= size 24) :paragraph-2 :paragraph-1)}
|
||||||
|
context]]])
|
||||||
|
|
||||||
(defn context-tag
|
(defn- view-internal
|
||||||
[{:keys [text-style blur? no-avatar-placeholder? text-container-style ellipsize-text?]
|
[{:keys [theme type size state blur? customization-color profile-picture full-name users
|
||||||
:as props}
|
group-name token-logo amount token-name network-logo network-name networks
|
||||||
photo
|
account-name emoji collectible collectible-name collectible-number duration]
|
||||||
name
|
:or {customization-color :blue
|
||||||
channel-name]
|
type :default
|
||||||
(let [text-props {:weight :medium
|
state :default}
|
||||||
:size :paragraph-2
|
:as props}]
|
||||||
:style (assoc text-style :justify-content :center)
|
[rn/view
|
||||||
:number-of-lines 1
|
{:style (style/container {:theme theme
|
||||||
:ellipsize-mode :tail}
|
:type type
|
||||||
empty-photo? (nil? photo)
|
:size size
|
||||||
avatar-size :xxs
|
:state state
|
||||||
avatar-outer-size (get-in user-avatar-style/sizes [avatar-size :outer])]
|
:blur? blur?
|
||||||
[base-tag (update-in props [:style :padding-left] #(or % 3))
|
:customization-color customization-color})}
|
||||||
(if (and empty-photo? no-avatar-placeholder?)
|
(case type
|
||||||
[rn/view {:style {:width avatar-outer-size}}]
|
:default
|
||||||
[user-avatar/user-avatar
|
[tag-skeleton {:theme theme :size size :text full-name}
|
||||||
{:full-name name
|
[user-avatar/user-avatar
|
||||||
:profile-picture photo
|
{:full-name full-name
|
||||||
:size avatar-size
|
:profile-picture profile-picture
|
||||||
:status-indicator? false}])
|
:size (if (= size 24) :xxs 28)
|
||||||
[rn/view {:style (or text-container-style style/context-tag-text-container)}
|
:status-indicator? false}]]
|
||||||
(if ellipsize-text?
|
|
||||||
[rn/view {:style {:flex 1}}
|
|
||||||
[text/text text-props name]]
|
|
||||||
[text/text text-props (str " " name)])
|
|
||||||
(when channel-name
|
|
||||||
[:<>
|
|
||||||
[icons/icon
|
|
||||||
:i/chevron-right
|
|
||||||
{:color (style/context-tag-icon-color blur?)
|
|
||||||
:size 16}]
|
|
||||||
[text/text text-props (str "# " channel-name)]])]]))
|
|
||||||
|
|
||||||
(defn user-avatar-tag
|
:multiuser
|
||||||
[params username photo]
|
[preview-list/preview-list {:type :user :size 20}
|
||||||
[context-tag params photo username])
|
users]
|
||||||
|
|
||||||
(defn audio-tag
|
:multinetwork ;; TODO: use multinetwork preview-list type when available (issue #17008)
|
||||||
[duration params]
|
[preview-list/preview-list {:type :user :size 20}
|
||||||
[base-tag (merge {:style style/audio-tag-container} params)
|
(map #(hash-map :profile-picture %) networks)]
|
||||||
[rn/view {:style style/audio-tag-icon-container}
|
|
||||||
[icons/icon
|
|
||||||
:i/play
|
|
||||||
{:color style/audio-tag-icon-color
|
|
||||||
:size 12}]]
|
|
||||||
[text/text
|
|
||||||
{:weight :medium
|
|
||||||
:size :paragraph-2
|
|
||||||
:style {:margin-left 4
|
|
||||||
:color (style/audio-tag-text-color (:override-theme params))}}
|
|
||||||
duration]])
|
|
||||||
|
|
||||||
(defn community-tag
|
:audio
|
||||||
[avatar community-name {:keys [override-theme] :as params}]
|
[tag-skeleton {:theme theme :text (str duration)}
|
||||||
[context-tag
|
[rn/view {:style style/audio-tag-icon-container}
|
||||||
(merge {:style style/community-tag
|
[icons/icon :i/play {:color style/audio-tag-icon-color :size 12}]]]
|
||||||
:text-style (style/community-tag-text override-theme)
|
|
||||||
:text-container-style style/community-tag-text-container
|
:group
|
||||||
:ellipsize-text? true}
|
[tag-skeleton {:theme theme :size size :text group-name}
|
||||||
params)
|
[group-avatar/view
|
||||||
avatar
|
{:icon-name :i/members
|
||||||
community-name])
|
:size (if (= size 24) :x-small :small)
|
||||||
|
:customization-color (colors/custom-color :purple 50)}]]
|
||||||
|
|
||||||
|
(:channel :community)
|
||||||
|
[communities-tag (assoc props :channel? (= type :channel))]
|
||||||
|
|
||||||
|
:token
|
||||||
|
[tag-skeleton {:theme theme :size size :text (str amount " " token-name)}
|
||||||
|
[rn/image {:style (style/circle-logo size) :source token-logo}]]
|
||||||
|
|
||||||
|
:network
|
||||||
|
[tag-skeleton {:theme theme :size size :text network-name}
|
||||||
|
[rn/image {:style (style/circle-logo size) :source network-logo}]]
|
||||||
|
|
||||||
|
:collectible
|
||||||
|
[tag-skeleton
|
||||||
|
{:theme theme
|
||||||
|
:size size
|
||||||
|
:text (str collectible-name " #" collectible-number)}
|
||||||
|
[rn/image {:style (style/rounded-logo size) :source collectible}]]
|
||||||
|
|
||||||
|
:account
|
||||||
|
[tag-skeleton {:theme theme :size size :text account-name}
|
||||||
|
[account-avatar/view {:emoji emoji :size (if (= size 24) 20 28)}]]
|
||||||
|
|
||||||
|
:address
|
||||||
|
[address-tag props]
|
||||||
|
|
||||||
|
:icon
|
||||||
|
[icon-tag props]
|
||||||
|
|
||||||
|
nil)])
|
||||||
|
|
||||||
|
(def view
|
||||||
|
"Properties:
|
||||||
|
type, state, blur? & customization-color
|
||||||
|
|
||||||
|
Depending on the `type` selected, different properties are accepted:
|
||||||
|
- `:default` or `nil`:
|
||||||
|
- size
|
||||||
|
- profile-picture
|
||||||
|
- full-name
|
||||||
|
|
||||||
|
- `:multiuser`:
|
||||||
|
- users (vector of {:profile-picture pic, :full-name \"a name\"})
|
||||||
|
|
||||||
|
- `:group`
|
||||||
|
- size
|
||||||
|
- group-name
|
||||||
|
|
||||||
|
- `:community`
|
||||||
|
- size
|
||||||
|
- community-logo (valid rn/image :source value)
|
||||||
|
- community-name
|
||||||
|
|
||||||
|
- `:channel`
|
||||||
|
- size
|
||||||
|
- community-logo (valid rn/image :source value)
|
||||||
|
- community-name
|
||||||
|
- channel-name
|
||||||
|
|
||||||
|
- `:token`
|
||||||
|
- size
|
||||||
|
- token-logo (valid rn/image :source value)
|
||||||
|
- amount
|
||||||
|
- token-name
|
||||||
|
|
||||||
|
- `:network`
|
||||||
|
- size
|
||||||
|
- network-logo (valid rn/image :source value)
|
||||||
|
- network-name
|
||||||
|
|
||||||
|
- `:multinetworks`
|
||||||
|
- networks (vector of {:network-logo pic, :network-name \"a name\"})
|
||||||
|
|
||||||
|
- `:account`
|
||||||
|
- size
|
||||||
|
- account-name
|
||||||
|
- emoji (string containing an emoji)
|
||||||
|
|
||||||
|
- `:collectible`
|
||||||
|
- size
|
||||||
|
- collectible (valid rn/image :source value)
|
||||||
|
- collectible-name
|
||||||
|
- collectible-number
|
||||||
|
|
||||||
|
- `:address`
|
||||||
|
- size
|
||||||
|
- address (string)
|
||||||
|
|
||||||
|
- `:icon`
|
||||||
|
- size
|
||||||
|
- icon
|
||||||
|
- context (string)
|
||||||
|
|
||||||
|
- `:audio`
|
||||||
|
- duration (string)
|
||||||
|
"
|
||||||
|
(quo.theme/with-theme view-internal))
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
(ns quo2.components.wallet.wallet-activity.component-spec
|
||||||
|
(:require [quo2.components.wallet.wallet-activity.view :as wallet-activity]
|
||||||
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
|
(def props
|
||||||
|
{})
|
||||||
|
|
||||||
|
(h/describe "Wallet activity"
|
||||||
|
(h/test "default render"
|
||||||
|
(h/render [wallet-activity/view props])
|
||||||
|
(h/is-truthy (h/query-by-label-text :wallet-activity)))
|
||||||
|
|
||||||
|
(h/test "Should call :on-press"
|
||||||
|
(let [on-press (h/mock-fn)]
|
||||||
|
(h/render [wallet-activity/view
|
||||||
|
(assoc props :on-press on-press)])
|
||||||
|
(h/is-truthy (h/query-by-label-text :wallet-activity))
|
||||||
|
(h/fire-event :press (h/query-by-label-text :wallet-activity))
|
||||||
|
(h/was-called on-press))))
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
(ns quo2.components.wallet.wallet-activity.style
|
||||||
|
(:require [quo2.foundations.colors :as colors]))
|
||||||
|
|
||||||
|
(defn wallet-activity-container
|
||||||
|
[{:keys [pressed?
|
||||||
|
theme
|
||||||
|
blur?]}]
|
||||||
|
(merge
|
||||||
|
{:border-radius 16
|
||||||
|
:padding-top 8
|
||||||
|
:padding-left 12
|
||||||
|
:padding-right 12
|
||||||
|
:padding-bottom 12}
|
||||||
|
(when pressed?
|
||||||
|
{:background-color (if blur?
|
||||||
|
colors/white-opa-5
|
||||||
|
(colors/theme-colors colors/neutral-5 colors/neutral-90 theme))})))
|
||||||
|
|
||||||
|
(def transaction-header-container
|
||||||
|
{:flex-direction :row
|
||||||
|
:align-items :center})
|
||||||
|
|
||||||
|
(defn transaction-header
|
||||||
|
[theme]
|
||||||
|
{:color (colors/theme-colors colors/neutral-100 colors/white theme)
|
||||||
|
:margin-right 4})
|
||||||
|
|
||||||
|
(defn transaction-counter
|
||||||
|
[theme]
|
||||||
|
{:color (colors/theme-colors colors/neutral-100 colors/white theme)})
|
||||||
|
|
||||||
|
(defn transaction-counter-container
|
||||||
|
[theme blur?]
|
||||||
|
{:border-width 1
|
||||||
|
:border-radius 6
|
||||||
|
:margin-right 8
|
||||||
|
:padding-horizontal 2
|
||||||
|
:border-color (if-not blur?
|
||||||
|
(colors/theme-colors colors/neutral-20 colors/neutral-80 theme)
|
||||||
|
colors/white-opa-10)})
|
||||||
|
|
||||||
|
(defn timestamp
|
||||||
|
[theme blur?]
|
||||||
|
{:color (if-not blur?
|
||||||
|
(colors/theme-colors colors/neutral-40 colors/neutral-50 theme)
|
||||||
|
colors/white-opa-40)})
|
||||||
|
|
||||||
|
(defn prop-text
|
||||||
|
[theme]
|
||||||
|
{:margin-right 4
|
||||||
|
:color (colors/theme-colors colors/neutral-100 colors/white theme)})
|
||||||
|
|
||||||
|
(def icon-container
|
||||||
|
{:width 32
|
||||||
|
:height 32
|
||||||
|
|
||||||
|
:margin-top 8})
|
||||||
|
|
||||||
|
(def content-container
|
||||||
|
{:margin-left 8})
|
||||||
|
|
||||||
|
(def content-line
|
||||||
|
{:flex-direction :row :margin-top 2 :align-items :center})
|
||||||
|
|
||||||
|
(defn icon-hole-view
|
||||||
|
[theme blur?]
|
||||||
|
{:width 32
|
||||||
|
:height 32
|
||||||
|
:border-width 1
|
||||||
|
:border-color (if-not blur?
|
||||||
|
(colors/theme-colors colors/neutral-20 colors/neutral-80 theme)
|
||||||
|
colors/white-opa-5)
|
||||||
|
:border-radius 16
|
||||||
|
:align-items :center
|
||||||
|
:justify-content :center})
|
||||||
|
|
||||||
|
(defn icon-color
|
||||||
|
[theme]
|
||||||
|
(colors/theme-colors colors/neutral-100 colors/white theme))
|
||||||
|
|
||||||
|
(def icon-status-container
|
||||||
|
{:position :absolute :bottom 0 :right 0})
|
||||||
|
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
(ns quo2.components.wallet.wallet-activity.view
|
||||||
|
(:require [quo2.theme :as quo.theme]
|
||||||
|
[quo2.components.wallet.wallet-activity.style :as style]
|
||||||
|
[react-native.core :as rn]
|
||||||
|
[quo2.components.markdown.text :as text]
|
||||||
|
[quo2.components.icon :as icon]
|
||||||
|
[quo2.components.tags.context-tag.view :as context-tag]
|
||||||
|
[react-native.hole-view :as hole-view]
|
||||||
|
[utils.i18n :as i18n]
|
||||||
|
[reagent.core :as reagent]))
|
||||||
|
|
||||||
|
(def transaction-translation
|
||||||
|
{:receive [i18n/label :t/receive]
|
||||||
|
:send [i18n/label :t/send]
|
||||||
|
:swap [i18n/label :t/swap]
|
||||||
|
:bridge [i18n/label :t/bridge]
|
||||||
|
:buy [i18n/label :t/buy]
|
||||||
|
:destroy [i18n/label :t/destroy]
|
||||||
|
:mint [i18n/label :t/mint]})
|
||||||
|
|
||||||
|
(def transaction-icon
|
||||||
|
{:receive :i/receive
|
||||||
|
:send :i/send
|
||||||
|
:swap :i/swap
|
||||||
|
:bridge :i/bridge
|
||||||
|
:buy :i/buy
|
||||||
|
:destroy :i/destroy
|
||||||
|
:mint :i/mint})
|
||||||
|
|
||||||
|
(def status-icon
|
||||||
|
{:pending :i/pending-state
|
||||||
|
:confirmed :i/positive-state
|
||||||
|
:finalised :i/diamond-blue
|
||||||
|
:failed :i/negative-state})
|
||||||
|
|
||||||
|
(defn transaction-header
|
||||||
|
[{:keys [transaction
|
||||||
|
timestamp
|
||||||
|
counter
|
||||||
|
theme
|
||||||
|
blur?]
|
||||||
|
:or {transaction :receive
|
||||||
|
counter 1}}]
|
||||||
|
|
||||||
|
[rn/view
|
||||||
|
{:style style/transaction-header-container}
|
||||||
|
[text/text
|
||||||
|
{:weight :semi-bold
|
||||||
|
:size :paragraph-1
|
||||||
|
:style (style/transaction-header theme)}
|
||||||
|
(transaction transaction-translation)]
|
||||||
|
(when (> counter 1)
|
||||||
|
[rn/view (style/transaction-counter-container theme blur?)
|
||||||
|
[text/text
|
||||||
|
{:weight :medium
|
||||||
|
:size :label
|
||||||
|
:style (style/transaction-counter theme)}
|
||||||
|
(str "x" counter "")]])
|
||||||
|
[rn/view
|
||||||
|
[text/text
|
||||||
|
{:weight :regular
|
||||||
|
:size :label
|
||||||
|
:style (style/timestamp theme blur?)}
|
||||||
|
timestamp]]])
|
||||||
|
|
||||||
|
(defn transaction-icon-view
|
||||||
|
[{:keys [theme blur? transaction status]
|
||||||
|
:or {transaction :receive
|
||||||
|
status :pending}}]
|
||||||
|
[rn/view {:style style/icon-container}
|
||||||
|
[hole-view/hole-view
|
||||||
|
{:style (style/icon-hole-view theme blur?)
|
||||||
|
:holes [{:x 20
|
||||||
|
:y 20
|
||||||
|
:right 0
|
||||||
|
:width 12
|
||||||
|
:height 12
|
||||||
|
:borderRadius 6}]}
|
||||||
|
[icon/icon (transaction-icon transaction)
|
||||||
|
{:color (style/icon-color theme)}]]
|
||||||
|
[rn/view {:style style/icon-status-container}
|
||||||
|
[icon/icon (status-icon status)
|
||||||
|
{:size 12
|
||||||
|
:no-color :true}]]])
|
||||||
|
|
||||||
|
(defn prop-text
|
||||||
|
[label theme]
|
||||||
|
[text/text
|
||||||
|
{:weight :regular
|
||||||
|
:size :paragraph-2
|
||||||
|
:style (style/prop-text theme)}
|
||||||
|
[i18n/label label]])
|
||||||
|
|
||||||
|
(defn prop-tag
|
||||||
|
[props]
|
||||||
|
[rn/view {:style {:margin-right 4}}
|
||||||
|
[context-tag/view (merge {:size 24} props)]])
|
||||||
|
|
||||||
|
(defn- view-internal
|
||||||
|
[_]
|
||||||
|
(let [pressed? (reagent/atom false)]
|
||||||
|
(fn
|
||||||
|
[{:keys [state theme blur?
|
||||||
|
on-press
|
||||||
|
first second third fourth
|
||||||
|
second-prefix third-prefix fourth-prefix]
|
||||||
|
:as props}]
|
||||||
|
[rn/pressable
|
||||||
|
{:style (style/wallet-activity-container {:pressed? @pressed?
|
||||||
|
:theme theme
|
||||||
|
:blur? blur?})
|
||||||
|
:accessibility-label :wallet-activity
|
||||||
|
:disabled (= state :disabled)
|
||||||
|
:on-press on-press
|
||||||
|
:on-press-in (fn [] (reset! pressed? true))
|
||||||
|
:on-press-out (fn [] (reset! pressed? false))}
|
||||||
|
|
||||||
|
[rn/view
|
||||||
|
{:style {:flex-direction :row}}
|
||||||
|
[transaction-icon-view props]
|
||||||
|
[rn/view ;content
|
||||||
|
{:style style/content-container}
|
||||||
|
|
||||||
|
[transaction-header props]
|
||||||
|
|
||||||
|
[rn/view {:style style/content-line}
|
||||||
|
(when first [prop-tag first])
|
||||||
|
(when second-prefix [prop-text second-prefix theme])
|
||||||
|
(when second [prop-tag second])]
|
||||||
|
|
||||||
|
[rn/view {:style style/content-line}
|
||||||
|
(when third-prefix [prop-text third-prefix theme])
|
||||||
|
(when third [prop-tag third])
|
||||||
|
(when fourth-prefix [prop-text fourth-prefix theme])
|
||||||
|
(when fourth [prop-tag fourth])]]]])))
|
||||||
|
|
||||||
|
(def view
|
||||||
|
"Properties:
|
||||||
|
- :transaction - type of transaction`. Possible values:
|
||||||
|
- :receive
|
||||||
|
- :send
|
||||||
|
- :swap
|
||||||
|
- :bridge
|
||||||
|
- :buy
|
||||||
|
- :destroy
|
||||||
|
- :mint
|
||||||
|
|
||||||
|
- :status - transaction status. Possible values:
|
||||||
|
- :pending
|
||||||
|
- :confirmed
|
||||||
|
- :finalised
|
||||||
|
- :failed
|
||||||
|
|
||||||
|
- :counter - amount of transactions shown by instance of the component
|
||||||
|
|
||||||
|
- :timestamp - when transaction occured (string)
|
||||||
|
- :blur?
|
||||||
|
|
||||||
|
- :first - props for context tag component that will be first on the first line
|
||||||
|
- :second - props for context tag component that will be second on the first line
|
||||||
|
- :third - props for context tag component that will be first on the second line
|
||||||
|
- :fourth - props for context tag component that will be second on the second line
|
||||||
|
|
||||||
|
- :second-prefix - translation keyword to be used with label before second context tag
|
||||||
|
- :third-prefix - translation keyword to be used with label before third context tag
|
||||||
|
- :fourth-prefix - translation keyword to be used with label before fourth context tag
|
||||||
|
|
||||||
|
"
|
||||||
|
(quo.theme/with-theme view-internal))
|
||||||
+5
-6
@@ -114,7 +114,8 @@
|
|||||||
quo2.components.wallet.progress-bar.view
|
quo2.components.wallet.progress-bar.view
|
||||||
quo2.components.wallet.summary-info.view
|
quo2.components.wallet.summary-info.view
|
||||||
quo2.components.wallet.token-input.view
|
quo2.components.wallet.token-input.view
|
||||||
quo2.components.wallet.wallet-overview.view))
|
quo2.components.wallet.wallet-overview.view
|
||||||
|
quo2.components.wallet.wallet-activity.view))
|
||||||
|
|
||||||
(def separator quo2.components.common.separator.view/separator)
|
(def separator quo2.components.common.separator.view/separator)
|
||||||
|
|
||||||
@@ -301,11 +302,8 @@
|
|||||||
(def permission-tag quo2.components.tags.permission-tag/tag)
|
(def permission-tag quo2.components.tags.permission-tag/tag)
|
||||||
(def status-tag quo2.components.tags.status-tags/status-tag)
|
(def status-tag quo2.components.tags.status-tags/status-tag)
|
||||||
(def token-tag quo2.components.tags.token-tag/tag)
|
(def token-tag quo2.components.tags.token-tag/tag)
|
||||||
(def user-avatar-tag quo2.components.tags.context-tag.view/user-avatar-tag)
|
|
||||||
(def context-tag quo2.components.tags.context-tag.view/context-tag)
|
(def context-tag quo2.components.tags.context-tag.view/view)
|
||||||
(def group-avatar-tag quo2.components.tags.context-tag.view/group-avatar-tag)
|
|
||||||
(def audio-tag quo2.components.tags.context-tag.view/audio-tag)
|
|
||||||
(def community-tag quo2.components.tags.context-tag.view/community-tag)
|
|
||||||
|
|
||||||
;;;; Title
|
;;;; Title
|
||||||
(def title quo2.components.text-combinations.title.view/title)
|
(def title quo2.components.text-combinations.title.view/title)
|
||||||
@@ -319,3 +317,4 @@
|
|||||||
(def summary-info quo2.components.wallet.summary-info.view/view)
|
(def summary-info quo2.components.wallet.summary-info.view/view)
|
||||||
(def token-input quo2.components.wallet.token-input.view/view)
|
(def token-input quo2.components.wallet.token-input.view/view)
|
||||||
(def wallet-overview quo2.components.wallet.wallet-overview.view/view)
|
(def wallet-overview quo2.components.wallet.wallet-overview.view/view)
|
||||||
|
(def wallet-activity quo2.components.wallet.wallet-activity.view/view)
|
||||||
|
|||||||
@@ -59,4 +59,5 @@
|
|||||||
[quo2.components.wallet.progress-bar.component-spec]
|
[quo2.components.wallet.progress-bar.component-spec]
|
||||||
[quo2.components.wallet.summary-info.component-spec]
|
[quo2.components.wallet.summary-info.component-spec]
|
||||||
[quo2.components.wallet.token-input.component-spec]
|
[quo2.components.wallet.token-input.component-spec]
|
||||||
[quo2.components.wallet.wallet-overview.component-spec]))
|
[quo2.components.wallet.wallet-overview.component-spec]
|
||||||
|
[quo2.components.wallet.wallet-activity.component-spec]))
|
||||||
|
|||||||
@@ -28,3 +28,7 @@
|
|||||||
{:ethereum (js/require "../resources/images/tokens/mainnet/ETH-network.png")
|
{:ethereum (js/require "../resources/images/tokens/mainnet/ETH-network.png")
|
||||||
:optimism (js/require "../resources/images/tokens/mainnet/OP.png")
|
:optimism (js/require "../resources/images/tokens/mainnet/OP.png")
|
||||||
:arbitrum (js/require "../resources/images/tokens/mainnet/ARB.png")})
|
:arbitrum (js/require "../resources/images/tokens/mainnet/ARB.png")})
|
||||||
|
|
||||||
|
(defn get-network
|
||||||
|
[n]
|
||||||
|
(get networks n))
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
[react/nested-text
|
[react/nested-text
|
||||||
{:style {:color colors/gray}
|
{:style {:color colors/gray}
|
||||||
:ellipsize-mode :middle
|
:ellipsize-mode :middle
|
||||||
:number-of-lines 1} (i18n/label :t/to) " "
|
:number-of-lines 1} (i18n/label :t/To) " "
|
||||||
[{:style {:color colors/black}} (displayed-name contact)]]
|
[{:style {:color colors/black}} (displayed-name contact)]]
|
||||||
[react/text {:style {:margin-top 6 :color colors/gray}}
|
[react/text {:style {:margin-top 6 :color colors/gray}}
|
||||||
(str fee " " fee-display-symbol " " (string/lower-case (i18n/label :t/network-fee)))])]
|
(str fee " " fee-display-symbol " " (string/lower-case (i18n/label :t/network-fee)))])]
|
||||||
@@ -497,9 +497,9 @@
|
|||||||
[react/view
|
[react/view
|
||||||
[network-item]
|
[network-item]
|
||||||
[separator]])
|
[separator]])
|
||||||
[contact-item (i18n/label :t/from) from]
|
[contact-item (i18n/label :t/From) from]
|
||||||
[separator]
|
[separator]
|
||||||
[contact-item (i18n/label :t/to) contact]
|
[contact-item (i18n/label :t/To) contact]
|
||||||
(when-not cancel?
|
(when-not cancel?
|
||||||
[separator])
|
[separator])
|
||||||
(when-not cancel?
|
(when-not cancel?
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
:align-items :center
|
:align-items :center
|
||||||
:margin-vertical 16}]
|
:margin-vertical 16}]
|
||||||
[quo/list-header
|
[quo/list-header
|
||||||
(i18n/label :t/from)]
|
(i18n/label :t/From)]
|
||||||
[react/view {:flex-direction :row :flex 1 :align-items :center}
|
[react/view {:flex-direction :row :flex 1 :align-items :center}
|
||||||
[react/view {:flex 1}
|
[react/view {:flex 1}
|
||||||
[render-account from nil ::commands/set-selected-account]]]
|
[render-account from nil ::commands/set-selected-account]]]
|
||||||
@@ -204,7 +204,7 @@
|
|||||||
[fiat-value amount-text token prices wallet-currency]
|
[fiat-value amount-text token prices wallet-currency]
|
||||||
[components/separator]
|
[components/separator]
|
||||||
[quo/list-header
|
[quo/list-header
|
||||||
(i18n/label :t/to)]
|
(i18n/label :t/To)]
|
||||||
[react/view {:flex-direction :row :flex 1 :align-items :center}
|
[react/view {:flex-direction :row :flex 1 :align-items :center}
|
||||||
[react/view {:flex 1}
|
[react/view {:flex 1}
|
||||||
[render-account from token :wallet.request/set-field]]]]]
|
[render-account from token :wallet.request/set-field]]]]]
|
||||||
@@ -280,12 +280,12 @@
|
|||||||
(when-not (or request? from-chat?)
|
(when-not (or request? from-chat?)
|
||||||
[set-max token])
|
[set-max token])
|
||||||
[components/separator]
|
[components/separator]
|
||||||
[quo/list-header (i18n/label :t/from)]
|
[quo/list-header (i18n/label :t/From)]
|
||||||
[react/view {:flex-direction :row :flex 1 :align-items :center}
|
[react/view {:flex-direction :row :flex 1 :align-items :center}
|
||||||
[react/view {:flex 1}
|
[react/view {:flex 1}
|
||||||
[render-account from token :wallet.send/set-field]]]
|
[render-account from token :wallet.send/set-field]]]
|
||||||
[quo/list-header
|
[quo/list-header
|
||||||
(i18n/label :t/to)]
|
(i18n/label :t/To)]
|
||||||
[react/view {:flex-direction :row :flex 1 :align-items :center}
|
[react/view {:flex-direction :row :flex 1 :align-items :center}
|
||||||
[react/view {:flex 1}
|
[react/view {:flex 1}
|
||||||
[render-contact to from-chat?]]]]]
|
[render-contact to from-chat?]]]]]
|
||||||
|
|||||||
@@ -245,13 +245,13 @@
|
|||||||
[react/view {:style styles/details-block}
|
[react/view {:style styles/details-block}
|
||||||
[details-list-row :t/block block]
|
[details-list-row :t/block block]
|
||||||
[details-list-row :t/hash hash]
|
[details-list-row :t/hash hash]
|
||||||
[details-list-row :t/from
|
[details-list-row :t/From
|
||||||
[{:accessibility-label (if from-wallet :sender-name-text :sender-address-text)}
|
[{:accessibility-label (if from-wallet :sender-name-text :sender-address-text)}
|
||||||
(or from-wallet from-contact from)]
|
(or from-wallet from-contact from)]
|
||||||
(when (or from-wallet from-contact)
|
(when (or from-wallet from-contact)
|
||||||
[{:accessibility-label :sender-address-text}
|
[{:accessibility-label :sender-address-text}
|
||||||
from])]
|
from])]
|
||||||
[details-list-row :t/to
|
[details-list-row :t/To
|
||||||
[{:accessibility-label (if to-wallet :recipient-name-text :recipient-address-text)}
|
[{:accessibility-label (if to-wallet :recipient-name-text :recipient-address-text)}
|
||||||
(or to-wallet to-contact to)]
|
(or to-wallet to-contact to)]
|
||||||
(when (or to-wallet to-contact)
|
(when (or to-wallet to-contact)
|
||||||
|
|||||||
@@ -16,11 +16,11 @@
|
|||||||
[rn/view {:padding-horizontal 20}
|
[rn/view {:padding-horizontal 20}
|
||||||
[quo/text {:size :heading-1 :weight :semi-bold}
|
[quo/text {:size :heading-1 :weight :semi-bold}
|
||||||
(i18n/label :t/enter-password)]
|
(i18n/label :t/enter-password)]
|
||||||
[quo/user-avatar-tag
|
[rn/view {:style {:margin-top 8 :margin-bottom 20}}
|
||||||
{:size :small
|
[quo/context-tag
|
||||||
:style {:margin-top 8 :margin-bottom 20}}
|
{:size 24
|
||||||
(multiaccounts/displayed-name account)
|
:profile-picture (multiaccounts/displayed-photo account)
|
||||||
(multiaccounts/displayed-photo account)]
|
:full-name (multiaccounts/displayed-name account)}]]
|
||||||
[quo/input
|
[quo/input
|
||||||
{:type :password
|
{:type :password
|
||||||
:label (i18n/label :t/profile-password)
|
:label (i18n/label :t/profile-password)
|
||||||
|
|||||||
@@ -12,6 +12,6 @@
|
|||||||
:align-items :center
|
:align-items :center
|
||||||
:justify-content :space-between})
|
:justify-content :space-between})
|
||||||
|
|
||||||
(def context-tag
|
(def community-tag
|
||||||
{:margin-right :auto
|
{:margin-right :auto
|
||||||
:margin-top 8})
|
:margin-top 8})
|
||||||
|
|||||||
@@ -14,7 +14,10 @@
|
|||||||
:weight :semi-bold
|
:weight :semi-bold
|
||||||
:size :heading-1}
|
:size :heading-1}
|
||||||
title]]
|
title]]
|
||||||
[quo/context-tag
|
[rn/view {:style style/community-tag}
|
||||||
{:style style/context-tag}
|
[quo/context-tag
|
||||||
(:thumbnail images) name]
|
{:type :community
|
||||||
|
:size 24
|
||||||
|
:community-logo (:thumbnail images)
|
||||||
|
:community-name name}]]
|
||||||
children]))
|
children]))
|
||||||
|
|||||||
@@ -37,11 +37,12 @@
|
|||||||
:weight :semi-bold
|
:weight :semi-bold
|
||||||
:size :heading-1}
|
:size :heading-1}
|
||||||
(request-to-join-text open?)]]
|
(request-to-join-text open?)]]
|
||||||
[quo/context-tag
|
[rn/view {:style {:margin-right :auto :margin-top 8}}
|
||||||
{:style
|
[quo/context-tag
|
||||||
{:margin-right :auto
|
{:type :community
|
||||||
:margin-top 8}}
|
:size 24
|
||||||
(:thumbnail images) name]
|
:community-logo (:thumbnail images)
|
||||||
|
:community-name name}]]
|
||||||
[quo/text
|
[quo/text
|
||||||
{:style {:margin-top 24}
|
{:style {:margin-top 24}
|
||||||
:accessibility-label :communities-rules-title
|
:accessibility-label :communities-rules-title
|
||||||
|
|||||||
@@ -25,15 +25,21 @@
|
|||||||
|
|
||||||
(defn example-tags
|
(defn example-tags
|
||||||
[blur?]
|
[blur?]
|
||||||
[[quo/context-tag {:blur? [blur?]}
|
[[quo/context-tag
|
||||||
(resources/get-mock-image :user-picture-male5)
|
{:blur? blur?
|
||||||
"alisher.eth"]
|
:size 24
|
||||||
[quo/context-tag {:blur? [blur?]}
|
:profile-picture (resources/get-mock-image :user-picture-male5)
|
||||||
(resources/get-mock-image :user-picture-male4)
|
:full-name "alisher.eth"}]
|
||||||
"Pedro"]
|
[quo/context-tag
|
||||||
[quo/context-tag {:blur? [blur?]}
|
{:blur? blur?
|
||||||
(resources/get-mock-image :user-picture-female2)
|
:size 24
|
||||||
"Freya Odinson"]])
|
:profile-picture (resources/get-mock-image :user-picture-male4)
|
||||||
|
:full-name "Pedro"}]
|
||||||
|
[quo/context-tag
|
||||||
|
{:blur? blur?
|
||||||
|
:size 24
|
||||||
|
:profile-picture (resources/get-mock-image :user-picture-female2)
|
||||||
|
:full-name "Freya Odinson"}]])
|
||||||
|
|
||||||
(defn cool-preview
|
(defn cool-preview
|
||||||
[]
|
[]
|
||||||
|
|||||||
@@ -116,6 +116,7 @@
|
|||||||
[status-im2.contexts.quo-preview.wallet.summary-info :as summary-info]
|
[status-im2.contexts.quo-preview.wallet.summary-info :as summary-info]
|
||||||
[status-im2.contexts.quo-preview.wallet.token-input :as token-input]
|
[status-im2.contexts.quo-preview.wallet.token-input :as token-input]
|
||||||
[status-im2.contexts.quo-preview.wallet.wallet-overview :as wallet-overview]
|
[status-im2.contexts.quo-preview.wallet.wallet-overview :as wallet-overview]
|
||||||
|
[status-im2.contexts.quo-preview.wallet.wallet-activity :as wallet-activity]
|
||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
(def screens-categories
|
(def screens-categories
|
||||||
@@ -450,7 +451,10 @@
|
|||||||
:component token-input/preview}
|
:component token-input/preview}
|
||||||
{:name :wallet-overview
|
{:name :wallet-overview
|
||||||
:options {:topBar {:visible true}}
|
:options {:topBar {:visible true}}
|
||||||
:component wallet-overview/preview-wallet-overview}]
|
:component wallet-overview/preview-wallet-overview}
|
||||||
|
{:name :wallet-activity
|
||||||
|
:options {:topBar {:visible true}}
|
||||||
|
:component wallet-activity/preview-wallet-activity}]
|
||||||
:keycard [{:name :keycard-component
|
:keycard [{:name :keycard-component
|
||||||
:options {:topBar {:visible true}}
|
:options {:topBar {:visible true}}
|
||||||
:component keycard/preview-keycard}]})
|
:component keycard/preview-keycard}]})
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
(ns status-im2.contexts.quo-preview.notifications.activity-logs
|
(ns status-im2.contexts.quo-preview.notifications.activity-logs
|
||||||
(:require [quo2.core :as quo2]
|
(:require [quo2.core :as quo]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo2.foundations.colors :as colors]
|
||||||
|
[quo2.theme :as quo.theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[reagent.core :as reagent]
|
[reagent.core :as reagent]
|
||||||
[status-im2.contexts.quo-preview.preview :as preview]
|
[status-im2.contexts.quo-preview.preview :as preview]
|
||||||
@@ -67,27 +68,20 @@
|
|||||||
status-tags/status-tags-options])
|
status-tags/status-tags-options])
|
||||||
|
|
||||||
(def basic-user-action
|
(def basic-user-action
|
||||||
[[quo2/user-avatar-tag
|
[[quo/context-tag
|
||||||
{:color :purple
|
{:size 24
|
||||||
:override-theme :dark
|
:full-name "Name"
|
||||||
:size :small
|
:blur? true}]
|
||||||
:style {:background-color colors/white-opa-10}
|
|
||||||
:text-style {:color colors/white}}
|
|
||||||
"Name"]
|
|
||||||
"did something here."])
|
"did something here."])
|
||||||
|
|
||||||
(def complex-user-action
|
(def complex-user-action
|
||||||
(let [tag-props {:color :purple
|
[[quo/context-tag {:size 24 :full-name "Alice" :blur? true}]
|
||||||
:size :small
|
"from"
|
||||||
:style {:background-color colors/white-opa-10}
|
[quo/context-tag {:size 24 :full-name "Mainnet" :blur? true}]
|
||||||
:text-style {:color colors/white}}]
|
"to"
|
||||||
[[quo2/user-avatar-tag tag-props "Alice"]
|
[quo/context-tag {:size 24 :full-name "Optimism" :blur? true}]
|
||||||
"from"
|
"on"
|
||||||
[quo2/user-avatar-tag tag-props "Mainnet"]
|
[quo/context-tag {:size 24 :full-name "My savings" :blur? true}]])
|
||||||
"to"
|
|
||||||
[quo2/user-avatar-tag tag-props "Optimism"]
|
|
||||||
"on"
|
|
||||||
[quo2/user-avatar-tag tag-props "My savings"]]))
|
|
||||||
|
|
||||||
(def message-with-mention
|
(def message-with-mention
|
||||||
(let [common-text-style {:style {:color colors/white}
|
(let [common-text-style {:style {:color colors/white}
|
||||||
@@ -95,8 +89,8 @@
|
|||||||
{:body [rn/view
|
{:body [rn/view
|
||||||
{:flex 1
|
{:flex 1
|
||||||
:flex-direction :row}
|
:flex-direction :row}
|
||||||
[quo2/text common-text-style "Hello"]
|
[quo/text common-text-style "Hello"]
|
||||||
[quo2/text
|
[quo/text
|
||||||
{:style {:background-color colors/primary-50-opa-10
|
{:style {:background-color colors/primary-50-opa-10
|
||||||
:border-radius 6
|
:border-radius 6
|
||||||
:color colors/primary-50
|
:color colors/primary-50
|
||||||
@@ -104,7 +98,7 @@
|
|||||||
:padding-horizontal 3
|
:padding-horizontal 3
|
||||||
:size :paragraph-1}}
|
:size :paragraph-1}}
|
||||||
"@name"]
|
"@name"]
|
||||||
[quo2/text common-text-style "! How are you feeling?"]]}))
|
[quo/text common-text-style "! How are you feeling?"]]}))
|
||||||
|
|
||||||
(def message-with-title
|
(def message-with-title
|
||||||
{:body "Your favorite color is Turquoise."
|
{:body "Your favorite color is Turquoise."
|
||||||
@@ -176,12 +170,13 @@
|
|||||||
{:flex 1
|
{:flex 1
|
||||||
:padding 16}
|
:padding 16}
|
||||||
[preview/customizer state descriptor]]
|
[preview/customizer state descriptor]]
|
||||||
[rn/view
|
[quo.theme/provider {:theme :dark}
|
||||||
{:background-color colors/neutral-90
|
[rn/view
|
||||||
:flex-direction :row
|
{:background-color colors/neutral-90
|
||||||
:justify-content :center
|
:flex-direction :row
|
||||||
:padding-vertical 60}
|
:justify-content :center
|
||||||
[quo2/activity-log props]]]))))
|
:padding-vertical 60}
|
||||||
|
[quo/activity-log props]]]]))))
|
||||||
|
|
||||||
(defn preview-activity-logs
|
(defn preview-activity-logs
|
||||||
[]
|
[]
|
||||||
|
|||||||
@@ -1,173 +1,267 @@
|
|||||||
(ns status-im2.contexts.quo-preview.tags.context-tags
|
(ns status-im2.contexts.quo-preview.tags.context-tags
|
||||||
(:require [quo2.components.tags.context-tag.view :as quo2]
|
(:require [quo2.core :as quo]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo2.foundations.colors :as colors]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[reagent.core :as reagent]
|
[reagent.core :as reagent]
|
||||||
[status-im.multiaccounts.core :as multiaccounts]
|
|
||||||
[status-im2.common.resources :as resources]
|
[status-im2.common.resources :as resources]
|
||||||
[status-im2.contexts.quo-preview.preview :as preview]))
|
[status-im2.contexts.quo-preview.preview :as preview]))
|
||||||
|
|
||||||
(def group-avatar-default-params
|
|
||||||
{:size :small
|
|
||||||
:color :purple})
|
|
||||||
|
|
||||||
(def example-pk
|
(def example-pk
|
||||||
"0x04fcf40c526b09ff9fb22f4a5dbd08490ef9b64af700870f8a0ba2133f4251d5607ed83cd9047b8c2796576bc83fa0de23a13a4dced07654b8ff137fe744047917")
|
"0x04fcf40c526b09ff9fb22f4a5dbd08490ef9b64af700870f8a0ba2133f4251d5607ed83cd9047b8c2796576bc83fa0de23a13a4dced07654b8ff137fe744047917")
|
||||||
(def example-pk2
|
|
||||||
"0x04c178513eb741e8c4e50326b22baefa7d60a2f4eb81e328c4bbe0b441f87b2a014a5907a419f5897fc3c0493a0ff9db689a1999d6ca7fdc63119dd1981d0c7ccf")
|
|
||||||
(def example-photo
|
|
||||||
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII")
|
|
||||||
(def example-photo2
|
|
||||||
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3/OAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANCSURBVEiJtZZPbBtFFMZ/M7ubXdtdb1xSFyeilBapySVU8h8OoFaooFSqiihIVIpQBKci6KEg9Q6H9kovIHoCIVQJJCKE1ENFjnAgcaSGC6rEnxBwA04Tx43t2FnvDAfjkNibxgHxnWb2e/u992bee7tCa00YFsffekFY+nUzFtjW0LrvjRXrCDIAaPLlW0nHL0SsZtVoaF98mLrx3pdhOqLtYPHChahZcYYO7KvPFxvRl5XPp1sN3adWiD1ZAqD6XYK1b/dvE5IWryTt2udLFedwc1+9kLp+vbbpoDh+6TklxBeAi9TL0taeWpdmZzQDry0AcO+jQ12RyohqqoYoo8RDwJrU+qXkjWtfi8Xxt58BdQuwQs9qC/afLwCw8tnQbqYAPsgxE1S6F3EAIXux2oQFKm0ihMsOF71dHYx+f3NND68ghCu1YIoePPQN1pGRABkJ6Bus96CutRZMydTl+TvuiRW1m3n0eDl0vRPcEysqdXn+jsQPsrHMquGeXEaY4Yk4wxWcY5V/9scqOMOVUFthatyTy8QyqwZ+kDURKoMWxNKr2EeqVKcTNOajqKoBgOE28U4tdQl5p5bwCw7BWquaZSzAPlwjlithJtp3pTImSqQRrb2Z8PHGigD4RZuNX6JYj6wj7O4TFLbCO/Mn/m8R+h6rYSUb3ekokRY6f/YukArN979jcW+V/S8g0eT/N3VN3kTqWbQ428m9/8k0P/1aIhF36PccEl6EhOcAUCrXKZXXWS3XKd2vc/TRBG9O5ELC17MmWubD2nKhUKZa26Ba2+D3P+4/MNCFwg59oWVeYhkzgN/JDR8deKBoD7Y+ljEjGZ0sosXVTvbc6RHirr2reNy1OXd6pJsQ+gqjk8VWFYmHrwBzW/n+uMPFiRwHB2I7ih8ciHFxIkd/3Omk5tCDV1t+2nNu5sxxpDFNx+huNhVT3/zMDz8usXC3ddaHBj1GHj/As08fwTS7Kt1HBTmyN29vdwAw+/wbwLVOJ3uAD1wi/dUH7Qei66PfyuRj4Ik9is+hglfbkbfR3cnZm7chlUWLdwmprtCohX4HUtlOcQjLYCu+fzGJH2QRKvP3UNz8bWk1qMxjGTOMThZ3kvgLI5AzFfo379UAAAAASUVORK5CYII=")
|
|
||||||
|
|
||||||
(def coinbase-community-image (resources/get-mock-image :coinbase))
|
(def avatar-options
|
||||||
|
[{:key nil
|
||||||
|
:value "Default avatar"}
|
||||||
|
{:key (resources/mock-images :user-picture-male5)
|
||||||
|
:value "User pic male 5"}
|
||||||
|
{:key (resources/mock-images :user-picture-male4)
|
||||||
|
:value "User pic male 4"}
|
||||||
|
{:key (resources/mock-images :user-picture-female2)
|
||||||
|
:value "User pic female 2"}])
|
||||||
|
|
||||||
|
(def size-descriptor
|
||||||
|
{:label "Size"
|
||||||
|
:key :size
|
||||||
|
:type :select
|
||||||
|
:options [{:key 24
|
||||||
|
:value "24"}
|
||||||
|
{:key 32
|
||||||
|
:value "32"}]})
|
||||||
|
|
||||||
(def main-descriptor
|
(def main-descriptor
|
||||||
[{:label "Type"
|
[{:label "Type"
|
||||||
:key :type
|
:key :type
|
||||||
:type :select
|
:type :select
|
||||||
:options [{:key :public-key
|
:options [{:key :default
|
||||||
:value "Public key"}
|
:value "Default"}
|
||||||
{:key :avatar
|
{:key :multiuser
|
||||||
:value "Avatar"}
|
:value "Multiuser"}
|
||||||
{:key :group-avatar
|
{:key :group
|
||||||
:value "Group avatar"}
|
:value "Group"}
|
||||||
{:key :context-tag
|
{:key :channel
|
||||||
:value "Context tag"}
|
:value "Channel"}
|
||||||
{:key :audio
|
|
||||||
:value "Audio"}
|
|
||||||
{:key :community
|
{:key :community
|
||||||
:value "Community"}]}
|
:value "Community"}
|
||||||
{:label "Blur"
|
{:key :token
|
||||||
|
:value "Token"}
|
||||||
|
{:key :network
|
||||||
|
:value "Network"}
|
||||||
|
{:key :multinetwork
|
||||||
|
:value "Multinetwork"}
|
||||||
|
{:key :account
|
||||||
|
:value "Account"}
|
||||||
|
{:key :collectible
|
||||||
|
:value "Collectible"}
|
||||||
|
{:key :address
|
||||||
|
:value "Address"}
|
||||||
|
{:key :icon
|
||||||
|
:value "Icon"}
|
||||||
|
{:key :audio
|
||||||
|
:value "Audio"}]}
|
||||||
|
{:label "Blur?"
|
||||||
:key :blur?
|
:key :blur?
|
||||||
:type :boolean}])
|
|
||||||
|
|
||||||
(def context-tag-descriptor
|
|
||||||
[{:label "Show avatar"
|
|
||||||
:key :show-avatar?
|
|
||||||
:type :boolean}
|
:type :boolean}
|
||||||
{:label "Label"
|
{:label "State"
|
||||||
:key :label
|
:key :state
|
||||||
|
:type :select
|
||||||
|
:options [{:key :default
|
||||||
|
:value "Default"}
|
||||||
|
{:key :selected
|
||||||
|
:value "selected"}]}
|
||||||
|
{:label "Customization color:"
|
||||||
|
:key :customization-color
|
||||||
|
:type :select
|
||||||
|
:options (map (fn [[color-kw _]]
|
||||||
|
{:key color-kw
|
||||||
|
:value (name color-kw)})
|
||||||
|
colors/customization)}])
|
||||||
|
|
||||||
|
(def default-descriptor
|
||||||
|
[size-descriptor
|
||||||
|
{:label "Profile picture"
|
||||||
|
:key :profile-picture
|
||||||
|
:type :select
|
||||||
|
:options avatar-options}
|
||||||
|
{:label "Full name"
|
||||||
|
:key :full-name
|
||||||
|
:type :text}])
|
||||||
|
|
||||||
|
(def multiuser-descriptor
|
||||||
|
(let [users [(resources/mock-images :user-picture-male5)
|
||||||
|
(resources/mock-images :user-picture-male4)
|
||||||
|
nil
|
||||||
|
(resources/mock-images :user-picture-female2)
|
||||||
|
nil]]
|
||||||
|
[{:label "users"
|
||||||
|
:key :users
|
||||||
|
:type :select
|
||||||
|
:options (map (fn [idx]
|
||||||
|
{:key (mapv (fn [picture idx-name]
|
||||||
|
{:profile-picture picture
|
||||||
|
:full-name (str (inc idx-name))})
|
||||||
|
(take idx (cycle users))
|
||||||
|
(range))
|
||||||
|
:value (str idx)})
|
||||||
|
(range 1 10))}]))
|
||||||
|
|
||||||
|
(def group-descriptor
|
||||||
|
[size-descriptor
|
||||||
|
{:label "Group"
|
||||||
|
:key :group-name
|
||||||
|
:type :text}])
|
||||||
|
|
||||||
|
(def channel-descriptor
|
||||||
|
[size-descriptor
|
||||||
|
{:label "Community name"
|
||||||
|
:key :community-name
|
||||||
:type :text}
|
:type :text}
|
||||||
{:label "Channel name"
|
{:label "Channel name"
|
||||||
:key :channel-name
|
:key :channel-name
|
||||||
|
:type :text}])
|
||||||
|
|
||||||
|
(def community-descriptor
|
||||||
|
[size-descriptor
|
||||||
|
{:label "Community name"
|
||||||
|
:key :community-name
|
||||||
|
:type :text}])
|
||||||
|
|
||||||
|
(def token-descriptor
|
||||||
|
[size-descriptor
|
||||||
|
{:label "Amount"
|
||||||
|
:key :amount
|
||||||
:type :text}
|
:type :text}
|
||||||
{:label "Avatar placeholder"
|
{:label "Token name"
|
||||||
:key :no-avatar-placeholder?
|
:key :token-name
|
||||||
:type :boolean}])
|
:type :text}])
|
||||||
|
|
||||||
|
(def network-descriptor
|
||||||
|
[size-descriptor
|
||||||
|
{:label "Network name"
|
||||||
|
:key :network-name
|
||||||
|
:type :text}])
|
||||||
|
|
||||||
|
(def multinetwork-descriptor
|
||||||
|
(let [networks (cycle [(resources/mock-images :monkey) (resources/mock-images :diamond)])]
|
||||||
|
[{:label "Networks"
|
||||||
|
:key :networks
|
||||||
|
:type :select
|
||||||
|
:options (map (fn [size]
|
||||||
|
{:key (take size networks)
|
||||||
|
:value (str size)})
|
||||||
|
(range 1 10))}]))
|
||||||
|
|
||||||
|
(def account-descriptor
|
||||||
|
[size-descriptor
|
||||||
|
{:label "Account name"
|
||||||
|
:key :account-name
|
||||||
|
:type :text}
|
||||||
|
{:label "Emoji"
|
||||||
|
:key :emoji
|
||||||
|
:type :select
|
||||||
|
:options [{:key "🐷" :value "🐷"}
|
||||||
|
{:key "🍇" :value "🍇"}
|
||||||
|
{:key "🐱" :value "🐱"}]}])
|
||||||
|
|
||||||
|
(def collectible-descriptor
|
||||||
|
[size-descriptor
|
||||||
|
{:label "Collectible name"
|
||||||
|
:key :collectible-name
|
||||||
|
:type :text}
|
||||||
|
{:label "Collectible number"
|
||||||
|
:key :collectible-number
|
||||||
|
:type :text}])
|
||||||
|
|
||||||
|
(def address-descriptor
|
||||||
|
[size-descriptor])
|
||||||
|
|
||||||
|
(def icon-descriptor
|
||||||
|
[size-descriptor
|
||||||
|
{:label "Context"
|
||||||
|
:key :context
|
||||||
|
:type :text}
|
||||||
|
{:label "Icon"
|
||||||
|
:key :icon
|
||||||
|
:type :select
|
||||||
|
:options [{:key :i/placeholder :value "Placeholder"}
|
||||||
|
{:key :i/add :value "Add"}
|
||||||
|
{:key :i/alert :value "Alert"}]}])
|
||||||
|
|
||||||
|
(def audio-descriptor
|
||||||
|
[{:label "Duration"
|
||||||
|
:key :duration
|
||||||
|
:type :text}])
|
||||||
|
|
||||||
(defn cool-preview
|
(defn cool-preview
|
||||||
[]
|
[]
|
||||||
(let [state (reagent/atom {:label "Name"
|
(let [state
|
||||||
:channel-name "Channel"
|
(reagent/atom
|
||||||
:type :group-avatar
|
{:label "Name"
|
||||||
:duration "00:32"
|
:size 32
|
||||||
:show-avatar? true
|
:type :group
|
||||||
:no-avatar-placeholder? false})]
|
:blur? false
|
||||||
|
:state :selected
|
||||||
|
:customization-color :army
|
||||||
|
:profile-picture nil
|
||||||
|
:full-name "Full Name"
|
||||||
|
:users [{:profile-picture (resources/mock-images :user-picture-male5)
|
||||||
|
:full-name "1"}
|
||||||
|
{:profile-picture nil
|
||||||
|
:full-name "3"}
|
||||||
|
{:profile-picture (resources/mock-images :user-picture-male5)
|
||||||
|
:full-name "2"}]
|
||||||
|
:group-name "Group"
|
||||||
|
:community-logo (resources/mock-images :coinbase)
|
||||||
|
:community-name "Community"
|
||||||
|
:channel-name "my channel"
|
||||||
|
:token-logo (resources/mock-images :diamond)
|
||||||
|
:token-name "ETH"
|
||||||
|
:amount "10"
|
||||||
|
:network-logo (resources/mock-images :monkey)
|
||||||
|
:network-name "Network"
|
||||||
|
:networks [(resources/mock-images :monkey)
|
||||||
|
(resources/mock-images :diamond)]
|
||||||
|
:account-name "Account name"
|
||||||
|
:emoji "😝"
|
||||||
|
:collectible (resources/mock-images :collectible)
|
||||||
|
:collectible-name "Collectible"
|
||||||
|
:collectible-number "123"
|
||||||
|
:address example-pk
|
||||||
|
:icon :i/placeholder
|
||||||
|
:context "Context"
|
||||||
|
:duration "00:32"})]
|
||||||
(fn []
|
(fn []
|
||||||
(let [contacts {example-pk {:public-key example-pk
|
[rn/touchable-without-feedback {:on-press rn/dismiss-keyboard!}
|
||||||
:primary-name "Automatic incompatible Coati"
|
[rn/view {:style {:padding-bottom 150}}
|
||||||
:photo example-photo}
|
[rn/view {:style {:flex 1}}
|
||||||
example-pk2 {:public-key example-pk2
|
[preview/customizer state
|
||||||
:primary-name "Clearcut Flickering Rattlesnake"
|
(concat main-descriptor
|
||||||
:photo example-photo2}}
|
(case (:type @state)
|
||||||
contacts-public-keys (map (fn [{:keys [public-key]}]
|
:default default-descriptor
|
||||||
{:key public-key
|
:multiuser multiuser-descriptor
|
||||||
:value (get-in contacts [public-key :primary-name])})
|
:group group-descriptor
|
||||||
(vals contacts))
|
:channel channel-descriptor
|
||||||
current-username (if (seq (:contact @state))
|
:community community-descriptor
|
||||||
(->> @state
|
:token token-descriptor
|
||||||
:contact
|
:network network-descriptor
|
||||||
contacts
|
:multinetwork multinetwork-descriptor
|
||||||
multiaccounts/displayed-name)
|
:account account-descriptor
|
||||||
"Please select a user")
|
:collectible collectible-descriptor
|
||||||
descriptor (cond
|
:address address-descriptor
|
||||||
(= (:type @state) :context-tag)
|
:icon icon-descriptor
|
||||||
(into main-descriptor context-tag-descriptor)
|
:audio audio-descriptor
|
||||||
|
default-descriptor))]]
|
||||||
(= (:type @state) :group-avatar)
|
[rn/view {:style {:padding-vertical 60}}
|
||||||
(conj main-descriptor
|
[preview/blur-view
|
||||||
{:label "Label"
|
{:style {:flex 1
|
||||||
:key :label
|
:margin-vertical 20
|
||||||
:type :text})
|
:margin-horizontal 40}
|
||||||
|
:show-blur-background? (:blur? @state)}
|
||||||
(= (:type @state) :avatar)
|
[quo/context-tag @state]]]]])))
|
||||||
(let [photo (-> @state :contact contacts :photo)]
|
|
||||||
(when-not (contains? @state :contacts)
|
|
||||||
(swap! state assoc :contacts contacts-public-keys))
|
|
||||||
(when-not (= (:photo @state)
|
|
||||||
photo)
|
|
||||||
(swap! state assoc :photo photo))
|
|
||||||
(conj main-descriptor
|
|
||||||
{:label "Contacts"
|
|
||||||
:key :contact
|
|
||||||
:type :select
|
|
||||||
:options contacts-public-keys}))
|
|
||||||
|
|
||||||
(= (:type @state) :community)
|
|
||||||
(conj main-descriptor
|
|
||||||
{:label "Community name"
|
|
||||||
:key :label
|
|
||||||
:type :text})
|
|
||||||
|
|
||||||
(= (:type @state) :audio)
|
|
||||||
(conj main-descriptor
|
|
||||||
{:label "Duration"
|
|
||||||
:key :duration
|
|
||||||
:type :text})
|
|
||||||
|
|
||||||
:else
|
|
||||||
main-descriptor)]
|
|
||||||
[rn/touchable-without-feedback {:on-press rn/dismiss-keyboard!}
|
|
||||||
[rn/view {:style {:padding-bottom 150}}
|
|
||||||
[rn/view {:style {:flex 1}}
|
|
||||||
[preview/customizer state descriptor]]
|
|
||||||
[rn/view {:style {:padding-vertical 60}}
|
|
||||||
[preview/blur-view
|
|
||||||
{:style {:flex 1
|
|
||||||
:margin-vertical 20
|
|
||||||
:margin-horizontal 40}
|
|
||||||
:show-blur-background? (:blur? @state)}
|
|
||||||
(case (:type @state)
|
|
||||||
:context-tag [quo2/context-tag
|
|
||||||
{:blur? (:blur? @state)
|
|
||||||
:size :small
|
|
||||||
:color :purple
|
|
||||||
:no-avatar-placeholder? (:no-avatar-placeholder? @state)}
|
|
||||||
(when (:show-avatar? @state)
|
|
||||||
example-photo2)
|
|
||||||
(:label @state)
|
|
||||||
(:channel-name @state)]
|
|
||||||
|
|
||||||
:group-avatar [quo2/group-avatar-tag (:label @state)
|
|
||||||
{:blur? (:blur? @state)
|
|
||||||
:size :x-small
|
|
||||||
:customization-color :purple}]
|
|
||||||
|
|
||||||
:public-key [quo2/public-key-tag
|
|
||||||
{:blur? (:blur? @state)
|
|
||||||
:size :small
|
|
||||||
:color :purple}
|
|
||||||
example-pk]
|
|
||||||
|
|
||||||
:avatar [quo2/user-avatar-tag
|
|
||||||
{:blur? (:blur? @state)
|
|
||||||
:size :small
|
|
||||||
:color :purple}
|
|
||||||
current-username (:photo @state)]
|
|
||||||
|
|
||||||
:audio [quo2/audio-tag (:duration @state) {:blur? (:blur? @state)}]
|
|
||||||
|
|
||||||
:community [quo2/community-tag
|
|
||||||
coinbase-community-image
|
|
||||||
(:label @state)
|
|
||||||
{:blur? (:blur? @state)}])]]]]))))
|
|
||||||
|
|
||||||
(defn preview-context-tags
|
(defn preview-context-tags
|
||||||
[]
|
[]
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style {:background-color (colors/theme-colors colors/white
|
{:style {:background-color (colors/theme-colors colors/white colors/neutral-95)
|
||||||
colors/neutral-95)
|
|
||||||
:flex 1}}
|
:flex 1}}
|
||||||
[rn/flat-list
|
[rn/flat-list
|
||||||
{:style {:flex 1}
|
{:style {:flex 1}
|
||||||
|
|||||||
@@ -0,0 +1,241 @@
|
|||||||
|
(ns status-im2.contexts.quo-preview.wallet.wallet-activity
|
||||||
|
(:require [quo2.core :as quo]
|
||||||
|
[quo2.foundations.colors :as colors]
|
||||||
|
[react-native.core :as rn]
|
||||||
|
[reagent.core :as reagent]
|
||||||
|
[status-im2.common.resources :as resources]
|
||||||
|
[status-im2.contexts.quo-preview.preview :as preview]
|
||||||
|
[quo2.foundations.resources :as quo.resources]))
|
||||||
|
|
||||||
|
(def asset-snt
|
||||||
|
{:size 24
|
||||||
|
:type :token
|
||||||
|
:token-name "SNT"
|
||||||
|
:amount 1500
|
||||||
|
:token-logo (quo.resources/get-token :snt)})
|
||||||
|
|
||||||
|
(def asset-dai
|
||||||
|
{:size 24
|
||||||
|
:type :token
|
||||||
|
:token-name "DAI"
|
||||||
|
:amount 2400
|
||||||
|
:token-logo (quo.resources/get-token :dai)})
|
||||||
|
|
||||||
|
(def asset-collectible
|
||||||
|
{:size 24
|
||||||
|
:type :collectible
|
||||||
|
:collectible (resources/mock-images :collectible)
|
||||||
|
:collectible-name "Collectible"
|
||||||
|
:collectible-number "123"})
|
||||||
|
|
||||||
|
(def trip-to-vegas
|
||||||
|
{:size 24
|
||||||
|
:type :account
|
||||||
|
:account-name "Trip to Vegas"
|
||||||
|
:emoji "🤑"})
|
||||||
|
|
||||||
|
(def piggy-bank
|
||||||
|
{:size 24
|
||||||
|
:type :account
|
||||||
|
:account-name "Piggy bank"
|
||||||
|
:emoji "🐷"})
|
||||||
|
|
||||||
|
(def aretha-gosling
|
||||||
|
{:size 24
|
||||||
|
:type :default
|
||||||
|
:full-name "Aretha Gosling"
|
||||||
|
:profile-picture (resources/mock-images :user-picture-female2)})
|
||||||
|
|
||||||
|
(def james-bond
|
||||||
|
{:size 24
|
||||||
|
:type :default
|
||||||
|
:full-name "James Bond"
|
||||||
|
:profile-picture (resources/mock-images :user-picture-male4)})
|
||||||
|
|
||||||
|
(def mainnet
|
||||||
|
{:size 24
|
||||||
|
:type :network
|
||||||
|
:network-logo (quo.resources/get-network :ethereum)
|
||||||
|
:network-name "Mainnet"})
|
||||||
|
|
||||||
|
(def optimism
|
||||||
|
{:size 24
|
||||||
|
:type :network
|
||||||
|
:network-logo (quo.resources/get-network :optimism)
|
||||||
|
:network-name "Optimism"})
|
||||||
|
|
||||||
|
(def arbitrum
|
||||||
|
{:size 24
|
||||||
|
:type :network
|
||||||
|
:network-logo (quo.resources/get-network :arbitrum)
|
||||||
|
:network-name "Arbitrum"})
|
||||||
|
|
||||||
|
(def multinetwork
|
||||||
|
{:size 24
|
||||||
|
:type :multinetwork
|
||||||
|
:networks [(quo.resources/get-network :ethereum)
|
||||||
|
(quo.resources/get-network :arbitrum)
|
||||||
|
(quo.resources/get-network :optimism)]})
|
||||||
|
|
||||||
|
(def moonpay
|
||||||
|
{:size 24
|
||||||
|
:type :network
|
||||||
|
:network-logo (quo.resources/get-network :ethereum)
|
||||||
|
:network-name "Moonpay"})
|
||||||
|
|
||||||
|
(def binance
|
||||||
|
{:size 24
|
||||||
|
:type :network
|
||||||
|
:network-logo (quo.resources/get-network :ethereum)
|
||||||
|
:network-name "Binance"})
|
||||||
|
|
||||||
|
(def context-tags
|
||||||
|
[{:key asset-snt
|
||||||
|
:value "SNT"}
|
||||||
|
{:key asset-dai
|
||||||
|
:value "UNK"}
|
||||||
|
{:key asset-collectible
|
||||||
|
:value "Collectible"}
|
||||||
|
{:key trip-to-vegas
|
||||||
|
:value "Account: Trip to Vegas"}
|
||||||
|
{:key piggy-bank
|
||||||
|
:value "Account: Piggy bank"}
|
||||||
|
{:key aretha-gosling
|
||||||
|
:value "Person: Aretha Gosling"}
|
||||||
|
{:key james-bond
|
||||||
|
:value "Person: James Bond"}
|
||||||
|
{:key mainnet
|
||||||
|
:value "Network: Mainnet"}
|
||||||
|
{:key optimism
|
||||||
|
:value "Network: Optimism"}
|
||||||
|
{:key arbitrum
|
||||||
|
:value "Network: Arbitrum"}
|
||||||
|
{:key multinetwork
|
||||||
|
:value "Network: Multinetwork"}
|
||||||
|
{:key moonpay
|
||||||
|
:value "Market: Moonpay"}
|
||||||
|
{:key binance
|
||||||
|
:value "Market: Binance"}])
|
||||||
|
|
||||||
|
(def prefixes
|
||||||
|
[{:key :t/to
|
||||||
|
:value "To"}
|
||||||
|
{:key :t/in
|
||||||
|
:value "In"}
|
||||||
|
{:key :t/via
|
||||||
|
:value "Via"}
|
||||||
|
{:key :t/from
|
||||||
|
:value "From"}
|
||||||
|
{:key :t/on
|
||||||
|
:value "On"}
|
||||||
|
{:key :t/at
|
||||||
|
:value "At"}])
|
||||||
|
|
||||||
|
(def descriptor
|
||||||
|
|
||||||
|
(concat
|
||||||
|
[{:label "Transaction"
|
||||||
|
:key :transaction
|
||||||
|
:type :select
|
||||||
|
:options [{:key :receive
|
||||||
|
:value "Receive"}
|
||||||
|
{:key :send
|
||||||
|
:value "Send"}
|
||||||
|
{:key :swap
|
||||||
|
:value "Swap"}
|
||||||
|
{:key :bridge
|
||||||
|
:value "Bridge"}
|
||||||
|
{:key :buy
|
||||||
|
:value "Buy"}
|
||||||
|
{:key :destroy
|
||||||
|
:value "Destroy"}
|
||||||
|
{:key :mint
|
||||||
|
:value "Mint"}]}
|
||||||
|
{:label "Status"
|
||||||
|
:key :status
|
||||||
|
:type :select
|
||||||
|
:options [{:key :pending
|
||||||
|
:value "Pending"}
|
||||||
|
{:key :confirmed
|
||||||
|
:value "Confirmed"}
|
||||||
|
{:key :finalised
|
||||||
|
:value "Finalised"}
|
||||||
|
{:key :failed
|
||||||
|
:value "Failed"}]}
|
||||||
|
{:label "Timestamp"
|
||||||
|
:key :timestamp
|
||||||
|
:type :text}
|
||||||
|
{:label "Counter"
|
||||||
|
:key :counter
|
||||||
|
:type :select
|
||||||
|
:options [{:key 1
|
||||||
|
:value 1}
|
||||||
|
{:key 2
|
||||||
|
:value 2}
|
||||||
|
{:key 3
|
||||||
|
:value 3}]}
|
||||||
|
|
||||||
|
{:label "Slot 1"
|
||||||
|
:key :first
|
||||||
|
:type :select
|
||||||
|
:options context-tags}
|
||||||
|
{:label "Slot 2 prefix"
|
||||||
|
:key :second-prefix
|
||||||
|
:type :select
|
||||||
|
:options prefixes}
|
||||||
|
{:label "Slot 2"
|
||||||
|
:key :second
|
||||||
|
:type :select
|
||||||
|
:options context-tags}
|
||||||
|
{:label "Slot 3 prefix"
|
||||||
|
:key :third-prefix
|
||||||
|
:type :select
|
||||||
|
:options prefixes}
|
||||||
|
{:label "Slot 3"
|
||||||
|
:key :third
|
||||||
|
:type :select
|
||||||
|
:options context-tags}
|
||||||
|
{:label "Slot 4 prefix"
|
||||||
|
:key :fourth-prefix
|
||||||
|
:type :select
|
||||||
|
:options prefixes}
|
||||||
|
{:label "Slot 4"
|
||||||
|
:key :fourth
|
||||||
|
:type :select
|
||||||
|
:options context-tags}]))
|
||||||
|
|
||||||
|
(defn cool-preview
|
||||||
|
[]
|
||||||
|
(let [state (reagent/atom {:transaction :send
|
||||||
|
:timestamp "Today 22:20"
|
||||||
|
:status :pending
|
||||||
|
:counter 1
|
||||||
|
:first asset-snt
|
||||||
|
:second-prefix :t/from
|
||||||
|
:second piggy-bank
|
||||||
|
:third-prefix :t/to
|
||||||
|
:third aretha-gosling
|
||||||
|
:fourth-prefix :t/via
|
||||||
|
:fourth mainnet})]
|
||||||
|
(fn []
|
||||||
|
[rn/touchable-without-feedback {:on-press rn/dismiss-keyboard!}
|
||||||
|
[rn/view {:padding-bottom 150}
|
||||||
|
[rn/view {:flex 1}
|
||||||
|
[preview/customizer state descriptor]]
|
||||||
|
[rn/view
|
||||||
|
{:padding-vertical 60
|
||||||
|
:flex-direction :row
|
||||||
|
:justify-content :center}
|
||||||
|
[quo/wallet-activity @state]]]])))
|
||||||
|
|
||||||
|
(defn preview-wallet-activity
|
||||||
|
[]
|
||||||
|
[rn/view
|
||||||
|
{:background-color (colors/theme-colors colors/white
|
||||||
|
colors/neutral-95)
|
||||||
|
:flex 1}
|
||||||
|
[rn/flat-list
|
||||||
|
{:flex 1
|
||||||
|
:keyboard-should-persist-taps :always
|
||||||
|
:header [cool-preview]
|
||||||
|
:key-fn str}]])
|
||||||
@@ -69,8 +69,11 @@
|
|||||||
:context [[common/user-avatar-tag author]
|
:context [[common/user-avatar-tag author]
|
||||||
(i18n/label :t/wants-to-join)
|
(i18n/label :t/wants-to-join)
|
||||||
[quo/context-tag
|
[quo/context-tag
|
||||||
common/tag-params
|
{:type :community
|
||||||
community-image community-name]]
|
:size 24
|
||||||
|
:blur? true
|
||||||
|
:community-logo community-image
|
||||||
|
:community-name community-name}]]
|
||||||
:items (case membership-status
|
:items (case membership-status
|
||||||
constants/activity-center-membership-status-accepted
|
constants/activity-center-membership-status-accepted
|
||||||
[{:type :status
|
[{:type :status
|
||||||
|
|||||||
@@ -1,30 +1,21 @@
|
|||||||
(ns status-im2.contexts.shell.activity-center.notification.common.view
|
(ns status-im2.contexts.shell.activity-center.notification.common.view
|
||||||
(:require [quo2.core :as quo]
|
(:require [quo2.core :as quo]
|
||||||
|
[quo2.foundations.colors :as colors]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.gesture :as gesture]
|
[react-native.gesture :as gesture]
|
||||||
[quo2.foundations.colors :as colors]
|
|
||||||
[status-im.multiaccounts.core :as multiaccounts]
|
[status-im.multiaccounts.core :as multiaccounts]
|
||||||
[status-im2.contexts.shell.activity-center.notification.common.style :as style]
|
[status-im2.contexts.shell.activity-center.notification.common.style :as style]
|
||||||
[utils.i18n :as i18n]
|
[utils.i18n :as i18n]
|
||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
(def tag-params
|
|
||||||
{:size :small
|
|
||||||
:customization-color :blue
|
|
||||||
:style style/user-avatar-tag
|
|
||||||
:text-style style/user-avatar-tag-text
|
|
||||||
:no-avatar-placeholder? true})
|
|
||||||
|
|
||||||
(defn user-avatar-tag
|
(defn user-avatar-tag
|
||||||
[user-id]
|
[user-id]
|
||||||
(let [{:keys [primary-name] :as contact} (rf/sub [:contacts/contact-by-identity user-id])]
|
(let [{:keys [primary-name] :as contact} (rf/sub [:contacts/contact-by-identity user-id])]
|
||||||
[quo/user-avatar-tag
|
[quo/context-tag
|
||||||
{:color :purple
|
{:blur? true
|
||||||
:size :small
|
:size 24
|
||||||
:style style/user-avatar-tag
|
:full-name primary-name
|
||||||
:text-style style/user-avatar-tag-text}
|
:profile-picture (multiaccounts/displayed-photo contact)}]))
|
||||||
primary-name
|
|
||||||
(multiaccounts/displayed-photo contact)]))
|
|
||||||
|
|
||||||
(defn- render-swipe-action
|
(defn- render-swipe-action
|
||||||
[{:keys [active-swipeable
|
[{:keys [active-swipeable
|
||||||
|
|||||||
+6
-2
@@ -34,5 +34,9 @@
|
|||||||
:unread? (not read)
|
:unread? (not read)
|
||||||
:context [[quo/text {:style common-style/user-avatar-tag-text}
|
:context [[quo/text {:style common-style/user-avatar-tag-text}
|
||||||
(i18n/label :t/community-kicked-body)]
|
(i18n/label :t/community-kicked-body)]
|
||||||
[quo/context-tag common/tag-params community-image
|
[quo/context-tag
|
||||||
community-name]]}]]))
|
{:type :community
|
||||||
|
:size 24
|
||||||
|
:blur? true
|
||||||
|
:community-logo community-image
|
||||||
|
:community-name community-name}]]}]]))
|
||||||
|
|||||||
+6
-2
@@ -22,8 +22,12 @@
|
|||||||
[community membership-status]
|
[community membership-status]
|
||||||
(let [community-name (:name community)
|
(let [community-name (:name community)
|
||||||
community-image (get-in community [:images :thumbnail :uri])
|
community-image (get-in community [:images :thumbnail :uri])
|
||||||
community-context-tag [quo/context-tag common/tag-params community-image
|
community-context-tag [quo/context-tag
|
||||||
community-name]]
|
{:type :community
|
||||||
|
:size 24
|
||||||
|
:blur? true
|
||||||
|
:community-logo community-image
|
||||||
|
:community-name community-name}]]
|
||||||
(cond
|
(cond
|
||||||
(= membership-status constants/activity-center-membership-status-idle)
|
(= membership-status constants/activity-center-membership-status-idle)
|
||||||
{:header-text (i18n/label :t/community-request-not-accepted)
|
{:header-text (i18n/label :t/community-request-not-accepted)
|
||||||
|
|||||||
@@ -66,9 +66,11 @@
|
|||||||
:unread? (not read)
|
:unread? (not read)
|
||||||
:context [[common/user-avatar-tag author]
|
:context [[common/user-avatar-tag author]
|
||||||
(i18n/label :t/added-you-to)
|
(i18n/label :t/added-you-to)
|
||||||
[quo/group-avatar-tag chat-name
|
[quo/context-tag
|
||||||
{:size :x-small
|
{:type :group
|
||||||
:customization-color :purple}]]
|
:blur? true
|
||||||
|
:size 24
|
||||||
|
:group-name chat-name}]]
|
||||||
:items (when-not (or accepted dismissed)
|
:items (when-not (or accepted dismissed)
|
||||||
[{:type :button
|
[{:type :button
|
||||||
:subtype :positive
|
:subtype :positive
|
||||||
|
|||||||
@@ -59,9 +59,19 @@
|
|||||||
:timestamp (datetime/timestamp->relative timestamp)
|
:timestamp (datetime/timestamp->relative timestamp)
|
||||||
:unread? (not read)
|
:unread? (not read)
|
||||||
:context [[common/user-avatar-tag author]
|
:context [[common/user-avatar-tag author]
|
||||||
[quo/text {:style style/tag-text} (string/lower-case (i18n/label :t/on))]
|
[quo/text {:style style/tag-text}
|
||||||
|
(string/lower-case (i18n/label :t/on))]
|
||||||
(if community-chat?
|
(if community-chat?
|
||||||
[quo/context-tag common/tag-params community-image community-name
|
[quo/context-tag
|
||||||
chat-name]
|
{:type :channel
|
||||||
[quo/group-avatar-tag chat-name common/tag-params])]
|
:blur? true
|
||||||
|
:size 24
|
||||||
|
:community-logo community-image
|
||||||
|
:community-name community-name
|
||||||
|
:channel-name chat-name}]
|
||||||
|
[quo/context-tag
|
||||||
|
{:type :group
|
||||||
|
:group-name chat-name
|
||||||
|
:blur? true
|
||||||
|
:size 24}])]
|
||||||
:message {:body (message-body message)}}]]]))
|
:message {:body (message-body message)}}]]]))
|
||||||
|
|||||||
@@ -74,9 +74,18 @@
|
|||||||
:context [[common/user-avatar-tag author]
|
:context [[common/user-avatar-tag author]
|
||||||
[quo/text {:style style/lowercase-text} (i18n/label :t/on)]
|
[quo/text {:style style/lowercase-text} (i18n/label :t/on)]
|
||||||
(if community-chat?
|
(if community-chat?
|
||||||
[quo/context-tag common/tag-params community-image community-name
|
[quo/context-tag
|
||||||
chat-name]
|
{:type :channel
|
||||||
[quo/group-avatar-tag chat-name common/tag-params])]
|
:blur? true
|
||||||
|
:size 24
|
||||||
|
:community-logo community-image
|
||||||
|
:community-name community-name
|
||||||
|
:channel-name chat-name}]
|
||||||
|
[quo/context-tag
|
||||||
|
{:type :group
|
||||||
|
:group-name chat-name
|
||||||
|
:blur? true
|
||||||
|
:size 24}])]
|
||||||
:message {:body-number-of-lines 1
|
:message {:body-number-of-lines 1
|
||||||
:attachment (cond
|
:attachment (cond
|
||||||
(= (:content-type message)
|
(= (:content-type message)
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
(ns status-im2.contexts.shell.jump-to.components.switcher-cards.view
|
(ns status-im2.contexts.shell.jump-to.components.switcher-cards.view
|
||||||
(:require [clojure.string :as string]
|
(:require [clojure.string :as string]
|
||||||
[utils.i18n :as i18n]
|
|
||||||
[quo2.core :as quo]
|
[quo2.core :as quo]
|
||||||
[utils.re-frame :as rf]
|
|
||||||
[status-im2.config :as config]
|
|
||||||
[quo2.foundations.colors :as colors]
|
[quo2.foundations.colors :as colors]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.fast-image :as fast-image]
|
[react-native.fast-image :as fast-image]
|
||||||
|
[status-im2.config :as config]
|
||||||
[status-im2.constants :as constants]
|
[status-im2.constants :as constants]
|
||||||
|
[status-im2.contexts.chat.messages.resolver.message-resolver :as resolver]
|
||||||
[status-im2.contexts.shell.jump-to.animation :as animation]
|
[status-im2.contexts.shell.jump-to.animation :as animation]
|
||||||
[status-im2.contexts.shell.jump-to.constants :as shell.constants]
|
|
||||||
[status-im2.contexts.shell.jump-to.components.switcher-cards.style :as style]
|
[status-im2.contexts.shell.jump-to.components.switcher-cards.style :as style]
|
||||||
[status-im2.contexts.chat.messages.resolver.message-resolver :as resolver]))
|
[status-im2.contexts.shell.jump-to.constants :as shell.constants]
|
||||||
|
[utils.i18n :as i18n]
|
||||||
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
(defn- channel-card
|
(defn- channel-card
|
||||||
[{:keys [emoji channel-name customization-color]}]
|
[{:keys [emoji channel-name customization-color]}]
|
||||||
@@ -82,13 +82,14 @@
|
|||||||
:style style/gif}]
|
:style style/gif}]
|
||||||
|
|
||||||
constants/content-type-audio
|
constants/content-type-audio
|
||||||
[quo/audio-tag data {:override-theme :dark}]
|
[quo/context-tag {:type :audio :duration data}]
|
||||||
|
|
||||||
constants/content-type-community
|
constants/content-type-community
|
||||||
[quo/community-tag
|
[quo/context-tag
|
||||||
(:avatar data)
|
{:type :community
|
||||||
(:community-name data)
|
:size 24
|
||||||
{:override-theme :dark}]
|
:community-logo (:avatar data)
|
||||||
|
:community-name (:community-name data)}]
|
||||||
|
|
||||||
(constants/content-type-link) ;; Components not available
|
(constants/content-type-link) ;; Components not available
|
||||||
;; Code snippet content type is not supported yet
|
;; Code snippet content type is not supported yet
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
(ns status-im2.contexts.syncing.syncing-instructions.view
|
(ns status-im2.contexts.syncing.syncing-instructions.view
|
||||||
(:require [quo2.core :as quo]
|
(:require [quo2.core :as quo]
|
||||||
[quo2.foundations.colors :as colors]
|
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.gesture :as gesture]
|
[react-native.gesture :as gesture]
|
||||||
[reagent.core :as reagent]
|
[reagent.core :as reagent]
|
||||||
@@ -15,7 +14,8 @@
|
|||||||
[quo/text
|
[quo/text
|
||||||
{:size :paragraph-2
|
{:size :paragraph-2
|
||||||
:weight :regular
|
:weight :regular
|
||||||
:container-style style/list-text} (i18n/label value)]
|
:container-style style/list-text}
|
||||||
|
(i18n/label value)]
|
||||||
|
|
||||||
:button-primary
|
:button-primary
|
||||||
[quo/button
|
[quo/button
|
||||||
@@ -42,10 +42,10 @@
|
|||||||
|
|
||||||
:context-tag
|
:context-tag
|
||||||
[quo/context-tag
|
[quo/context-tag
|
||||||
{:override-theme :dark
|
{:blur? true
|
||||||
:text-style {:color colors/white}}
|
:size 24
|
||||||
(resources/get-mock-image (:source value))
|
:profile-picture (resources/get-mock-image (:source value))
|
||||||
(i18n/label (:label value))]))
|
:full-name (i18n/label (:label value))}]))
|
||||||
|
|
||||||
(defn- render-item
|
(defn- render-item
|
||||||
[i list-item]
|
[i list-item]
|
||||||
|
|||||||
@@ -70,11 +70,11 @@
|
|||||||
(assoc acc
|
(assoc acc
|
||||||
hash
|
hash
|
||||||
(enrich-transaction transaction contacts native-currency))) ;;TODO this doesn't
|
(enrich-transaction transaction contacts native-currency))) ;;TODO this doesn't
|
||||||
;;look good for
|
;;look good for
|
||||||
;;performance, we
|
;;performance, we
|
||||||
;;need to calculate
|
;;need to calculate
|
||||||
;;this only once for
|
;;this only once for
|
||||||
;;each transaction
|
;;each transaction
|
||||||
{}
|
{}
|
||||||
transactions)))
|
transactions)))
|
||||||
|
|
||||||
@@ -125,13 +125,13 @@
|
|||||||
(case type
|
(case type
|
||||||
:inbound
|
:inbound
|
||||||
(assoc transaction
|
(assoc transaction
|
||||||
:label (i18n/label :t/from)
|
:label (i18n/label :t/From)
|
||||||
:contact-accessibility-label :sender-text
|
:contact-accessibility-label :sender-text
|
||||||
:address-accessibility-label :sender-address-text
|
:address-accessibility-label :sender-address-text
|
||||||
:contact from-contact
|
:contact from-contact
|
||||||
:address from)
|
:address from)
|
||||||
(assoc transaction
|
(assoc transaction
|
||||||
:label (i18n/label :t/to)
|
:label (i18n/label :t/To)
|
||||||
:contact-accessibility-label :recipient-name-text
|
:contact-accessibility-label :recipient-name-text
|
||||||
:address-accessibility-label :recipient-address-text
|
:address-accessibility-label :recipient-address-text
|
||||||
:contact to-contact
|
:contact to-contact
|
||||||
|
|||||||
+11
-3
@@ -626,7 +626,8 @@
|
|||||||
"follow-your-interests": "Jump into a public chat and meet new people",
|
"follow-your-interests": "Jump into a public chat and meet new people",
|
||||||
"follow": "Follow",
|
"follow": "Follow",
|
||||||
"free": "↓ Free",
|
"free": "↓ Free",
|
||||||
"from": "From",
|
"From": "From",
|
||||||
|
"from": "from",
|
||||||
"gas-limit": "Gas limit",
|
"gas-limit": "Gas limit",
|
||||||
"gas-price": "Gas price",
|
"gas-price": "Gas price",
|
||||||
"gas-used": "Gas used",
|
"gas-used": "Gas used",
|
||||||
@@ -688,6 +689,7 @@
|
|||||||
"profile-pic-take": "Take photo",
|
"profile-pic-take": "Take photo",
|
||||||
"profile-pic-pick": "Select from gallery",
|
"profile-pic-pick": "Select from gallery",
|
||||||
"profile-pic-remove": "Remove photo",
|
"profile-pic-remove": "Remove photo",
|
||||||
|
"in": "in",
|
||||||
"in-contacts": "In contacts",
|
"in-contacts": "In contacts",
|
||||||
"incoming": "Incoming",
|
"incoming": "Incoming",
|
||||||
"incoming-transaction": "Incoming transaction",
|
"incoming-transaction": "Incoming transaction",
|
||||||
@@ -1331,7 +1333,8 @@
|
|||||||
"this-will-take-few-seconds": "This will take a few seconds",
|
"this-will-take-few-seconds": "This will take a few seconds",
|
||||||
"three-words-description": "You should see these 3 words before signing each transaction",
|
"three-words-description": "You should see these 3 words before signing each transaction",
|
||||||
"three-words-description-2": "If you see a different combination, cancel the transaction and sign out",
|
"three-words-description-2": "If you see a different combination, cancel the transaction and sign out",
|
||||||
"to": "To",
|
"to": "to",
|
||||||
|
"To": "To",
|
||||||
"to-block": "Block",
|
"to-block": "Block",
|
||||||
"to-encrypt-enter-password": "To encrypt the account please enter your password",
|
"to-encrypt-enter-password": "To encrypt the account please enter your password",
|
||||||
"to-see-this-message": "To see this message,",
|
"to-see-this-message": "To see this message,",
|
||||||
@@ -2279,5 +2282,10 @@
|
|||||||
"collectibles": "Collectibles",
|
"collectibles": "Collectibles",
|
||||||
"no-collectibles-description": "Don't be a bored ape",
|
"no-collectibles-description": "Don't be a bored ape",
|
||||||
"no-activity": "No activity",
|
"no-activity": "No activity",
|
||||||
"no-activity-description": "C'mon do something..."
|
"no-activity-description": "C'mon do something...",
|
||||||
|
"bridge": "Bridge",
|
||||||
|
"buy": "Buy",
|
||||||
|
"destroy": "Destroy",
|
||||||
|
"mint": "Mint",
|
||||||
|
"via": "via"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user