Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d739e4413 | ||
|
|
336c98aff9 | ||
|
|
fd6c607115 | ||
|
|
82357057ed |
@@ -417,9 +417,7 @@
|
||||
TestTargetID = 13B07F861A680F5B00A75B9A;
|
||||
};
|
||||
13B07F861A680F5B00A75B9A = {
|
||||
DevelopmentTeam = 8B5X2M6H2Y;
|
||||
LastSwiftMigration = 1140;
|
||||
ProvisioningStyle = Manual;
|
||||
SystemCapabilities = {
|
||||
com.apple.BackgroundModes = {
|
||||
enabled = 1;
|
||||
@@ -843,9 +841,8 @@
|
||||
BUNDLE_ID_SUFFIX = .debug;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CUSTOM_PRODUCT_NAME = "Status Debug";
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 8B5X2M6H2Y;
|
||||
@@ -898,8 +895,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
|
||||
PRODUCT_NAME = StatusIm;
|
||||
PROVISIONING_PROFILE = "9da75626-9594-43d9-a827-0f6d43c28f54";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "match Development im.status.ethereum";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -917,9 +913,8 @@
|
||||
BUNDLE_ID_SUFFIX = "";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CUSTOM_PRODUCT_NAME = Status;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 8B5X2M6H2Y;
|
||||
@@ -964,8 +959,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
|
||||
PRODUCT_NAME = StatusIm;
|
||||
PROVISIONING_PROFILE = "e2202b12-7a66-4ff7-af3c-a52e35f32dc1";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "match AdHoc im.status.ethereum";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
|
||||
+4
-8
@@ -149,15 +149,11 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
||||
this.getReactApplicationContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit("gethEvent", params);
|
||||
}
|
||||
|
||||
private File getPublicStorageDirectory() {
|
||||
private File getLogsFile() {
|
||||
final Context context = this.getReactApplicationContext();
|
||||
// Environment.getExternalStoragePublicDirectory doesn't work as expected on Android Q
|
||||
// https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)
|
||||
return context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
|
||||
|
||||
}
|
||||
private File getLogsFile() {
|
||||
final File pubDirectory = this.getPublicStorageDirectory();
|
||||
final File pubDirectory = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
|
||||
final File logFile = new File(pubDirectory, gethLogFileName);
|
||||
|
||||
return logFile;
|
||||
@@ -1174,8 +1170,8 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
||||
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String logFileDirectory() {
|
||||
return getPublicStorageDirectory().getAbsolutePath();
|
||||
public String logFilePath() {
|
||||
return getLogsFile().getAbsolutePath();
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
|
||||
@@ -882,7 +882,7 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(backupDisabledDataDir) {
|
||||
return rootUrl.path;
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFileDirectory) {
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFilePath) {
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
|
||||
@@ -6,10 +6,10 @@ export function useTranslateY(initialTranslationY, bottomSheetDy, panY) {
|
||||
})
|
||||
}
|
||||
|
||||
export function useBackgroundOpacity(translateY, backgroundHeight, windowHeight, opacity) {
|
||||
export function useBackgroundOpacity(translateY, backgroundHeight, windowHeight) {
|
||||
return useDerivedValue(() => {
|
||||
const calculatedOpacity = ((translateY.value - windowHeight) / -backgroundHeight) * opacity
|
||||
const opacity = ((translateY.value - windowHeight) / -backgroundHeight) * 0.5
|
||||
|
||||
return Math.max(Math.min(calculatedOpacity, opacity), 0)
|
||||
return Math.max(Math.min(opacity, 0.5), 0)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
[quo2.components.common.unread-grey-dot.style :as style]))
|
||||
|
||||
(defn unread-grey-dot
|
||||
[accessibility-label]
|
||||
[]
|
||||
[rn/view
|
||||
(cond-> {:style style/unread-grey-dot}
|
||||
accessibility-label (assoc :accessibility-label accessibility-label :accessible true))])
|
||||
{:style style/unread-grey-dot}])
|
||||
|
||||
@@ -16,13 +16,15 @@
|
||||
:height 230
|
||||
:border-radius 20}
|
||||
:on-press on-press}
|
||||
[rn/view {:style style/detail-container}
|
||||
[rn/view
|
||||
{:flex 1}
|
||||
[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]]
|
||||
@@ -36,7 +38,7 @@
|
||||
{:title name
|
||||
:description description}]
|
||||
[rn/view {:style (style/card-stats-position)}
|
||||
[community-view/community-stats-column
|
||||
{:type :card-view}]]
|
||||
[community-view/community-stats-column :card-view]]
|
||||
[rn/view {:style (style/community-tags-position)}
|
||||
[community-view/community-tags tags]]]]]]])
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
[counter/counter {:type :default} unread-mentions-count]
|
||||
|
||||
unread-messages?
|
||||
[unread-grey-dot :unviewed-messages-public]))
|
||||
[unread-grey-dot]))
|
||||
|
||||
(defn communities-list-view-item
|
||||
[props
|
||||
@@ -46,7 +46,7 @@
|
||||
(merge {:style {:height 56
|
||||
:border-radius 16}}
|
||||
props)
|
||||
[rn/view {:style style/detail-container}
|
||||
[rn/view {:flex 1}
|
||||
[rn/view (style/list-info-container)
|
||||
[community-icon/community-icon
|
||||
{:images community-icon} 32]
|
||||
@@ -64,8 +64,7 @@
|
||||
colors/neutral-40
|
||||
colors/neutral-60))}}
|
||||
name]
|
||||
[community-view/community-stats-column
|
||||
{:type :list-view}]]
|
||||
[community-view/community-stats-column :list-view]]
|
||||
(if (= status :gated)
|
||||
[community-view/permission-tag-container
|
||||
{:locked? locked?
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
[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
|
||||
@@ -24,7 +23,7 @@
|
||||
members-count]])
|
||||
|
||||
(defn community-stats-column
|
||||
[{:keys [type]}]
|
||||
[type]
|
||||
(let [icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)]
|
||||
[rn/view
|
||||
(if (= type :card-view)
|
||||
@@ -42,9 +41,7 @@
|
||||
|
||||
(defn community-tags
|
||||
[tags]
|
||||
[gesture-handler/scroll-view
|
||||
{:shows-horizontal-scroll-indicator false
|
||||
:horizontal true}
|
||||
[rn/view (style/community-tags-container)
|
||||
(for [{:keys [name emoji]} tags]
|
||||
^{:key name}
|
||||
[rn/view {:margin-right 8}
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
colors/white
|
||||
colors/neutral-90)})
|
||||
|
||||
(def detail-container
|
||||
{:flex 1})
|
||||
|
||||
(defn stats-count-container
|
||||
[]
|
||||
{:flex-direction :row
|
||||
@@ -40,6 +37,10 @@
|
||||
{:flex-direction :row
|
||||
:align-items :center})
|
||||
|
||||
(defn community-tags-container
|
||||
[]
|
||||
{:flex-direction :row})
|
||||
|
||||
(defn card-stats-position
|
||||
[]
|
||||
{:position :absolute
|
||||
@@ -61,7 +62,7 @@
|
||||
:bottom 0
|
||||
:left 0
|
||||
:right 0
|
||||
:border-radius 20
|
||||
:height 20
|
||||
:padding-horizontal padding-horizontal
|
||||
:border-top-right-radius 16
|
||||
:border-top-left-radius 16
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
(ns quo2.components.drawers.drawer-buttons.style
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[react-native.platform :as platform]))
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
|
||||
(def outer-container
|
||||
{:height 216
|
||||
:border-radius 20})
|
||||
(def outer-container {:height 216})
|
||||
|
||||
(def top-card
|
||||
{:flex 1
|
||||
@@ -12,9 +9,7 @@
|
||||
:padding-horizontal 20
|
||||
:border-top-left-radius 20
|
||||
:border-top-right-radius 20
|
||||
:background-color (if platform/ios?
|
||||
colors/neutral-80-opa-80-blur
|
||||
colors/neutral-80)})
|
||||
:background-color colors/neutral-80})
|
||||
|
||||
(def bottom-card
|
||||
{:position :absolute
|
||||
@@ -26,7 +21,7 @@
|
||||
:padding-horizontal 20
|
||||
:border-top-left-radius 20
|
||||
:border-top-right-radius 20
|
||||
:background-color colors/white-opa-5})
|
||||
:background-color (colors/alpha colors/white 0.05)})
|
||||
|
||||
(def bottom-container
|
||||
{:flex-direction :row
|
||||
@@ -40,14 +35,14 @@
|
||||
:width 28
|
||||
:justify-content :center
|
||||
:align-items :center
|
||||
:border-color colors/white-opa-5})
|
||||
:border-color (colors/alpha colors/white 0.05)})
|
||||
|
||||
(def bottom-text
|
||||
{:flex 1
|
||||
:color colors/white-70-blur})
|
||||
:color (colors/alpha colors/white 0.7)})
|
||||
|
||||
(def top-text
|
||||
{:color colors/white-70-blur})
|
||||
{:color (colors/alpha colors/white 0.7)})
|
||||
|
||||
(defn heading-text
|
||||
[gap]
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
[quo2.components.icon :as icon]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.blur :as blur]
|
||||
[quo2.components.drawers.drawer-buttons.style :as style]))
|
||||
|
||||
(defn render-bottom
|
||||
@@ -71,7 +70,7 @@
|
||||
child-2 string, keyword or hiccup
|
||||
"
|
||||
[{:keys [container-style top-card bottom-card]} child-1 child-2]
|
||||
[blur/ios-view
|
||||
[rn/view
|
||||
{:style (merge container-style style/outer-container)}
|
||||
[card
|
||||
(merge {:gap 4
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
[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
|
||||
@@ -19,29 +18,20 @@
|
||||
[rn/view
|
||||
{:style (style/container customization-color)}
|
||||
[rn/view
|
||||
(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)])
|
||||
[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)]]
|
||||
[buttons/button
|
||||
{:accessibility-label :select-profile-picture-button
|
||||
:type :grey
|
||||
@@ -57,7 +47,6 @@
|
||||
[rn/view {:style style/input-container}
|
||||
[title-input/title-input
|
||||
(merge title-input-props
|
||||
{:blur? true
|
||||
:override-theme :dark
|
||||
{:override-theme :dark
|
||||
:placeholder placeholder
|
||||
:customization-color customization-color})]]]))
|
||||
|
||||
@@ -2,35 +2,34 @@
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
|
||||
(defn get-focused-placeholder-color
|
||||
[blur? override-theme]
|
||||
[blur?]
|
||||
(if blur?
|
||||
(colors/theme-colors colors/neutral-80-opa-20 colors/white-opa-20 override-theme)
|
||||
(colors/theme-colors colors/neutral-30 colors/neutral-60 override-theme))
|
||||
)
|
||||
(colors/theme-colors colors/neutral-80-opa-20 (colors/alpha colors/white 0.2))
|
||||
(colors/theme-colors colors/neutral-30 colors/neutral-60)))
|
||||
|
||||
(defn get-placeholder-color
|
||||
[blur? override-theme]
|
||||
[blur?]
|
||||
(if blur?
|
||||
(colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-30 override-theme)
|
||||
(colors/theme-colors colors/neutral-40 colors/neutral-50 override-theme)))
|
||||
(colors/theme-colors colors/neutral-80-opa-40 (colors/alpha colors/white 0.3))
|
||||
(colors/theme-colors colors/neutral-40 colors/neutral-50)))
|
||||
|
||||
(defn- get-disabled-color
|
||||
[blur? override-theme]
|
||||
[blur?]
|
||||
(if blur?
|
||||
(colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-30)
|
||||
(colors/theme-colors colors/neutral-40 colors/neutral-50 override-theme)))
|
||||
(colors/theme-colors colors/neutral-80-opa-40 (colors/alpha colors/white 0.3))
|
||||
(colors/theme-colors colors/neutral-40 colors/neutral-50)))
|
||||
|
||||
(defn- get-char-count-color
|
||||
[blur? override-theme]
|
||||
[blur?]
|
||||
(if blur?
|
||||
(colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40)
|
||||
(colors/theme-colors colors/neutral-40 colors/neutral-50 override-theme)))
|
||||
(colors/theme-colors colors/neutral-80-opa-40 (colors/alpha colors/white 0.4))
|
||||
(colors/theme-colors colors/neutral-40 colors/neutral-50)))
|
||||
|
||||
(defn get-selection-color
|
||||
[customization-color blur? override-theme]
|
||||
[customization-color blur?]
|
||||
(if blur?
|
||||
(colors/theme-colors colors/neutral-100 colors/white override-theme)
|
||||
(colors/custom-color customization-color (if (or (= :dark override-theme) colors/dark?) 60 50))))
|
||||
(colors/theme-colors colors/neutral-100 colors/white)
|
||||
(colors/custom-color customization-color (if colors/dark? 60 50))))
|
||||
|
||||
(def text-input-container {:flex 1})
|
||||
|
||||
@@ -38,12 +37,12 @@
|
||||
[disabled? blur? override-theme]
|
||||
{:text-align-vertical :bottom
|
||||
:color (if disabled?
|
||||
(get-disabled-color blur? override-theme)
|
||||
(get-disabled-color blur?)
|
||||
(colors/theme-colors colors/neutral-100 colors/white override-theme))})
|
||||
|
||||
(defn char-count
|
||||
[blur? override-theme]
|
||||
{:color (get-char-count-color blur? override-theme)})
|
||||
[blur?]
|
||||
{:color (get-char-count-color blur?)})
|
||||
|
||||
(def container
|
||||
{:flex-direction :row
|
||||
|
||||
@@ -45,21 +45,21 @@
|
||||
:editable (not disabled?)
|
||||
:max-length max-length
|
||||
:placeholder placeholder
|
||||
:selection-color (style/get-selection-color customization-color blur? override-theme)
|
||||
:selection-color (style/get-selection-color customization-color blur?)
|
||||
:placeholder-text-color (if @focused?
|
||||
(style/get-focused-placeholder-color blur? override-theme)
|
||||
(style/get-placeholder-color blur? override-theme))}]]
|
||||
(style/get-focused-placeholder-color blur?)
|
||||
(style/get-placeholder-color blur?))}]]
|
||||
[rn/view
|
||||
{:style style/counter-container}
|
||||
[text/text
|
||||
[text/text
|
||||
{:style (style/char-count blur? override-theme)
|
||||
{:style (style/char-count blur?)
|
||||
:size :paragraph-2}
|
||||
(pad-0
|
||||
(str
|
||||
(count @value)))]
|
||||
[text/text
|
||||
{:style (style/char-count blur? override-theme)
|
||||
{:style (style/char-count blur?)
|
||||
:size :paragraph-2}
|
||||
(str "/"
|
||||
(pad-0
|
||||
|
||||
@@ -62,4 +62,4 @@
|
||||
(not muted?)
|
||||
(not (pos? (int mentions-count)))
|
||||
unread-messages?)
|
||||
[unread-grey-dot :unviewed-messages-public])]]])
|
||||
[unread-grey-dot])]]])
|
||||
|
||||
@@ -203,8 +203,8 @@
|
||||
}
|
||||
}
|
||||
"
|
||||
[{:keys [container-style one-icon-align-left? horizontal-description?
|
||||
align-mid? page-nav-color page-nav-background-uri
|
||||
[{:keys [one-icon-align-left? horizontal-description? align-mid?
|
||||
page-nav-color page-nav-background-uri
|
||||
mid-section
|
||||
left-section
|
||||
right-section-buttons]}]
|
||||
@@ -222,14 +222,13 @@
|
||||
:left-icon (:left-icon mid-section)
|
||||
:avatar (:avatar mid-section)}]
|
||||
[rn/view
|
||||
{:style (cond-> (merge {:display :flex
|
||||
:flex-direction :row
|
||||
;; iPhone 11 Pro's height in Figma divided by Component height 56/1125
|
||||
:align-items :center
|
||||
:padding-horizontal 20
|
||||
:height 56
|
||||
:justify-content :space-between}
|
||||
container-style)
|
||||
{:style (cond-> {:display :flex
|
||||
:flex-direction :row
|
||||
;; iPhone 11 Pro's height in Figma divided by Component height 56/1125
|
||||
:align-items :center
|
||||
:padding-horizontal 20
|
||||
:height 56
|
||||
:justify-content :space-between}
|
||||
page-nav-background-uri (assoc :background-color page-nav-color)
|
||||
page-nav-color (assoc :background page-nav-background-uri))}
|
||||
[rn/view
|
||||
|
||||
@@ -11,14 +11,12 @@
|
||||
|
||||
(def small-container-style
|
||||
(merge default-container-style
|
||||
{:min-height 24
|
||||
:padding-horizontal 8
|
||||
{:padding-horizontal 8
|
||||
:padding-vertical 1}))
|
||||
|
||||
(def large-container-style
|
||||
(merge default-container-style
|
||||
{:min-height 32
|
||||
:padding-horizontal 11
|
||||
{:padding-horizontal 11
|
||||
:padding-vertical 4}))
|
||||
|
||||
(defn base-tag
|
||||
@@ -38,7 +36,6 @@
|
||||
:style (assoc (if (= size :small)
|
||||
small-container-style
|
||||
large-container-style)
|
||||
:align-self :flex-start
|
||||
:border-width 1
|
||||
:border-color border-color
|
||||
:background-color background-color)}
|
||||
@@ -48,11 +45,10 @@
|
||||
[rn/view
|
||||
{:style {:justify-content :center
|
||||
:align-items :center}}
|
||||
(when icon
|
||||
[icon/icon
|
||||
icon
|
||||
{:no-color true
|
||||
:size (if (= size :large) 20 12)}])]
|
||||
[icon/icon
|
||||
icon
|
||||
{:no-color true
|
||||
:size (if (= size :large) 20 12)}]]
|
||||
[text/text
|
||||
{:size paragraph-size
|
||||
:weight :medium
|
||||
@@ -60,11 +56,11 @@
|
||||
:color text-color}} label]]])))
|
||||
|
||||
(defn- positive
|
||||
[size theme label _ no-icon?]
|
||||
[size theme label _]
|
||||
[base-tag
|
||||
{:accessibility-label :status-tag-positive
|
||||
:size size
|
||||
:icon (when-not no-icon? :i/positive-state)
|
||||
:icon :i/positive-state
|
||||
:background-color colors/success-50-opa-10
|
||||
:border-color colors/success-50-opa-20
|
||||
:label label
|
||||
@@ -72,11 +68,11 @@
|
||||
:text-color (if (= theme :dark) colors/success-60 colors/success-50)}])
|
||||
|
||||
(defn- negative
|
||||
[size theme label _ no-icon?]
|
||||
[size theme label _]
|
||||
[base-tag
|
||||
{:accessibility-label :status-tag-negative
|
||||
:size size
|
||||
:icon (when-not no-icon? :i/negative-state)
|
||||
:icon :i/negative-state
|
||||
:background-color colors/danger-50-opa-10
|
||||
:border-color colors/danger-50-opa-20
|
||||
:label label
|
||||
@@ -84,15 +80,14 @@
|
||||
:text-color (if (= theme :light) colors/danger-50 colors/danger-60)}])
|
||||
|
||||
(defn- pending
|
||||
[size theme label blur? no-icon?]
|
||||
[size theme label blur?]
|
||||
[base-tag
|
||||
{:accessibility-label :status-tag-pending
|
||||
:size size
|
||||
:label label
|
||||
:icon (when-not no-icon?
|
||||
(if blur?
|
||||
:i/pending-dark-blur
|
||||
(if (= theme :light) :i/pending-light :i/pending-dark)))
|
||||
:icon (if blur?
|
||||
:i/pending-dark-blur
|
||||
(if (= theme :light) :i/pending-light :i/pending-dark))
|
||||
:background-color (if blur?
|
||||
colors/white-opa-5
|
||||
(colors/theme-colors colors/neutral-10 colors/neutral-80-opa-40 theme))
|
||||
@@ -105,7 +100,7 @@
|
||||
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}])
|
||||
|
||||
(defn status-tag
|
||||
[{:keys [status size override-theme label blur? no-icon?]}]
|
||||
[{:keys [status size override-theme label blur?]}]
|
||||
(when status
|
||||
(when-let [status-component (case (:type status)
|
||||
:positive positive
|
||||
@@ -116,5 +111,4 @@
|
||||
size
|
||||
(or override-theme (quo2.theme/get-theme))
|
||||
label
|
||||
blur?
|
||||
no-icon?])))
|
||||
blur?])))
|
||||
|
||||
@@ -117,7 +117,6 @@
|
||||
|
||||
;;;;Blur
|
||||
(def white-70-blur (alpha white 0.7))
|
||||
(def neutral-80-opa-1-blur (alpha "#192438" 0.1))
|
||||
(def neutral-5-opa-70-blur (alpha neutral-5 0.7))
|
||||
(def neutral-80-opa-80-blur (alpha "#192438" 0.8))
|
||||
(def neutral-90-opa-70-blur (alpha neutral-90 0.7))
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
(ns react-native.blur
|
||||
(:require ["@react-native-community/blur" :as blur]
|
||||
[react-native.platform :as platform]
|
||||
[reagent.core :as reagent]
|
||||
[react-native.core :as rn]))
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(def view (reagent/adapt-react-class (.-BlurView blur)))
|
||||
|
||||
;; blur view is currently not working correctly on Android.
|
||||
(def ios-view (if platform/ios? view rn/view))
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
Swipeable
|
||||
TouchableWithoutFeedback
|
||||
gestureHandlerRootHOC
|
||||
FlatList
|
||||
ScrollView)]
|
||||
FlatList)]
|
||||
[react-native.flat-list :as rn-flat-list]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
@@ -70,9 +69,6 @@
|
||||
children))
|
||||
|
||||
(def gesture-flat-list (reagent/adapt-react-class FlatList))
|
||||
|
||||
(defn flat-list
|
||||
[props]
|
||||
[gesture-flat-list (rn-flat-list/base-list-props props)])
|
||||
|
||||
(def scroll-view (reagent/adapt-react-class ScrollView))
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
cancelAnimation
|
||||
SlideInUp
|
||||
SlideOutUp
|
||||
LinearTransition
|
||||
runOnJS)]
|
||||
LinearTransition)]
|
||||
[reagent.core :as reagent]
|
||||
["react-native-redash" :refer (withPause)]
|
||||
[react-native.flat-list :as rn-flat-list]
|
||||
@@ -65,8 +64,6 @@
|
||||
(def with-pause withPause)
|
||||
(def cancel-animation cancelAnimation)
|
||||
|
||||
(def run-on-js runOnJS)
|
||||
|
||||
;; Easings
|
||||
(def bezier (.-bezier ^js Easing))
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
(if new-contact?
|
||||
(rf/merge cofx
|
||||
(contact/add-contact chat-key nickname ens-name)
|
||||
(navigation/navigate-to :contacts-list {}))
|
||||
(navigation/navigate-to-cofx :contacts-list {}))
|
||||
(chat/start-chat cofx chat-key ens-name))
|
||||
{:utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
|
||||
:content (case validation-result
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
(ns status-im.bottom-sheet.events
|
||||
(:require [utils.re-frame :as rf]))
|
||||
|
||||
(rf/defn show-bottom-sheet-old
|
||||
[{:keys [db]} {:keys [view options]}]
|
||||
{:dismiss-keyboard nil
|
||||
:show-bottom-sheet-overlay-old nil
|
||||
:db (assoc db
|
||||
:bottom-sheet/show? true
|
||||
:bottom-sheet/view view
|
||||
:bottom-sheet/options options)})
|
||||
|
||||
(rf/defn show-bottom-sheet-event
|
||||
{:events [:bottom-sheet/show-sheet-old]}
|
||||
[cofx view options]
|
||||
(show-bottom-sheet-old
|
||||
cofx
|
||||
{:view view
|
||||
:options options}))
|
||||
|
||||
(rf/defn hide-bottom-sheet-old
|
||||
{:events [:bottom-sheet/hide-old]}
|
||||
[{:keys [db]}]
|
||||
{:db (assoc db :bottom-sheet/show? false)
|
||||
:dismiss-bottom-sheet-overlay-old nil})
|
||||
|
||||
(rf/defn hide-bottom-sheet-navigation-overlay
|
||||
{:events [:bottom-sheet/hide-old-navigation-overlay]}
|
||||
[{}]
|
||||
{:dismiss-bottom-sheet-overlay-old nil})
|
||||
@@ -1,56 +0,0 @@
|
||||
(ns status-im.bottom-sheet.styles
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
|
||||
(def border-radius 20)
|
||||
|
||||
(defn handle
|
||||
[override-theme]
|
||||
{:position :absolute
|
||||
:top 8
|
||||
:width 32
|
||||
:height 4
|
||||
:background-color (colors/theme-colors colors/neutral-100 colors/white override-theme)
|
||||
:opacity 0.1
|
||||
:border-radius 100
|
||||
:align-self :center})
|
||||
|
||||
(def backdrop
|
||||
{:position :absolute
|
||||
:left 0
|
||||
:right 0
|
||||
:bottom 0
|
||||
:top 0
|
||||
:background-color colors/neutral-100})
|
||||
|
||||
(def container
|
||||
{:position :absolute
|
||||
:left 0
|
||||
:right 0
|
||||
:top 0
|
||||
:bottom 0
|
||||
:overflow :hidden})
|
||||
|
||||
(defn content-style
|
||||
[insets bottom-safe-area-spacing?]
|
||||
{:position :absolute
|
||||
:left 0
|
||||
:right 0
|
||||
:top 0
|
||||
:padding-top border-radius
|
||||
:padding-bottom (if bottom-safe-area-spacing? (:bottom insets) 0)})
|
||||
|
||||
(defn selected-background
|
||||
[override-theme]
|
||||
{:border-radius 12
|
||||
:padding-left 12
|
||||
:margin-horizontal 8
|
||||
:margin-bottom 10
|
||||
:height 48
|
||||
:background-color (colors/theme-colors colors/white colors/neutral-90 override-theme)})
|
||||
|
||||
(defn background
|
||||
[override-theme]
|
||||
{:background-color (colors/theme-colors colors/white colors/neutral-95 override-theme)
|
||||
:flex 1
|
||||
:border-top-left-radius border-radius
|
||||
:border-top-right-radius border-radius})
|
||||
@@ -1,240 +0,0 @@
|
||||
(ns status-im.bottom-sheet.view
|
||||
(:require [oops.core :refer [oget]]
|
||||
[quo.react :as react]
|
||||
[status-im.bottom-sheet.styles :as styles]
|
||||
[re-frame.core :as re-frame]
|
||||
[react-native.background-timer :as timer]
|
||||
[react-native.core :as rn]
|
||||
[react-native.gesture :as gesture]
|
||||
[react-native.hooks :as hooks]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[react-native.safe-area :as safe-area]
|
||||
[reagent.core :as reagent]
|
||||
[utils.worklets.bottom-sheet :as worklets.bottom-sheet]))
|
||||
|
||||
(def animation-delay 450)
|
||||
|
||||
(defn with-animation
|
||||
[value & [options callback]]
|
||||
(reanimated/with-spring
|
||||
value
|
||||
(clj->js (merge {:mass 2
|
||||
:stiffness 500
|
||||
:damping 200})
|
||||
options)
|
||||
callback))
|
||||
|
||||
(defn get-bottom-sheet-gesture
|
||||
[pan-y translate-y bg-height bg-height-expanded
|
||||
window-height keyboard-shown disable-drag? expandable?
|
||||
show-bottom-sheet? expanded? close-bottom-sheet gesture-running?]
|
||||
(-> (gesture/gesture-pan)
|
||||
(gesture/on-start
|
||||
(fn [_]
|
||||
(reset! gesture-running? true)
|
||||
(when (and keyboard-shown (not disable-drag?) show-bottom-sheet?)
|
||||
(re-frame/dispatch [:dismiss-keyboard]))))
|
||||
(gesture/on-update
|
||||
(fn [evt]
|
||||
(when (and (not disable-drag?) show-bottom-sheet?)
|
||||
(let [max-pan-up (if (or @expanded? (not expandable?))
|
||||
0
|
||||
(- (- bg-height-expanded bg-height)))
|
||||
max-pan-down (if @expanded?
|
||||
bg-height-expanded
|
||||
bg-height)]
|
||||
(reanimated/set-shared-value pan-y
|
||||
(max
|
||||
(min
|
||||
(.-translationY evt)
|
||||
max-pan-down)
|
||||
max-pan-up))))))
|
||||
(gesture/on-end
|
||||
(fn [_]
|
||||
(reset! gesture-running? false)
|
||||
(when (and (not disable-drag?) show-bottom-sheet?)
|
||||
(let [end-pan-y (- window-height (.-value translate-y))
|
||||
expand-threshold (min (* bg-height 1.1) (+ bg-height 50))
|
||||
collapse-threshold (max (* bg-height-expanded 0.9) (- bg-height-expanded 50))
|
||||
should-close-bottom-sheet? (< end-pan-y (max (* bg-height 0.7) 50))]
|
||||
(cond
|
||||
should-close-bottom-sheet?
|
||||
(close-bottom-sheet)
|
||||
|
||||
(and (not @expanded?) (> end-pan-y expand-threshold))
|
||||
(reset! expanded? true)
|
||||
|
||||
(and @expanded? (< end-pan-y collapse-threshold))
|
||||
(reset! expanded? false))))))))
|
||||
|
||||
(defn handle-comp
|
||||
[window-width override-theme]
|
||||
[rn/view
|
||||
{:style {:width window-width
|
||||
:position :absolute
|
||||
:background-color :transparent
|
||||
:top 0
|
||||
:height 20}}
|
||||
[rn/view {:style (styles/handle override-theme)}]])
|
||||
|
||||
(defn bottom-sheet
|
||||
[props children]
|
||||
(let [{on-cancel :on-cancel
|
||||
disable-drag? :disable-drag?
|
||||
show-handle? :show-handle?
|
||||
visible? :visible?
|
||||
backdrop-dismiss? :backdrop-dismiss?
|
||||
expandable? :expandable?
|
||||
bottom-safe-area-spacing? :bottom-safe-area-spacing?
|
||||
selected-item :selected-item
|
||||
is-initially-expanded? :expanded?
|
||||
override-theme :override-theme
|
||||
:or {show-handle? true
|
||||
backdrop-dismiss? true
|
||||
expandable? false
|
||||
bottom-safe-area-spacing? true
|
||||
is-initially-expanded? false}}
|
||||
props
|
||||
content-height (reagent/atom nil)
|
||||
show-bottom-sheet? (reagent/atom nil)
|
||||
keyboard-was-shown? (reagent/atom false)
|
||||
expanded? (reagent/atom is-initially-expanded?)
|
||||
gesture-running? (reagent/atom false)
|
||||
reset-atoms (fn []
|
||||
(reset! show-bottom-sheet? nil)
|
||||
(reset! content-height nil)
|
||||
(reset! expanded? false)
|
||||
(reset! keyboard-was-shown? false)
|
||||
(reset! gesture-running? false))
|
||||
close-bottom-sheet (fn []
|
||||
(reset! show-bottom-sheet? false)
|
||||
(when (fn? on-cancel) (on-cancel))
|
||||
(timer/set-timeout
|
||||
#(do
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old-navigation-overlay])
|
||||
(reset-atoms))
|
||||
animation-delay))]
|
||||
[safe-area/consumer
|
||||
(fn [insets]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [{height :height
|
||||
window-width :width}
|
||||
(rn/use-window-dimensions)
|
||||
window-height (if selected-item (- height 72) height)
|
||||
{:keys [keyboard-shown]} (hooks/use-keyboard)
|
||||
bg-height-expanded (- window-height (:top insets))
|
||||
bg-height (max (min @content-height bg-height-expanded) 109)
|
||||
bottom-sheet-dy (reanimated/use-shared-value 0)
|
||||
pan-y (reanimated/use-shared-value 0)
|
||||
translate-y (worklets.bottom-sheet/use-translate-y window-height bottom-sheet-dy pan-y)
|
||||
bg-opacity
|
||||
(worklets.bottom-sheet/use-background-opacity translate-y bg-height window-height 0.7)
|
||||
on-content-layout (fn [evt]
|
||||
(let [height (oget evt "nativeEvent" "layout" "height")]
|
||||
(reset! content-height height)))
|
||||
on-expanded (fn []
|
||||
(reanimated/set-shared-value bottom-sheet-dy bg-height-expanded)
|
||||
(reanimated/set-shared-value pan-y 0))
|
||||
on-collapsed (fn []
|
||||
(reanimated/set-shared-value bottom-sheet-dy bg-height)
|
||||
(reanimated/set-shared-value pan-y 0))
|
||||
bottom-sheet-gesture (get-bottom-sheet-gesture
|
||||
pan-y
|
||||
translate-y
|
||||
bg-height
|
||||
bg-height-expanded
|
||||
window-height
|
||||
keyboard-shown
|
||||
disable-drag?
|
||||
expandable?
|
||||
show-bottom-sheet?
|
||||
expanded?
|
||||
close-bottom-sheet
|
||||
gesture-running?)
|
||||
handle-comp [gesture/gesture-detector {:gesture bottom-sheet-gesture}
|
||||
[handle-comp window-width override-theme]]]
|
||||
|
||||
(react/effect! #(do
|
||||
(cond
|
||||
(and
|
||||
(nil? @show-bottom-sheet?)
|
||||
visible?
|
||||
(some? @content-height)
|
||||
(> @content-height 0))
|
||||
(reset! show-bottom-sheet? true)
|
||||
|
||||
(and @show-bottom-sheet? (not visible?))
|
||||
(close-bottom-sheet)))
|
||||
[@show-bottom-sheet? @content-height visible?])
|
||||
(react/effect! #(do
|
||||
(when @show-bottom-sheet?
|
||||
(cond
|
||||
keyboard-shown
|
||||
(do
|
||||
(reset! keyboard-was-shown? true)
|
||||
(reset! expanded? true))
|
||||
(and @keyboard-was-shown? (not keyboard-shown))
|
||||
(reset! expanded? false))))
|
||||
[@show-bottom-sheet? @keyboard-was-shown? keyboard-shown])
|
||||
(react/effect! #(do
|
||||
(when-not @gesture-running?
|
||||
(cond
|
||||
@show-bottom-sheet?
|
||||
(if @expanded?
|
||||
(do
|
||||
(reanimated/set-shared-value
|
||||
bottom-sheet-dy
|
||||
(with-animation (+ bg-height-expanded (.-value pan-y))))
|
||||
;; Workaround for
|
||||
;; https://github.com/software-mansion/react-native-reanimated/issues/1758#issue-817145741
|
||||
;; withTiming/withSpring callback not working
|
||||
;; on-expanded should be called as a callback of
|
||||
;; with-animation instead, once this issue has been resolved
|
||||
(timer/set-timeout on-expanded animation-delay))
|
||||
(do
|
||||
(reanimated/set-shared-value
|
||||
bottom-sheet-dy
|
||||
(with-animation (+ bg-height (.-value pan-y))))
|
||||
;; Workaround for
|
||||
;; https://github.com/software-mansion/react-native-reanimated/issues/1758#issue-817145741
|
||||
;; withTiming/withSpring callback not working
|
||||
;; on-collapsed should be called as a callback of
|
||||
;; with-animation instead, once this issue has been resolved
|
||||
(timer/set-timeout on-collapsed animation-delay)))
|
||||
|
||||
(= @show-bottom-sheet? false)
|
||||
(reanimated/set-shared-value bottom-sheet-dy (with-animation 0)))))
|
||||
[@show-bottom-sheet? @expanded? @gesture-running?])
|
||||
|
||||
[:<>
|
||||
[rn/touchable-without-feedback {:on-press (when backdrop-dismiss? close-bottom-sheet)}
|
||||
[reanimated/view
|
||||
{:style (reanimated/apply-animations-to-style
|
||||
{:opacity bg-opacity}
|
||||
styles/backdrop)}]]
|
||||
(cond->> [reanimated/view
|
||||
{:style (reanimated/apply-animations-to-style
|
||||
{:transform [{:translateY translate-y}]}
|
||||
{:width window-width
|
||||
:height window-height})}
|
||||
[rn/view {:style styles/container}
|
||||
(when selected-item
|
||||
[rn/view {:style (styles/selected-background override-theme)}
|
||||
[selected-item]])
|
||||
[rn/view {:style (styles/background override-theme)}
|
||||
[rn/keyboard-avoiding-view
|
||||
{:behaviour (if platform/ios? :padding :height)
|
||||
:style {:flex 1}}
|
||||
[rn/view
|
||||
{:style (styles/content-style insets bottom-safe-area-spacing?)
|
||||
:on-layout (when-not (and
|
||||
(some? @content-height)
|
||||
(> @content-height 0))
|
||||
on-content-layout)}
|
||||
children]]
|
||||
(when show-handle?
|
||||
handle-comp)]]]
|
||||
(not show-handle?)
|
||||
(conj [gesture/gesture-detector {:gesture bottom-sheet-gesture}]))]))])]))
|
||||
@@ -3,7 +3,7 @@
|
||||
["eth-phishing-detect" :as eth-phishing-detect]
|
||||
[clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im.browser.eip3085 :as eip3085]
|
||||
[status-im.browser.eip3326 :as eip3326]
|
||||
[status-im.browser.permissions :as browser.permissions]
|
||||
@@ -572,7 +572,7 @@
|
||||
[{:keys [db] :as cofx} address]
|
||||
(rf/merge cofx
|
||||
{:browser/clear-web-data nil}
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(browser.permissions/clear-dapps-permissions)
|
||||
(multiaccounts.update/multiaccount-update :dapps-address address {})
|
||||
#(when (= (:view-id db) :browser)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
:on-success #(re-frame/dispatch [:eip3085/send-success-call-to-bridge cofx id
|
||||
message-id])
|
||||
:on-error #(log/error "failed to perform settings_saveSetting" %)}]
|
||||
:dispatch [:bottom-sheet/hide-old]})
|
||||
:dispatch [:bottom-sheet/hide]})
|
||||
|
||||
(rf/defn deny-permission
|
||||
{:events [:eip3085.ui/dapp-permission-denied]}
|
||||
@@ -37,7 +37,7 @@
|
||||
:messageId message-id
|
||||
:error {:code 4001
|
||||
:message "User rejected the request."}}
|
||||
:dispatch [:bottom-sheet/hide-old]})
|
||||
:dispatch [:bottom-sheet/hide]})
|
||||
|
||||
(rf/defn handle-add-ethereum-chain
|
||||
{:events [:eip3085/handle-add-ethereum-chain]}
|
||||
@@ -64,7 +64,7 @@
|
||||
:id id
|
||||
:new-network network)]
|
||||
(if (network/chain-id-available? networks network)
|
||||
{:dispatch [:bottom-sheet/show-sheet-old
|
||||
{:dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[sheet/permissions-panel dapp-name message-id params])}]}
|
||||
(send-success-call-to-bridge cofx id message-id)))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
:messageId message-id
|
||||
:error {:code 4001
|
||||
:message "User rejected the request."}}
|
||||
:dispatch [:bottom-sheet/hide-old]})
|
||||
:dispatch [:bottom-sheet/hide]})
|
||||
|
||||
(rf/defn handle-switch-ethereum-chain
|
||||
{:events [:eip3326/handle-switch-ethereum-chain]}
|
||||
@@ -39,7 +39,7 @@
|
||||
:target-network-id target-network-id
|
||||
:network-from network-from
|
||||
:network-to network-to)]
|
||||
{:dispatch [:bottom-sheet/show-sheet-old
|
||||
{:dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[sheet/permissions-panel dapp-name message-id params])}]}))
|
||||
{:browser/send-to-bridge {:type constants/web3-send-async-callback
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
[status-im.async-storage.core :as async-storage]
|
||||
[status-im.ui.components.emoji-thumbnail.styles :as emoji-thumbnail-styles]
|
||||
[status-im.utils.universal-links.core :as universal-links]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.toasts.events :as toasts]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im2.contexts.activity-center.events :as activity-center]
|
||||
@@ -445,7 +445,7 @@
|
||||
[cofx id]
|
||||
(rf/merge cofx
|
||||
(reset-community-id-input id)
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(navigation/open-modal :invite-people-community {:invite? true})))
|
||||
|
||||
(rf/defn share-community-pressed
|
||||
@@ -453,7 +453,7 @@
|
||||
[cofx id]
|
||||
(rf/merge cofx
|
||||
(reset-community-id-input id)
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(navigation/open-modal :invite-people-community {})))
|
||||
|
||||
(rf/defn create-channel-pressed
|
||||
@@ -575,7 +575,7 @@
|
||||
{:events [::member-banned]}
|
||||
[cofx response-js]
|
||||
(rf/merge cofx
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(handle-response response-js)
|
||||
(activity-center/notifications-fetch-unread-count)))
|
||||
|
||||
@@ -596,7 +596,7 @@
|
||||
{:events [::member-kicked]}
|
||||
[cofx response-js]
|
||||
(rf/merge cofx
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(handle-response response-js)))
|
||||
|
||||
(rf/defn member-kick
|
||||
@@ -817,13 +817,13 @@
|
||||
[cofx community-id]
|
||||
(rf/merge cofx
|
||||
(navigation/pop-to-root :shell-stack)
|
||||
(navigation/navigate-to :community-overview community-id)))
|
||||
(navigation/navigate-to-cofx :community-overview community-id)))
|
||||
|
||||
(rf/defn member-role-updated
|
||||
{:events [:community.member/role-updated]}
|
||||
[cofx response-js]
|
||||
(rf/merge cofx
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(handle-response response-js)))
|
||||
|
||||
(rf/defn add-role-to-member
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
{:db (assoc db
|
||||
:group/selected-contacts #{}
|
||||
:new-chat-name "")}
|
||||
(navigation/navigate-to :contact-toggle-list nil)))
|
||||
(navigation/navigate-to-cofx :contact-toggle-list nil)))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
(:refer-clojure :exclude [name])
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.eip55 :as eip55]
|
||||
[status-im.ethereum.ens :as ens]
|
||||
@@ -121,7 +121,7 @@
|
||||
(let [{:keys [state username custom-domain?]} (:ens/registration db)]
|
||||
(case state
|
||||
(:available :owned)
|
||||
(navigation/navigate-to cofx :ens-checkout {})
|
||||
(navigation/navigate-to-cofx cofx :ens-checkout {})
|
||||
:connected-with-different-key
|
||||
(re-frame/dispatch [::set-pub-key])
|
||||
:connected
|
||||
@@ -261,7 +261,7 @@
|
||||
[{:keys [db] :as cofx} _ {:keys [address]}]
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:ens/registration :address] address)}
|
||||
(bottom-sheet/hide-bottom-sheet-old)))
|
||||
(bottom-sheet/hide-bottom-sheet)))
|
||||
|
||||
(rf/defn save-preferred-name
|
||||
{:events [::save-preferred-name]}
|
||||
@@ -311,14 +311,14 @@
|
||||
::resolve-pubkey
|
||||
[chain-id username
|
||||
#(re-frame/dispatch [::public-key-resolved username %])]}
|
||||
(navigation/navigate-to :ens-name-details username))))
|
||||
(navigation/navigate-to-cofx :ens-name-details username))))
|
||||
|
||||
(rf/defn start-registration
|
||||
{:events [::add-username-pressed ::get-started-pressed]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
(set-username-candidate (get-in db [:ens/registration :username] ""))
|
||||
(navigation/navigate-to :ens-search {})))
|
||||
(navigation/navigate-to-cofx :ens-search {})))
|
||||
|
||||
(rf/defn remove-username
|
||||
{:events [::remove-username]}
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
{:db (-> db
|
||||
(assoc :new-chat-name (get-in db [:chats chat-id :name]))
|
||||
(assoc :current-chat-id chat-id))}
|
||||
(navigation/navigate-to :group-chat-profile nil)))
|
||||
(navigation/navigate-to-cofx :group-chat-profile nil)))
|
||||
|
||||
(rf/defn ui-leave-chat-pressed
|
||||
{:events [:group-chats.ui/leave-chat-pressed]}
|
||||
@@ -256,5 +256,5 @@
|
||||
:content (i18n/label :t/leave-chat-confirmation)
|
||||
:confirm-button-text (i18n/label :t/leave)
|
||||
:on-accept #(do
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch [:group-chats.ui/leave-chat-confirmed chat-id]))}}))
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
{:db (-> db
|
||||
(assoc-in [:keycard :creating-backup?] backup-type))}
|
||||
(when (:multiaccount db)
|
||||
(navigation/navigate-to :my-profile nil))
|
||||
(navigation/navigate-to :seed-phrase nil)))
|
||||
(navigation/navigate-to-cofx :my-profile nil))
|
||||
(navigation/navigate-to-cofx :seed-phrase nil)))
|
||||
|
||||
(rf/defn recovery-card-pressed
|
||||
{:events [:keycard-settings.ui/recovery-card-pressed]}
|
||||
@@ -69,4 +69,4 @@
|
||||
(update :multiaccounts/key-storage dissoc :seed-phrase))
|
||||
:dismiss-keyboard nil}
|
||||
(common/listen-to-hardware-back-button)
|
||||
(navigation/navigate-to :keycard-onboarding-intro nil)))
|
||||
(navigation/navigate-to-cofx :keycard-onboarding-intro nil)))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
(common/clear-pin)
|
||||
(common/hide-connection-sheet)
|
||||
(if (get-in db [:keycard :pin :puk-restore?])
|
||||
(navigation/navigate-to :multiaccounts nil)
|
||||
(navigation/navigate-to-cofx :multiaccounts nil)
|
||||
(navigation/set-stack-root :profile-stack [:my-profile :keycard-settings]))))
|
||||
|
||||
(rf/defn change-pin
|
||||
@@ -150,7 +150,7 @@
|
||||
:content (i18n/label :t/pin-changed)}}
|
||||
(common/hide-connection-sheet)
|
||||
(if puk-restore?
|
||||
(navigation/navigate-to :multiaccounts nil)
|
||||
(navigation/navigate-to-cofx :multiaccounts nil)
|
||||
(navigation/set-stack-root :profile-stack [:my-profile :keycard-settings]))
|
||||
(when (:multiaccounts/login db)
|
||||
(common/get-keys-from-keycard)))))
|
||||
@@ -211,5 +211,5 @@
|
||||
:sign []
|
||||
:error-label :t/pin-mismatch))}
|
||||
(when (zero? pin-retries) (common/frozen-keycard-popup))
|
||||
(navigation/navigate-to :enter-pin-settings nil))
|
||||
(navigation/navigate-to-cofx :enter-pin-settings nil))
|
||||
(common/show-wrong-keycard-alert))))))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(ns status-im.keycard.common
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.keycard.nfc :as nfc]
|
||||
@@ -195,7 +195,8 @@
|
||||
connected?)
|
||||
(rf/merge
|
||||
cofx
|
||||
(bottom-sheet/show-bottom-sheet-old
|
||||
{:dismiss-keyboard true}
|
||||
(bottom-sheet/show-bottom-sheet
|
||||
{:view {:transparent platform/ios?
|
||||
:show-handle? false
|
||||
:backdrop-dismiss? false
|
||||
@@ -230,7 +231,7 @@
|
||||
{:db (assoc-in db [:keycard :card-read-in-progress?] false)}
|
||||
(restore-on-card-connected)
|
||||
(restore-on-card-read)
|
||||
(bottom-sheet/hide-bottom-sheet-old)))
|
||||
(bottom-sheet/hide-bottom-sheet)))
|
||||
|
||||
(rf/defn hide-connection-sheet
|
||||
[cofx]
|
||||
@@ -308,7 +309,7 @@
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:keycard :pin :current] [])}
|
||||
(navigation/navigate-to :enter-pin-settings nil)))
|
||||
(navigation/navigate-to-cofx :enter-pin-settings nil)))
|
||||
|
||||
(defn- tag-lost-exception?
|
||||
[code error]
|
||||
@@ -491,7 +492,7 @@
|
||||
(if login?
|
||||
(rf/merge cofx
|
||||
(clear-on-card-read)
|
||||
(navigation/navigate-to :not-keycard nil))
|
||||
(navigation/navigate-to-cofx :not-keycard nil))
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:keycard :application-info-error] error)}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
{:enter-step :original
|
||||
:original []
|
||||
:confirmation []}))}
|
||||
(navigation/navigate-to :keycard-onboarding-pin nil)))
|
||||
(navigation/navigate-to-cofx :keycard-onboarding-pin nil)))
|
||||
|
||||
(rf/defn load-recovery-pin-screen
|
||||
[{:keys [db] :as cofx}]
|
||||
@@ -66,7 +66,7 @@
|
||||
"instance-uid"
|
||||
instance-uid)
|
||||
(if (= flow :import)
|
||||
(navigation/navigate-to cofx :keycard-recovery-no-key nil)
|
||||
(navigation/navigate-to-cofx cofx :keycard-recovery-no-key nil)
|
||||
(if paired?
|
||||
(rf/merge cofx
|
||||
(common/listen-to-hardware-back-button)
|
||||
@@ -86,7 +86,7 @@
|
||||
(assoc-in [:keycard :pin :on-verified] nil)
|
||||
(assoc-in [:keycard :setup-step] nil))}
|
||||
(common/clear-on-card-connected)
|
||||
(navigation/navigate-to :keycard-settings nil)))
|
||||
(navigation/navigate-to-cofx :keycard-settings nil)))
|
||||
|
||||
(rf/defn password-option-pressed
|
||||
{:eevents [:keycard.ui/password-option-pressed]}
|
||||
@@ -272,7 +272,7 @@
|
||||
(not on-verified-failure))
|
||||
(when exporting?
|
||||
(navigation/navigate-back)))
|
||||
;(navigation/navigate-to :enter-pin-settings nil)))
|
||||
;(navigation/navigate-to-cofx :enter-pin-settings nil)))
|
||||
(when (zero? pin-retries) (common/frozen-keycard-popup))
|
||||
(when on-verified-failure
|
||||
(fn [_]
|
||||
@@ -505,7 +505,7 @@
|
||||
(when multiaccount
|
||||
(set-multiaccount-pairing multiaccount pairing paired-on))
|
||||
(when (= flow :login)
|
||||
(navigation/navigate-to :multiaccounts nil))
|
||||
(navigation/navigate-to-cofx :multiaccounts nil))
|
||||
(when (= flow :recovery)
|
||||
(onboarding/proceed-with-generating-key))
|
||||
(when (= flow :import)
|
||||
@@ -531,7 +531,7 @@
|
||||
:keycard/pair))
|
||||
(common/hide-connection-sheet)
|
||||
(when (= flow :import)
|
||||
(navigation/navigate-to :keycard-recovery-pair nil))
|
||||
(navigation/navigate-to-cofx :keycard-recovery-pair nil))
|
||||
(when (not= setup-step :enter-pair-code)
|
||||
(common/process-error code error))))))
|
||||
|
||||
@@ -579,7 +579,7 @@
|
||||
|
||||
(when (= card-state :pre-init)
|
||||
(if (= flow :import)
|
||||
(navigation/navigate-to :keycard-recovery-no-key nil)
|
||||
(navigation/navigate-to-cofx :keycard-recovery-no-key nil)
|
||||
(fn [cofx]
|
||||
(rf/merge
|
||||
cofx
|
||||
@@ -596,7 +596,7 @@
|
||||
|
||||
(when (= card-state :blank)
|
||||
(if (= flow :import)
|
||||
(navigation/navigate-to :keycard-recovery-no-key nil)
|
||||
(navigation/navigate-to-cofx :keycard-recovery-no-key nil)
|
||||
(show-no-keycard-applet-alert)))
|
||||
|
||||
(when (and (= card-state :multiaccount)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
(rf/defn reset-card-pressed
|
||||
{:events [:keycard-settings.ui/reset-card-pressed]}
|
||||
[cofx]
|
||||
(navigation/navigate-to cofx :reset-card nil))
|
||||
(navigation/navigate-to-cofx cofx :reset-card nil))
|
||||
|
||||
(rf/defn delete-card
|
||||
[{:keys [db] :as cofx}]
|
||||
@@ -20,7 +20,7 @@
|
||||
(rf/defn navigate-to-reset-card-screen
|
||||
{:events [:keycard/navigate-to-reset-card-screen]}
|
||||
[cofx]
|
||||
(navigation/navigate-to cofx :reset-card nil))
|
||||
(navigation/navigate-to-cofx cofx :reset-card nil))
|
||||
|
||||
(rf/defn reset-card-next-button-pressed
|
||||
{:events [:keycard-settings.ui/reset-card-next-button-pressed]}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
(ns status-im.keycard.login
|
||||
(:require [status-im.bottom-sheet.events :as bottom-sheet]
|
||||
(:require [status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.keycard.common :as common]
|
||||
status-im.keycard.fx
|
||||
@@ -22,13 +22,13 @@
|
||||
(rf/defn login-pin-more-icon-pressed
|
||||
{:events [:keycard.login.pin.ui/more-icon-pressed]}
|
||||
[cofx]
|
||||
(bottom-sheet/hide-bottom-sheet-old cofx))
|
||||
(bottom-sheet/show-bottom-sheet cofx {:view :keycard.login/more}))
|
||||
|
||||
(rf/defn login-create-key-pressed
|
||||
{:events [:keycard.login.ui/create-new-key-pressed]}
|
||||
[cofx]
|
||||
(rf/merge cofx
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(onboarding/start-onboarding-flow)))
|
||||
|
||||
(rf/defn login-add-key-pressed
|
||||
@@ -48,7 +48,7 @@
|
||||
(log/debug "[keycard] load-pair-card-pressed")
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:keycard :flow] :login)}
|
||||
(navigation/navigate-to :keycard-recovery-pair nil)))
|
||||
(navigation/navigate-to-cofx :keycard-recovery-pair nil)))
|
||||
|
||||
(rf/defn reset-pin
|
||||
{:events [::reset-pin]}
|
||||
@@ -70,11 +70,11 @@
|
||||
:status nil))
|
||||
:hide-popover nil})
|
||||
(when (:multiaccount db)
|
||||
(navigation/navigate-to :my-profile nil))
|
||||
(navigation/navigate-to-cofx :my-profile nil))
|
||||
(when-not (:multiaccounts/login db)
|
||||
(if (:popover/popover db)
|
||||
(navigation/navigate-replace :keycard-pin nil)
|
||||
(navigation/navigate-to :keycard-pin nil)))))
|
||||
(navigation/navigate-to-cofx :keycard-pin nil)))))
|
||||
|
||||
(rf/defn dismiss-frozen-keycard-popover
|
||||
{:events [::frozen-keycard-popover-dismissed]}
|
||||
@@ -107,22 +107,22 @@
|
||||
(empty? application-info)
|
||||
(rf/merge cofx
|
||||
(common/hide-connection-sheet)
|
||||
(navigation/navigate-to :not-keycard nil))
|
||||
(navigation/navigate-to-cofx :not-keycard nil))
|
||||
|
||||
(empty? key-uid)
|
||||
(rf/merge cofx
|
||||
(common/hide-connection-sheet)
|
||||
(navigation/navigate-to :keycard-blank nil))
|
||||
(navigation/navigate-to-cofx :keycard-blank nil))
|
||||
|
||||
multiaccount-mismatch?
|
||||
(rf/merge cofx
|
||||
(common/hide-connection-sheet)
|
||||
(navigation/navigate-to :keycard-wrong nil))
|
||||
(navigation/navigate-to-cofx :keycard-wrong nil))
|
||||
|
||||
(not paired?)
|
||||
(rf/merge cofx
|
||||
(common/hide-connection-sheet)
|
||||
(navigation/navigate-to :keycard-unpaired nil))
|
||||
(navigation/navigate-to-cofx :keycard-unpaired nil))
|
||||
|
||||
(and (zero? pin-retry-counter)
|
||||
(or (nil? puk-retry-counter)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
(rf/merge cofx
|
||||
{:utils/show-popup {:title (i18n/label :t/error)
|
||||
:content (i18n/label :t/something-went-wrong)}}
|
||||
(navigation/navigate-to :keycard-authentication-method nil))))))
|
||||
(navigation/navigate-to-cofx :keycard-authentication-method nil))))))
|
||||
|
||||
(rf/defn load-preparing-screen
|
||||
{:events [:keycard/load-preparing-screen]}
|
||||
@@ -120,7 +120,7 @@
|
||||
[cofx]
|
||||
(rf/merge cofx
|
||||
(recovery-phrase-start-confirmation)
|
||||
(navigation/navigate-to :keycard-onboarding-recovery-phrase-confirm-word1 nil)))
|
||||
(navigation/navigate-to-cofx :keycard-onboarding-recovery-phrase-confirm-word1 nil)))
|
||||
|
||||
(rf/defn recovery-phrase-next-word
|
||||
[{:keys [db]}]
|
||||
@@ -143,7 +143,7 @@
|
||||
:on-verified :keycard/generate-and-load-key
|
||||
:current []})
|
||||
(assoc-in [:keycard :setup-step] :loading-keys))}
|
||||
(navigation/navigate-to :keycard-onboarding-pin nil))
|
||||
(navigation/navigate-to-cofx :keycard-onboarding-pin nil))
|
||||
(load-finishing-screen cofx))))
|
||||
|
||||
(rf/defn recovery-phrase-confirm-word-next-pressed
|
||||
@@ -178,10 +178,10 @@
|
||||
(rf/merge cofx
|
||||
{:keycard/check-nfc-enabled nil}
|
||||
(if (= flow :import)
|
||||
(navigation/navigate-to :keycard-recovery-intro nil)
|
||||
(navigation/navigate-to-cofx :keycard-recovery-intro nil)
|
||||
(do
|
||||
(common/listen-to-hardware-back-button)
|
||||
(navigation/navigate-to :keycard-onboarding-intro nil))))))
|
||||
(navigation/navigate-to-cofx :keycard-onboarding-intro nil))))))
|
||||
|
||||
(rf/defn start-onboarding-flow
|
||||
{:events [:keycard/start-onboarding-flow]}
|
||||
@@ -190,7 +190,7 @@
|
||||
{:db (assoc-in db [:keycard :flow] :create)
|
||||
:keycard/check-nfc-enabled nil}
|
||||
(common/listen-to-hardware-back-button)
|
||||
(navigation/navigate-to :keycard-onboarding-intro nil)))
|
||||
(navigation/navigate-to-cofx :keycard-onboarding-intro nil)))
|
||||
|
||||
(rf/defn open-nfc-settings-pressed
|
||||
{:events [:keycard.onboarding.nfc-on/open-nfc-settings-pressed]}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(ns status-im.keycard.recovery
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.eip55 :as eip55]
|
||||
@@ -54,16 +54,16 @@
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
(assoc-in [:keycard :setup-step] :pair))
|
||||
:dispatch [:bottom-sheet/hide-old]}
|
||||
:dispatch [:bottom-sheet/hide]}
|
||||
(common/listen-to-hardware-back-button)
|
||||
(navigation/navigate-to :keycard-recovery-pair nil)))
|
||||
(navigation/navigate-to-cofx :keycard-recovery-pair nil)))
|
||||
|
||||
(rf/defn keycard-storage-selected-for-recovery
|
||||
{:events [:recovery.ui/keycard-storage-selected]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:keycard :flow] :recovery)}
|
||||
(navigation/navigate-to :keycard-recovery-enter-mnemonic nil)))
|
||||
(navigation/navigate-to-cofx :keycard-recovery-enter-mnemonic nil)))
|
||||
|
||||
(rf/defn start-import-flow
|
||||
{:events [::recover-with-keycard-pressed]}
|
||||
@@ -74,13 +74,13 @@
|
||||
(assoc-in [:keycard :flow] :import)
|
||||
(assoc :recovered-account? true))
|
||||
:keycard/check-nfc-enabled nil}
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(navigation/navigate-to :keycard-recovery-intro nil)))
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(navigation/navigate-to-cofx :keycard-recovery-intro nil)))
|
||||
|
||||
(rf/defn access-key-pressed
|
||||
{:events [:multiaccounts.recover.ui/recover-multiaccount-button-pressed]}
|
||||
[_]
|
||||
{:dispatch [:bottom-sheet/show-sheet-old :recover-sheet]})
|
||||
{:dispatch [:bottom-sheet/show-sheet :recover-sheet]})
|
||||
|
||||
(rf/defn recovery-keycard-selected
|
||||
{:events [:recovery.ui/keycard-option-pressed]}
|
||||
@@ -89,7 +89,7 @@
|
||||
{:db (assoc-in db [:keycard :flow] :recovery)
|
||||
:keycard/check-nfc-enabled nil}
|
||||
(common/listen-to-hardware-back-button)
|
||||
(navigation/navigate-to :keycard-onboarding-intro nil)))
|
||||
(navigation/navigate-to-cofx :keycard-onboarding-intro nil)))
|
||||
|
||||
(rf/defn cancel-pressed
|
||||
{:events [::cancel-pressed]}
|
||||
@@ -126,10 +126,10 @@
|
||||
:keycard dissoc
|
||||
:multiaccount-wallet-address
|
||||
:multiaccount-whisper-public-key)}
|
||||
(navigation/navigate-to (if platform/android?
|
||||
:notifications-settings
|
||||
:welcome)
|
||||
nil)))
|
||||
(navigation/navigate-to-cofx (if platform/android?
|
||||
:notifications-settings
|
||||
:welcome)
|
||||
nil)))
|
||||
|
||||
(rf/defn intro-wizard
|
||||
{:events [:multiaccounts.create.ui/intro-wizard]}
|
||||
@@ -141,7 +141,7 @@
|
||||
(dissoc :restored-account?))}
|
||||
(multiaccounts.create/prepare-intro-wizard)
|
||||
(if (pos? (count accs))
|
||||
(navigation/navigate-to :get-your-keys nil)
|
||||
(navigation/navigate-to-cofx :get-your-keys nil)
|
||||
(navigation/set-stack-root :onboarding [:get-your-keys])))))
|
||||
|
||||
(rf/defn recovery-no-key
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
:content (i18n/label :t/card-unpaired)}}
|
||||
(common/clear-on-card-connected)
|
||||
(remove-pairing-from-multiaccount nil)
|
||||
(navigation/navigate-to :keycard-settings nil))))
|
||||
(navigation/navigate-to-cofx :keycard-settings nil))))
|
||||
|
||||
(rf/defn on-unpair-error
|
||||
{:events [:keycard.callback/on-unpair-error]}
|
||||
@@ -103,7 +103,7 @@
|
||||
:utils/show-popup {:title ""
|
||||
:content (i18n/label :t/something-went-wrong)}}
|
||||
(common/clear-on-card-connected)
|
||||
(navigation/navigate-to :keycard-settings nil)))
|
||||
(navigation/navigate-to-cofx :keycard-settings nil)))
|
||||
|
||||
(rf/defn remove-key-with-unpair
|
||||
{:events [:keycard/remove-key-with-unpair]}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
(ns status-im.keycard.wallet
|
||||
(:require [status-im.bottom-sheet.events :as bottom-sheet]
|
||||
(:require [status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.eip55 :as eip55]
|
||||
@@ -17,7 +17,7 @@
|
||||
(assoc-in [:keycard :pin :enter-step] :export-key)
|
||||
(update-in [:keycard :pin] dissoc :export-key))
|
||||
:dismiss-keyboard nil}
|
||||
(bottom-sheet/show-bottom-sheet-old {:view {:content add-new.views/pin}})))
|
||||
(bottom-sheet/show-bottom-sheet {:view {:content add-new.views/pin}})))
|
||||
|
||||
(rf/defn verify-pin-with-delay
|
||||
[cofx]
|
||||
@@ -29,7 +29,7 @@
|
||||
(rf/defn hide-pin-sheet
|
||||
{:events [:keycard/new-account-pin-sheet-hide]}
|
||||
[cofx]
|
||||
(bottom-sheet/hide-bottom-sheet-old cofx))
|
||||
(bottom-sheet/hide-bottom-sheet cofx))
|
||||
|
||||
(rf/defn generate-new-keycard-account
|
||||
{:events [:wallet.accounts/generate-new-keycard-account]}
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
(set-input :id id)
|
||||
(set-input :url (str url))
|
||||
(set-input :name (str name))
|
||||
(navigation/navigate-to :edit-mailserver nil))))
|
||||
(navigation/navigate-to-cofx :edit-mailserver nil))))
|
||||
|
||||
(defn mailserver->rpc
|
||||
[mailserver current-fleet]
|
||||
@@ -411,4 +411,4 @@
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
{:db (dissoc db :mailserver.edit/mailserver)}
|
||||
(navigation/navigate-to :edit-mailserver nil)))
|
||||
(navigation/navigate-to-cofx :edit-mailserver nil)))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
(ns status-im.mobile-sync-settings.core
|
||||
(:require [status-im.bottom-sheet.events :as bottom-sheet]
|
||||
(:require [status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.contexts.add-new-contact.events :as add-new-contact]
|
||||
[status-im.mailserver.core :as mailserver]
|
||||
[status-im.multiaccounts.model :as multiaccounts.model]
|
||||
@@ -33,7 +33,7 @@
|
||||
(not remember-syncing-choice?)
|
||||
(not= :create-multiaccount (:view-id db)))
|
||||
|
||||
[(bottom-sheet/show-bottom-sheet-old
|
||||
[(bottom-sheet/show-bottom-sheet
|
||||
{:view :mobile-network})
|
||||
(sheet-defaults)]
|
||||
|
||||
@@ -42,13 +42,13 @@
|
||||
;; no reason to restart wallet.
|
||||
(and logged-in? initialized?)
|
||||
[(mailserver/process-next-messages-request)
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(wallet/restart-wallet-service nil)
|
||||
(add-new-contact/set-new-identity-reconnected)]
|
||||
|
||||
logged-in?
|
||||
[(mailserver/process-next-messages-request)
|
||||
(bottom-sheet/hide-bottom-sheet-old)]))))
|
||||
(bottom-sheet/hide-bottom-sheet)]))))
|
||||
|
||||
(defn apply-settings
|
||||
([sync?] (apply-settings sync? :default))
|
||||
@@ -115,10 +115,12 @@
|
||||
[cofx]
|
||||
(rf/merge
|
||||
cofx
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(navigation/navigate-to :mobile-network-settings nil)))
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(navigation/navigate-to-cofx :mobile-network-settings nil)))
|
||||
|
||||
(rf/defn mobile-network-show-offline-sheet
|
||||
{:events [:mobile-network/show-offline-sheet]}
|
||||
[cofx]
|
||||
(bottom-sheet/hide-bottom-sheet-old cofx))
|
||||
(bottom-sheet/show-bottom-sheet
|
||||
cofx
|
||||
{:view :mobile-network-offline}))
|
||||
|
||||
@@ -125,28 +125,6 @@
|
||||
(fn [[cb options]]
|
||||
(authenticate-fx #(cb %) options)))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:biometric/enable-and-save-password
|
||||
(fn [{:keys [key-uid
|
||||
masked-password
|
||||
on-success
|
||||
on-error]}]
|
||||
(-> (keychain/save-user-password!
|
||||
key-uid
|
||||
masked-password)
|
||||
(.then
|
||||
(fn [_]
|
||||
(keychain/save-auth-method!
|
||||
key-uid
|
||||
keychain/auth-method-biometric)))
|
||||
(.then
|
||||
(fn [_]
|
||||
(when on-success
|
||||
(on-success))))
|
||||
(.catch (fn [error]
|
||||
(when on-error
|
||||
(on-error error)))))))
|
||||
|
||||
(rf/defn update-biometric
|
||||
[{db :db :as cofx} biometric-auth?]
|
||||
(let [key-uid (or (get-in db [:multiaccount :key-uid])
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
(:require [clojure.string :as string]
|
||||
[quo.platform :as platform]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im.multiaccounts.update.core :as multiaccounts.update]
|
||||
[status-im.native-module.core :as native-module]
|
||||
[utils.re-frame :as rf]
|
||||
@@ -44,7 +44,6 @@
|
||||
(let [me? (= (:public-key current-multiaccount) identity)]
|
||||
(if me?
|
||||
[(or (:preferred-name current-multiaccount)
|
||||
(:primary-name contact)
|
||||
(gfycat/generate-gfy identity))]
|
||||
[(:primary-name contact) (:secondary-name contact)])))
|
||||
|
||||
@@ -147,12 +146,12 @@
|
||||
[:dark :light colors/neutral-100]
|
||||
[:light :dark colors/white])]
|
||||
(theme/set-theme theme)
|
||||
(re-frame/dispatch [:change-shell-status-bar-style
|
||||
(re-frame/dispatch [:change-root-status-bar-style
|
||||
(if (shell.animation/home-stack-open?) status-bar-theme :light)])
|
||||
(when reload-ui?
|
||||
(hot-reload/reload)
|
||||
(when-not (= view-id :shell-stack)
|
||||
(re-frame/dispatch [:change-shell-nav-bar-color nav-bar-color]))))))
|
||||
(re-frame/dispatch [:change-root-nav-bar-color nav-bar-color]))))))
|
||||
|
||||
(rf/defn switch-appearance
|
||||
{:events [:multiaccounts.ui/appearance-switched]}
|
||||
@@ -198,7 +197,7 @@
|
||||
:params [key-uid (clean-path path) ax ay bx by]
|
||||
;; NOTE: In case of an error we can show a toast error
|
||||
:on-success #(re-frame/dispatch [::update-local-picture %])}]}
|
||||
(bottom-sheet/hide-bottom-sheet-old))))
|
||||
(bottom-sheet/hide-bottom-sheet))))
|
||||
|
||||
(rf/defn save-profile-picture-from-url
|
||||
{:events [::save-profile-picture-from-url]}
|
||||
@@ -209,7 +208,7 @@
|
||||
:params [key-uid url]
|
||||
:on-error #(log/error "::save-profile-picture-from-url error" %)
|
||||
:on-success #(re-frame/dispatch [::update-local-picture %])}]}
|
||||
(bottom-sheet/hide-bottom-sheet-old))))
|
||||
(bottom-sheet/hide-bottom-sheet))))
|
||||
|
||||
(comment
|
||||
(re-frame/dispatch
|
||||
@@ -227,7 +226,7 @@
|
||||
;; with a toast error
|
||||
:on-success #(log/info "[multiaccount] Delete profile image" %)}]}
|
||||
(multiaccounts.update/optimistic :images nil)
|
||||
(bottom-sheet/hide-bottom-sheet-old))))
|
||||
(bottom-sheet/hide-bottom-sheet))))
|
||||
|
||||
(rf/defn get-profile-picture
|
||||
[cofx]
|
||||
|
||||
@@ -94,16 +94,16 @@
|
||||
(rf/defn multiaccount-generate-and-derive-addresses-success
|
||||
{:events [:multiaccount-generate-and-derive-addresses-success]}
|
||||
[{:keys [db]} result]
|
||||
{:db (update db
|
||||
:intro-wizard
|
||||
(fn [data]
|
||||
(-> data
|
||||
(dissoc :processing?)
|
||||
(assoc :multiaccounts result
|
||||
:selected-storage-type :default
|
||||
:selected-id (-> result first :id)
|
||||
:step :choose-key))))
|
||||
:navigate-to :choose-name})
|
||||
{:db (update db
|
||||
:intro-wizard
|
||||
(fn [data]
|
||||
(-> data
|
||||
(dissoc :processing?)
|
||||
(assoc :multiaccounts result
|
||||
:selected-storage-type :default
|
||||
:selected-id (-> result first :id)
|
||||
:step :choose-key))))
|
||||
:navigate-to-fx :choose-name})
|
||||
|
||||
(rf/defn generate-and-derive-addresses
|
||||
{:events [:generate-and-derive-addresses]}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(ns status-im.multiaccounts.key-storage.core
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.mnemonic :as mnemonic]
|
||||
[utils.i18n :as i18n]
|
||||
@@ -22,7 +22,7 @@
|
||||
"This event can be dispatched before login and from profile and needs to redirect accordingly"
|
||||
{:events [::key-and-storage-management-pressed]}
|
||||
[cofx]
|
||||
(navigation/navigate-to
|
||||
(navigation/navigate-to-cofx
|
||||
cofx
|
||||
(if (multiaccounts.model/logged-in? cofx)
|
||||
:actions-logged-in
|
||||
@@ -60,7 +60,7 @@
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (assoc db :recovered-account? true)}
|
||||
(navigation/navigate-to :seed-phrase nil)))
|
||||
(navigation/navigate-to-cofx :seed-phrase nil)))
|
||||
|
||||
(rf/defn seed-phrase-input-changed
|
||||
{:events [::seed-phrase-input-changed]}
|
||||
@@ -85,7 +85,7 @@
|
||||
(let [backup? (get-in db [:keycard :creating-backup?])]
|
||||
(if backup?
|
||||
(keycard.backup/start-keycard-backup cofx)
|
||||
(navigation/navigate-to cofx :storage nil))))
|
||||
(navigation/navigate-to-cofx cofx :storage nil))))
|
||||
|
||||
(defn validate-seed-against-key-uid
|
||||
"Check if the key-uid was generated with the given seed-phrase"
|
||||
@@ -173,7 +173,7 @@ We don't need to take the exact steps, just set the required state and redirect
|
||||
"
|
||||
(rf/defn import-multiaccount
|
||||
[{:keys [db] :as cofx}]
|
||||
{:dispatch [:bottom-sheet/hide-old]
|
||||
{:dispatch [:bottom-sheet/hide]
|
||||
::multiaccounts.recover/import-multiaccount
|
||||
{:passphrase (get-in db [:multiaccounts/key-storage :seed-phrase])
|
||||
:password nil
|
||||
@@ -183,7 +183,7 @@ We don't need to take the exact steps, just set the required state and redirect
|
||||
{:events [::delete-multiaccount-and-init-keycard-onboarding]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge
|
||||
{:dispatch [:bottom-sheet/hide-old]
|
||||
{:dispatch [:bottom-sheet/hide]
|
||||
:db (assoc-in db [:multiaccounts/key-storage :reset-db-checked?] true)}
|
||||
(import-multiaccount)))
|
||||
|
||||
@@ -192,7 +192,7 @@ We don't need to take the exact steps, just set the required state and redirect
|
||||
[{:keys [db] :as cofx}]
|
||||
(if (get-in db [:multiaccounts/key-storage :reset-db-checked?])
|
||||
(popover/show-popover cofx {:view :transfer-multiaccount-to-keycard-warning})
|
||||
(bottom-sheet/hide-bottom-sheet-old cofx)))
|
||||
(bottom-sheet/show-bottom-sheet cofx {:view :migrate-account-password})))
|
||||
|
||||
(rf/defn skip-password-pressed
|
||||
{:events [::skip-password-pressed]}
|
||||
@@ -248,14 +248,14 @@ We don't need to take the exact steps, just set the required state and redirect
|
||||
(dissoc :multiaccounts/key-storage))}
|
||||
(popover/hide-popover)
|
||||
(common/listen-to-hardware-back-button)
|
||||
(navigation/navigate-to :keycard-onboarding-intro nil)))
|
||||
(navigation/navigate-to-cofx :keycard-onboarding-intro nil)))
|
||||
|
||||
(rf/defn goto-multiaccounts-screen
|
||||
{:events [::hide-popover-and-goto-multiaccounts-screen]}
|
||||
[cofx _]
|
||||
(rf/merge cofx
|
||||
(popover/hide-popover)
|
||||
(navigation/navigate-to :multiaccounts nil)))
|
||||
(navigation/navigate-to-cofx :multiaccounts nil)))
|
||||
|
||||
(rf/defn confirm-logout-and-goto-key-storage
|
||||
{:events [::confirm-logout-and-goto-key-storage]}
|
||||
|
||||
@@ -480,7 +480,7 @@
|
||||
(re-frame/dispatch [:syncing/pairing-completed])
|
||||
|
||||
(get db :onboarding-2/new-account?)
|
||||
(re-frame/dispatch [:onboarding-2/finalize-setup])
|
||||
(re-frame/dispatch [:navigate-to :enable-notifications])
|
||||
|
||||
(get db :tos/accepted?)
|
||||
(re-frame/dispatch [:init-root :shell-stack])
|
||||
@@ -621,12 +621,12 @@
|
||||
(if password
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (update-in db
|
||||
[:multiaccounts/login]
|
||||
assoc
|
||||
:password password
|
||||
:save-password? true)
|
||||
:set-root :progress}
|
||||
{:db (update-in db
|
||||
[:multiaccounts/login]
|
||||
assoc
|
||||
:password password
|
||||
:save-password? true)
|
||||
:init-root-fx :progress}
|
||||
login)
|
||||
(rf/merge
|
||||
cofx
|
||||
@@ -636,10 +636,10 @@
|
||||
(assoc-in [:keycard :pin :status] nil)
|
||||
(assoc-in [:keycard :pin :login] []))})
|
||||
#(if keycard-account?
|
||||
{:set-root :multiaccounts-keycard}
|
||||
{:set-root :profiles})
|
||||
{:init-root-fx :multiaccounts-keycard}
|
||||
{:init-root-fx :profiles})
|
||||
#(when goto-key-storage?
|
||||
(navigation/navigate-to % :actions-not-logged-in nil))))))
|
||||
(navigation/navigate-to-cofx % :actions-not-logged-in nil))))))
|
||||
|
||||
(rf/defn get-credentials
|
||||
[{:keys [db] :as cofx} key-uid]
|
||||
@@ -725,7 +725,7 @@
|
||||
(rf/defn welcome-lets-go
|
||||
{:events [:welcome-lets-go]}
|
||||
[_]
|
||||
{:set-root :shell-stack})
|
||||
{:init-root-fx :shell-stack})
|
||||
|
||||
(rf/defn multiaccount-selected
|
||||
{:events [:multiaccounts.login.ui/multiaccount-selected]}
|
||||
@@ -738,7 +738,7 @@
|
||||
cofx
|
||||
(merge
|
||||
{:db (update db :keycard dissoc :application-info)}
|
||||
(when keycard-multiaccount? {:navigate-to :keycard-login-pin}))
|
||||
(when keycard-multiaccount? {:navigate-to-fx :keycard-login-pin}))
|
||||
(open-login (select-keys multiaccount [:key-uid :name :public-key :identicon :images])))))
|
||||
|
||||
(rf/defn hide-keycard-banner
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
[{:keys [db] :as cofx} {:keys [auth-method logout?]}]
|
||||
(let [key-uid (get-in db [:multiaccount :key-uid])]
|
||||
(rf/merge cofx
|
||||
{:set-root :progress
|
||||
{:init-root-fx :progress
|
||||
:chat.ui/clear-inputs nil
|
||||
:chat.ui/clear-inputs-old nil
|
||||
:shell/reset-bottom-tabs nil
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(ns status-im.multiaccounts.recover.core
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.mnemonic :as mnemonic]
|
||||
@@ -142,7 +142,7 @@
|
||||
:step :recovery-success)}
|
||||
(when (existing-account? multiaccounts key-uid)
|
||||
(show-existing-multiaccount-alert key-uid))
|
||||
(navigation/navigate-to :recover-multiaccount-success nil))))
|
||||
(navigation/navigate-to-cofx :recover-multiaccount-success nil))))
|
||||
|
||||
(rf/defn enter-phrase-pressed
|
||||
{:events [::enter-phrase-pressed]}
|
||||
@@ -159,8 +159,8 @@
|
||||
:forward-action :multiaccounts.recover/enter-phrase-next-pressed}
|
||||
:recovered-account? true)
|
||||
(update :keycard dissoc :flow))}
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(navigation/navigate-to :recover-multiaccount-enter-phrase nil)))
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(navigation/navigate-to-cofx :recover-multiaccount-enter-phrase nil)))
|
||||
|
||||
(rf/defn proceed-to-import-mnemonic
|
||||
{:events [:multiaccounts.recover/phrase-validated]}
|
||||
@@ -234,7 +234,7 @@
|
||||
{:dispatch [:recovery.ui/keycard-option-pressed]}
|
||||
(rf/merge cofx
|
||||
{:db (update db :intro-wizard assoc :step :create-code)}
|
||||
(navigation/navigate-to :create-password nil)))))
|
||||
(navigation/navigate-to-cofx :create-password nil)))))
|
||||
|
||||
(rf/defn re-encrypt-pressed
|
||||
{:events [:multiaccounts.recover/re-encrypt-pressed]}
|
||||
@@ -246,7 +246,7 @@
|
||||
:step :select-key-storage
|
||||
:selected-storage-type :default)}
|
||||
(if (nfc/nfc-supported?)
|
||||
(navigation/navigate-to :select-key-storage nil)
|
||||
(navigation/navigate-to-cofx :select-key-storage nil)
|
||||
(select-storage-next-pressed))))
|
||||
|
||||
(rf/defn confirm-password-next-button-pressed
|
||||
|
||||
@@ -628,6 +628,6 @@
|
||||
[]
|
||||
(.keystoreDir ^js (status)))
|
||||
|
||||
(defn log-file-directory
|
||||
(defn log-file-path
|
||||
[]
|
||||
(.logFileDirectory ^js (status)))
|
||||
(.logFilePath ^js (status)))
|
||||
|
||||
@@ -202,4 +202,4 @@
|
||||
(rf/defn open-network-details
|
||||
{:events [::network-entry-pressed]}
|
||||
[cofx network]
|
||||
(navigation/navigate-to cofx :network-details {:networks/selected-network network}))
|
||||
(navigation/navigate-to-cofx cofx :network-details {:networks/selected-network network}))
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
:MailserversConfig {:Enabled true}
|
||||
:EnableNTPSync true
|
||||
:WakuConfig
|
||||
{:Enabled (not wakuv2-enabled)
|
||||
{:Enabled true
|
||||
:BloomFilterMode waku-bloom-filter-mode
|
||||
:LightClient true
|
||||
:MinimumPoW 0.000001}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:pairing/prompt-user-pop-up] false)}
|
||||
(navigation/navigate-to :installations nil)))
|
||||
(navigation/navigate-to-cofx :installations nil)))
|
||||
|
||||
(rf/defn prompt-user-on-new-installation
|
||||
[{:keys [db]}]
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
(and public-key own)
|
||||
(rf/merge cofx
|
||||
{:pop-to-root-fx :shell-stack}
|
||||
(navigation/navigate-to :my-profile nil))
|
||||
(navigation/navigate-to-cofx :my-profile nil))
|
||||
|
||||
(and public-key (not own))
|
||||
(rf/merge cofx
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(ns status-im.signing.gas
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.popover.core :as popover]
|
||||
@@ -277,7 +277,7 @@
|
||||
max-priority-fee})]
|
||||
(rf/merge cofx
|
||||
{:db (assoc db :signing/edit-fee edit-fee)}
|
||||
(bottom-sheet/show-bottom-sheet-old {:view sheet-opts}))))
|
||||
(bottom-sheet/show-bottom-sheet {:view sheet-opts}))))
|
||||
|
||||
(rf/defn submit-fee
|
||||
{:events [:signing.edit-fee.ui/submit]}
|
||||
@@ -300,14 +300,14 @@
|
||||
:maxFeePerGas (money/->wei :gwei (:value-number maxFeePerGas))
|
||||
:maxPriorityFeePerGas (money/->wei :gwei
|
||||
(:value-number maxPriorityFeePerGas)))}
|
||||
(bottom-sheet/hide-bottom-sheet-old)))))
|
||||
(bottom-sheet/hide-bottom-sheet)))))
|
||||
|
||||
(rf/defn submit-nonce
|
||||
{:events [:signing.nonce/submit]}
|
||||
[{db :db :as cofx} nonce]
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:signing/tx :nonce] (if (string/blank? nonce) nil nonce))}
|
||||
(bottom-sheet/hide-bottom-sheet-old)))
|
||||
(bottom-sheet/hide-bottom-sheet)))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:signing/update-gas-price
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch event))
|
||||
|
||||
(defview connectivity-sheet
|
||||
@@ -187,6 +187,6 @@
|
||||
[quo/button
|
||||
{:type :icon
|
||||
:accessibility-label (str "conn-button-" (name icon))
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content connectivity-sheet}])
|
||||
:theme (if (= (:peers state) :offline) :negative :secondary)} icon])))
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
:icon :main-icons/share
|
||||
:accessibility-label accessibility-label
|
||||
:on-press (fn []
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(js/setTimeout
|
||||
#(re-frame/dispatch [::invite.events/share-link nil])
|
||||
250))}])
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
[modal? {:keys [on-press label icon]}]
|
||||
(cond-> {:icon (if modal? :i/close :i/arrow-left)
|
||||
:accessibility-label :back-button
|
||||
:on-press #(re-frame/dispatch [:navigate-back :bottom-sheet/hide-old])}
|
||||
:on-press #(re-frame/dispatch [:navigate-back :bottom-sheet/hide])}
|
||||
on-press
|
||||
(assoc :on-press on-press)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(js/setTimeout #(re-frame/dispatch event) 200))
|
||||
|
||||
(defn list-item
|
||||
@@ -30,7 +30,7 @@
|
||||
:on-press #(re-frame/dispatch [:browser.ui/open-url url])
|
||||
:on-long-press (fn []
|
||||
(re-frame/dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[react/view {:flex 1}
|
||||
[quo/list-item
|
||||
@@ -109,7 +109,7 @@
|
||||
[quo/button
|
||||
{:accessibility-label :select-account
|
||||
:type :scale
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (accounts/accounts-list accounts
|
||||
dapps-account)}])}
|
||||
[react/view (styles/dapps-account color)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch event))
|
||||
|
||||
(defn wallet-connection
|
||||
@@ -81,7 +81,7 @@
|
||||
:accessibility-label :share
|
||||
:icon :main-icons/share
|
||||
:on-press (fn []
|
||||
(re-frame/dispatch-sync [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch-sync [:bottom-sheet/hide])
|
||||
(js/setTimeout
|
||||
#(browser/share-link url)
|
||||
200))}]
|
||||
@@ -103,7 +103,7 @@
|
||||
:accessibility-label :connected-account
|
||||
:chevron true
|
||||
:on-press #(hide-sheet-and-dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (wallet-connection (http/url-host url) account)}])}]
|
||||
[quo/list-item
|
||||
{:theme :accent
|
||||
|
||||
@@ -2,18 +2,13 @@
|
||||
(:require [utils.re-frame :as rf]
|
||||
[status-im.ui.screens.browser.empty-tab.views :as empty-tab]
|
||||
[status-im.ui.screens.browser.views :as browser]
|
||||
[status-im.ui.screens.browser.tabs.views :as tabs]
|
||||
[react-native.safe-area :as safe-area]
|
||||
[react-native.core :as rn]))
|
||||
[status-im.ui.screens.browser.tabs.views :as tabs]))
|
||||
|
||||
(defn browser-stack
|
||||
[]
|
||||
(let [screen-id (rf/sub [:browser/screen-id])]
|
||||
[safe-area/consumer
|
||||
(fn [{:keys [top]}]
|
||||
[rn/view {:padding-top top :flex 1}
|
||||
(case screen-id
|
||||
:empty-tab [empty-tab/empty-tab]
|
||||
:browser [browser/browser]
|
||||
:browser-tabs [tabs/tabs]
|
||||
[empty-tab/empty-tab])])]))
|
||||
(case screen-id
|
||||
:empty-tab [empty-tab/empty-tab]
|
||||
:browser [browser/browser]
|
||||
:browser-tabs [tabs/tabs]
|
||||
[empty-tab/empty-tab])))
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
[icons/icon :main-icons/arrow-right {:color colors/black}]]
|
||||
[react/touchable-highlight
|
||||
{:accessibility-label :select-account
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (accounts/accounts-list accounts
|
||||
dapps-account)}])}
|
||||
[chat-icon/custom-icon-view-list (:name dapps-account) (:color dapps-account) 32]]
|
||||
@@ -112,7 +112,7 @@
|
||||
[icons/icon :main-icons/qr {:color colors/black}]]
|
||||
[react/touchable-highlight
|
||||
{:on-press #(re-frame/dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (options/browser-options
|
||||
url
|
||||
dapps-account
|
||||
@@ -143,7 +143,7 @@
|
||||
{:permissions (map resources-to-permissions-map resources)
|
||||
:on-allowed #(.answerPermissionRequest ^js webview-ref true resources)
|
||||
:on-denied #(.answerPermissionRequest ^js webview-ref false)})
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old]))}
|
||||
(re-frame/dispatch [:bottom-sheet/hide]))}
|
||||
(i18n/label :t/allow)]]
|
||||
[react/view styles/blocked-access-button-wrapper
|
||||
[quo/button
|
||||
@@ -151,7 +151,7 @@
|
||||
:style styles/blocked-access-button
|
||||
:on-press (fn []
|
||||
(.answerPermissionRequest ^js webview-ref false)
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old]))}
|
||||
(re-frame/dispatch [:bottom-sheet/hide]))}
|
||||
(i18n/label :t/deny)]]]])
|
||||
|
||||
(views/defview block-resources-panel
|
||||
@@ -166,7 +166,7 @@
|
||||
(defn request-resources-access-for-page
|
||||
[resources url webview-ref]
|
||||
(re-frame/dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (fn [] [request-resources-panel resources url webview-ref])
|
||||
:show-handle? false
|
||||
:backdrop-dismiss? false
|
||||
@@ -176,7 +176,7 @@
|
||||
(defn block-resources-access-and-notify-user
|
||||
[url]
|
||||
(.answerPermissionRequest ^js @webview-ref/webview-ref false)
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn [] [block-resources-panel url])}]))
|
||||
|
||||
;; should-component-update is called only when component's props are changed,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch event))
|
||||
|
||||
(defn one-to-one-chat-accents
|
||||
@@ -53,7 +53,7 @@
|
||||
:accessibility-label :share-chat-button
|
||||
:icon :main-icons/share
|
||||
:on-press (fn []
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
;; https://github.com/facebook/react-native/pull/26839
|
||||
(js/setTimeout
|
||||
#(list-selection/open-share {:message message})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns status-im.ui.screens.communities.channel-details
|
||||
(:require [clojure.string :as string]
|
||||
[quo.core :as quo]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.communities.core :as communities]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.ui.components.profile-header.view :as profile-header]
|
||||
@@ -63,4 +64,5 @@
|
||||
:accessory :text
|
||||
:accessory-text (count pinned-messages)
|
||||
:chevron true
|
||||
:on-press #(rf/dispatch [:pin-message/show-pins-bottom-sheet chat-id])}]])]))))
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet :pinned-messages-list
|
||||
chat-id])}]])]))))
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
[utils.i18n :as i18n]
|
||||
[quo.core :as quo]
|
||||
[quo.design-system.colors :as colors]
|
||||
[quo2.components.community.style :as styles]
|
||||
[quo2.components.community.style :as styles] ;; TODO reimplement with quo2 library and new
|
||||
;; designs
|
||||
[quo2.components.navigation.floating-shell-button :as floating-shell-button]
|
||||
[react-native.core :as rn]
|
||||
[status-im.communities.core :as communities]
|
||||
@@ -68,7 +69,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(rf/dispatch [:bottom-sheet/hide-old])
|
||||
(rf/dispatch [:bottom-sheet/hide])
|
||||
(rf/dispatch event))
|
||||
|
||||
(defn community-plus-actions
|
||||
@@ -172,7 +173,7 @@
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch [:chat/navigate-to-chat chat-id])
|
||||
(rf/dispatch [:search/home-filter-changed nil]))
|
||||
:on-long-press #(rf/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-long-press #(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[sheets/actions home-item])}])}])
|
||||
|
||||
@@ -291,7 +292,7 @@
|
||||
(when (or admin joined)
|
||||
[{:icon :main-icons/more
|
||||
:accessibility-label :community-menu-button
|
||||
:on-press #(rf/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-press #(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[community-actions community])}])}])}]
|
||||
(if joined
|
||||
@@ -299,7 +300,7 @@
|
||||
[community-channel-preview-list id chats])
|
||||
(when admin
|
||||
[components.plus-button/plus-button-old
|
||||
{:on-press #(rf/dispatch [:bottom-sheet/show-sheet-old
|
||||
{:on-press #(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[community-plus-actions community])}])
|
||||
:accessibility-label :new-chat-button}])
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
:icon :main-icons/camera
|
||||
:title (i18n/label :t/community-image-take)
|
||||
:on-press #(do
|
||||
(rf/dispatch [:bottom-sheet/hide-old])
|
||||
(rf/dispatch [:bottom-sheet/hide])
|
||||
(take-pic))}]
|
||||
[quo/list-item
|
||||
{:accessibility-label :pick-photo
|
||||
@@ -71,7 +71,7 @@
|
||||
:theme :accent
|
||||
:title (i18n/label :t/community-image-pick)
|
||||
:on-press #(do
|
||||
(rf/dispatch [:bottom-sheet/hide-old])
|
||||
(rf/dispatch [:bottom-sheet/hide])
|
||||
(pick-pic))}]
|
||||
(when (and has-picture (not editing?))
|
||||
[quo/list-item
|
||||
@@ -80,7 +80,7 @@
|
||||
:theme :accent
|
||||
:title (i18n/label :t/community-image-remove)
|
||||
:on-press #(do
|
||||
(rf/dispatch [:bottom-sheet/hide-old])
|
||||
(rf/dispatch [:bottom-sheet/hide])
|
||||
(rf/dispatch [::communities/remove-field :image]))}])]))
|
||||
|
||||
(defn photo-picker
|
||||
@@ -92,7 +92,7 @@
|
||||
[rn/touchable-opacity
|
||||
{:on-press (fn []
|
||||
(rn/dismiss-keyboard!)
|
||||
(rf/dispatch [:bottom-sheet/show-sheet-old
|
||||
(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (bottom-sheet (boolean image) editing?)}]))}
|
||||
[rn/view
|
||||
{:style {:width 128
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(rf/dispatch [:bottom-sheet/hide-old])
|
||||
(rf/dispatch [:bottom-sheet/hide])
|
||||
(rf/dispatch event))
|
||||
|
||||
(defn member-sheet
|
||||
@@ -72,7 +72,7 @@
|
||||
:accessory (when (not= public-key my-public-key)
|
||||
[quo/button
|
||||
{:on-press
|
||||
#(rf/dispatch [:bottom-sheet/show-sheet-old
|
||||
#(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[member-sheet primary-name member community-id
|
||||
can-kick-users? can-manage-users? admin?])}])
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(rf/dispatch [:bottom-sheet/hide-old])
|
||||
(rf/dispatch [:bottom-sheet/hide])
|
||||
(rf/dispatch event))
|
||||
|
||||
(defn community-unviewed-count
|
||||
@@ -49,7 +49,7 @@
|
||||
(rf/dispatch [:communities/load-category-states id])
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch [:navigate-to :community-overview id]))
|
||||
:on-long-press #(rf/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-long-press #(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[community/community-actions community])}])}
|
||||
[:<>
|
||||
@@ -150,7 +150,7 @@
|
||||
[{:icon :main-icons/more
|
||||
:accessibility-label :chat-menu-button
|
||||
:on-press
|
||||
#(rf/dispatch [:bottom-sheet/show-sheet-old
|
||||
#(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[communities-actions])
|
||||
:height 256}])}]}]
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
:title (:name account)
|
||||
:subtitle (utils/get-shortened-checksum-address (:address account))
|
||||
:chevron true
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn [] [sheets/accounts-list :from
|
||||
::ens/change-address])}])}]))
|
||||
|
||||
@@ -681,7 +681,7 @@
|
||||
[react/view {:style {:flex 1 :margin-top 8}}
|
||||
(for [name names]
|
||||
(let [action #(do (re-frame/dispatch [::ens/save-preferred-name name])
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old]))
|
||||
(re-frame/dispatch [:bottom-sheet/hide]))
|
||||
stateofus-username (stateofus/username name)
|
||||
s (or stateofus-username name)]
|
||||
^{:key name}
|
||||
@@ -755,7 +755,7 @@
|
||||
[profile.components/settings-item
|
||||
{:label-kw :ens-primary-username
|
||||
:value preferred-name
|
||||
:action-fn #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:action-fn #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content
|
||||
(fn [] (name-list names preferred-name))}])}]])]]])
|
||||
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
(ns status-im.ui.screens.home.sheet.views
|
||||
(:require [quo.core :as quo]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.qr-scanner.core :as qr-scanner]
|
||||
[status-im.ui.components.invite.views :as invite]
|
||||
[status-im.ui.components.react :as rn]
|
||||
[status-im.ui2.screens.chat.components.new-chat.view :as new-chat-aio]
|
||||
[status-im2.config :as config]
|
||||
[quo2.core :as quo2]
|
||||
[status-im.ui.screens.home.sheet.styles :as style]))
|
||||
|
||||
(defn- hide-sheet-and-dispatch
|
||||
[event]
|
||||
(rf/dispatch [:bottom-sheet/hide-old])
|
||||
(rf/dispatch [:bottom-sheet/hide])
|
||||
(rf/dispatch event))
|
||||
|
||||
(defn add-new-view
|
||||
@@ -57,6 +60,48 @@
|
||||
[invite/list-item
|
||||
{:accessibility-label :chats-menu-invite-friends-button}]])
|
||||
|
||||
(defn new-chat-bottom-sheet
|
||||
[]
|
||||
[rn/view
|
||||
[quo2/menu-item
|
||||
{:type :transparent
|
||||
:title (i18n/label :t/new-chat)
|
||||
:icon-bg-color :transparent
|
||||
:container-padding-vertical 12
|
||||
:title-column-style {:margin-left 2}
|
||||
:style-props {:border-bottom-width 1
|
||||
:border-bottom-color (colors/theme-colors colors/neutral-10
|
||||
colors/neutral-90)}
|
||||
:icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)
|
||||
:accessibility-label :start-a-new-chat
|
||||
:icon :i/new-message
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:group-chat/clear-contacts])
|
||||
(hide-sheet-and-dispatch [:bottom-sheet/show-sheet
|
||||
:start-a-new-chat {}]))}]
|
||||
[quo2/menu-item
|
||||
{:type :transparent
|
||||
:title (i18n/label :t/add-a-contact)
|
||||
:icon-bg-color :transparent
|
||||
:icon-container-style {:padding-horizontal 0}
|
||||
:container-padding-horizontal {:padding-horizontal 4}
|
||||
:style-props {:margin-top 18
|
||||
:margin-bottom 9}
|
||||
:container-padding-vertical 12
|
||||
:title-column-style {:margin-left 2}
|
||||
:icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)
|
||||
:accessibility-label :add-a-contact
|
||||
:subtitle (i18n/label :t/enter-a-chat-key)
|
||||
:subtitle-color colors/neutral-50
|
||||
:icon :i/add-user
|
||||
:on-press #(hide-sheet-and-dispatch [:open-modal :new-contact])}]])
|
||||
|
||||
(def new-chat-bottom-sheet-comp
|
||||
{:content new-chat-bottom-sheet})
|
||||
|
||||
;; Deprecated
|
||||
(def add-new
|
||||
{:content add-new-view})
|
||||
|
||||
(def start-a-new-chat
|
||||
{:content new-chat-aio/contact-selection-list})
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
(re-frame/dispatch [:dismiss-keyboard])
|
||||
(re-frame/dispatch [:chat/navigate-to-chat chat-id])
|
||||
(re-frame/dispatch [:search/home-filter-changed nil]))
|
||||
:on-long-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-long-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[sheets/actions home-item])}])}]
|
||||
[communities.views/community-home-list-item home-item]))
|
||||
@@ -169,7 +169,7 @@
|
||||
(re-frame/dispatch [:dismiss-keyboard])
|
||||
(re-frame/dispatch [:chat/navigate-to-chat chat-id])
|
||||
(re-frame/dispatch [:search/home-filter-changed nil]))
|
||||
:on-long-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-long-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[sheets/actions home-item])}])}]
|
||||
[communities.views/community-home-list-item home-item]))
|
||||
@@ -261,7 +261,7 @@
|
||||
{:on-press (when-not logging-in?
|
||||
(fn []
|
||||
(re-frame/dispatch [:group-chat/clear-contacts])
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet-old :start-a-new-chat {}])))
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet :start-a-new-chat {}])))
|
||||
:loading logging-in?
|
||||
:accessibility-label :new-chat-button}]))
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
{:on-press (when-not logging-in?
|
||||
(fn []
|
||||
(re-frame/dispatch [:group-chat/clear-contacts])
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet-old :start-a-new-chat {}])))
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet :start-a-new-chat {}])))
|
||||
:loading logging-in?
|
||||
:accessibility-label :new-chat-button}]))
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[quo.design-system.colors :as colors]
|
||||
[re-frame.core :as re-frame]
|
||||
[reagent.core :as reagent]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.common.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im2.constants :as constants]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.keycard.login :as keycard.login]
|
||||
@@ -447,8 +447,8 @@
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
(multiaccounts.create/prepare-intro-wizard)
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(navigation/navigate-to :get-your-keys nil)))
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(navigation/navigate-to-cofx :get-your-keys nil)))
|
||||
|
||||
(defn- more-sheet-content
|
||||
[]
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch event))
|
||||
|
||||
(views/defview settings-sheet
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch event))
|
||||
|
||||
(defn settings-separator
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch event))
|
||||
|
||||
(defview custom-seed-phrase
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
(defn- hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch event))
|
||||
|
||||
(defn actions-sheet
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
(defn topbar-button
|
||||
[]
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content sheets/actions-sheet}]))
|
||||
(defview multiaccounts
|
||||
[]
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
(i18n/label :t/generate-a-key)]]
|
||||
[react/view {:padding-vertical 8}
|
||||
[quo/button
|
||||
{:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old :recover-sheet])
|
||||
{:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet :recover-sheet])
|
||||
:type :secondary}
|
||||
(i18n/label :t/access-existing-keys)]]
|
||||
[react/text {:style (assoc (styles/wizard-text) :margin-top 20 :margin-bottom 16)}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
(defn learn-more
|
||||
[title content]
|
||||
[react/text
|
||||
{:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old :learn-more
|
||||
{:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet :learn-more
|
||||
{:title (i18n/label title)
|
||||
:content (i18n/label content)}])
|
||||
:style (merge (styles/wizard-text) {:color colors/blue})
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
:accessory :text
|
||||
:accessory-text pin-count
|
||||
:disabled (zero? pin-count)
|
||||
:on-press #(rf/dispatch [:pin-message/show-pins-bottom-sheet public-key])
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet :pinned-messages-list public-key])
|
||||
:chevron true}])
|
||||
|
||||
(defn nickname-settings
|
||||
@@ -88,14 +88,14 @@
|
||||
|
||||
(defn valid-nickname?
|
||||
[nickname]
|
||||
(not (string/blank? nickname)))
|
||||
(not (string/blank? (string/trim (or nickname "")))))
|
||||
|
||||
(defn- nickname-input
|
||||
[nickname entered-nickname public-key]
|
||||
[quo/text-input
|
||||
{:on-change-text #(reset! entered-nickname %)
|
||||
:on-submit-editing #(when (valid-nickname? @entered-nickname)
|
||||
(save-nickname public-key @entered-nickname))
|
||||
(save-nickname public-key (string/trim (or @entered-nickname ""))))
|
||||
:auto-capitalize :none
|
||||
:auto-focus false
|
||||
:max-length 32
|
||||
@@ -131,7 +131,9 @@
|
||||
:center
|
||||
[quo/button
|
||||
{:type :secondary
|
||||
:on-press #(save-nickname public-key @entered-nickname)}
|
||||
:disabled (not (valid-nickname? @entered-nickname))
|
||||
:on-press #(when (valid-nickname? @entered-nickname)
|
||||
(save-nickname public-key (string/trim (or @entered-nickname ""))))}
|
||||
(i18n/label :t/done)]}]])))
|
||||
|
||||
(defn button-item
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
(not= public-key current-user-identity))
|
||||
{:accessory [quo/button
|
||||
{:on-press #(re-frame/dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[member-sheet chat-id member admin?])}])
|
||||
:type :icon
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(debounce/dispatch-and-chill event 2000))
|
||||
|
||||
(defn invitation-sheet
|
||||
@@ -142,7 +142,7 @@
|
||||
{:title (multiaccounts/displayed-name contact)
|
||||
:icon [chat-icon/contact-icon-contacts-tab
|
||||
(multiaccounts/displayed-photo contact)]
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[invitation-sheet invitation contact])}])}]))
|
||||
|
||||
@@ -214,7 +214,8 @@
|
||||
:accessory :text
|
||||
:accessory-text (count pinned-messages)
|
||||
:chevron true
|
||||
:on-press #(re-frame/dispatch [:pin-message/show-pins-bottom-sheet chat-id])}]
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet :pinned-messages-list
|
||||
chat-id])}]
|
||||
(when member?
|
||||
[quo/list-item
|
||||
{:theme :negative
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
|
||||
(defn pick-pic
|
||||
[]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(react/show-image-picker
|
||||
#(re-frame/dispatch [::multiaccounts/save-profile-picture (.-path ^js %) 0 0 crop-size crop-size])
|
||||
crop-opts))
|
||||
|
||||
(defn take-pic
|
||||
[]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(react/show-image-picker-camera
|
||||
#(re-frame/dispatch [::multiaccounts/save-profile-picture (.-path ^js %) 0 0 crop-size crop-size])
|
||||
crop-opts))
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
:use-insets true
|
||||
:extended-header (profile-header/extended-header
|
||||
{:on-press on-share
|
||||
:on-edit #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-edit #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (edit/bottom-sheet
|
||||
has-picture)}])
|
||||
:title (multiaccounts/displayed-name account)
|
||||
|
||||
@@ -113,29 +113,25 @@
|
||||
|
||||
;Multiaccounts
|
||||
{:name :multiaccounts
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:topBar {:title {:text (i18n/label :t/your-keys)}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/your-keys)}
|
||||
:rightButtons (right-button-options :multiaccounts :more)}}
|
||||
:right-handler multiaccounts/topbar-button
|
||||
:component multiaccounts/multiaccounts}
|
||||
|
||||
;Login
|
||||
{:name :login
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:topBar {:rightButtons (right-button-options :login :more)}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:rightButtons (right-button-options :login :more)}}
|
||||
:right-handler login/topbar-button
|
||||
:component login/login}
|
||||
|
||||
{:name :progress
|
||||
:options {:insets {:top? true}}
|
||||
:component progress/progress}
|
||||
|
||||
;[Onboarding]
|
||||
{:name :get-your-keys
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:component onboarding.keys/get-your-keys}
|
||||
|
||||
;[Onboarding]
|
||||
@@ -143,435 +139,377 @@
|
||||
:options {:topBar {:visible false}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:popStackOnPress false}}
|
||||
:insets {:bottom true}
|
||||
:component onboarding.keys/choose-a-chat-name}
|
||||
|
||||
;[Onboarding]
|
||||
{:name :select-key-storage
|
||||
:insets {:bottom true}
|
||||
:options {:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:popStackOnPress false}}
|
||||
:component onboarding.storage/select-key-storage}
|
||||
|
||||
;[Onboarding] Create Password
|
||||
{:name :create-password
|
||||
:options {:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:popStackOnPress false}}
|
||||
:insets {:bottom true}
|
||||
:component onboarding.password/screen}
|
||||
|
||||
;[Onboarding] Welcome
|
||||
{:name :welcome
|
||||
:options {:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:popStackOnPress false}}
|
||||
:insets {:bottom true}
|
||||
:component onboarding.welcome/welcome}
|
||||
|
||||
;[Onboarding] Notification
|
||||
{:name :onboarding-notification
|
||||
:options {:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:popStackOnPress false}}
|
||||
:insets {:bottom true}
|
||||
:component onboarding.notifications/notifications-onboarding}
|
||||
|
||||
;[Onboarding] Recovery
|
||||
{:name :recover-multiaccount-enter-phrase
|
||||
:options {:insets {:top? true :bottom? true}}
|
||||
:insets {:bottom true}
|
||||
:component onboarding.phrase/enter-phrase}
|
||||
{:name :recover-multiaccount-success
|
||||
:options {:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:popStackOnPress false}}
|
||||
:insets {:bottom true}
|
||||
:component onboarding.phrase/wizard-recovery-success}
|
||||
|
||||
;;CHAT
|
||||
{:name :start-a-new-chat
|
||||
:options {:sheet? true :insets {:top? true}}
|
||||
:component new-chat-aio/contact-selection-list}
|
||||
|
||||
{:name :group-chat-profile
|
||||
;;TODO animated-header
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component group-details/group-details}
|
||||
{:name :group-chat-invite
|
||||
;;TODO parameter in the event
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component profile.group-chat/group-chat-invite}
|
||||
|
||||
{:name :stickers
|
||||
:options {:insets {:top? true}
|
||||
:topBar {:title {:text (i18n/label :t/sticker-market)}}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/sticker-market)}}}
|
||||
:component stickers/packs}
|
||||
|
||||
{:name :stickers-pack
|
||||
:options {:insets {:top? true}}
|
||||
:component stickers/pack}
|
||||
|
||||
;; Community
|
||||
{:name :community
|
||||
;;TODO custom
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component community/community}
|
||||
{:name :community-management
|
||||
:insets {:top false}
|
||||
;;TODO animated-header
|
||||
:options {:topBar {:visible false}}
|
||||
:component community.profile/management-container}
|
||||
{:name :community-members
|
||||
;;TODO custom subtitle
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component members/members-container}
|
||||
{:name :community-requests-to-join
|
||||
;;TODO custom subtitle
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component requests-to-join/requests-to-join-container}
|
||||
{:name :create-community-channel
|
||||
:options {:topBar {:title {:text (i18n/label :t/create-channel-title)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/create-channel-title)}}}
|
||||
:component create-channel/view}
|
||||
{:name :community-emoji-thumbnail-picker
|
||||
:options {:topBar {:title {:text (i18n/label :t/community-emoji-thumbnail-title)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/community-emoji-thumbnail-title)}}}
|
||||
:component community-emoji-thumbnail-picker/view}
|
||||
{:name :create-community-category
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-category)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-category)}}}
|
||||
:component create-category/view}
|
||||
{:name :select-category
|
||||
:insets {:bottom true}
|
||||
;;TODO custom
|
||||
:options {:topBar {:visible false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component select-category/view}
|
||||
{:name :community-reorder-categories
|
||||
:insets {:top false}
|
||||
:options {:topBar {:visible false}}
|
||||
:component reorder-categories/view}
|
||||
{:name :community-channel-details
|
||||
:insets {:top false}
|
||||
;;TODO custom
|
||||
:options {:topBar {:visible false}}
|
||||
:component communities.channel-details/view}
|
||||
{:name :edit-community-channel
|
||||
:options {:topBar {:title {:text (i18n/label :t/edit-channel-title)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/edit-channel-title)}}}
|
||||
:insets {:bottom true}
|
||||
:component edit-channel/view}
|
||||
{:name :contact-toggle-list
|
||||
;;TODO custom subtitle
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component group-chat/contact-toggle-list}
|
||||
{:name :new-group
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
;;TODO custom subtitle
|
||||
:component group-chat/new-group}
|
||||
{:name :communities
|
||||
;;TODO custom
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component communities/communities}
|
||||
{:name :community-import
|
||||
:options {:topBar {:title {:text (i18n/label :t/import-community-title)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/import-community-title)}}}
|
||||
:component communities.import/view}
|
||||
{:name :community-edit
|
||||
:options {:topBar {:title {:text (i18n/label :t/community-edit-title)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/community-edit-title)}}}
|
||||
:component community.edit/edit}
|
||||
{:name :community-create
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-community-title)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-community-title)}}}
|
||||
:component communities.create/view}
|
||||
{:name :community-membership
|
||||
:options {:topBar {:title {:text (i18n/label :t/membership-title)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/membership-title)}}}
|
||||
:component membership/membership}
|
||||
|
||||
;;WALLET
|
||||
|
||||
{:name :wallet
|
||||
:insets {:top false}
|
||||
:on-focus [:wallet/tab-opened]
|
||||
;;TODO wallet redesign
|
||||
;;:options {:statusBar {:backgroundColor quo2.colors/neutral-5}}
|
||||
:component wallet.accounts/accounts-overview-old}
|
||||
{:name :wallet-account
|
||||
;;TODO dynamic titleaccounts-overview
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component wallet.account/account}
|
||||
{:name :add-new-account
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component add-account/add-account}
|
||||
{:name :add-new-account-pin
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component add-account/pin}
|
||||
{:name :account-settings
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component account-settings/account-settings}
|
||||
{:name :wallet-transaction-details
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component wallet-transactions/transaction-details}
|
||||
{:name :wallet-settings-assets
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component wallet-settings/manage-assets}
|
||||
{:name :wallet-add-custom-token
|
||||
:on-focus [:wallet/wallet-add-custom-token]
|
||||
:options {:topBar {:title {:text (i18n/label :t/add-custom-token)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/add-custom-token)}}}
|
||||
:component custom-tokens/add-custom-token}
|
||||
{:name :wallet-custom-token-details
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component custom-tokens/custom-token-details}
|
||||
{:name :currency-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/main-currency)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/main-currency)}}}
|
||||
:component currency-settings/currency-settings}
|
||||
|
||||
{:name :manage-accounts
|
||||
:options {:topBar {:title {:text (i18n/label :t/wallet-manage-accounts)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/wallet-manage-accounts)}}}
|
||||
:component accounts-manage/manage}
|
||||
|
||||
{:name :token-swap
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component wallet.swap/swap}
|
||||
|
||||
{:name :token-swap-advanced-nonce
|
||||
:options {:topBar {:title {:text (i18n/label :t/nonce)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/nonce)}}}
|
||||
:component wallet.swap/nonce-modal}
|
||||
|
||||
{:name :token-swap-advanced-approve-token
|
||||
:options {:topBar {:title {:text (i18n/label :t/approve-token)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/approve-token)}}}
|
||||
:component wallet.swap/approve-token-modal}
|
||||
|
||||
{:name :token-swap-advanced-transaction-fee
|
||||
:options {:topBar {:title {:text (i18n/label :t/transaction-fee)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/transaction-fee)}}}
|
||||
:component wallet.swap/transaction-fee-modal}
|
||||
|
||||
{:name :token-swap-advanced-swap-details
|
||||
:options {:topBar {:title {:text (i18n/label :t/swap-details)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/swap-details)}}}
|
||||
:component wallet.swap/swap-details-modal}
|
||||
|
||||
{:name :swap-asset-selector
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component wallet.swap/asset-selector}
|
||||
|
||||
;;PROFILE
|
||||
|
||||
{:name :my-profile
|
||||
:insets {:top false}
|
||||
:options {:topBar {:visible false}}
|
||||
:component profile.user/my-profile}
|
||||
{:name :contacts-list
|
||||
:options {:topBar {:title {:text (i18n/label :t/contacts)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/contacts)}}}
|
||||
:component contacts-list/contacts-list}
|
||||
{:name :ens-main
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-usernames)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-usernames)}}}
|
||||
:component ens/main}
|
||||
{:name :ens-search
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-your-username)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-your-username)}}}
|
||||
:component ens/search}
|
||||
{:name :ens-checkout
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-your-username)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-your-username)}}}
|
||||
:component ens/checkout}
|
||||
{:name :ens-confirmation
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-your-username)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-your-username)}}}
|
||||
:component ens/confirmation}
|
||||
{:name :ens-terms
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-terms-registration)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/ens-terms-registration)}}}
|
||||
:component ens/terms}
|
||||
{:name :ens-name-details
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component ens/name-details}
|
||||
{:name :blocked-users-list
|
||||
:options {:topBar {:title {:text (i18n/label :t/blocked-users)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/blocked-users)}}}
|
||||
:component contacts-list/blocked-users-list}
|
||||
{:name :wakuv2-settings
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component wakuv2-settings/wakuv2-settings}
|
||||
{:name :edit-wakuv2-node
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component edit-wakuv2-node/edit-node}
|
||||
{:name :bootnodes-settings
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component bootnodes-settings/bootnodes-settings}
|
||||
{:name :installations
|
||||
:options {:topBar {:title {:text (i18n/label :t/devices)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/devices)}}}
|
||||
:component pairing/installations}
|
||||
{:name :edit-bootnode
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component edit-bootnode/edit-bootnode}
|
||||
{:name :offline-messaging-settings
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component offline-messaging-settings/offline-messaging-settings}
|
||||
{:name :edit-mailserver
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component edit-mailserver/edit-mailserver}
|
||||
{:name :dapps-permissions
|
||||
:options {:topBar {:title {:text (i18n/label :t/dapps-permissions)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/dapps-permissions)}}}
|
||||
:component dapps-permissions/dapps-permissions}
|
||||
{:name :link-previews-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/chat-link-previews)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/chat-link-previews)}}}
|
||||
:component link-previews-settings/link-previews-settings}
|
||||
{:name :privacy-and-security
|
||||
:options {:topBar {:title {:text (i18n/label :t/privacy-and-security)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/privacy-and-security)}}}
|
||||
:component privacy-and-security/privacy-and-security}
|
||||
{:name :messages-from-contacts-only
|
||||
:options {:topBar {:title {:text (i18n/label :t/accept-new-chats-from)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/accept-new-chats-from)}}}
|
||||
:component messages-from-contacts-only/messages-from-contacts-only}
|
||||
{:name :appearance
|
||||
:options {:topBar {:title {:text (i18n/label :t/appearance)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/appearance)}}}
|
||||
:component appearance/appearance}
|
||||
{:name :privacy-and-security-profile-pic-show-to
|
||||
:options {:topbar {:title {:text (i18n/label :t/show-profile-pictures-to)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topbar {:title {:text (i18n/label :t/show-profile-pictures-to)}}}
|
||||
:component privacy-and-security/profile-pic-show-to}
|
||||
{:name :privacy-and-security-profile-pic
|
||||
:options {:topBar {:title {:text (i18n/label :t/show-profile-pictures)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/show-profile-pictures)}}}
|
||||
:component privacy-and-security/profile-pic}
|
||||
{:name :notifications
|
||||
:options {:topBar {:title {:text (i18n/label :t/notification-settings)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/notification-settings)}}}
|
||||
:component notifications-settings/notifications-settings}
|
||||
{:name :notifications-servers
|
||||
:options {:topBar {:title {:text (i18n/label :t/notifications-servers)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/notifications-servers)}}}
|
||||
:component notifications-settings/notifications-servers}
|
||||
{:name :sync-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/sync-settings)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/sync-settings)}}}
|
||||
:component sync-settings/sync-settings}
|
||||
{:name :advanced-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/advanced)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/advanced)}}}
|
||||
:component advanced-settings/advanced-settings}
|
||||
{:name :help-center
|
||||
:options {:topBar {:title {:text (i18n/label :t/need-help)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/need-help)}}}
|
||||
:component help-center/help-center}
|
||||
{:name :glossary
|
||||
:options {:topBar {:title {:text (i18n/label :t/glossary)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/glossary)}}}
|
||||
:component glossary/glossary}
|
||||
{:name :about-app
|
||||
:options {:topBar {:title {:text (i18n/label :t/about-app)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/about-app)}}}
|
||||
:component about-app/about-app}
|
||||
{:name :privacy-policy
|
||||
:options {:topBar {:title {:text (i18n/label :t/privacy-policy)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/privacy-policy)}}}
|
||||
:component about-app/privacy-policy}
|
||||
{:name :terms-of-service
|
||||
:options {:topBar {:title {:text (i18n/label :t/terms-of-service)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/terms-of-service)}}}
|
||||
:component about-app/tos}
|
||||
{:name :principles
|
||||
:options {:topBar {:title {:text (i18n/label :t/principles)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/principles)}}}
|
||||
:component about-app/principles}
|
||||
{:name :force-accept-tos
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component terms-of-service/force-accept-tos}
|
||||
{:name :manage-dapps-permissions
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component dapps-permissions/manage}
|
||||
{:name :network-settings
|
||||
;;TODO accessories
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component network/network-settings}
|
||||
{:name :network-details
|
||||
:options {:topBar {:title {:text (i18n/label :t/network-details)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/network-details)}}}
|
||||
:component network-details/network-details}
|
||||
{:name :network-info
|
||||
:options {:topBar {:title {:text (i18n/label :t/network-info)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/network-info)}}}
|
||||
:component network-info/network-info}
|
||||
{:name :rpc-usage-info
|
||||
:options {:topBar {:title {:text (i18n/label :t/rpc-usage-info)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/rpc-usage-info)}}}
|
||||
:component rpc-usage-info/usage-info}
|
||||
{:name :peers-stats
|
||||
:options {:topBar {:title {:text (i18n/label :t/peers-stats)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/peers-stats)}}}
|
||||
:component peers-stats/peers-stats}
|
||||
{:name :edit-network
|
||||
:options {:topBar {:title {:text (i18n/label :t/add-network)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/add-network)}}}
|
||||
:component edit-network/edit-network}
|
||||
{:name :log-level-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/log-level-settings)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/log-level-settings)}}}
|
||||
:component log-level-settings/log-level-settings}
|
||||
{:name :fleet-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/fleet-settings)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/fleet-settings)}}}
|
||||
:component fleet-settings/fleet-settings}
|
||||
{:name :mobile-network-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/mobile-network-settings)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/mobile-network-settings)}}}
|
||||
:component mobile-network-settings/mobile-network-settings}
|
||||
{:name :backup-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/backup-settings)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/backup-settings)}}}
|
||||
:component backup-settings/backup-settings}
|
||||
{:name :backup-seed
|
||||
;;TODO dynamic navigation
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component profile.seed/backup-seed}
|
||||
{:name :reset-password
|
||||
:options {:topBar {:title {:text (i18n/label :t/reset-password)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/reset-password)}}}
|
||||
:component reset-password/reset-password}
|
||||
{:name :delete-profile
|
||||
:insets {:bottom? true}
|
||||
:insets {:bottom true}
|
||||
:component delete-profile/delete-profile}
|
||||
{:name :default-sync-period-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/default-sync-period)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/default-sync-period)}}}
|
||||
:component default-sync-period-settings/default-sync-period-settings}
|
||||
|
||||
;;MODALS
|
||||
@@ -580,75 +518,70 @@
|
||||
{:name :new-chat
|
||||
:on-focus [:contacts/new-chat-focus]
|
||||
;;TODO accessories
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component new-chat/new-chat}
|
||||
|
||||
;[Chat] New Public chat
|
||||
{:name :new-public-chat
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-public-group-chat)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-public-group-chat)}}}
|
||||
:component new-public-chat/new-public-chat}
|
||||
|
||||
;[Chat] Link preview settings
|
||||
{:name :link-preview-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/chat-link-previews)}}
|
||||
:insets {:top? true}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/chat-link-previews)}}}
|
||||
:component link-previews-settings/link-previews-settings}
|
||||
|
||||
;[Chat] Edit nickname
|
||||
{:name :nickname
|
||||
:insets {:bottom true}
|
||||
;;TODO dyn subtitle
|
||||
:options {:topBar {:visible false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component contact/nickname-view}
|
||||
|
||||
{:name :new-chat-aio
|
||||
:on-focus [:contacts/new-chat-focus]
|
||||
;;TODO accessories
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component new-chat-aio/contact-selection-list}
|
||||
|
||||
;[Chat] New Public chat
|
||||
{:name :new-public-chat
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-public-group-chat)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-public-group-chat)}}}
|
||||
:component new-public-chat/new-public-chat}
|
||||
|
||||
;[Group chat] Add participants
|
||||
{:name :add-participants-toggle-list
|
||||
:on-focus [:group/add-participants-toggle-list]
|
||||
:insets {:bottom true}
|
||||
;;TODO dyn subtitle
|
||||
:options {:topBar {:visible false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component group-chat/add-participants-toggle-list}
|
||||
|
||||
;[Communities] Invite people
|
||||
{:name :invite-people-community
|
||||
;;TODO dyn title
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:component communities.invite/invite}
|
||||
:options {:topBar {:visible false}}
|
||||
:component communities.invite/invite
|
||||
:insets {:bottom true}}
|
||||
|
||||
;[Wallet] Recipient
|
||||
{:name :recipient
|
||||
:insets {:bottom true}
|
||||
;;TODO accessories
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component recipient/recipient}
|
||||
|
||||
;[Wallet] New favourite
|
||||
{:name :new-favourite
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-favourite)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/new-favourite)}}}
|
||||
:component recipient/new-favourite}
|
||||
|
||||
;QR Scanner
|
||||
{:name :qr-scanner
|
||||
:insets {:top false :bottom false}
|
||||
;;TODO custom topbar
|
||||
:options {:topBar {:visible false}
|
||||
:navigationBar {:backgroundColor colors/black-persist}
|
||||
@@ -662,9 +595,8 @@
|
||||
:options {:topBar {:title {:text (i18n/label :t/notification-settings)}}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:popStackOnPress false}}
|
||||
:insets {:bottom true}
|
||||
:component notifications-settings/notifications-settings}
|
||||
|
||||
;;TODO WHY MODAL?
|
||||
@@ -673,218 +605,211 @@
|
||||
:options {:topBar {:title {:text (i18n/label :t/notification-settings)}}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:popStackOnPress false}}
|
||||
:insets {:bottom true}
|
||||
:component notifications-settings/notifications-advanced-settings}
|
||||
|
||||
;[Wallet] Prepare Transaction
|
||||
{:name :prepare-send-transaction
|
||||
:insets {:bottom true}
|
||||
:on-dissmiss [:wallet/cancel-transaction-command]
|
||||
:options {:topBar {:title {:text (i18n/label :t/send-transaction)}}
|
||||
:swipeToDismiss false
|
||||
:hardwareBackButton {:dismissModalOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:hardwareBackButton {:dismissModalOnPress false}}
|
||||
:component wallet.send/prepare-send-transaction}
|
||||
|
||||
;[Wallet] Request Transaction
|
||||
{:name :request-transaction
|
||||
:insets {:bottom true}
|
||||
:on-dissmiss [:wallet/cancel-transaction-command]
|
||||
:options {:topBar {:title {:text (i18n/label :t/request-transaction)}}
|
||||
:swipeToDismiss false
|
||||
:hardwareBackButton {:dismissModalOnPress false}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:hardwareBackButton {:dismissModalOnPress false}}
|
||||
:component wallet.send/request-transaction}
|
||||
|
||||
;[Wallet] Buy crypto
|
||||
{:name :buy-crypto
|
||||
:insets {:bottom? true}
|
||||
:insets {:bottom true}
|
||||
:component wallet.buy-crypto/container}
|
||||
|
||||
;[Wallet] Buy crypto website
|
||||
{:name :buy-crypto-website
|
||||
:insets {:bottom true}
|
||||
;;TODO subtitle
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component wallet.buy-crypto/website}
|
||||
|
||||
{:name :nft-details
|
||||
:insets {:bottom true}
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component wallet.collectibles/nft-details-modal}
|
||||
|
||||
;[Browser] New bookmark
|
||||
{:name :new-bookmark
|
||||
:insets {:bottom true}
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component bookmarks/new-bookmark}
|
||||
|
||||
;Profile
|
||||
{:name :profile
|
||||
:insets {:bottom true}
|
||||
;;TODO custom toolbar
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component contact/profile}
|
||||
|
||||
;KEYCARD
|
||||
{:name :keycard-onboarding-intro
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}}
|
||||
:component keycard.onboarding/intro}
|
||||
{:name :keycard-onboarding-puk-code
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}}
|
||||
;;TODO dynamic
|
||||
:component keycard.onboarding/puk-code}
|
||||
{:name :keycard-onboarding-pin
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}}
|
||||
;;TODO dynamic
|
||||
:component keycard.onboarding/pin}
|
||||
{:name :keycard-recovery-pair
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/step-i-of-n {:number 2 :step 1})}}
|
||||
:insets {:bottom? true
|
||||
:top? true}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}}
|
||||
:component keycard.recovery/pair}
|
||||
{:name :seed-phrase
|
||||
:insets {:bottom true}
|
||||
;;TODO subtitle
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component key-storage.views/seed-phrase}
|
||||
{:name :keycard-recovery-pin
|
||||
:insets {:bottom true}
|
||||
;;TODO dynamic
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component keycard.recovery/pin}
|
||||
{:name :keycard-wrong
|
||||
:insets {:bottom true}
|
||||
;;TODO move to popover?
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component keycard/wrong}
|
||||
{:name :not-keycard
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}}
|
||||
;;TODO move to popover?
|
||||
:component keycard/not-keycard}
|
||||
{:name :keycard-onboarding-recovery-phrase
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}}
|
||||
:component keycard.onboarding/recovery-phrase}
|
||||
{:name :keycard-onboarding-recovery-phrase-confirm-word1
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}}
|
||||
:component keycard.onboarding/recovery-phrase-confirm-word}
|
||||
{:name :keycard-onboarding-recovery-phrase-confirm-word2
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}}
|
||||
:component keycard.onboarding/recovery-phrase-confirm-word}
|
||||
{:name :keycard-recovery-intro
|
||||
:insets {:bottom? true}
|
||||
:insets {:bottom true}
|
||||
:component keycard.recovery/intro}
|
||||
{:name :keycard-recovery-success
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}}
|
||||
:component keycard.recovery/success}
|
||||
{:name :keycard-recovery-no-key
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}
|
||||
:popGesture false
|
||||
:hardwareBackButton {:dismissModalOnPress false
|
||||
:popStackOnPress false}}
|
||||
:component keycard.recovery/no-key}
|
||||
{:name :keycard-authentication-method
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}}
|
||||
:component keycard.authentication/keycard-authentication-method}
|
||||
{:name :keycard-login-pin
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}}
|
||||
:component keycard/login-pin}
|
||||
{:name :keycard-blank
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}}
|
||||
:component keycard/blank}
|
||||
{:name :keycard-unpaired
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}}
|
||||
:component keycard/unpaired}
|
||||
{:name :keycard-settings
|
||||
:options {:topBar {:title {:text (i18n/label :t/status-keycard)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/status-keycard)}}}
|
||||
:component keycard.settings/keycard-settings}
|
||||
{:name :reset-card
|
||||
:options {:topBar {:title {:text (i18n/label :t/reset-card)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/reset-card)}}}
|
||||
:component keycard.settings/reset-card}
|
||||
{:name :keycard-pin
|
||||
:insets {:bottom true}
|
||||
;;TODO dynamic title
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component keycard.settings/reset-pin}
|
||||
{:name :enter-pin-settings
|
||||
:insets {:bottom? true}
|
||||
:insets {:bottom true}
|
||||
:component keycard.pin/enter-pin}
|
||||
{:name :change-pairing-code
|
||||
:insets {:bottom? true}
|
||||
:insets {:bottom true}
|
||||
:component keycard.pairing/change-pairing-code}
|
||||
|
||||
;;KEYSTORAGE
|
||||
{:name :actions-not-logged-in
|
||||
;;TODO: topbar
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:visible false}}
|
||||
;;TODO move to popover?
|
||||
:component key-storage.views/actions-not-logged-in}
|
||||
{:name :actions-logged-in
|
||||
;;TODO: topbar
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:insets {:bottom true}
|
||||
;;TODO move to popover?
|
||||
:component key-storage.views/actions-logged-in}
|
||||
{:name :storage
|
||||
;;TODO: topbar
|
||||
:options {:insets {:bottom? true
|
||||
:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:insets {:bottom true}
|
||||
;;TODO move to popover?
|
||||
:component key-storage.views/storage}
|
||||
|
||||
{:name :show-all-connections
|
||||
:options {:topBar {:title {:text (i18n/label :all-connections)}}
|
||||
:insets {:bottom? true
|
||||
:top? true}}
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :all-connections)}}}
|
||||
:component manage-all-connections/views}
|
||||
|
||||
;; BUG REPORT
|
||||
{:name :bug-report
|
||||
:options {:insets {:top? true}}
|
||||
:options {:topBar {:visible false}}
|
||||
:component bug-report/bug-report}])
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
:margin-top 6}
|
||||
[quo/button
|
||||
{:type :secondary
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/hide-old])}
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/hide])}
|
||||
(i18n/label :t/cancel)]
|
||||
[quo/button
|
||||
{:type :secondary
|
||||
@@ -201,7 +201,7 @@
|
||||
:accessibility-label :see-fee-suggestions
|
||||
;;:on-press
|
||||
#_(re-frame/dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[fee-bottom-sheet-eip1559 fee-display-symbol])
|
||||
:content-height 270}])}
|
||||
@@ -285,7 +285,7 @@
|
||||
{:type :secondary
|
||||
:accessibility-label :set-custom-fee
|
||||
:on-press #(re-frame/dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[fee-bottom-sheet-eip1559-custom fee-display-symbol])
|
||||
:content-height 270}])}
|
||||
|
||||
@@ -470,7 +470,7 @@
|
||||
{:size :small
|
||||
:title (i18n/label :t/advanced)
|
||||
:chevron true
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old {:content sheets/advanced}])}]])
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet {:content sheets/advanced}])}]])
|
||||
|
||||
(views/defview sheet
|
||||
[{:keys [from contact amount token cancel?] :as tx}]
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
{:title name
|
||||
:right-accessories
|
||||
[{:icon :main-icons/more
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content sheets/account-settings
|
||||
:content-height 60}])}]}]
|
||||
[react/animated-scroll-view
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch event))
|
||||
|
||||
(defn accounts-options
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
[status-im.ui.screens.wallet.accounts.common :as common]
|
||||
[status-im.ui.screens.wallet.accounts.sheets :as sheets]
|
||||
[status-im.ui.screens.wallet.accounts.styles :as styles]
|
||||
[status-im.ui.screens.wallet.buy-crypto.views :as buy-crypto]
|
||||
[react-native.safe-area :as safe-area])
|
||||
[status-im.ui.screens.wallet.buy-crypto.views :as buy-crypto])
|
||||
(:require-macros [status-im.utils.views :as views]))
|
||||
|
||||
(views/defview account-card
|
||||
@@ -55,7 +54,7 @@
|
||||
[react/touchable-highlight
|
||||
{:style styles/card-icon-more
|
||||
:on-press #(re-frame/dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (fn [] [sheets/account-card-actions account type wallet])
|
||||
:content-height 130}])}
|
||||
[icons/icon :main-icons/more {:color colors/white-persist}]]]]]))
|
||||
@@ -63,7 +62,7 @@
|
||||
(defn add-card
|
||||
[card-width]
|
||||
[react/touchable-highlight
|
||||
{:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
{:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content sheets/add-account
|
||||
:content-height 260}])
|
||||
:accessibility-label "add-new-account"}
|
||||
@@ -291,7 +290,7 @@
|
||||
[quo2.button/button
|
||||
{:type :grey
|
||||
:size 32
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content sheets/add-account
|
||||
:content-height 260}])}
|
||||
"Add account"]]]))))
|
||||
@@ -302,36 +301,33 @@
|
||||
;mainnet? @(re-frame/subscribe [:mainnet?])
|
||||
selected-account-atom (reagent/atom nil)]
|
||||
(fn []
|
||||
[safe-area/consumer
|
||||
(fn [{:keys [top]}]
|
||||
[react/view
|
||||
{:style {:flex 1
|
||||
:padding-top top
|
||||
:background-color (quo2.colors/theme-colors quo2.colors/neutral-5
|
||||
quo2.colors/neutral-95)}}
|
||||
[react/view {:padding-horizontal 20}
|
||||
[react/view {:flex-direction :row :height 56 :align-items :center :justify-content :flex-end}
|
||||
[quo2.button/button
|
||||
{:icon true
|
||||
:size 32
|
||||
:type :grey
|
||||
:accessibility-label :accounts-qr-code
|
||||
:on-press #(re-frame/dispatch
|
||||
[::qr-scanner/scan-code
|
||||
{:handler :wallet.send/qr-scanner-result}])}
|
||||
:i/placeholder]
|
||||
[react/view {:width 12}]
|
||||
[quo2.button/button
|
||||
{:icon true
|
||||
:size 32
|
||||
:type :grey
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
{:content (sheets/accounts-options mnemonic)}])
|
||||
:accessibility-label :accounts-more-options}
|
||||
:i/placeholder]]
|
||||
[total-value]
|
||||
[accounts selected-account-atom]]
|
||||
[account.views/account-new @selected-account-atom]])])))
|
||||
[react/view
|
||||
{:style {:flex 1
|
||||
:background-color (quo2.colors/theme-colors quo2.colors/neutral-5
|
||||
quo2.colors/neutral-95)}}
|
||||
[react/view {:padding-horizontal 20}
|
||||
[react/view {:flex-direction :row :height 56 :align-items :center :justify-content :flex-end}
|
||||
[quo2.button/button
|
||||
{:icon true
|
||||
:size 32
|
||||
:type :grey
|
||||
:accessibility-label :accounts-qr-code
|
||||
:on-press #(re-frame/dispatch
|
||||
[::qr-scanner/scan-code
|
||||
{:handler :wallet.send/qr-scanner-result}])}
|
||||
:i/placeholder]
|
||||
[react/view {:width 12}]
|
||||
[quo2.button/button
|
||||
{:icon true
|
||||
:size 32
|
||||
:type :grey
|
||||
:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (sheets/accounts-options mnemonic)}])
|
||||
:accessibility-label :accounts-more-options}
|
||||
:i/placeholder]]
|
||||
[total-value]
|
||||
[accounts selected-account-atom]]
|
||||
[account.views/account-new @selected-account-atom]])))
|
||||
|
||||
(defn accounts-overview-old
|
||||
[]
|
||||
@@ -350,7 +346,7 @@
|
||||
{:handler :wallet.send/qr-scanner-result}])
|
||||
:icon :main-icons/qr
|
||||
:accessibility-label :accounts-qr-code}
|
||||
{:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
{:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (sheets/accounts-options
|
||||
mnemonic)}])
|
||||
:icon :main-icons/more
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
|
||||
(defn show-accounts-list
|
||||
[]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(js/setTimeout #(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(js/setTimeout #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn [] [accounts-list :to :wallet.send/set-field])
|
||||
:content-height 300}])
|
||||
400))
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
{:on-press (when-not request?
|
||||
#(do
|
||||
(re-frame/dispatch [:dismiss-keyboard])
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn [] [sheets/assets (:address from)])
|
||||
:content-height 300}])))}
|
||||
[react/view
|
||||
@@ -70,7 +70,7 @@
|
||||
:chevron true
|
||||
:on-press #(do
|
||||
(re-frame/dispatch [:dismiss-keyboard])
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet-old
|
||||
(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn [] [sheets/accounts-list :from event])
|
||||
:content-height 300}]))}])
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
(defn hide-sheet-and-dispatch
|
||||
[event]
|
||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch event))
|
||||
|
||||
(defn custom-token-actions-view
|
||||
@@ -65,7 +65,7 @@
|
||||
:on-press #(re-frame/dispatch
|
||||
[:wallet.settings/toggle-visible-token (keyword symbol) (not checked?)])
|
||||
:on-long-press #(re-frame/dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (custom-token-actions-view token)}])}])}))
|
||||
|
||||
(defn- render-token-wrapper
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
:margin-left 20
|
||||
:margin-bottom 36
|
||||
:justify-content :center
|
||||
:align-items :center
|
||||
:margin-top 40})
|
||||
:align-items :center})
|
||||
|
||||
(def chat-button
|
||||
{:position :absolute
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
[status-im.react-native.resources :as resources]
|
||||
[status-im2.common.contact-list-item.view :as contact-list-item]))
|
||||
|
||||
(defn- hide-sheet-and-dispatch
|
||||
[event]
|
||||
(rf/dispatch [:bottom-sheet/hide])
|
||||
(rf/dispatch event))
|
||||
|
||||
(defn- no-contacts-view
|
||||
[]
|
||||
[rn/view
|
||||
@@ -40,7 +45,7 @@
|
||||
(i18n/label :t/invite-friends)]
|
||||
[quo2/button
|
||||
{:type :grey
|
||||
:on-press #(rf/dispatch [:open-modal :new-contact])}
|
||||
:on-press #(hide-sheet-and-dispatch [:open-modal :new-contact])}
|
||||
(i18n/label :t/add-a-contact)]])
|
||||
|
||||
(defn contact-item-render
|
||||
@@ -64,17 +69,18 @@
|
||||
(let [contacts (rf/sub [:contacts/sorted-and-grouped-by-first-letter])
|
||||
selected-contacts-count (rf/sub [:selected-contacts-count])
|
||||
selected-contacts (rf/sub [:group/selected-contacts])
|
||||
window-height (rf/sub [:dimensions/window-height])
|
||||
one-contact-selected? (= selected-contacts-count 1)
|
||||
contacts-selected? (pos? selected-contacts-count)
|
||||
{:keys [primary-name public-key]} (when one-contact-selected?
|
||||
(rf/sub [:contacts/contact-by-identity
|
||||
(first selected-contacts)]))
|
||||
no-contacts? (empty? contacts)]
|
||||
[:<>
|
||||
[rn/view {:style {:height (* window-height 0.9)}}
|
||||
[quo2/button
|
||||
{:type :grey
|
||||
:icon true
|
||||
:on-press #(rf/dispatch [:navigate-back])
|
||||
:on-press #(rf/dispatch [:bottom-sheet/hide])
|
||||
:style style/contact-selection-close
|
||||
:override-background-color (quo2.colors/theme-colors quo2.colors/neutral-10
|
||||
quo2.colors/neutral-90)}
|
||||
@@ -111,8 +117,10 @@
|
||||
:accessibility-label :next-button
|
||||
:on-press (fn []
|
||||
(if one-contact-selected?
|
||||
(rf/dispatch [:chat.ui/start-chat public-key])
|
||||
(rf/dispatch [:navigate-to :new-group])))}
|
||||
(hide-sheet-and-dispatch [:chat.ui/start-chat
|
||||
public-key])
|
||||
(hide-sheet-and-dispatch [:navigate-to
|
||||
:new-group])))}
|
||||
(if one-contact-selected?
|
||||
(i18n/label :t/chat-with {:selected-user primary-name})
|
||||
(i18n/label :t/setup-group-chat))])]))])
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
{:on-press
|
||||
(fn []
|
||||
(re-frame/dispatch
|
||||
[:bottom-sheet/show-sheet-old
|
||||
[:bottom-sheet/show-sheet
|
||||
{:content (sheets/options chat-id message-id)
|
||||
:content-height 200}])
|
||||
(rn/dismiss-keyboard!))}
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
:active-opacity 1
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:pin-message/hide-pin-limit-modal chat-id])
|
||||
(rf/dispatch [:pin-message/show-pins-bottom-sheet chat-id])
|
||||
(rf/dispatch [:bottom-sheet/show-sheet :pinned-messages-list
|
||||
chat-id])
|
||||
(rf/dispatch [:dismiss-keyboard]))
|
||||
:style style/view-pinned-messages}
|
||||
[quo/text {:size :paragraph-2 :weight :medium :color colors/white}
|
||||
|
||||
@@ -155,36 +155,19 @@
|
||||
(callback nil))))
|
||||
(callback nil))))))
|
||||
|
||||
(defn save-user-password!
|
||||
[key-uid password]
|
||||
(save-credentials
|
||||
key-uid
|
||||
key-uid
|
||||
(security/safe-unmask-data password)
|
||||
#(when-not %
|
||||
(log/error
|
||||
(str "Error while saving password."
|
||||
" "
|
||||
"The app will continue to work normally, "
|
||||
"but you will have to login again next time you launch it.")))))
|
||||
|
||||
(defn save-auth-method!
|
||||
[key-uid method]
|
||||
(save-credentials
|
||||
(str key-uid "-auth")
|
||||
key-uid
|
||||
method
|
||||
#(when-not %
|
||||
(log/error
|
||||
(str "Error while saving auth method."
|
||||
" "
|
||||
"The app will continue to work normally, "
|
||||
"but you will have to login again next time you launch it.")))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:keychain/save-user-password
|
||||
(fn [[key-uid masked-password]]
|
||||
(save-user-password! key-uid masked-password)))
|
||||
(fn [[key-uid password]]
|
||||
(save-credentials
|
||||
key-uid
|
||||
key-uid
|
||||
(security/safe-unmask-data password)
|
||||
#(when-not %
|
||||
(log/error
|
||||
(str "Error while saving password."
|
||||
" "
|
||||
"The app will continue to work normally, "
|
||||
"but you will have to login again next time you launch it."))))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:keychain/save-auth-method
|
||||
@@ -195,7 +178,16 @@
|
||||
"method"
|
||||
method)
|
||||
(when-not (empty? key-uid) ; key-uid may be nil after restore from local pairing
|
||||
(save-auth-method! key-uid method))))
|
||||
(save-credentials
|
||||
(str key-uid "-auth")
|
||||
key-uid
|
||||
method
|
||||
#(when-not %
|
||||
(log/error
|
||||
(str "Error while saving auth method."
|
||||
" "
|
||||
"The app will continue to work normally, "
|
||||
"but you will have to login again next time you launch it.")))))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:keychain/save-keycard-keys
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user