Compare commits

...
Author SHA1 Message Date
Parvesh Monu cb15e503d5 fix status bar color 2023-04-06 19:26:14 +05:30
Siddarth Kumar 35ff3a4eca fix chat layout breaking when combining normal text with code blocks (#15585) 2023-04-05 16:49:02 +01:00
Omar Basem 0168ab6baf fix: images 1.22 (#15576)
Author: Omar Basem <omarbasem.0101@gmail.com>
2023-04-05 15:48:34 +05:30
Omar Basem 5ca5c5f2bb fix: image desktop (#15562)
* fix: image desktop not opening
2023-04-03 20:20:16 +05:30
Parvesh Monu 5e9ceec65f fix create profile issues (#15561) 2023-04-03 19:50:31 +05:30
Brian Sztamfater 05d616e417 fix: add min 5 characters validation for display names
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-04-03 19:48:07 +05:30
jakub 3e756ce897 Revert "set signing to auto for debug builds (#15420)"
This reverts commit 3f3cbe98a4.
2023-04-03 09:50:20 +01:00
Andrea Maria Piana 7c362cd246 Use right version 2023-04-03 09:48:36 +01:00
John Ngei 12552c9491 Update communities discover screen
* Fix: discover communities missing data

* made community tags scrollable
2023-03-31 13:45:34 +01:00
Andrea Maria Piana 9cdbf41d74 Bump version to 0.142.5 2023-03-31 13:45:07 +01:00
Andrea Maria Piana 8b05a551d9 Bump release to 1.23.0 2023-03-30 17:30:21 +01:00
20 changed files with 125 additions and 88 deletions
+12 -6
View File
@@ -417,7 +417,9 @@
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = 8B5X2M6H2Y;
LastSwiftMigration = 1140;
ProvisioningStyle = Manual;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
@@ -841,8 +843,9 @@
BUNDLE_ID_SUFFIX = .debug;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CUSTOM_PRODUCT_NAME = "Status Debug";
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 8B5X2M6H2Y;
@@ -895,7 +898,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
PRODUCT_NAME = StatusIm;
PROVISIONING_PROFILE_SPECIFIER = "";
PROVISIONING_PROFILE = "9da75626-9594-43d9-a827-0f6d43c28f54";
PROVISIONING_PROFILE_SPECIFIER = "match Development im.status.ethereum";
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
@@ -913,8 +917,9 @@
BUNDLE_ID_SUFFIX = "";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CUSTOM_PRODUCT_NAME = Status;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 8B5X2M6H2Y;
@@ -959,7 +964,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
PRODUCT_NAME = StatusIm;
PROVISIONING_PROFILE_SPECIFIER = "";
PROVISIONING_PROFILE = "e2202b12-7a66-4ff7-af3c-a52e35f32dc1";
PROVISIONING_PROFILE_SPECIFIER = "match AdHoc im.status.ethereum";
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
@@ -16,15 +16,13 @@
:height 230
:border-radius 20}
:on-press on-press}
[rn/view
{:flex 1}
[rn/view {:style style/detail-container}
[rn/view (style/community-cover-container 60)
[rn/image
{:source cover
:style
{:flex 1
:border-top-right-radius 20
:border-top-left-radius 20}}]]
:style {:flex 1
:border-top-right-radius 20
:border-top-left-radius 20}}]]
[rn/view (style/card-view-content-container 12)
[rn/view (style/card-view-chat-icon 48)
[icon/community-icon {:images images} 48]]
@@ -38,7 +36,7 @@
{:title name
:description description}]
[rn/view {:style (style/card-stats-position)}
[community-view/community-stats-column :card-view]]
[community-view/community-stats-column
{:type :card-view}]]
[rn/view {:style (style/community-tags-position)}
[community-view/community-tags tags]]]]]]])
@@ -46,7 +46,7 @@
(merge {:style {:height 56
:border-radius 16}}
props)
[rn/view {:flex 1}
[rn/view {:style style/detail-container}
[rn/view (style/list-info-container)
[community-icon/community-icon
{:images community-icon} 32]
@@ -64,7 +64,8 @@
colors/neutral-40
colors/neutral-60))}}
name]
[community-view/community-stats-column :list-view]]
[community-view/community-stats-column
{:type :list-view}]]
(if (= status :gated)
[community-view/permission-tag-container
{:locked? locked?
@@ -5,6 +5,7 @@
[quo2.components.tags.permission-tag :as permission]
[quo2.components.tags.tag :as tag]
[quo2.foundations.colors :as colors]
[quo.gesture-handler :as gesture-handler] ;;TODO move to quo2
[react-native.core :as rn]))
(defn community-stats
@@ -23,7 +24,7 @@
members-count]])
(defn community-stats-column
[type]
[{:keys [type]}]
(let [icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)]
[rn/view
(if (= type :card-view)
@@ -41,7 +42,9 @@
(defn community-tags
[tags]
[rn/view (style/community-tags-container)
[gesture-handler/scroll-view
{:shows-horizontal-scroll-indicator false
:horizontal true}
(for [{:keys [name emoji]} tags]
^{:key name}
[rn/view {:margin-right 8}
+4 -5
View File
@@ -22,6 +22,9 @@
colors/white
colors/neutral-90)})
(def detail-container
{:flex 1})
(defn stats-count-container
[]
{:flex-direction :row
@@ -37,10 +40,6 @@
{:flex-direction :row
:align-items :center})
(defn community-tags-container
[]
{:flex-direction :row})
(defn card-stats-position
[]
{:position :absolute
@@ -62,7 +61,7 @@
:bottom 0
:left 0
:right 0
:height 20
:border-radius 20
:padding-horizontal padding-horizontal
:border-top-right-radius 16
:border-top-left-radius 16
@@ -6,6 +6,7 @@
[quo2.components.inputs.title-input.view :as title-input]
[quo2.foundations.colors :as colors]
[react-native.core :as rn]
[react-native.platform :as platform]
[react-native.hole-view :as hole-view]))
(defn profile-input
@@ -18,20 +19,29 @@
[rn/view
{:style (style/container customization-color)}
[rn/view
[hole-view/hole-view
{:holes [{:x 33
:y 23
:width 24
:height 24
:borderRadius 12}]}
[user-avatar/user-avatar
(assoc image-picker-props
:customization-color customization-color
:full-name (if (seq full-name)
full-name
placeholder)
:status-indicator? false
:size :medium)]]
(if platform/ios?
[hole-view/hole-view
{:holes [{:x 33
:y 23
:width 24
:height 24
:borderRadius 12}]}
[user-avatar/user-avatar
(assoc image-picker-props
:customization-color customization-color
:full-name (if (seq full-name)
full-name
placeholder)
:status-indicator? false
:size :medium)]]
[user-avatar/user-avatar
(assoc image-picker-props
:customization-color customization-color
:full-name (if (seq full-name)
full-name
placeholder)
:status-indicator? false
:size :medium)])
[buttons/button
{:accessibility-label :select-profile-picture-button
:type :grey
+22 -19
View File
@@ -365,6 +365,25 @@
[_]
(status/get-node-config #(re-frame/dispatch [::get-node-config-callback %])))
(rf/defn redirect-to-root
"Decides which root should be initialised depending on user and app state"
[{:keys [db] :as cofx}]
(cond
(get db :local-pairing/completed-pairing?)
{:dispatch [:syncing/pairing-completed]}
(get db :onboarding-2/new-account?)
{:dispatch [:onboarding-2/finalize-setup]}
(get db :tos/accepted?)
(rf/merge
cofx
(multiaccounts/switch-theme nil :shell-stack)
(navigation/init-root :shell-stack))
:else
{:dispatch [:init-root :tos]}))
(rf/defn get-settings-callback
{:events [::get-settings-callback]}
[{:keys [db] :as cofx} settings]
@@ -397,7 +416,8 @@
(logging/set-log-level (:log-level multiaccount))
(activity-center/notifications-fetch-pending-contact-requests)
(activity-center/update-seen-state)
(activity-center/notifications-fetch-unread-count))))
(activity-center/notifications-fetch-unread-count)
(redirect-to-root))))
(re-frame/reg-fx
::open-last-chat
@@ -472,22 +492,6 @@
keychain/auth-method-biometric
keychain/auth-method-password))))
(defn redirect-to-root
"Decides which root should be initialised depending on user and app state"
[db]
(cond
(get db :local-pairing/completed-pairing?)
(re-frame/dispatch [:syncing/pairing-completed])
(get db :onboarding-2/new-account?)
(re-frame/dispatch [:onboarding-2/finalize-setup])
(get db :tos/accepted?)
(re-frame/dispatch [:init-root :shell-stack])
:else
(re-frame/dispatch [:init-root :tos])))
(rf/defn login-only-events
[{:keys [db] :as cofx} key-uid password save-password?]
(let [auth-method (:auth-method db)
@@ -499,8 +503,7 @@
{:db (assoc db :chats/loading? true)
:json-rpc/call
[{:method "settings_getSettings"
:on-success #(do (re-frame/dispatch [::get-settings-callback %])
(redirect-to-root db))}]}
:on-success #(re-frame/dispatch [::get-settings-callback %])}]}
(notifications/load-notification-preferences)
(when save-password?
(keychain/save-user-password key-uid password))
@@ -13,3 +13,5 @@
(def ^:const velocity-factor 0.5)
(def ^:const default-duration 300)
(def ^:const default-dimension 300)
@@ -216,10 +216,11 @@
curr-orientation (or (rf/sub [:lightbox/orientation])
orientation/portrait)
portrait? (= curr-orientation orientation/portrait)
dimensions (utils/get-dimensions image-width
image-height
curr-orientation
args)
dimensions (utils/get-dimensions
(or image-width c/default-dimension)
(or image-height c/default-duration)
curr-orientation
args)
animations {:scale (anim/use-val c/min-scale)
:saved-scale (anim/use-val c/min-scale)
:pan-x-start (anim/use-val c/init-offset)
@@ -46,8 +46,7 @@
{:on-press (fn []
(permissions/request-permissions
{:permissions [:read-external-storage :write-external-storage]
:on-allowed #(rf/dispatch
[:open-modal :photo-selector {:insets insets}])
:on-allowed #(rf/dispatch [:open-modal :photo-selector {:insets insets}])
:on-denied (fn []
(background-timer/set-timeout
#(utils-old/show-popup (i18n/label :t/error)
@@ -13,7 +13,7 @@
[units {:keys [type literal destination]} chat-id]
(case (keyword type)
:code
(conj units [rn/view {:style (merge style/block (style/code))} [quo/text {:weight :code} literal]])
(conj units [quo/text {:style (merge style/block (style/code)) :weight :code} literal])
:emph
(conj units [quo/text {:style {:font-style :italic}} literal])
@@ -3,10 +3,10 @@
[react-native.platform :as platform]))
(defn gradient-container
[insets]
[bottom-inset]
{:left 0
:right 0
:height (+ (:bottom insets) (if platform/ios? 65 85))
:height (+ bottom-inset (if platform/ios? 65 85))
:position :absolute
:bottom 0})
@@ -31,7 +31,7 @@
{:colors [:black :transparent]
:start {:x 0 :y 1}
:end {:x 0 :y 0}
:style (style/gradient-container insets)}
:style (style/gradient-container (:bottom insets))}
[quo/button
{:style {:align-self :stretch
:margin-horizontal 20
@@ -22,10 +22,11 @@
(def featured-list-container
{:flex-direction :row
:overflow :hidden
:margin-bottom 24
:margin-left 20
:padding-right 20})
:overflow :hidden})
(def flat-list-container
{:padding-bottom 24
:padding-horizontal 20})
(def other-communities-container
{:flex 1
@@ -4,12 +4,12 @@
[quo2.core :as quo]
[quo2.foundations.colors :as colors]
[react-native.core :as rn]
[react-native.platform :as platform]
[reagent.core :as reagent]
[status-im2.common.resources :as resources]
[status-im2.contexts.communities.menus.community-options.view :as options]
[status-im.ui.screens.communities.community :as community]
[status-im.ui.components.react :as react]
[react-native.platform :as platform]
[status-im2.common.scroll-page.view :as scroll-page]
[status-im2.contexts.communities.discover.style :as style]
[utils.re-frame :as rf]))
@@ -22,7 +22,7 @@
:group [{:id 1
:token-icon (resources/get-mock-image :status-logo)}]}]}})
(defn render-fn
(defn community-list-item
[community-item _ _ {:keys [width view-type]}]
(let [item (merge community-item
(get mock-community-item-data :data))
@@ -98,18 +98,20 @@
{:style style/featured-list-container
:on-layout #(swap! view-size
(fn []
(- (oops/oget % "nativeEvent.layout.width") 20)))}
(- (oops/oget % "nativeEvent.layout.width") 40)))}
(when-not (= @view-size 0)
[rn/flat-list
{:key-fn :id
:horizontal true
:keyboard-should-persist-taps :always
:shows-horizontal-scroll-indicator false
:nestedScrollEnabled true
:separator [rn/view {:width 12}]
:data communities
:render-fn render-fn
:render-fn community-list-item
:render-data {:width @view-size
:view-type view-type}}])])))
:view-type view-type}
:content-container-style style/flat-list-container}])])))
(defn discover-communities-header
[{:keys [featured-communities-count
@@ -120,7 +122,7 @@
[screen-title]
[featured-communities-header featured-communities-count]
[featured-list featured-communities view-type]
[quo/separator]
[quo/separator {:style {:margin-horizontal 20}}]
[discover-communities-segments selected-tab false]])
(defn other-communities-list
@@ -131,14 +133,16 @@
(let [community-id (when communities-ids item)
community (if communities
item
[rf/sub [:communities/home-item community-id]])]
(rf/sub [:communities/home-item community-id]))
cover {:uri (get-in (:images item) [:banner :uri])}]
[rn/view
{:key (str inner-index (:id community))
:margin-bottom 16}
(if (= view-type :card-view)
[quo/community-card-view-item
(merge community
(get mock-community-item-data :data))
(get mock-community-item-data :data)
{:cover cover})
#(rf/dispatch [:navigate-to :community-overview (:id community)])]
[quo/communities-list-view-item
{:on-press (fn []
@@ -35,6 +35,10 @@
(defn has-common-names [s] (pos? (count (filter #(string/includes? s %) common-names))))
(def special-characters-regex (new js/RegExp #"[^a-zA-Z\d\s-._]" "i"))
(defn has-special-characters [s] (re-find special-characters-regex s))
(def min-length 5)
(defn length-not-valid [s] (< (count (string/trim s)) min-length))
(def valid-regex (new js/RegExp #"^[\w-\s]{5,24}$" "i"))
(defn valid-name [s] (re-find valid-regex s))
(defn validation-message
[s]
@@ -47,6 +51,9 @@
(string/ends-with? s ".eth") (i18n/label :t/ending-not-allowed {:ending ".eth"})
(has-common-names s) (i18n/label :t/are-not-allowed {:check (i18n/label :t/common-names)})
(has-emojis s) (i18n/label :t/are-not-allowed {:check (i18n/label :t/emojis)})
(length-not-valid s) (i18n/label :t/name-must-have-at-least-characters
{:min-chars min-length})
(not (valid-name s)) (i18n/label :t/name-is-not-valid)
:else nil))
(defn button-container
@@ -67,7 +74,7 @@
validation-msg (reagent/atom (validation-message @full-name))
on-change-text (fn [s]
(reset! validation-msg (validation-message s))
(reset! full-name s))
(reset! full-name (string/trim s)))
custom-color (reagent/atom (or color c/profile-default-color))
profile-pic (reagent/atom image-path)
on-change-profile-pic #(reset! profile-pic %)
@@ -83,7 +83,7 @@
(:labelled? @state))
:resource (if (= :emoji (:type @state))
(resources/get-image :music)
:main-icons2/placeholder)})]]]]])))
:i/placeholder)})]]]]])))
(defn preview-tag
[]
[rn/view
+5 -4
View File
@@ -6,16 +6,16 @@
[status-im2.navigation.state :as state]))
(defn status-bar-options
[]
[& [status-bar-theme]]
;; dark-mode? = After login we are going to use theme as per user's choice (colors/dark?)
;; but before login we only have dark mode (dark-mode? = true)
(let [dark-mode? (if (= @state/root-id :shell-stack) (colors/dark?) true)]
(if platform/android?
{:navigationBar {:backgroundColor colors/neutral-100}
:statusBar {:backgroundColor :transparent
:style (if dark-mode? :light :dark)
:style (or status-bar-theme (if dark-mode? :light :dark))
:drawBehind true}}
{:statusBar {:style (if dark-mode? :light :dark)}})))
{:statusBar {:style (or status-bar-theme (if dark-mode? :light :dark))}})))
(defn topbar-options
[]
@@ -155,7 +155,8 @@
{:stack {:id :shell-stack
:children [{:component {:name :shell-stack
:id :shell-stack
:options (merge (status-bar-options)
:options (merge (status-bar-options
(if (colors/dark?) :light :dark))
{:topBar {:visible false}})}}]}}}
:profiles
{:root
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.142.4",
"commit-sha1": "142b170ec99498bbeb41d7f4ce5b7140db597e56",
"src-sha256": "038p3axqj4m2wczs3fg44535rn6y235hr23w9fjriaglp80p2z07"
"version": "v0.142.5",
"commit-sha1": "7c2b5a39b370ceb9276a01b53cf9fb966bfe9d5b",
"src-sha256": "0rppkkkhhjzq6sykv34r3y3sslv821jjzd319f9bh3lybqqy5jp3"
}
+3 -1
View File
@@ -2054,5 +2054,7 @@
"error-syncing-connection-failed": "Oops! Connection failed. Try again",
"camera-permission-denied": "Permission denied",
"enable-biometrics": "Enable biometrics",
"use-biometrics": "Use biometrics to fill in your password"
"use-biometrics": "Use biometrics to fill in your password",
"name-must-have-at-least-characters": "Name must have at least {{min-chars}} characters",
"name-is-not-valid": "Name is not valid"
}