mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-13 18:25:45 +00:00
parent
84da3128bf
commit
73bbfa7d31
BIN
resources/images/icons2/32x32/identicon-ring@2x.png
Normal file
BIN
resources/images/icons2/32x32/identicon-ring@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
resources/images/icons2/32x32/identicon-ring@3x.png
Normal file
BIN
resources/images/icons2/32x32/identicon-ring@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
@ -126,9 +126,7 @@
|
|||||||
:height outer-dimensions
|
:height outer-dimensions
|
||||||
:border-radius outer-dimensions}}
|
:border-radius outer-dimensions}}
|
||||||
(when (and ring? identicon?)
|
(when (and ring? identicon?)
|
||||||
[icons/icon :main-icons/identicon-ring {:width outer-dimensions
|
[icons/icon :i/identicon-ring {:size outer-dimensions
|
||||||
:height outer-dimensions
|
|
||||||
:size outer-dimensions
|
|
||||||
:no-color true}])
|
:no-color true}])
|
||||||
(if profile-picture
|
(if profile-picture
|
||||||
;; display image
|
;; display image
|
||||||
|
@ -9,13 +9,24 @@
|
|||||||
(colors/theme-colors colors/danger-50 colors/danger-60)
|
(colors/theme-colors colors/danger-50 colors/danger-60)
|
||||||
(colors/theme-colors colors/neutral-50 colors/neutral-40)))
|
(colors/theme-colors colors/neutral-50 colors/neutral-40)))
|
||||||
|
|
||||||
|
(defn divider []
|
||||||
|
[rn/view {:style {:border-top-width 1
|
||||||
|
:border-top-color (colors/theme-colors colors/neutral-10 colors/neutral-80)
|
||||||
|
:margin-top 8
|
||||||
|
:margin-bottom 7
|
||||||
|
:align-items :center
|
||||||
|
:flex-direction :row}}])
|
||||||
|
|
||||||
(defn action [{:keys [icon
|
(defn action [{:keys [icon
|
||||||
label
|
label
|
||||||
sub-label
|
sub-label
|
||||||
right-icon
|
right-icon
|
||||||
danger?
|
danger?
|
||||||
on-press] :as action-props}]
|
on-press
|
||||||
|
add-divider?] :as action-props}]
|
||||||
(when action-props
|
(when action-props
|
||||||
|
[:<> {:key label}
|
||||||
|
(when add-divider? [divider])
|
||||||
[rn/touchable-opacity {:on-press on-press}
|
[rn/touchable-opacity {:on-press on-press}
|
||||||
[rn/view {:style
|
[rn/view {:style
|
||||||
{:height (if sub-label 56 47)
|
{:height (if sub-label 56 47)
|
||||||
@ -55,20 +66,11 @@
|
|||||||
:width 20}}
|
:width 20}}
|
||||||
[icon/icon right-icon
|
[icon/icon right-icon
|
||||||
{:color (get-icon-color danger?)
|
{:color (get-icon-color danger?)
|
||||||
:size 20}]])]]))
|
:size 20}]])]]]))
|
||||||
|
|
||||||
(defn divider []
|
|
||||||
[rn/view {:style {:border-top-width 1
|
|
||||||
:border-top-color (colors/theme-colors colors/neutral-10 colors/neutral-80)
|
|
||||||
:margin-top 8
|
|
||||||
:margin-bottom 7
|
|
||||||
:align-items :center
|
|
||||||
:flex-direction :row}}])
|
|
||||||
|
|
||||||
(defn action-drawer [sections]
|
(defn action-drawer [sections]
|
||||||
[:<> {:style
|
[:<>
|
||||||
{:flex 1}}
|
(doall
|
||||||
(interpose
|
|
||||||
[divider]
|
|
||||||
(for [actions sections]
|
(for [actions sections]
|
||||||
(map action actions)))])
|
(doall
|
||||||
|
(map action actions))))])
|
||||||
|
@ -30,4 +30,5 @@
|
|||||||
(get-icons 12)
|
(get-icons 12)
|
||||||
(get-icons 16)
|
(get-icons 16)
|
||||||
(get-icons 20)
|
(get-icons 20)
|
||||||
(get-icons 24)))
|
(get-icons 24)
|
||||||
|
(get-icons 32)))
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
(defn show-overlay [comp]
|
(defn show-overlay [comp]
|
||||||
(.showOverlay Navigation (clj->js comp)))
|
(.showOverlay Navigation (clj->js comp)))
|
||||||
|
|
||||||
|
(defn pop-to-root [tab]
|
||||||
|
(.popToRoot Navigation (clj->js tab)))
|
||||||
|
|
||||||
(defn dissmiss-overlay [comp]
|
(defn dissmiss-overlay [comp]
|
||||||
(.catch (.dismissOverlay Navigation comp) #()))
|
(.catch (.dismissOverlay Navigation comp) #()))
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
[status-im.constants :as constants]
|
[status-im.constants :as constants]
|
||||||
[quo2.components.drawers.action-drawers :as drawer]))
|
[quo2.components.drawers.action-drawers :as drawer]))
|
||||||
|
|
||||||
(defn- entry [{:keys [icon label on-press danger? sub-label chevron?]}]
|
(defn- entry [{:keys [icon label on-press danger? sub-label chevron? add-divider?]}]
|
||||||
{:pre [(keyword? icon)
|
{:pre [(keyword? icon)
|
||||||
(string? label)
|
(string? label)
|
||||||
(fn? on-press)
|
(fn? on-press)
|
||||||
@ -19,7 +19,8 @@
|
|||||||
:on-press on-press
|
:on-press on-press
|
||||||
:danger? danger?
|
:danger? danger?
|
||||||
:sub-label sub-label
|
:sub-label sub-label
|
||||||
:right-icon (when chevron? :i/chevron-right)})
|
:right-icon (when chevron? :i/chevron-right)
|
||||||
|
:add-divider? add-divider?})
|
||||||
|
|
||||||
(defn hide-sheet-and-dispatch [event]
|
(defn hide-sheet-and-dispatch [event]
|
||||||
(rf/dispatch [:bottom-sheet/hide])
|
(rf/dispatch [:bottom-sheet/hide])
|
||||||
@ -96,7 +97,8 @@
|
|||||||
:on-press #(mark-all-read-action chat-id)
|
:on-press #(mark-all-read-action chat-id)
|
||||||
:danger? false
|
:danger? false
|
||||||
:sub-label nil
|
:sub-label nil
|
||||||
:chevron? false}))
|
:chevron? false
|
||||||
|
:add-divider? true}))
|
||||||
|
|
||||||
(defn clear-history-entry [chat-id]
|
(defn clear-history-entry [chat-id]
|
||||||
(entry {:icon :i/delete
|
(entry {:icon :i/delete
|
||||||
@ -104,7 +106,8 @@
|
|||||||
:on-press #(clear-history-action chat-id)
|
:on-press #(clear-history-action chat-id)
|
||||||
:danger? true
|
:danger? true
|
||||||
:sub-label nil
|
:sub-label nil
|
||||||
:chevron? false}))
|
:chevron? false
|
||||||
|
:add-divider? true}))
|
||||||
|
|
||||||
(defn delete-chat-entry [item]
|
(defn delete-chat-entry [item]
|
||||||
(entry {:icon :i/delete
|
(entry {:icon :i/delete
|
||||||
@ -208,7 +211,8 @@
|
|||||||
:on-press #(js/alert "TODO: to be implemented, requires status-go impl.")
|
:on-press #(js/alert "TODO: to be implemented, requires status-go impl.")
|
||||||
:danger? true
|
:danger? true
|
||||||
:sub-label nil
|
:sub-label nil
|
||||||
:chevron? false}))
|
:chevron? false
|
||||||
|
:add-divider? true}))
|
||||||
|
|
||||||
(defn block-user-entry [item]
|
(defn block-user-entry [item]
|
||||||
(entry {:icon :i/block
|
(entry {:icon :i/block
|
||||||
|
@ -68,9 +68,9 @@
|
|||||||
:size :label
|
:size :label
|
||||||
:weight :regular
|
:weight :regular
|
||||||
:accessibility-label :quoted-message
|
:accessibility-label :quoted-message
|
||||||
|
:ellipsize-mode :tail
|
||||||
:style (merge
|
:style (merge
|
||||||
{:ellipsize-mode :tail
|
{:text-transform :none
|
||||||
:text-transform :none
|
|
||||||
:margin-left 4
|
:margin-left 4
|
||||||
:margin-top 2}
|
:margin-top 2}
|
||||||
(when (or (= constants/content-type-image content-type)
|
(when (or (= constants/content-type-image content-type)
|
||||||
|
@ -195,7 +195,7 @@
|
|||||||
{:id :sent
|
{:id :sent
|
||||||
:label (i18n/label :t/sent)}]}]
|
:label (i18n/label :t/sent)}]}]
|
||||||
[list/flat-list
|
[list/flat-list
|
||||||
{:key-fn :first
|
{:key-fn :chat-id
|
||||||
:data (if (= @selected-requests-tab :received) received-requests sent-requests)
|
:data (if (= @selected-requests-tab :received) received-requests sent-requests)
|
||||||
:render-fn received-cr-item/received-cr-item}]]))])
|
:render-fn received-cr-item/received-cr-item}]]))])
|
||||||
|
|
||||||
|
@ -325,3 +325,8 @@
|
|||||||
:change-root-status-bar-style-fx
|
:change-root-status-bar-style-fx
|
||||||
(fn [style]
|
(fn [style]
|
||||||
(navigation/merge-options "shell-stack" {:statusBar {:style style}})))
|
(navigation/merge-options "shell-stack" {:statusBar {:style style}})))
|
||||||
|
|
||||||
|
(re-frame/reg-fx
|
||||||
|
:pop-to-root-tab-fx
|
||||||
|
(fn [tab]
|
||||||
|
(navigation/pop-to-root tab)))
|
||||||
|
@ -40,7 +40,8 @@
|
|||||||
(rf/defn change-tab
|
(rf/defn change-tab
|
||||||
{:events [:navigate-change-tab]}
|
{:events [:navigate-change-tab]}
|
||||||
[_ tab]
|
[_ tab]
|
||||||
{:change-tab-fx tab})
|
;{:change-tab-fx tab} ; TODO: effect needs to be implemented (may not be possible: https://github.com/wix/react-native-navigation/issues/4837)
|
||||||
|
)
|
||||||
|
|
||||||
(rf/defn navigate-replace
|
(rf/defn navigate-replace
|
||||||
{:events [:navigate-replace]}
|
{:events [:navigate-replace]}
|
||||||
|
@ -4,7 +4,24 @@
|
|||||||
[status-im.ethereum.json-rpc :as json-rpc]
|
[status-im.ethereum.json-rpc :as json-rpc]
|
||||||
["react-native" :refer (DevSettings LogBox)]))
|
["react-native" :refer (DevSettings LogBox)]))
|
||||||
|
|
||||||
(.ignoreAllLogs LogBox)
|
;; Only ignore warnings/errors that cannot be fixed for the time being.
|
||||||
|
;; When you add a warning to be ignored explain below why it is ignored and how it can be fixed.
|
||||||
|
;; When a warning is fixed make sure to remove it from here.
|
||||||
|
(.ignoreLogs ^js LogBox (clj->js ["undefined is not an object (evaluating 'e.message')"
|
||||||
|
"Cannot read property 'message' of undefined"
|
||||||
|
"InternalError Metro has encountered an error"
|
||||||
|
"undefined Unable to resolve module `parse-svg-path`"
|
||||||
|
"group12"]))
|
||||||
|
|
||||||
|
;; List of ignored warnings/errors:
|
||||||
|
;; 1. "evaluating 'e.message'": Not sure why this error is happening, but it is coming from here
|
||||||
|
;; @walletconnect/jsonrpc-utils/dist/esm/error.js parseConnectionError() method
|
||||||
|
;; 2. "Cannot read property 'message' of undefined": same as 1, but for Android
|
||||||
|
;; 3. "InternalError Metro has encountered an error": an error that happens when losing connection to metro, can be safely ignored
|
||||||
|
;; 4. "undefined Unable to resolve module `parse-svg-path`": an error that happens when losing connection to metro, can be safely ignored
|
||||||
|
;; 5. "group12": referring to the group-icon size 12x12. Currently, it is not available. When the design team adds it to the
|
||||||
|
;; icon set it will be added to project.
|
||||||
|
|
||||||
|
|
||||||
(defn setup []
|
(defn setup []
|
||||||
(rf/set-mergeable-keys #{:filters/load-filters
|
(rf/set-mergeable-keys #{:filters/load-filters
|
||||||
|
Loading…
x
Reference in New Issue
Block a user