Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0933c74a0 | ||
|
|
99294fa8ea | ||
|
|
e11a761fcc | ||
|
|
999588e67d | ||
|
|
9cae50dc88 |
@@ -3,12 +3,12 @@
|
||||
|
||||
(defn container
|
||||
[{:keys [container-size customization-color theme]}]
|
||||
{:width container-size
|
||||
:height container-size
|
||||
:align-items :center
|
||||
:justify-content :center
|
||||
:border-radius (/ container-size 2)
|
||||
:overflow :hidden
|
||||
:background-color (colors/theme-colors (colors/custom-color customization-color 50)
|
||||
(colors/custom-color customization-color 60)
|
||||
theme)})
|
||||
{:width container-size
|
||||
:height container-size
|
||||
:align-items :center
|
||||
:justify-content :center
|
||||
:border-radius (/ container-size 2)
|
||||
:background-color
|
||||
(colors/theme-colors (colors/custom-color customization-color 50)
|
||||
(colors/custom-color customization-color 60)
|
||||
theme)})
|
||||
|
||||
@@ -7,27 +7,34 @@
|
||||
[quo2.components.avatars.group-avatar.style :as style]))
|
||||
|
||||
(def sizes
|
||||
{20 {:icon 12}
|
||||
28 {:icon 16}
|
||||
32 {:icon 16}
|
||||
48 {:icon 20}
|
||||
80 {:icon 32}})
|
||||
{:icon {:x-small 12
|
||||
:small 16
|
||||
:medium 16
|
||||
:large 20
|
||||
:x-large 32}
|
||||
:container {:x-small 20
|
||||
:small 28
|
||||
:medium 32
|
||||
:large 48
|
||||
:x-large 80}})
|
||||
|
||||
(defn- view-internal
|
||||
[_]
|
||||
(fn [{:keys [size theme customization-color picture]
|
||||
:or {size 20
|
||||
customization-color :blue}}]
|
||||
(let [icon-size (get-in sizes [size :icon])]
|
||||
:or {size :x-small
|
||||
customization-color :blue
|
||||
picture nil}}]
|
||||
(let [container-size (get-in sizes [:container size])
|
||||
icon-size (get-in sizes [:icon size])]
|
||||
[rn/view
|
||||
{:style (style/container {:container-size size
|
||||
{:style (style/container {:container-size container-size
|
||||
:customization-color customization-color
|
||||
:theme theme})}
|
||||
(if picture
|
||||
[fast-image/fast-image
|
||||
{:source picture
|
||||
:style {:width size
|
||||
:height size}}]
|
||||
:style {:width container-size
|
||||
:height container-size}}]
|
||||
[icon/icon :i/members
|
||||
{:size icon-size
|
||||
:color colors/white-opa-70}])])))
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
(ns status-im2.common.log
|
||||
(:require [clojure.string :as string]
|
||||
[native-module.core :as native-module]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.utils.types :as types]
|
||||
[status-im2.config :as config]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.re-frame :as rf]
|
||||
[native-module.core :as native-module]
|
||||
[status-im.utils.types :as types]))
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(def logs-queue (atom #queue []))
|
||||
(def max-log-entries 1000)
|
||||
@@ -28,6 +28,7 @@
|
||||
:mobile-system? false
|
||||
:log-level level
|
||||
:callback handle-error}]
|
||||
(log/merge-config! {:ns-whitelist ["*"]})
|
||||
(if (string/blank? level)
|
||||
(native-module/init-status-go-logging (merge logging-params {:log-level "WARN"}))
|
||||
(do
|
||||
|
||||
@@ -69,7 +69,8 @@
|
||||
{:full-name display-name
|
||||
:profile-picture photo-path
|
||||
:status-indicator? false
|
||||
:size :xxxs}]
|
||||
:size :xxxs
|
||||
:ring? false}]
|
||||
[quo/text
|
||||
{:weight :semi-bold
|
||||
:size :paragraph-2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(ns status-im2.contexts.chat.home.view
|
||||
(:require [oops.core :as oops]
|
||||
[quo2.theme :as theme]
|
||||
[quo2.theme :as quo.theme]
|
||||
[re-frame.core :as re-frame]
|
||||
[react-native.core :as rn]
|
||||
[react-native.reanimated :as reanimated]
|
||||
@@ -27,31 +27,32 @@
|
||||
(filter k)
|
||||
(sort-by :timestamp >))))
|
||||
|
||||
(def empty-state-content
|
||||
(defn empty-state-content
|
||||
[theme]
|
||||
#:tab{:contacts
|
||||
{:title (i18n/label :t/no-contacts)
|
||||
:description (i18n/label :t/no-contacts-description)
|
||||
:image (resources/get-image
|
||||
(theme/theme-value :no-contacts-light :no-contacts-dark))}
|
||||
(quo.theme/theme-value :no-contacts-light :no-contacts-dark theme))}
|
||||
:groups
|
||||
{:title (i18n/label :t/no-group-chats)
|
||||
:description (i18n/label :t/no-group-chats-description)
|
||||
:image (resources/get-image
|
||||
(theme/theme-value :no-group-chats-light :no-group-chats-dark))}
|
||||
(quo.theme/theme-value :no-group-chats-light :no-group-chats-dark theme))}
|
||||
:recent
|
||||
{:title (i18n/label :t/no-messages)
|
||||
:description (i18n/label :t/no-messages-description)
|
||||
:image (resources/get-image
|
||||
(theme/theme-value :no-messages-light :no-messages-dark))}})
|
||||
(quo.theme/theme-value :no-messages-light :no-messages-dark theme))}})
|
||||
|
||||
(defn chats
|
||||
[{:keys [selected-tab set-scroll-ref scroll-shared-value]}]
|
||||
[{:keys [theme selected-tab set-scroll-ref scroll-shared-value]}]
|
||||
(let [unfiltered-items (rf/sub [:chats-stack-items])
|
||||
items (filter-and-sort-items-by-tab selected-tab unfiltered-items)]
|
||||
(if (empty? items)
|
||||
[common.home/empty-state-image
|
||||
{:selected-tab selected-tab
|
||||
:tab->content empty-state-content}]
|
||||
:tab->content (empty-state-content theme)}]
|
||||
[reanimated/flat-list
|
||||
{:ref set-scroll-ref
|
||||
:key-fn #(or (:chat-id %) (:public-key %) (:id %))
|
||||
@@ -81,12 +82,12 @@
|
||||
item]))
|
||||
|
||||
(defn contacts
|
||||
[{:keys [pending-contact-requests set-scroll-ref scroll-shared-value]}]
|
||||
[{:keys [theme pending-contact-requests set-scroll-ref scroll-shared-value]}]
|
||||
(let [items (rf/sub [:contacts/active-sections])]
|
||||
(if (and (empty? items) (empty? pending-contact-requests))
|
||||
[common.home/empty-state-image
|
||||
{:selected-tab :tab/contacts
|
||||
:tab->content empty-state-content}]
|
||||
:tab->content (empty-state-content theme)}]
|
||||
[rn/section-list
|
||||
{:ref set-scroll-ref
|
||||
:key-fn :public-key
|
||||
@@ -117,8 +118,8 @@
|
||||
:title (i18n/label :t/invite-friends-to-status)
|
||||
:description (i18n/label :t/share-invite-link)}})
|
||||
|
||||
(defn home
|
||||
[]
|
||||
(defn- f-view-internal
|
||||
[{:keys [theme]}]
|
||||
(let [scroll-ref (atom nil)
|
||||
set-scroll-ref #(reset! scroll-ref %)]
|
||||
(fn []
|
||||
@@ -131,11 +132,13 @@
|
||||
[contacts
|
||||
{:pending-contact-requests pending-contact-requests
|
||||
:set-scroll-ref set-scroll-ref
|
||||
:scroll-shared-value scroll-shared-value}]
|
||||
:scroll-shared-value scroll-shared-value
|
||||
:theme theme}]
|
||||
[chats
|
||||
{:selected-tab selected-tab
|
||||
:set-scroll-ref set-scroll-ref
|
||||
:scroll-shared-value scroll-shared-value}])
|
||||
:scroll-shared-value scroll-shared-value
|
||||
:theme theme}])
|
||||
[:f> common.home.banner/animated-banner
|
||||
{:content banner-data
|
||||
:customization-color customization-color
|
||||
@@ -153,3 +156,9 @@
|
||||
:selected-tab selected-tab
|
||||
:on-tab-change (fn [tab] (rf/dispatch [:messages-home/select-tab tab]))
|
||||
:scroll-shared-value scroll-shared-value}]]))))
|
||||
|
||||
(defn- internal-chats-home-view
|
||||
[params]
|
||||
[:f> f-view-internal params])
|
||||
|
||||
(def view (quo.theme/with-theme internal-chats-home-view))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(ns status-im2.contexts.communities.home.view
|
||||
(:require [oops.core :as oops]
|
||||
[quo2.core :as quo]
|
||||
[quo2.theme :as theme]
|
||||
[quo2.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[status-im2.common.home.banner.view :as common.home.banner]
|
||||
@@ -37,7 +37,9 @@
|
||||
{:id :pending :label (i18n/label :t/pending) :accessibility-label :pending-tab}
|
||||
{:id :opened :label (i18n/label :t/opened) :accessibility-label :opened-tab}])
|
||||
|
||||
(def empty-state-content
|
||||
|
||||
(defn empty-state-content
|
||||
[theme]
|
||||
{:joined
|
||||
{:title (i18n/label :t/no-communities)
|
||||
:description [:<>
|
||||
@@ -45,18 +47,21 @@
|
||||
(i18n/label :t/no-communities-description-strikethrough)]
|
||||
" "
|
||||
(i18n/label :t/no-communities-description)]
|
||||
:image (resources/get-image (theme/theme-value :no-communities-light
|
||||
:no-communities-dark))}
|
||||
:image (resources/get-image (quo.theme/theme-value :no-communities-light
|
||||
:no-communities-dark
|
||||
theme))}
|
||||
:pending
|
||||
{:title (i18n/label :t/no-pending-communities)
|
||||
:description (i18n/label :t/no-pending-communities-description)
|
||||
:image (resources/get-image (theme/theme-value :no-pending-communities-light
|
||||
:no-pending-communities-dark))}
|
||||
:image (resources/get-image (quo.theme/theme-value :no-pending-communities-light
|
||||
:no-pending-communities-dark
|
||||
theme))}
|
||||
:opened
|
||||
{:title (i18n/label :t/no-opened-communities)
|
||||
:description (i18n/label :t/no-opened-communities-description)
|
||||
:image (resources/get-image (theme/theme-value :no-opened-communities-light
|
||||
:no-opened-communities-dark))}})
|
||||
:image (resources/get-image (quo.theme/theme-value :no-opened-communities-light
|
||||
:no-opened-communities-dark
|
||||
theme))}})
|
||||
|
||||
(def ^:private banner-data
|
||||
{:title-props
|
||||
@@ -70,8 +75,8 @@
|
||||
:banner (resources/get-image :discover)
|
||||
:accessibility-label :communities-home-discover-card}})
|
||||
|
||||
(defn home
|
||||
[]
|
||||
(defn- f-view-internal
|
||||
[{:keys [theme]}]
|
||||
(let [flat-list-ref (atom nil)
|
||||
set-flat-list-ref #(reset! flat-list-ref %)]
|
||||
(fn []
|
||||
@@ -87,7 +92,7 @@
|
||||
(if (empty? selected-items)
|
||||
[common.home/empty-state-image
|
||||
{:selected-tab selected-tab
|
||||
:tab->content empty-state-content}]
|
||||
:tab->content (empty-state-content theme)}]
|
||||
[reanimated/flat-list
|
||||
{:ref set-flat-list-ref
|
||||
:key-fn :id
|
||||
@@ -109,3 +114,9 @@
|
||||
:selected-tab selected-tab
|
||||
:on-tab-change (fn [tab] (rf/dispatch [:communities/select-tab tab]))
|
||||
:scroll-shared-value scroll-shared-value}]]))))
|
||||
|
||||
(defn- internal-communities-home-view
|
||||
[params]
|
||||
[:f> f-view-internal params])
|
||||
|
||||
(def view (quo.theme/with-theme internal-communities-home-view))
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
[status-im2.common.parallax.whitelist :as whitelist]
|
||||
[status-im2.common.biometric.events :as biometric]))
|
||||
|
||||
;; ! Enable biometrics screen
|
||||
|
||||
(defn page-title
|
||||
[]
|
||||
[quo/title
|
||||
@@ -36,7 +38,8 @@
|
||||
{:accessibility-label :maybe-later-button
|
||||
:background :blur
|
||||
:type :grey
|
||||
:on-press #(rf/dispatch [:onboarding-2/create-account-and-login])
|
||||
;; :on-press #(rf/dispatch [:onboarding-2/create-account-and-login])
|
||||
:on-press #(rf/dispatch [:open-modal :enable-notifications])
|
||||
:container-style {:margin-top 12}}
|
||||
(i18n/label :t/maybe-later)]]))
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
[status-im2.contexts.onboarding.enable-notifications.style :as style]
|
||||
[status-im2.contexts.shell.jump-to.utils :as shell.utils]))
|
||||
|
||||
;; !Enable notifications screen
|
||||
|
||||
(defn page-title
|
||||
[]
|
||||
[quo/title
|
||||
|
||||
@@ -52,7 +52,9 @@
|
||||
{:on-press (fn []
|
||||
(when on-press
|
||||
(on-press))
|
||||
(rf/dispatch [:open-modal :enable-notifications]))
|
||||
;; (rf/dispatch [:open-modal :enable-notifications])
|
||||
(rf/dispatch [:navigate-to-within-stack [:enable-biometrics :new-to-status]])
|
||||
) ;; !Here is the navigation to the notifications screen
|
||||
:accessibility-label :continue-button
|
||||
:customization-color profile-color
|
||||
:container-style style/continue-button}
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
[{:label "Size"
|
||||
:key :size
|
||||
:type :select
|
||||
:options [{:key 20
|
||||
:value 20}
|
||||
{:key 28
|
||||
:value 28}
|
||||
{:key 32
|
||||
:value 32}
|
||||
{:key 48
|
||||
:value 48}
|
||||
{:key 80
|
||||
:value 80}]}
|
||||
:options [{:key :x-small
|
||||
:value "x-small"}
|
||||
{:key :small
|
||||
:value "Small"}
|
||||
{:key :medium
|
||||
:value "Medium"}
|
||||
{:key :large
|
||||
:value "Large"}
|
||||
{:key :x-large
|
||||
:value "x-Large"}]}
|
||||
{:label "Avatar"
|
||||
:key :picture?
|
||||
:type :boolean}
|
||||
(preview/customization-color-option)])
|
||||
|
||||
(def avatar (resources/get-mock-image :photo1))
|
||||
(def avatar (resources/get-mock-image :user-picture-male4))
|
||||
|
||||
(defn cool-preview
|
||||
[]
|
||||
(let [state (reagent/atom {:theme :light
|
||||
:customization-color :blue
|
||||
:size 20
|
||||
:size :small
|
||||
:picture? false})]
|
||||
(fn []
|
||||
[rn/touchable-without-feedback {:on-press rn/dismiss-keyboard!}
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
:group-avatar [quo2/group-avatar-tag (:label @state)
|
||||
{:blur? (:blur? @state)
|
||||
:size 20
|
||||
:size :x-small
|
||||
:customization-color :purple}]
|
||||
|
||||
:public-key [quo2/public-key-tag
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(def tag-params
|
||||
{:size 20
|
||||
{:size :small
|
||||
:customization-color :blue
|
||||
:style style/user-avatar-tag
|
||||
:text-style style/user-avatar-tag-text
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
:context [[common/user-avatar-tag author]
|
||||
(i18n/label :t/added-you-to)
|
||||
[quo/group-avatar-tag chat-name
|
||||
{:size 20
|
||||
{:size :x-small
|
||||
:customization-color :purple}]]
|
||||
:items (when-not (or accepted dismissed)
|
||||
[{:type :button
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
:z-index (get shared-values
|
||||
(get shell.constants/stacks-z-index-keywords stack-id))})}
|
||||
(case stack-id
|
||||
:communities-stack [:f> communities/home]
|
||||
:chats-stack [:f> chat/home]
|
||||
:communities-stack [:f> communities/view]
|
||||
:chats-stack [:f> chat/view]
|
||||
;NOTE temporary while we support old wallet
|
||||
:wallet-stack (if @state/load-new-wallet?
|
||||
[wallet-new/view]
|
||||
|
||||
@@ -157,7 +157,11 @@
|
||||
:options {:theme :dark
|
||||
:layout options/onboarding-transparent-layout
|
||||
:animations transitions/push-animations-for-transparent-background
|
||||
:popGesture false}
|
||||
:popGesture false
|
||||
;; :modalPresentationStyle :overCurrentContext
|
||||
;; :hardwareBackButton {:dismissModalOnPress false
|
||||
;; :popStackOnPress false}
|
||||
}
|
||||
:component enable-biometrics/enable-biometrics}
|
||||
|
||||
{:name :generating-keys
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "7603b10fb902244899836a19d906cd573fb26093",
|
||||
"commit-sha1": "7603b10fb902244899836a19d906cd573fb26093",
|
||||
"src-sha256": "0asnapan03skhxr1r9cmj3q2rfa36sky1qzczficw34kb2icgj15"
|
||||
"version": "v0.163.9",
|
||||
"commit-sha1": "f2f599fe867a0eba90aaa717a29bb6e99cb5749e",
|
||||
"src-sha256": "0p282pv2lz5f2b0vhpcx0nj74dp5mf7hb41l12js2hxsp21sprmj"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user