Compare commits

...
Author SHA1 Message Date
jo-mut e39c249868 Fix: logo and community image banner not showing
https://github.com/status-im/status-go/compare/4d705ce1...6b1cac69
2023-03-28 13:51:35 +03:00
J.M.N c6addce62a refactored scroll-page component to use flatlist instead of scroll view 2023-03-28 13:51:34 +03:00
J.M.N 18e2652ec3 mute community 2023-03-28 13:51:34 +03:00
J.M.N e938c2393a Fix: scroll-page component sticky header height 2023-03-28 13:51:34 +03:00
yqrashawn ac2d10bc5d fix: disable edit image message until it's implemented (#15496) 2023-03-28 17:04:01 +08:00
Ibrahem Khalil e825f930fa Add accessibility label for community options button (#15484) 2023-03-28 07:50:07 +02:00
frank 394dfde87b fixed #15446 (App crashes on syncing QR...) (#15464)
https://github.com/status-im/status-go/compare/4cc53630...458f2817
2023-03-28 12:27:22 +08:00
Alexander e4db23b0a9 Center input value within the field (#15472) 2023-03-27 23:00:33 +02:00
Ulises Manuel CárdenasandJamie Caprani 94ddbbcd2e Add checked? property, dark blur variant & tests to disclaimer component
Co-authored-by: Jamie Caprani <jamiecaprani@gmail.com>
2023-03-27 14:06:09 -06:00
Parvesh Monu ac27314547 fix login/forget password button overlaps password input (#15488) 2023-03-27 22:08:05 +05:30
Icaro Motta 7a4b12acf4 Make component test helpers usable from the REPL (#15468)
This commit makes the test-helpers.component namespace loadable in the REPL,
plus other changes that allow for a reasonably enjoyable RDD (REPL-Driven
Development) workflow.

Why? I want to be able to get instant feedback when I render a component with
the RN Testing Library (RNTL), and only once I'm satisfied with my findings is
when I proceed to write/update the tests. This nearly instant feedback loop is
only feasible using the ClojureScript REPL, and I'd rather not endure long
recompilation cycles.

Note that by REPL I mean connecting to the CLJS REPL of the Shadow-CLJS :mobile
target.

Essentially, this is what this commit does:

- [x] Allow the test-helpers.component namespace to be evaluated in the REPL.
      This is now possible because I changed all functions that assumed js/jest
      existed with a guard clause using the CLJS macro exists?. Without the
      guard clauses, evaluating the namespace explodes due to stuff like
      js/jest.useFakeTimers that fail in compile time (it's a syntax sugar
      macro).
- [x] Change the family of functions to get the translation by text to either
      translate using i18n/label or translate with the dummy prefix tx:,
      depending if the code is running inside the Jest runtime or not.
- [x] Wrap remaining RNTL query functions, except for the find-* ones, since
      they don't work at all outside the Jest runtime.
- [x] All wrapped functions support the original arguments supported by RNTL.
      Arguments are always converted with clj->js.
- [x] All wrapped functions can optionally take a node (ReactTestInstance) as
      their first argument, otherwise the global screen object will be used.
      This is very important! See the explanation on section Doesn't RNTL
      recommend using the screen object?
- [x] Update Shadow-CLJS preloads, so that (in development) you can fire off the
      REPL and always be ready to call component test helpers. This is critical!

What else would be possible? Just an idea, but now that we can easily render
components using the same machinery provided by RNTL in the tests, we can
roughly implement Storybook's Play function
https://storybook.js.org/docs/react/writing-stories/play-function

Lesson learned: In the REPL, you may need to call
(re-frame.core/clear-subscription-cache!), otherwise you will experience
subscriptions returning the same value if their arguments are the same. For
example, I faced this while playing with the namespace
status-im2.contexts.communities.menus.community-options.component-spec. There
are better ways to solve this particular problem in the context of tests if we
use the tooling provided by day8.re-frame.test.

Doesn't RNTL recommend using the screen object? Indeed, it is recommended to use
the screen object instead of destructuring the results of RNTL render. It's just
easier and less error prone, but this only works reliably within the Jest
runtime, since it automatically cleans up rendered state after each test. When
using the REPL this is no longer the case, and I faced some errors, like Unable
to find node on an unmounted component, where RNTL would refuse to re-render
components, even if I explicitly unmounted them or called cleanup.

The only reliable solution I found was to store the result of render (a node)
and pass it to every subsequent call. This is not a workaround, it's officially
supported, but it's a tad less convenient. You can also not pass the node
reference and it should work most of the time.

Practical examples

Workflow suggestion: write your local experiments in the same namespace as the
component spec and within the comment macro. This way, you can have the Jest
watcher running and a REPL connected to :mobile, and they won't step on each
other. For the test watcher, I usually change quo2-core-spec or
status-im2.core-spec to only require what I'm interested, otherwise Jest
consumes way too many resources.

```clojure
;; Namespace quo2.components.colors.color-picker.component-spec
(h/test "color picker color changed"
  (let [selected (reagent/atom nil)]
    (h/render [color-picker/view {:on-change #(reset! selected %)}])
    (h/fire-event :press (get (h/get-all-by-label-text :color-picker-item) 0))
    (-> (h/expect @selected)
        (.toStrictEqual :blue))))

(comment
  (def selected (atom nil))
  (def c (h/render [color-picker/view {:on-change #(reset! selected %)}]))

  (h/fire-event :press (get (h/get-all-by-label-text c :color-picker-item) 0))

  ;; Options are passed down converted to JS types.
  (h/debug c {:message "Rendering header"})

  @selected ; => :blue
)
```

```clojure
;; Namespace quo2.components.tags.--tests--.status-tags-component-spec
(h/test "renders status tag with pending type"
  (render-status-tag {:status {:type :pending}
                      :label  "Pending"
                      :size   :small})
  (-> (h/expect (h/get-all-by-label-text :status-tag-pending))
      (.toBeTruthy))
  (-> (h/expect (h/get-by-text "Pending"))
      (.toBeTruthy)))

(comment
  (def c (render-status-tag {:status {:type :pending}
                             :label  "Pending"
                             :size   :small}))

  (h/get-all-by-label-text c :status-tag-pending))
```

```clojure
;; Namespace status-im2.contexts.communities.menus.community-options.component-spec
(h/test "joined and muted community"
  (setup-subs {:communities/my-pending-request-to-join nil
               :communities/community                  {:joined       true
                                                        :muted        true
                                                        :token-gated? true}})
  (h/render [options/community-options-bottom-sheet {:id "test"}])
  (-> (h/expect (h/get-by-translation-text :unmute-community))
      (.toBeTruthy)))

(comment
  (setup-subs {:communities/my-pending-request-to-join nil
               :communities/community                  {:joined       true
                                                        :muted        true
                                                        :token-gated? true}})
  (def c (h/render [options/community-options-bottom-sheet {:id "test"}]))
  (some? (h/get-by-translation-text c :invite-people-from-contacts)) ; => true
)
```
2023-03-27 11:54:56 -03:00
Brian Sztamfater 4e6dea6b36 feat: enable biometrics screen 2023-03-27 14:23:23 +01:00
Ulises M 899f89c800 Implement create password screens 2023-03-27 14:21:39 +01:00
Volodymyr Kozieiev b121678281 Fix mentions component remounting that forced user to click 2 times (#15474) 2023-03-27 12:29:09 +01:00
Roman Volosovskyi 7f87c007c1 [#15471] Add PreviewPrivacy to CreateAccountRequest 2023-03-27 09:57:07 +02:00
Churikova Tetiana 11726df060 e2e: add to run_in_parallel args handling 2023-03-26 20:57:06 +02:00
John Ngei 2f84cfd354 Onboarding notifications flow
* enable notifications onboarding

* added blurred background

* support navigate to previous screen
2023-03-25 01:40:36 +03:00
Parvesh Monu 7b60a5f867 Refactor app theme management (#15455) 2023-03-24 22:04:55 +05:30
Mohamed Javid 7d4be37111 [Feature] Sign in by scanning sync QR code (#15416) 2023-03-24 20:36:25 +05:30
Jamie Caprani 2f19badc6c Add seed phrase flow & customization color 2023-03-24 14:24:18 +00:00
Roman Volosovskyi 3b034265c0 [#15443] Show community name/description in message on Android 2023-03-24 12:53:13 +01:00
Churikova Tetiana 5fffc230c9 e2e: new community screens 2023-03-24 11:22:02 +01:00
Parvesh Monu 5c92b7eb1e remove navigate-to-nav2 event (#15454) 2023-03-24 11:14:17 +01:00
frank 45da51bea6 changes corresponding to refactor of local pair of status-go (PR #3248) (#15412) 2023-03-23 20:23:26 +08:00
Alexander 8d166a3a52 Fix for sender's name, profile icon, chat key, timestamp being lost for messages that contain images (#15426)
* Fix for sender's name, profile icon, chat key, timestamp being lost for messages that contain images

Lint fix

Lint fix

* Lint fix

* Text fix
2023-03-23 10:10:07 +01:00
Churikova Tetiana 401f7d7383 e2e: activity centre and more checks 2023-03-22 18:20:48 +01:00
erikseppanen c238ebe36e Add validation for when adding a contact (#15192) 2023-03-22 13:13:56 -04:00
Jamie Caprani a502da6ea4 https://github.com/status-im/status-go/compare/9c1c01c6...48eb7052 (#15401)
feat: add create profile to onboarding
2023-03-22 06:51:38 -07:00
Omar Basem f9255100a1 feat: bottom sheet screen (#15399)
* feat: bottom sheet screen
2023-03-22 17:31:20 +04:00
yqrashawn daa78b4171 fix: still need this fix to run-ios on m1 mac (#15439) 2023-03-22 21:13:51 +08:00
yqrashawn f2c8f21336 fix: reply with album (#15424) 2023-03-22 21:04:39 +08:00
Icaro Motta 554476ede9 Remove support for cancelling outgoing contact requests (#15415)
Removes the feature that allows users to cancel outgoing contact requests (possible spam vector). From now on, the user who sent the contact request will only be able to see the notification in the pending state. It seems this feature will be revisited in the future, but for now the agreement is to do the simplest thing and remove it.

Fixes https://github.com/status-im/status-mobile/issues/15357

Steps to test:

- Send CR from A to B.
- A should see a new notification in the pending state.
- B should receive a notification. If B accepts the CR, then A's pending CR disappears. If B declines the CR, then A's notification stays pending forever.

Note: As expected, A can swipe left->right to mark the outgoing pending notification as read or swipe right->left to delete it.
2023-03-22 08:59:32 -03:00
pavloburykh 8c358d4ae4 e2e: fix login
Signed-off-by: Parvesh Monu <parvesh.dhullmonu@gmail.com>
2023-03-22 13:52:16 +05:30
Parvesh Monu 937c128c08 Onboarding app locked flow 2023-03-22 13:41:05 +05:30
Parvesh Monu 03cf4cec0e fix intro navigation (#15430) 2023-03-22 01:27:09 +05:30
Ulises Manuel Cárdenas 554f8aff09 Add input tests
Also fixes text align on non-multiline inputs
2023-03-21 12:28:02 -06:00
jakub d71cfd12c1 nix: unpatched Node modules for Gradle deps update
Otherwise we can end up with Gradle failing to find the dependencies
because we've patched away all entries referencing external repos.

Also made the regex in AWS parser a but more strict.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-21 15:21:58 +01:00
Omar Basem a5d767515d Remove 100ms delay when opening image (#15422)
* remove image delay
2023-03-21 17:57:26 +04:00
jakub c38fdec5b7 ci: upgrade Node.js from 16.17.1 to 18.9.1
The End-of-Life for Node.js 16 is set to 11th of September 2023.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-21 13:12:56 +01:00
Jamie Caprani ada7a02c21 chore: add skeleton for sign in with syncing flow 2023-03-21 09:42:31 +00:00
Siddarth Kumar 3f3cbe98a4 set signing to auto for debug builds (#15420) 2023-03-21 13:10:55 +05:30
Churikova Tetiana a74da63c32 e2e: activity center 2023-03-20 13:58:09 +01:00
Volodymyr Kozieiev 6d006c0ea9 Updated to status-go version without sending status problem (#15148) 2023-03-20 12:11:16 +00:00
Jamie Caprani f6f5dfbe03 chore: add skeleton flow for onboarding (#15334) 2023-03-17 05:19:39 -07:00
Roman Volosovskyi d608b88e26 [#14622] Show ugly network state icons and connection bottom sheet 2023-03-17 11:00:00 +01:00
Alexander 854e372f73 Long quoted message in the reply box is not cut, goes beyond reply box and overlapped by cancel button (#15382)
* Long quoted message in the reply box is not cut, goes beyond reply box and overlapped by cancel button

* Lint fix
2023-03-17 10:18:14 +01:00
yqrashawn 2e0fa29806 fix: mark :albumize? true when rebuild message (#15286) 2023-03-17 16:25:48 +08:00
Ulises Manuel Cárdenas 0e36190516 Fix input padding & add blur and override-theme properties
Add with-let formatting style
2023-03-16 12:59:34 -06:00
Brian Sztamfater 74da82c61a feat: implement new splash screen static version
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-03-16 12:57:32 -03:00
Omar Basem b70dd2fe67 fix: image typo (#15390) 2023-03-16 19:55:45 +04:00
Andrea Maria Piana b44e4c6d59 Add collapsing of categories (#15306)
https://github.com/status-im/status-go/compare/290579f7...44a0f5b7

Fixes: #15290

This commit adds collapsing of categories.
It also adds ordering of chats/categories as it was previously ignored.

It also removes the communities/enabled? flag as it's not used anymore,
and communities should always be enabled.
2023-03-16 10:17:50 +00:00
jakub a0697d9242 ios: upgrade Cocoapods to 1.12.0, drop ancient fix
Upgrading to Cocoapods and Gems should remove the need for this hack-fix.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-16 10:24:27 +01:00
185 changed files with 4886 additions and 1865 deletions
+1
View File
@@ -30,6 +30,7 @@
"list-comp" :binding "list-comp" :binding
"defview" :arg1-body "defview" :arg1-body
"letsubs" :binding "letsubs" :binding
"with-let" "let"
"testing" :arg1-body "testing" :arg1-body
"deftest-sub" :arg1-body "deftest-sub" :arg1-body
"wait-for" :arg1-body "wait-for" :arg1-body
+1
View File
@@ -310,6 +310,7 @@ dependencies {
implementation "com.facebook.react:react-native:+" // From node_modules implementation "com.facebook.react:react-native:+" // From node_modules
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation "androidx.core:core-splashscreen:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni' exclude group:'com.facebook.fbjni'
+2 -1
View File
@@ -29,7 +29,7 @@
android:allowBackup="false" android:allowBackup="false"
android:label="@string/app_name" android:label="@string/app_name"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme" android:theme="@style/Theme.AppSplash"
android:name=".MainApplication" android:name=".MainApplication"
android:largeHeap="true" android:largeHeap="true"
android:usesCleartextTraffic="true"> android:usesCleartextTraffic="true">
@@ -38,6 +38,7 @@
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/Theme.AppSplash"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" android:windowSoftInputMode="adjustResize"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
@@ -21,6 +21,7 @@ import android.content.SharedPreferences;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.provider.Settings; import android.provider.Settings;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import com.facebook.react.ReactActivityDelegate; import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView; import com.facebook.react.ReactRootView;
import com.facebook.react.modules.core.DeviceEventManagerModule; import com.facebook.react.modules.core.DeviceEventManagerModule;
@@ -31,7 +32,7 @@ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
import com.facebook.react.ReactFragmentActivity; import com.facebook.react.ReactFragmentActivity;
import com.reactnativenavigation.NavigationActivity; import com.reactnativenavigation.NavigationActivity;
import com.facebook.react.modules.core.PermissionListener; import com.facebook.react.modules.core.PermissionListener;
import org.devio.rn.splashscreen.SplashScreen; import androidx.core.splashscreen.SplashScreen;
import java.util.Properties; import java.util.Properties;
import im.status.ethereum.module.StatusThreadPoolExecutor; import im.status.ethereum.module.StatusThreadPoolExecutor;
@@ -42,6 +43,8 @@ public class MainActivity extends NavigationActivity
@Nullable private PermissionListener mPermissionListener; @Nullable private PermissionListener mPermissionListener;
private boolean keepSplash = true;
private final int SPLASH_DELAY = 3200;
private static void registerUncaughtExceptionHandler(final Context context) { private static void registerUncaughtExceptionHandler(final Context context) {
final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler(); final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
@@ -121,21 +124,8 @@ public class MainActivity extends NavigationActivity
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
SplashScreen splashScreen = SplashScreen.installSplashScreen(this);
switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) { setTheme(R.style.DarkTheme);
case Configuration.UI_MODE_NIGHT_YES:
setTheme(R.style.DarkTheme);
SplashScreen.show(this, R.style.DarkTheme, R.id.lottie);
break;
case Configuration.UI_MODE_NIGHT_NO:
setTheme(R.style.LightTheme);
SplashScreen.show(this, R.style.LightTheme, R.id.lottie);
break;
default:
setTheme(R.style.LightTheme);
SplashScreen.show(this, R.style.LightTheme, R.id.lottie);
}
SplashScreen.setAnimationFinished(true);
// Make sure we get an Alert for every uncaught exceptions // Make sure we get an Alert for every uncaught exceptions
registerUncaughtExceptionHandler(MainActivity.this); registerUncaughtExceptionHandler(MainActivity.this);
@@ -197,6 +187,11 @@ public class MainActivity extends NavigationActivity
} }
}; };
splashScreen.setKeepOnScreenCondition(() -> keepSplash);
Handler handler = new Handler();
handler.postDelayed(() -> keepSplash = false, SPLASH_DELAY);
StatusThreadPoolExecutor.getInstance().execute(r); StatusThreadPoolExecutor.getInstance().execute(r);
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@@ -2,4 +2,6 @@
<resources> <resources>
<color name="alert_background">#ffffff</color> <color name="alert_background">#ffffff</color>
<color name="alert_text">#000000</color> <color name="alert_text">#000000</color>
<color name="splash_background">#09101C</color>
<color name="splash_status_bar_color">#ffffff</color>
</resources> </resources>
@@ -0,0 +1,13 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.AppSplash" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/splash_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_logo</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
<!-- Status bar and Nav bar configs -->
<item name="android:statusBarColor" tools:targetApi="l">@color/splash_background</item>
<item name="android:windowLightStatusBar">false</item>
<item name="postSplashScreenTheme">@style/DarkTheme</item>
</style>
</resources>
+29
View File
@@ -61,6 +61,35 @@ the source file. For a real example, see
[rn/view (do-something)]]) [rn/view (do-something)]])
``` ```
### Always add styles inside the `:style` key
Although when compiling ReactNative for mobile some components are able work with
their styles in the top-level of the properties map, prefer to add them inside the
`:style` key in order to separate styles from properties:
```clojure
;; bad
[rn/button {:flex 1
:padding-vertical 10
:padding-horizontal 20
:on-press #(js/alert "Hi!")
:title "Button"}]
;; good
[rn/button {:style {:flex 1
:padding-vertical 10
:padding-horizontal 20}
:on-press #(js/alert "Hi!")
:title "Button"}]
;; better
;; (define them in a style ns & place them inside `:style` key)
[rn/button {:style (style/button)
:on-press #(js/alert "Hi!")
:title "Button"}
]
```
### Don't use percents to define width/height ### Don't use percents to define width/height
In ReactNative, all layouts use the [flexbox In ReactNative, all layouts use the [flexbox
+32 -32
View File
@@ -1,24 +1,24 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
CFPropertyList (3.0.5) CFPropertyList (3.0.6)
rexml rexml
addressable (2.8.1) addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15) artifactory (3.0.15)
atomos (0.1.3) atomos (0.1.3)
aws-eventstream (1.2.0) aws-eventstream (1.2.0)
aws-partitions (1.644.0) aws-partitions (1.728.0)
aws-sdk-core (3.159.0) aws-sdk-core (3.170.0)
aws-eventstream (~> 1, >= 1.0.2) aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0) aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1) jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.58.0) aws-sdk-kms (1.63.0)
aws-sdk-core (~> 3, >= 3.127.0) aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.114.0) aws-sdk-s3 (1.119.1)
aws-sdk-core (~> 3, >= 3.127.0) aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1) aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4) aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.2) aws-sigv4 (1.5.2)
@@ -36,8 +36,8 @@ GEM
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1) dotenv (2.8.1)
emoji_regex (3.2.3) emoji_regex (3.2.3)
excon (0.93.0) excon (0.99.0)
faraday (1.10.2) faraday (1.10.3)
faraday-em_http (~> 1.0) faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0) faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1) faraday-excon (~> 1.1)
@@ -66,7 +66,7 @@ GEM
faraday_middleware (1.2.0) faraday_middleware (1.2.0)
faraday (~> 1.0) faraday (~> 1.0)
fastimage (2.2.6) fastimage (2.2.6)
fastlane (2.210.1) fastlane (2.212.1)
CFPropertyList (>= 2.3, < 4.0.0) CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0) addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0) artifactory (~> 3.0)
@@ -109,9 +109,9 @@ GEM
fastlane-plugin-diawi (2.1.0) fastlane-plugin-diawi (2.1.0)
rest-client (>= 2.0.0) rest-client (>= 2.0.0)
gh_inspector (1.1.3) gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.29.0) google-apis-androidpublisher_v3 (0.36.0)
google-apis-core (>= 0.9.0, < 2.a) google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.9.0) google-apis-core (0.11.0)
addressable (~> 2.5, >= 2.5.1) addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a) googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a) httpclient (>= 2.8.1, < 3.a)
@@ -120,10 +120,10 @@ GEM
retriable (>= 2.0, < 4.a) retriable (>= 2.0, < 4.a)
rexml rexml
webrick webrick
google-apis-iamcredentials_v1 (0.15.0) google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.9.0, < 2.a) google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.11.0) google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.9.0, < 2.a) google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.19.0) google-apis-storage_v1 (0.19.0)
google-apis-core (>= 0.9.0, < 2.a) google-apis-core (>= 0.9.0, < 2.a)
google-cloud-core (1.6.0) google-cloud-core (1.6.0)
@@ -131,8 +131,8 @@ GEM
google-cloud-errors (~> 1.0) google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0) google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0) faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.0) google-cloud-errors (1.3.1)
google-cloud-storage (1.43.0) google-cloud-storage (1.44.0)
addressable (~> 2.8) addressable (~> 2.8)
digest-crc (~> 0.4) digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1) google-apis-iamcredentials_v1 (~> 0.1)
@@ -140,7 +140,7 @@ GEM
google-cloud-core (~> 1.6) google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a) googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0) mini_mime (~> 1.0)
googleauth (1.2.0) googleauth (1.3.0)
faraday (>= 0.17.3, < 3.a) faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0) jwt (>= 1.4, < 3.0)
memoist (~> 0.16) memoist (~> 0.16)
@@ -152,14 +152,14 @@ GEM
http-cookie (1.0.5) http-cookie (1.0.5)
domain_name (~> 0.5) domain_name (~> 0.5)
httpclient (2.8.3) httpclient (2.8.3)
jmespath (1.6.1) jmespath (1.6.2)
json (2.6.2) json (2.6.3)
jwt (2.5.0) jwt (2.7.0)
memoist (0.16.2) memoist (0.16.2)
mime-types (3.4.1) mime-types (3.4.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105) mime-types-data (3.2023.0218.1)
mini_magick (4.11.0) mini_magick (4.12.0)
mini_mime (1.1.2) mini_mime (1.1.2)
multi_json (1.15.0) multi_json (1.15.0)
multipart-post (2.0.0) multipart-post (2.0.0)
@@ -168,8 +168,8 @@ GEM
netrc (0.11.0) netrc (0.11.0)
optparse (0.1.1) optparse (0.1.1)
os (1.1.4) os (1.1.4)
plist (3.6.0) plist (3.7.0)
public_suffix (5.0.0) public_suffix (5.0.1)
rake (13.0.6) rake (13.0.6)
representable (3.2.0) representable (3.2.0)
declarative (< 0.1.0) declarative (< 0.1.0)
@@ -191,7 +191,7 @@ GEM
faraday (>= 0.17.5, < 3.a) faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0) jwt (>= 1.5, < 3.0)
multi_json (~> 1.10) multi_json (~> 1.10)
simctl (1.6.8) simctl (1.6.10)
CFPropertyList CFPropertyList
naturally naturally
terminal-notifier (2.0.0) terminal-notifier (2.0.0)
@@ -207,7 +207,7 @@ GEM
unf_ext unf_ext
unf_ext (0.0.8.2) unf_ext (0.0.8.2)
unicode-display_width (1.8.0) unicode-display_width (1.8.0)
webrick (1.7.0) webrick (1.8.1)
word_wrap (1.0.0) word_wrap (1.0.0)
xcodeproj (1.22.0) xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0) CFPropertyList (>= 2.3.3, < 4.0)
@@ -230,4 +230,4 @@ DEPENDENCIES
fastlane-plugin-diawi fastlane-plugin-diawi
BUNDLED WITH BUNDLED WITH
2.3.20 2.4.6
+48 -48
View File
@@ -45,10 +45,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0x58gl654kcx65wyrix5swh5f9y431881a5mql8g3zwshd81fyb3"; sha256 = "0q3q19insq5ablmr6ypq033qg1gsar5mdphhp7xg80rd615cnq97";
type = "gem"; type = "gem";
}; };
version = "1.644.0"; version = "1.728.0";
}; };
aws-sdk-core = { aws-sdk-core = {
dependencies = ["aws-eventstream" "aws-partitions" "aws-sigv4" "jmespath"]; dependencies = ["aws-eventstream" "aws-partitions" "aws-sigv4" "jmespath"];
@@ -56,10 +56,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0cdjmpblskjmhag7wx6scwkd3cw1gfh85syr599s05k8zp6y4qw8"; sha256 = "0zc4zhv2wq7s5p8c9iaplama1lpg2kwldg81j83c8w4xydf1wd2r";
type = "gem"; type = "gem";
}; };
version = "3.159.0"; version = "3.170.0";
}; };
aws-sdk-kms = { aws-sdk-kms = {
dependencies = ["aws-sdk-core" "aws-sigv4"]; dependencies = ["aws-sdk-core" "aws-sigv4"];
@@ -67,10 +67,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1p2dbmb1vl8vk2xchrrsp2sxa95ya5w7ll1jlw89yyhls3l2l1ag"; sha256 = "0v87zi28dfmrv7bv91yfldccnpd63n295siirbz7wqv1rajn8n02";
type = "gem"; type = "gem";
}; };
version = "1.58.0"; version = "1.63.0";
}; };
aws-sdk-s3 = { aws-sdk-s3 = {
dependencies = ["aws-sdk-core" "aws-sdk-kms" "aws-sigv4"]; dependencies = ["aws-sdk-core" "aws-sdk-kms" "aws-sigv4"];
@@ -78,10 +78,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1r6dxz3llgxbbm66jq5mkzk0i6qsxwv0d9s0ipwb23vv3bgp23yf"; sha256 = "1rpnlzsl52znhcki13jkwdshgwf51pn26267481f4fa842gr7xgp";
type = "gem"; type = "gem";
}; };
version = "1.114.0"; version = "1.119.1";
}; };
aws-sigv4 = { aws-sigv4 = {
dependencies = ["aws-eventstream"]; dependencies = ["aws-eventstream"];
@@ -110,10 +110,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "193l8r1ycd3dcxa7lsb4pqcghbk56dzc5244m6y8xmv88z6m31d7"; sha256 = "1a36zn77yyibqsfpka0i8vgf3yv98ic2b9wwlbc29566y8wpa2bq";
type = "gem"; type = "gem";
}; };
version = "3.0.5"; version = "3.0.6";
}; };
claide = { claide = {
groups = ["default"]; groups = ["default"];
@@ -213,10 +213,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0b3rfqy87yiv9xmh260nyddxxjqj0vy32xvajvyn5jnjx96jwa24"; sha256 = "0j826kfvzn7nc5pv950n270r0sx1702k988ad11cdlav3dcxxw09";
type = "gem"; type = "gem";
}; };
version = "0.93.0"; version = "0.99.0";
}; };
faraday = { faraday = {
dependencies = ["faraday-em_http" "faraday-em_synchrony" "faraday-excon" "faraday-httpclient" "faraday-multipart" "faraday-net_http" "faraday-net_http_persistent" "faraday-patron" "faraday-rack" "faraday-retry" "ruby2_keywords"]; dependencies = ["faraday-em_http" "faraday-em_synchrony" "faraday-excon" "faraday-httpclient" "faraday-multipart" "faraday-net_http" "faraday-net_http_persistent" "faraday-patron" "faraday-rack" "faraday-retry" "ruby2_keywords"];
@@ -224,10 +224,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1d5ipsv069dhgv9zhxgj8pz4j52yhgvfm01aq881yz7qgjd7ilxp"; sha256 = "1c760q0ks4vj4wmaa7nh1dgvgqiwaw0mjr7v8cymy7i3ffgjxx90";
type = "gem"; type = "gem";
}; };
version = "1.10.2"; version = "1.10.3";
}; };
faraday-cookie_jar = { faraday-cookie_jar = {
dependencies = ["faraday" "http-cookie"]; dependencies = ["faraday" "http-cookie"];
@@ -368,10 +368,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1wxzcs81c5ji30hrz64884rg0w56v2nwjyiyc8daka578bg7s8d6"; sha256 = "0b22m2dkydyv2si55b1jzznzgxf2ycx2aarv1j5p25k861h2gsml";
type = "gem"; type = "gem";
}; };
version = "2.210.1"; version = "2.212.1";
}; };
fastlane-plugin-clean_testflight_testers = { fastlane-plugin-clean_testflight_testers = {
groups = ["default"]; groups = ["default"];
@@ -410,10 +410,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0z2i5wpkawkf4f42i55b1240iw8819wx828579s4vavhd9s17yik"; sha256 = "1mbnmn36z1cnsd6ar76p9wvqi0ac6wlpm1p1lqczivain16qma76";
type = "gem"; type = "gem";
}; };
version = "0.29.0"; version = "0.36.0";
}; };
google-apis-core = { google-apis-core = {
dependencies = ["addressable" "googleauth" "httpclient" "mini_mime" "representable" "retriable" "rexml" "webrick"]; dependencies = ["addressable" "googleauth" "httpclient" "mini_mime" "representable" "retriable" "rexml" "webrick"];
@@ -421,10 +421,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1w9m4zc5xswz2h7gj4jvnb1ivzb6lcsl75fnw8ip7qz6hzwfgrlc"; sha256 = "184zkm5agi7r5fl79hgahjpydsc4d23nd2ynh2sr9z8gs2w4h82f";
type = "gem"; type = "gem";
}; };
version = "0.9.0"; version = "0.11.0";
}; };
google-apis-iamcredentials_v1 = { google-apis-iamcredentials_v1 = {
dependencies = ["google-apis-core"]; dependencies = ["google-apis-core"];
@@ -432,10 +432,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "06smnmn2s460xl9x9rh07a3fkqdrjjy6azmx8iywggqgv2k5d8p9"; sha256 = "0ysil0bkh755kmf9xvw5szhk1yyh3gqzwfsrbwsrl77gsv7jarcs";
type = "gem"; type = "gem";
}; };
version = "0.15.0"; version = "0.17.0";
}; };
google-apis-playcustomapp_v1 = { google-apis-playcustomapp_v1 = {
dependencies = ["google-apis-core"]; dependencies = ["google-apis-core"];
@@ -443,10 +443,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "00nfh3xh51mbh02f8nqlsijdh59k9vjs5sglvpv09pl3wnhirf7w"; sha256 = "1mlgwiid5lgg41y7qk8ca9lzhwx5njs25hz5fbf1mdal0kwm37lm";
type = "gem"; type = "gem";
}; };
version = "0.11.0"; version = "0.13.0";
}; };
google-apis-storage_v1 = { google-apis-storage_v1 = {
dependencies = ["google-apis-core"]; dependencies = ["google-apis-core"];
@@ -486,10 +486,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0jynh1s93nl8njm5l5wcy86pnjmv112cq6m0443s52f04hg6h2s5"; sha256 = "0flpj7v196c3xsqx4yjb7rjcj8p0by4rhj6qf5zanw4p1i41ssf0";
type = "gem"; type = "gem";
}; };
version = "1.3.0"; version = "1.3.1";
}; };
google-cloud-storage = { google-cloud-storage = {
dependencies = ["addressable" "digest-crc" "google-apis-iamcredentials_v1" "google-apis-storage_v1" "google-cloud-core" "googleauth" "mini_mime"]; dependencies = ["addressable" "digest-crc" "google-apis-iamcredentials_v1" "google-apis-storage_v1" "google-cloud-core" "googleauth" "mini_mime"];
@@ -497,10 +497,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0j3hqyb4zgj6az6p0bz0kgskl6fddrwb095kxfbdx8r11m07mfr8"; sha256 = "1skhlpcykxxzw3050cwngdyc3n746wfx443w1w9chxwjbh2ix6i9";
type = "gem"; type = "gem";
}; };
version = "1.43.0"; version = "1.44.0";
}; };
googleauth = { googleauth = {
dependencies = ["faraday" "jwt" "memoist" "multi_json" "os" "signet"]; dependencies = ["faraday" "jwt" "memoist" "multi_json" "os" "signet"];
@@ -508,10 +508,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "030bcdnffwndk8h270cmbndixb5h3ss860yifv6bkfys95s5fjpp"; sha256 = "1hpwgwhk0lmnknkw8kbdfxn95qqs6aagpq815l5fkw9w6mi77pai";
type = "gem"; type = "gem";
}; };
version = "1.2.0"; version = "1.3.0";
}; };
highline = { highline = {
groups = ["default"]; groups = ["default"];
@@ -559,30 +559,30 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1mnvb80cdg7fzdcs3xscv21p28w4igk5sj5m7m81xp8v2ks87jj0"; sha256 = "1cdw9vw2qly7q7r41s7phnac264rbsdqgj4l0h4nqgbjb157g393";
type = "gem"; type = "gem";
}; };
version = "1.6.1"; version = "1.6.2";
}; };
json = { json = {
groups = ["default"]; groups = ["default"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0yk5d10yvspkc5jyvx9gc1a9pn1z8v4k2hvjk1l88zixwf3wf3cl"; sha256 = "0nalhin1gda4v8ybk6lq8f407cgfrj6qzn234yra4ipkmlbfmal6";
type = "gem"; type = "gem";
}; };
version = "2.6.2"; version = "2.6.3";
}; };
jwt = { jwt = {
groups = ["default"]; groups = ["default"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0kcmnx6rgjyd7sznai9ccns2nh7p7wnw3mi8a7vf2wkm51azwddq"; sha256 = "09yj3z5snhaawh2z1w45yyihzmh57m6m7dp8ra8gxavhj5kbiq5p";
type = "gem"; type = "gem";
}; };
version = "2.5.0"; version = "2.7.0";
}; };
memoist = { memoist = {
groups = ["default"]; groups = ["default"];
@@ -610,20 +610,20 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "003gd7mcay800k2q4pb2zn8lwwgci4bhi42v2jvlidm8ksx03i6q"; sha256 = "1pky3vzaxlgm9gw5wlqwwi7wsw3jrglrfflrppvvnsrlaiz043z9";
type = "gem"; type = "gem";
}; };
version = "3.2022.0105"; version = "3.2023.0218.1";
}; };
mini_magick = { mini_magick = {
groups = ["default"]; groups = ["default"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1aj604x11d9pksbljh0l38f70b558rhdgji1s9i763hiagvvx2hs"; sha256 = "0slh78f9z6n0l1i2km7m48yz7l4fjrk88sj1f4mh1wb39sl2yc37";
type = "gem"; type = "gem";
}; };
version = "4.11.0"; version = "4.12.0";
}; };
mini_mime = { mini_mime = {
groups = ["default"]; groups = ["default"];
@@ -710,20 +710,20 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1whhr897z6z6av85x2cipyjk46bwh6s4wx6nbrcd3iifnzvbqs7l"; sha256 = "0wzhnbzraz60paxhm48c50fp9xi7cqka4gfhxmiq43mhgh5ajg3h";
type = "gem"; type = "gem";
}; };
version = "3.6.0"; version = "3.7.0";
}; };
public_suffix = { public_suffix = {
groups = ["default"]; groups = ["default"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0sqw1zls6227bgq38sxb2hs8nkdz4hn1zivs27mjbniswfy4zvi6"; sha256 = "0hz0bx2qs2pwb0bwazzsah03ilpf3aai8b7lk7s35jsfzwbkjq35";
type = "gem"; type = "gem";
}; };
version = "5.0.0"; version = "5.0.1";
}; };
rake = { rake = {
groups = ["default"]; groups = ["default"];
@@ -834,10 +834,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1v9rsdmg5c5kkf8ps47xnrfbvjnq11sbaifr186jwkh4npawz00x"; sha256 = "0sr3z4kmp6ym7synicyilj9vic7i9nxgaszqx6n1xn1ss7s7g45r";
type = "gem"; type = "gem";
}; };
version = "1.6.8"; version = "1.6.10";
}; };
terminal-notifier = { terminal-notifier = {
groups = ["default"]; groups = ["default"];
@@ -947,10 +947,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1d4cvgmxhfczxiq5fr534lmizkhigd15bsx5719r5ds7k7ivisc7"; sha256 = "13qm7s0gr2pmfcl7dxrmq38asaza4w0i2n9my4yzs499j731wh8r";
type = "gem"; type = "gem";
}; };
version = "1.7.0"; version = "1.8.1";
}; };
word_wrap = { word_wrap = {
groups = ["default"]; groups = ["default"];
-10
View File
@@ -43,16 +43,6 @@ abstract_target 'Status' do
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end end
end end
# FIXME: Fix dependency signing broken on Xcode 14 due to lack of Team ID.
# https://github.com/CocoaPods/CocoaPods/issues/11402
installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end end
use_native_modules! use_native_modules!
+11 -11
View File
@@ -27,15 +27,15 @@ PODS:
- CryptoSwift - CryptoSwift
- secp256k1 - secp256k1
- SSZipArchive - SSZipArchive
- libwebp (1.2.3): - libwebp (1.2.4):
- libwebp/demux (= 1.2.3) - libwebp/demux (= 1.2.4)
- libwebp/mux (= 1.2.3) - libwebp/mux (= 1.2.4)
- libwebp/webp (= 1.2.3) - libwebp/webp (= 1.2.4)
- libwebp/demux (1.2.3): - libwebp/demux (1.2.4):
- libwebp/webp - libwebp/webp
- libwebp/mux (1.2.3): - libwebp/mux (1.2.4):
- libwebp/demux - libwebp/demux
- libwebp/webp (1.2.3) - libwebp/webp (1.2.4)
- Permission-Camera (2.1.5): - Permission-Camera (2.1.5):
- RNPermissions - RNPermissions
- Permission-Microphone (2.1.5): - Permission-Microphone (2.1.5):
@@ -645,10 +645,10 @@ SPEC CHECKSUMS:
FBLazyVector: 352a8ca9bbc8e2f097d680747a8c97ecef12d469 FBLazyVector: 352a8ca9bbc8e2f097d680747a8c97ecef12d469
FBReactNativeSpec: 7dfb84f624136a45727c813ed21d130cd3e61beb FBReactNativeSpec: 7dfb84f624136a45727c813ed21d130cd3e61beb
Folly: b73c3869541e86821df3c387eb0af5f65addfab4 Folly: b73c3869541e86821df3c387eb0af5f65addfab4
glog: 997518ea2aa2d8cd5df9797b641b758d52ecf2bc glog: 6934faae5afbec23475648c8aeb6047ce973af65
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352 HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8 Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8
libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
Permission-Camera: afad27bf90337684d4a86f3825112d648c8c4d3b Permission-Camera: afad27bf90337684d4a86f3825112d648c8c4d3b
Permission-Microphone: 0ffabc3fe1c75cfb260525ee3f529383c9f4368c Permission-Microphone: 0ffabc3fe1c75cfb260525ee3f529383c9f4368c
RCTRequired: 5520387431beaa5f32aa8726bf746cd5353119fe RCTRequired: 5520387431beaa5f32aa8726bf746cd5353119fe
@@ -716,6 +716,6 @@ SPEC CHECKSUMS:
TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4 TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4
Yoga: 0276e9f20976c8568e107cfc1163a8629051adc0 Yoga: 0276e9f20976c8568e107cfc1163a8629051adc0
PODFILE CHECKSUM: ca5d07911eadc1267649ecc15379e5127a0cc839 PODFILE CHECKSUM: dd4d6510a5580d20adac6c8a8dad97a0bc7d6508
COCOAPODS: 1.11.3 COCOAPODS: 1.12.0
+24 -12
View File
@@ -49,6 +49,12 @@
B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */; }; B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */; };
BA68A2377A20496EA737000D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E586E1B0E544F64AA9F5BD1 /* libz.tbd */; }; BA68A2377A20496EA737000D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E586E1B0E544F64AA9F5BD1 /* libz.tbd */; };
BFF6343F5A1F0F5FFFC8D020 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A4B974811E312E44D5BBE9EC /* libPods-Status-StatusIm-StatusImTests.a */; }; BFF6343F5A1F0F5FFFC8D020 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A4B974811E312E44D5BBE9EC /* libPods-Status-StatusIm-StatusImTests.a */; };
C14C5F8D29C0A149005C58A7 /* launch-icon@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C14C5F8C29C0A149005C58A7 /* launch-icon@3x.png */; };
C14C5F9129C0AD9C005C58A7 /* launch-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C14C5F9029C0AD9C005C58A7 /* launch-icon@2x.png */; };
C14C5F9329C0ADB5005C58A7 /* launch-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = C14C5F9229C0ADB5005C58A7 /* launch-icon.png */; };
C1715FFA29C0BCE10088FA8B /* launch-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C14C5F9029C0AD9C005C58A7 /* launch-icon@2x.png */; };
C1715FFB29C0BCE50088FA8B /* launch-icon@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C14C5F8C29C0A149005C58A7 /* launch-icon@3x.png */; };
C1715FFC29C0BCE80088FA8B /* launch-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = C14C5F9229C0ADB5005C58A7 /* launch-icon.png */; };
CE4E31B31D8695250033ED64 /* Statusgo.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4E31B21D8695250033ED64 /* Statusgo.xcframework */; }; CE4E31B31D8695250033ED64 /* Statusgo.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4E31B21D8695250033ED64 /* Statusgo.xcframework */; };
D1786306E0184916B11F4C37 /* Inter-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = B2A38FC3D3954DE7B2B171F8 /* Inter-Medium.otf */; }; D1786306E0184916B11F4C37 /* Inter-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = B2A38FC3D3954DE7B2B171F8 /* Inter-Medium.otf */; };
D84616FB563A48EBB1678699 /* Inter-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = CD4A2C27D6D5473184DC1F7E /* Inter-Bold.otf */; }; D84616FB563A48EBB1678699 /* Inter-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = CD4A2C27D6D5473184DC1F7E /* Inter-Bold.otf */; };
@@ -142,6 +148,9 @@
B2A38FC3D3954DE7B2B171F8 /* Inter-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Medium.otf"; path = "../resources/fonts/Inter-Medium.otf"; sourceTree = "<group>"; }; B2A38FC3D3954DE7B2B171F8 /* Inter-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Medium.otf"; path = "../resources/fonts/Inter-Medium.otf"; sourceTree = "<group>"; };
B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = StatusIm/Images.xcassets; sourceTree = "<group>"; }; B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = StatusIm/Images.xcassets; sourceTree = "<group>"; };
B321D25F4493470980039457 /* Inter-BoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-BoldItalic.otf"; path = "../resources/fonts/Inter-BoldItalic.otf"; sourceTree = "<group>"; }; B321D25F4493470980039457 /* Inter-BoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-BoldItalic.otf"; path = "../resources/fonts/Inter-BoldItalic.otf"; sourceTree = "<group>"; };
C14C5F8C29C0A149005C58A7 /* launch-icon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon@3x.png"; path = "StatusIm/launch-icon@3x.png"; sourceTree = "<group>"; };
C14C5F9029C0AD9C005C58A7 /* launch-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon@2x.png"; path = "StatusIm/launch-icon@2x.png"; sourceTree = "<group>"; };
C14C5F9229C0ADB5005C58A7 /* launch-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon.png"; path = "StatusIm/launch-icon.png"; sourceTree = "<group>"; };
C6B1215047604CD59A4C74D6 /* Inter-MediumItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-MediumItalic.otf"; path = "../resources/fonts/Inter-MediumItalic.otf"; sourceTree = "<group>"; }; C6B1215047604CD59A4C74D6 /* Inter-MediumItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-MediumItalic.otf"; path = "../resources/fonts/Inter-MediumItalic.otf"; sourceTree = "<group>"; };
CD4A2C27D6D5473184DC1F7E /* Inter-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Bold.otf"; path = "../resources/fonts/Inter-Bold.otf"; sourceTree = "<group>"; }; CD4A2C27D6D5473184DC1F7E /* Inter-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Bold.otf"; path = "../resources/fonts/Inter-Bold.otf"; sourceTree = "<group>"; };
CE4E31B21D8695250033ED64 /* Statusgo.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Statusgo.xcframework; path = "../modules/react-native-status/ios/RCTStatus/Statusgo.xcframework"; sourceTree = "<group>"; }; CE4E31B21D8695250033ED64 /* Statusgo.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Statusgo.xcframework; path = "../modules/react-native-status/ios/RCTStatus/Statusgo.xcframework"; sourceTree = "<group>"; };
@@ -206,6 +215,9 @@
13B07FAE1A68108700A75B9A /* StatusIm */ = { 13B07FAE1A68108700A75B9A /* StatusIm */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
C14C5F9229C0ADB5005C58A7 /* launch-icon.png */,
C14C5F9029C0AD9C005C58A7 /* launch-icon@2x.png */,
C14C5F8C29C0A149005C58A7 /* launch-icon@3x.png */,
922C4CA61F4D5F8B0033C753 /* StatusIm.entitlements */, 922C4CA61F4D5F8B0033C753 /* StatusIm.entitlements */,
B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */, B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */,
008F07F21AC5B25A0029DE68 /* main.jsbundle */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
@@ -405,9 +417,7 @@
TestTargetID = 13B07F861A680F5B00A75B9A; TestTargetID = 13B07F861A680F5B00A75B9A;
}; };
13B07F861A680F5B00A75B9A = { 13B07F861A680F5B00A75B9A = {
DevelopmentTeam = 8B5X2M6H2Y;
LastSwiftMigration = 1140; LastSwiftMigration = 1140;
ProvisioningStyle = Manual;
SystemCapabilities = { SystemCapabilities = {
com.apple.BackgroundModes = { com.apple.BackgroundModes = {
enabled = 1; enabled = 1;
@@ -477,8 +487,10 @@
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
C14C5F9329C0ADB5005C58A7 /* launch-icon.png in Resources */,
74B758FC20D7C00B003343C3 /* launch-image-universal.storyboard in Resources */, 74B758FC20D7C00B003343C3 /* launch-image-universal.storyboard in Resources */,
715D8132290BE850006F5C88 /* UbuntuMono-Regular.ttf in Resources */, 715D8132290BE850006F5C88 /* UbuntuMono-Regular.ttf in Resources */,
C14C5F9129C0AD9C005C58A7 /* launch-icon@2x.png in Resources */,
B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */, B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */,
D84616FB563A48EBB1678699 /* Inter-Bold.otf in Resources */, D84616FB563A48EBB1678699 /* Inter-Bold.otf in Resources */,
D99C50E5E18942A39C8DDF61 /* Inter-BoldItalic.otf in Resources */, D99C50E5E18942A39C8DDF61 /* Inter-BoldItalic.otf in Resources */,
@@ -489,6 +501,7 @@
70ADBB5ECF934DCF8A0E4919 /* Inter-Regular.otf in Resources */, 70ADBB5ECF934DCF8A0E4919 /* Inter-Regular.otf in Resources */,
3870E1E692E24133A80B07DE /* Inter-SemiBold.otf in Resources */, 3870E1E692E24133A80B07DE /* Inter-SemiBold.otf in Resources */,
8391E8E0E93C41A98AAA6631 /* Inter-SemiBoldItalic.otf in Resources */, 8391E8E0E93C41A98AAA6631 /* Inter-SemiBoldItalic.otf in Resources */,
C14C5F8D29C0A149005C58A7 /* launch-icon@3x.png in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -501,13 +514,16 @@
3AAD2ACB24A3A60E0075D594 /* Images.xcassets in Resources */, 3AAD2ACB24A3A60E0075D594 /* Images.xcassets in Resources */,
3AAD2ACC24A3A60E0075D594 /* Inter-Bold.otf in Resources */, 3AAD2ACC24A3A60E0075D594 /* Inter-Bold.otf in Resources */,
3AAD2ACD24A3A60E0075D594 /* Inter-BoldItalic.otf in Resources */, 3AAD2ACD24A3A60E0075D594 /* Inter-BoldItalic.otf in Resources */,
C1715FFA29C0BCE10088FA8B /* launch-icon@2x.png in Resources */,
3AAD2ACE24A3A60E0075D594 /* InterStatus-Regular.otf in Resources */, 3AAD2ACE24A3A60E0075D594 /* InterStatus-Regular.otf in Resources */,
3AAD2ACF24A3A60E0075D594 /* Inter-Italic.otf in Resources */, 3AAD2ACF24A3A60E0075D594 /* Inter-Italic.otf in Resources */,
3AAD2AD024A3A60E0075D594 /* Inter-Medium.otf in Resources */, 3AAD2AD024A3A60E0075D594 /* Inter-Medium.otf in Resources */,
3AAD2AD124A3A60E0075D594 /* Inter-MediumItalic.otf in Resources */, 3AAD2AD124A3A60E0075D594 /* Inter-MediumItalic.otf in Resources */,
3AAD2AD224A3A60E0075D594 /* Inter-Regular.otf in Resources */, 3AAD2AD224A3A60E0075D594 /* Inter-Regular.otf in Resources */,
C1715FFC29C0BCE80088FA8B /* launch-icon.png in Resources */,
3AAD2AD324A3A60E0075D594 /* Inter-SemiBold.otf in Resources */, 3AAD2AD324A3A60E0075D594 /* Inter-SemiBold.otf in Resources */,
3AAD2AD424A3A60E0075D594 /* Inter-SemiBoldItalic.otf in Resources */, 3AAD2AD424A3A60E0075D594 /* Inter-SemiBoldItalic.otf in Resources */,
C1715FFB29C0BCE50088FA8B /* launch-icon@3x.png in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -825,9 +841,8 @@
BUNDLE_ID_SUFFIX = .debug; BUNDLE_ID_SUFFIX = .debug;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements; CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
CUSTOM_PRODUCT_NAME = "Status Debug"; CUSTOM_PRODUCT_NAME = "Status Debug";
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 8B5X2M6H2Y; DEVELOPMENT_TEAM = 8B5X2M6H2Y;
@@ -880,8 +895,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum; PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
PRODUCT_NAME = StatusIm; PRODUCT_NAME = StatusIm;
PROVISIONING_PROFILE = "9da75626-9594-43d9-a827-0f6d43c28f54"; PROVISIONING_PROFILE_SPECIFIER = "";
PROVISIONING_PROFILE_SPECIFIER = "match Development im.status.ethereum";
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
@@ -899,9 +913,8 @@
BUNDLE_ID_SUFFIX = ""; BUNDLE_ID_SUFFIX = "";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements; CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
CUSTOM_PRODUCT_NAME = Status; CUSTOM_PRODUCT_NAME = Status;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 8B5X2M6H2Y; DEVELOPMENT_TEAM = 8B5X2M6H2Y;
@@ -946,8 +959,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum; PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
PRODUCT_NAME = StatusIm; PRODUCT_NAME = StatusIm;
PROVISIONING_PROFILE = "e2202b12-7a66-4ff7-af3c-a52e35f32dc1"; PROVISIONING_PROFILE_SPECIFIER = "";
PROVISIONING_PROFILE_SPECIFIER = "match AdHoc im.status.ethereum";
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1; TARGETED_DEVICE_FAMILY = 1;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

+2
View File
@@ -119,6 +119,8 @@
<array> <array>
<string>armv7</string> <string>armv7</string>
</array> </array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

+2
View File
@@ -123,6 +123,8 @@
<string>armv7</string> <string>armv7</string>
<string>gamekit</string> <string>gamekit</string>
</array> </array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
+13 -8
View File
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Lsa-QA-3zn"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Lsa-QA-3zn">
<device id="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
@@ -17,14 +16,20 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="launch_image" translatesAutoresizingMaskIntoConstraints="NO" id="cqW-9w-FC0"> <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch-icon.png" translatesAutoresizingMaskIntoConstraints="NO" id="cqW-9w-FC0">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/> <color key="backgroundColor" red="0.035294117647058823" green="0.062745098039215685" blue="0.10980392156862745" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</imageView> </imageView>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="2aN-f8-qiu"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="cqW-9w-FC0" secondAttribute="bottom" id="2Ue-hX-Tna"/>
<constraint firstAttribute="trailing" secondItem="cqW-9w-FC0" secondAttribute="trailing" id="Sfz-tk-PSg"/>
<constraint firstItem="cqW-9w-FC0" firstAttribute="leading" secondItem="0g6-xG-Wkj" secondAttribute="leading" id="UQo-dC-xeN"/>
<constraint firstItem="cqW-9w-FC0" firstAttribute="top" secondItem="0g6-xG-Wkj" secondAttribute="top" id="YrE-J2-QHf"/>
<constraint firstItem="cqW-9w-FC0" firstAttribute="centerX" secondItem="0g6-xG-Wkj" secondAttribute="centerX" id="ZQS-4G-GAL"/>
<constraint firstItem="cqW-9w-FC0" firstAttribute="centerY" secondItem="0g6-xG-Wkj" secondAttribute="centerY" id="noT-Rj-8Uy"/>
</constraints>
</view> </view>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="hOp-FG-FML" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="hOp-FG-FML" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -33,7 +38,7 @@
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
<image name="launch_image" width="90" height="101"/> <image name="launch-icon.png" width="84" height="88"/>
<systemColor name="systemBackgroundColor"> <systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor> </systemColor>
@@ -323,6 +323,30 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
callback.invoke(finalConfig); callback.invoke(finalConfig);
} }
@ReactMethod
public void createAccountAndLogin(final String createAccountRequest) {
Log.d(TAG, "createAccountAndLogin");
String result = Statusgo.createAccountAndLogin(createAccountRequest);
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "createAccountAndLogin success: " + result);
Log.d(TAG, "Geth node started");
} else {
Log.e(TAG, "createAccountAndLogin failed: " + result);
}
}
@ReactMethod
public void restoreAccountAndLogin(final String restoreAccountRequest) {
Log.d(TAG, "restoreAccountAndLogin");
String result = Statusgo.restoreAccountAndLogin(restoreAccountRequest);
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "restoreAccountAndLogin success: " + result);
Log.d(TAG, "Geth node started");
} else {
Log.e(TAG, "restoreAccountAndLogin failed: " + result);
}
}
@ReactMethod @ReactMethod
public void saveAccountAndLogin(final String multiaccountData, final String password, final String settings, final String config, final String accountsData) { public void saveAccountAndLogin(final String multiaccountData, final String password, final String settings, final String config, final String accountsData) {
try { try {
@@ -520,6 +544,8 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
return; return;
} }
Log.d(TAG, "[Opening accounts" + rootDir);
Runnable r = new Runnable() { Runnable r = new Runnable() {
@Override @Override
public void run() { public void run() {
@@ -785,9 +811,10 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
@ReactMethod @ReactMethod
public void getConnectionStringForBootstrappingAnotherDevice(final String configJSON, final Callback callback) throws JSONException { public void getConnectionStringForBootstrappingAnotherDevice(final String configJSON, final Callback callback) throws JSONException {
final JSONObject jsonConfig = new JSONObject(configJSON); final JSONObject jsonConfig = new JSONObject(configJSON);
final String keyUID = jsonConfig.getString("keyUID"); final JSONObject senderConfig = jsonConfig.getJSONObject("senderConfig");
final String keyUID = senderConfig.getString("keyUID");
final String keyStorePath = this.getKeyStorePath(keyUID); final String keyStorePath = this.getKeyStorePath(keyUID);
jsonConfig.put("keystorePath", keyStorePath); senderConfig.put("keystorePath", keyStorePath);
executeRunnableStatusGoMethod(() -> Statusgo.getConnectionStringForBootstrappingAnotherDevice(jsonConfig.toString()), callback); executeRunnableStatusGoMethod(() -> Statusgo.getConnectionStringForBootstrappingAnotherDevice(jsonConfig.toString()), callback);
} }
@@ -795,9 +822,10 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
@ReactMethod @ReactMethod
public void inputConnectionStringForBootstrapping(final String connectionString, final String configJSON, final Callback callback) throws JSONException { public void inputConnectionStringForBootstrapping(final String connectionString, final String configJSON, final Callback callback) throws JSONException {
final JSONObject jsonConfig = new JSONObject(configJSON); final JSONObject jsonConfig = new JSONObject(configJSON);
final JSONObject receiverConfig = jsonConfig.getJSONObject("receiverConfig");
final String keyStorePath = pathCombine(this.getNoBackupDirectory(), "/keystore"); final String keyStorePath = pathCombine(this.getNoBackupDirectory(), "/keystore");
jsonConfig.put("keystorePath", keyStorePath); receiverConfig.put("keystorePath", keyStorePath);
jsonConfig.put("rootDataDir", this.getNoBackupDirectory()); receiverConfig.getJSONObject("nodeConfig").put("rootDataDir", this.getNoBackupDirectory());
executeRunnableStatusGoMethod(() -> Statusgo.inputConnectionStringForBootstrapping(connectionString, jsonConfig.toString()), callback); executeRunnableStatusGoMethod(() -> Statusgo.inputConnectionStringForBootstrapping(connectionString, jsonConfig.toString()), callback);
} }
@@ -1129,6 +1157,23 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
executeRunnableStatusGoMethod(() -> Statusgo.deleteImportedKey(address, password, keyStoreDir), callback); executeRunnableStatusGoMethod(() -> Statusgo.deleteImportedKey(address, password, keyStoreDir), callback);
} }
@ReactMethod(isBlockingSynchronousMethod = true)
public String keystoreDir() {
final String absRootDirPath = this.getNoBackupDirectory();
return pathCombine(absRootDirPath, "keystore");
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String backupDisabledDataDir() {
return this.getNoBackupDirectory();
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String logFilePath() {
return getLogsFile().getAbsolutePath();
}
@ReactMethod(isBlockingSynchronousMethod = true) @ReactMethod(isBlockingSynchronousMethod = true)
public String generateAlias(final String seed) { public String generateAlias(final String seed) {
return Statusgo.generateAlias(seed); return Statusgo.generateAlias(seed);
@@ -309,12 +309,14 @@ RCT_EXPORT_METHOD(getConnectionStringForBootstrappingAnotherDevice:(NSString *)c
callback:(RCTResponseSenderBlock)callback) { callback:(RCTResponseSenderBlock)callback) {
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding]; NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:nil]; NSError *error;
NSString *keyUID = [configDict objectForKey:@"keyUID"]; NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
NSMutableDictionary *senderConfig = configDict[@"senderConfig"];
NSString *keyUID = senderConfig[@"keyUID"];
NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID]; NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID];
NSString *keystoreDir = multiaccountKeystoreDir.path; NSString *keystoreDir = multiaccountKeystoreDir.path;
[configDict setValue:keystoreDir forKey:@"keystorePath"]; [senderConfig setValue:keystoreDir forKey:@"keystorePath"];
NSString *modifiedConfigJSON = [configDict bv_jsonStringWithPrettyPrint:NO]; NSString *modifiedConfigJSON = [configDict bv_jsonStringWithPrettyPrint:NO];
NSString *result = StatusgoGetConnectionStringForBootstrappingAnotherDevice(modifiedConfigJSON); NSString *result = StatusgoGetConnectionStringForBootstrappingAnotherDevice(modifiedConfigJSON);
@@ -326,17 +328,20 @@ RCT_EXPORT_METHOD(inputConnectionStringForBootstrapping:(NSString *)cs
callback:(RCTResponseSenderBlock)callback) { callback:(RCTResponseSenderBlock)callback) {
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding]; NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:nil]; NSError *error;
NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
NSMutableDictionary *receiverConfig = configDict[@"receiverConfig"];
NSMutableDictionary *nodeConfig = receiverConfig[@"nodeConfig"];
NSFileManager *fileManager = [NSFileManager defaultManager]; NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject]; NSURL *rootUrl =[[fileManager URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject];
NSURL *rootDataDir = rootUrl.path;
NSURL *multiaccountKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"]; NSURL *multiaccountKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSString *keystoreDir = multiaccountKeystoreDir.path; NSString *keystoreDir = multiaccountKeystoreDir.path;
NSString *rootDataDir = rootUrl.path;
[configDict setValue:keystoreDir forKey:@"keystorePath"]; [receiverConfig setValue:keystoreDir forKey:@"keystorePath"];
[configDict setValue:rootDataDir forKey:@"rootDataDir"]; [nodeConfig setValue:rootDataDir forKey:@"rootDataDir"];
NSString *modifiedConfigJSON = [configDict bv_jsonStringWithPrettyPrint:NO]; NSString *modifiedConfigJSON = [configDict bv_jsonStringWithPrettyPrint:NO];
NSString *result = StatusgoInputConnectionStringForBootstrapping(cs,modifiedConfigJSON); NSString *result = StatusgoInputConnectionStringForBootstrapping(cs, modifiedConfigJSON);
callback(@[result]); callback(@[result]);
} }
@@ -857,6 +862,34 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(generateAlias:(NSString *)publicKey) {
return StatusgoGenerateAlias(publicKey); return StatusgoGenerateAlias(publicKey);
} }
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(keystoreDir) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *commonKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
return commonKeystoreDir.path;
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(backupDisabledDataDir) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
return rootUrl.path;
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFilePath) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
return rootUrl.path;
}
RCT_EXPORT_METHOD(generateAliasAsync:(NSString *)publicKey RCT_EXPORT_METHOD(generateAliasAsync:(NSString *)publicKey
callback:(RCTResponseSenderBlock)callback) { callback:(RCTResponseSenderBlock)callback) {
#if DEBUG #if DEBUG
@@ -934,6 +967,20 @@ RCT_EXPORT_METHOD(identiconAsync:(NSString *)publicKey
callback(@[result]); callback(@[result]);
} }
RCT_EXPORT_METHOD(createAccountAndLogin:(NSString *)request) {
#if DEBUG
NSLog(@"createAccountAndLogin() method called");
#endif
StatusgoCreateAccountAndLogin(request);
}
RCT_EXPORT_METHOD(restoreAccountAndLogin:(NSString *)request) {
#if DEBUG
NSLog(@"restoreAccountAndLogin() method called");
#endif
StatusgoRestoreAccountAndLogin(request);
}
RCT_EXPORT_METHOD(generateAliasAndIdenticonAsync:(NSString *)publicKey RCT_EXPORT_METHOD(generateAliasAndIdenticonAsync:(NSString *)publicKey
callback:(RCTResponseSenderBlock)callback) { callback:(RCTResponseSenderBlock)callback) {
#if DEBUG #if DEBUG
+70 -25
View File
@@ -479,6 +479,21 @@
} }
}, },
{
"path": "androidx/core/core-splashscreen/1.0.0",
"repo": "https://dl.google.com/dl/android/maven2",
"files": {
"core-splashscreen-1.0.0.pom": {
"sha1": "763acf4fa60a08a3c059a4c50d3d54ac34a0cfa2",
"sha256": "0arxyx9zlzwlr0h88xmgzlgbjfp3s79pd7mbk3ipfqwkfgbzzmq3"
},
"core-splashscreen-1.0.0.aar": {
"sha1": "6b1eccca966811faafb13f6c2f88351504dc9eae",
"sha256": "0wiarwyh5rk7ca54b0i47rs7ix49r2krrvhiqamw8gyaq4yv51iy"
}
}
},
{ {
"path": "androidx/core/core/1.0.0", "path": "androidx/core/core/1.0.0",
"repo": "https://dl.google.com/dl/android/maven2", "repo": "https://dl.google.com/dl/android/maven2",
@@ -10572,6 +10587,21 @@
} }
}, },
{
"path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"kotlin-stdlib-common-1.6.21.pom": {
"sha1": "747a8ea8a8a4328946cf0252c5ceb2aa0ceb054f",
"sha256": "18kbabqzyiv5rzcvxzn28wsk6cxnh7aliiayian2sg7xfgp5dhav"
},
"kotlin-stdlib-common-1.6.21.jar": {
"sha1": "5e5b55c26dbc80372a920aef60eb774b714559b8",
"sha256": "0qr34h6pkf6bw6vagc06y78ln6gikj3qq3hrgfai8flzrmcyqfqq"
}
}
},
{ {
"path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10", "path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10",
"repo": "https://repo.maven.apache.org/maven2", "repo": "https://repo.maven.apache.org/maven2",
@@ -11022,6 +11052,21 @@
} }
}, },
{
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.6.21",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"kotlin-stdlib-1.6.21.pom": {
"sha1": "f44be76009ce4253eaa59b914f4dccc384442016",
"sha256": "0d0zmvx7znha69ir50z72n7nzgw4yr6rfzb6mb6kdn0vl1dp4hnf"
},
"kotlin-stdlib-1.6.21.jar": {
"sha1": "11ef67f1900634fd951bad28c53ec957fabbe5b8",
"sha256": "14m428q4m7y8srb7z5m0qfq8ic3f62layqwgn9rpacxvf9k5573k"
}
}
},
{ {
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.7.10", "path": "org/jetbrains/kotlin/kotlin-stdlib/1.7.10",
"repo": "https://repo.maven.apache.org/maven2", "repo": "https://repo.maven.apache.org/maven2",
@@ -11527,57 +11572,57 @@
}, },
{ {
"path": "org/slf4j/jcl-over-slf4j/2.0.6", "path": "org/slf4j/jcl-over-slf4j/2.0.7",
"repo": "https://repo.maven.apache.org/maven2", "repo": "https://repo.maven.apache.org/maven2",
"files": { "files": {
"jcl-over-slf4j-2.0.6.pom": { "jcl-over-slf4j-2.0.7.pom": {
"sha1": "c9d9caedcca2a1564e47b55614960958c5f78773", "sha1": "15536e4a74a7aa317322a3d7814db8251de60d6f",
"sha256": "1swgy5hwv54b1i1117shn3wmwba3v78qvy6cnv8v243j7ac6vzqq" "sha256": "1rzjwbmzf2hb85j6c41mch803vqwqdq1rfrrirfhp1lfpfnzyd23"
}, },
"jcl-over-slf4j-2.0.6.jar": { "jcl-over-slf4j-2.0.7.jar": {
"sha1": "839ff57e112f2e28ef372e96d135696a6896b9ad", "sha1": "f127fe5ee53404a8b3697cdd032dd1dd6a29dd77",
"sha256": "0s9scdwkxwj3al87ihanj10rscrjh44kligr5asb7qpl28d1xvks" "sha256": "0hhpc2qdl4aa9mb8dk89wzbd5vkna557vjmjdmfswvfjw5bng021"
} }
} }
}, },
{ {
"path": "org/slf4j/slf4j-api/2.0.6", "path": "org/slf4j/slf4j-api/2.0.7",
"repo": "https://repo.maven.apache.org/maven2", "repo": "https://repo.maven.apache.org/maven2",
"files": { "files": {
"slf4j-api-2.0.6.pom": { "slf4j-api-2.0.7.pom": {
"sha1": "2b93d5f66ad2ba259bf4b2c94da39f0d6c544400", "sha1": "facf002401dbff2065d4257690651e3fa775e3f4",
"sha256": "0dipzawn8rxikciij2z06c25rb2vdj83s8ga3a7n10r77p2qcklb" "sha256": "10br4q2w50fn3mkvk1xji81wdpy86cm0wyv6m30xa0ha1v7kqh1d"
}, },
"slf4j-api-2.0.6.jar": { "slf4j-api-2.0.7.jar": {
"sha1": "88c40d8b4f33326f19a7d3c0aaf2c7e8721d4953", "sha1": "41eb7184ea9d556f23e18b5cb99cad1f8581fc00",
"sha256": "1nkv0z4dpkvp6pr9ph8087z5r691bv95xdv3gnfi6s5j23a94aig" "sha256": "1x26v62ypzpp84yfad8mx53llbacq6580y34v8nc618r7awrhqjx"
} }
} }
}, },
{ {
"path": "org/slf4j/slf4j-jdk14/2.0.6", "path": "org/slf4j/slf4j-jdk14/2.0.7",
"repo": "https://repo.maven.apache.org/maven2", "repo": "https://repo.maven.apache.org/maven2",
"files": { "files": {
"slf4j-jdk14-2.0.6.pom": { "slf4j-jdk14-2.0.7.pom": {
"sha1": "96ac9d6ab608e787d54892b35205bc6a560aa007", "sha1": "31039eac9f263c48bda14efd90aef0fb7a5a0e6a",
"sha256": "0gnsyy1n5v8xqdy6a6p1752m5c4afihpw0n36n6aqw01y9l86q1h" "sha256": "1vx1ziyx36zf2lrpkvvm4c75hp8pw8vjpiyr5120ss8nwpd33qal"
}, },
"slf4j-jdk14-2.0.6.jar": { "slf4j-jdk14-2.0.7.jar": {
"sha1": "13056cb341f2d8795120f8027766a058da874f85", "sha1": "d91cd16b55ffbd5f46c60d0173fd4eeccacfee2d",
"sha256": "0jncm8a2ppliqpzkbqm26sn98mwif8c1nligc1zh4jbzr8mxyzhy" "sha256": "1xvphj12jpnvr1sw8zx42p49in4xi61mjvpxrkk3q3qpyad7017r"
} }
} }
}, },
{ {
"path": "org/slf4j/slf4j-parent/2.0.6", "path": "org/slf4j/slf4j-parent/2.0.7",
"repo": "https://repo.maven.apache.org/maven2", "repo": "https://repo.maven.apache.org/maven2",
"files": { "files": {
"slf4j-parent-2.0.6.pom": { "slf4j-parent-2.0.7.pom": {
"sha1": "0f99f8426c64fc5e0c4b6749245e50484a16c372", "sha1": "3f97e066227cc2353d212b8c43440b0bf4c033f3",
"sha256": "091il49sidk0lcmzdy0vl3a4l16kw6x1q0l9vk0hir1ipq66b0hl" "sha256": "1rs55v9gqda5lks89dd81frps5c9g3zgxk832qyckw9srlvbp0n1"
} }
} }
}, },
+3
View File
@@ -25,6 +25,7 @@ androidx.constraintlayout:constraintlayout:2.0.4
androidx.coordinatorlayout:coordinatorlayout:1.0.0 androidx.coordinatorlayout:coordinatorlayout:1.0.0
androidx.coordinatorlayout:coordinatorlayout:1.1.0 androidx.coordinatorlayout:coordinatorlayout:1.1.0
androidx.core:core-ktx:1.6.0 androidx.core:core-ktx:1.6.0
androidx.core:core-splashscreen:1.0.0
androidx.core:core:1.0.1 androidx.core:core:1.0.1
androidx.core:core:1.1.0 androidx.core:core:1.1.0
androidx.core:core:1.6.0 androidx.core:core:1.6.0
@@ -517,6 +518,7 @@ org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.31 org.jetbrains.kotlin:kotlin-stdlib-common:1.4.31
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.10 org.jetbrains.kotlin:kotlin-stdlib-common:1.5.10
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.30 org.jetbrains.kotlin:kotlin-stdlib-common:1.5.30
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71 org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20 org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50 org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50
@@ -536,6 +538,7 @@ org.jetbrains.kotlin:kotlin-stdlib:1.3.50
org.jetbrains.kotlin:kotlin-stdlib:1.4.31 org.jetbrains.kotlin:kotlin-stdlib:1.4.31
org.jetbrains.kotlin:kotlin-stdlib:1.5.10 org.jetbrains.kotlin:kotlin-stdlib:1.5.10
org.jetbrains.kotlin:kotlin-stdlib:1.5.30 org.jetbrains.kotlin:kotlin-stdlib:1.5.30
org.jetbrains.kotlin:kotlin-stdlib:1.6.21
org.jetbrains.kotlin:kotlin-util-io:1.3.50 org.jetbrains.kotlin:kotlin-util-io:1.3.50
org.jetbrains.kotlin:kotlin-util-io:1.4.31 org.jetbrains.kotlin:kotlin-util-io:1.4.31
org.jetbrains.kotlin:kotlin-util-klib:1.4.31 org.jetbrains.kotlin:kotlin-util-klib:1.4.31
+7 -4
View File
@@ -30,6 +30,7 @@ https://dl.google.com/dl/android/maven2/androidx/constraintlayout/constraintlayo
https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.0.0/coordinatorlayout-1.0.0.pom https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.0.0/coordinatorlayout-1.0.0.pom
https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.pom https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.pom
https://dl.google.com/dl/android/maven2/androidx/core/core-ktx/1.6.0/core-ktx-1.6.0.pom https://dl.google.com/dl/android/maven2/androidx/core/core-ktx/1.6.0/core-ktx-1.6.0.pom
https://dl.google.com/dl/android/maven2/androidx/core/core-splashscreen/1.0.0/core-splashscreen-1.0.0.pom
https://dl.google.com/dl/android/maven2/androidx/core/core/1.0.0/core-1.0.0.pom https://dl.google.com/dl/android/maven2/androidx/core/core/1.0.0/core-1.0.0.pom
https://dl.google.com/dl/android/maven2/androidx/core/core/1.0.1/core-1.0.1.pom https://dl.google.com/dl/android/maven2/androidx/core/core/1.0.1/core-1.0.1.pom
https://dl.google.com/dl/android/maven2/androidx/core/core/1.1.0/core-1.1.0.pom https://dl.google.com/dl/android/maven2/androidx/core/core/1.1.0/core-1.1.0.pom
@@ -733,6 +734,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.10/kotlin-stdlib-common-1.5.10.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.10/kotlin-stdlib-common-1.5.10.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.30/kotlin-stdlib-common-1.5.30.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.30/kotlin-stdlib-common-1.5.30.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.20/kotlin-stdlib-common-1.6.20.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.20/kotlin-stdlib-common-1.6.20.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10/kotlin-stdlib-common-1.7.10.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10/kotlin-stdlib-common-1.7.10.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.8.0/kotlin-stdlib-common-1.8.0.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.8.0/kotlin-stdlib-common-1.8.0.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom
@@ -763,6 +765,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.31/k
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.10/kotlin-stdlib-1.5.10.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.10/kotlin-stdlib-1.5.10.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.30/kotlin-stdlib-1.5.30.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.30/kotlin-stdlib-1.5.30.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.20/kotlin-stdlib-1.6.20.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.20/kotlin-stdlib-1.6.20.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.7.10/kotlin-stdlib-1.7.10.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.7.10/kotlin-stdlib-1.7.10.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.8.0/kotlin-stdlib-1.8.0.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.8.0/kotlin-stdlib-1.8.0.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.3.50/kotlin-util-io-1.3.50.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.3.50/kotlin-util-io-1.3.50.pom
@@ -799,9 +802,9 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm/6.0/asm-6.0.pom
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.4/asm-9.4.pom https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.4/asm-9.4.pom
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom https://repo.maven.apache.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5.1/ow2-1.5.1.pom https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5.1/ow2-1.5.1.pom
https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/2.0.6/jcl-over-slf4j-2.0.6.pom https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/2.0.7/jcl-over-slf4j-2.0.7.pom
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/2.0.6/slf4j-api-2.0.6.pom https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/2.0.7/slf4j-api-2.0.7.pom
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/2.0.6/slf4j-jdk14-2.0.6.pom https://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/2.0.7/slf4j-jdk14-2.0.7.pom
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/2.0.6/slf4j-parent-2.0.6.pom https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/2.0.7/slf4j-parent-2.0.7.pom
https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
+3 -3
View File
@@ -29,17 +29,17 @@ function findPackage(line, regex) {
if (line ~ "com.facebook.react:react-native") { continue } if (line ~ "com.facebook.react:react-native") { continue }
# Example: +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 # Example: +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50
if (findPackage(line, "--- ([^:]+):([^:]+):([^ ]+)$")) { if (findPackage(line, "--- ([^ :]+):([^ :]+):([^ :]+)$")) {
continue continue
} }
# Example: +--- androidx.lifecycle:lifecycle-common:{strictly 2.0.0} -> 2.0.0 (c) # Example: +--- androidx.lifecycle:lifecycle-common:{strictly 2.0.0} -> 2.0.0 (c)
if (findPackage(line, "--- ([^:]+):([^:]+):[^ ]+ -> ([^: ]+) ?(\\([*c]\\))?$")) { if (findPackage(line, "--- ([^ :]+):([^ :]+):[^:]+ -> ([^ :]+) ?(\\([*c]\\))?$")) {
continue continue
} }
# Example: +--- com.android.support:appcompat-v7:28.0.0 -> androidx.appcompat:appcompat:1.0.2 # Example: +--- com.android.support:appcompat-v7:28.0.0 -> androidx.appcompat:appcompat:1.0.2
if (findPackage(line, "--- [^:]+:[^:]+:[^ ]+ -> ([^:]+):([^:]+):([^ ]+)$")) { if (findPackage(line, "--- [^ :]+:[^ :]+:[^ ]+ -> ([^ :]+):([^ :]+):([^ :]+)$")) {
continue continue
} }
} }
+2 -2
View File
@@ -46,8 +46,8 @@ in {
# Package version adjustments # Package version adjustments
gradle = super.gradle_5; gradle = super.gradle_5;
nodejs = super.nodejs-16_x; nodejs = super.nodejs-18_x;
yarn = super.yarn.override { nodejs = super.nodejs-16_x; }; yarn = super.yarn.override { nodejs = super.nodejs-18_x; };
openjdk = super.openjdk8_headless; openjdk = super.openjdk8_headless;
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } { xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
version = "13.3"; version = "13.3";
+3 -3
View File
@@ -11,10 +11,10 @@ let
# We follow the master branch of official nixpkgs. # We follow the master branch of official nixpkgs.
nixpkgsSrc = fetchFromGitHub { nixpkgsSrc = fetchFromGitHub {
name = "nixpkgs-source"; name = "nixpkgs-source";
owner = "NixOS"; owner = "status-im"; # FIXME: Fork used to get Cocoapods 1.12.0.
repo = "nixpkgs"; repo = "nixpkgs";
rev = "579238da5f431b7833a9f0681663900aaf0dd1e8"; rev = "b9b2ed705edc00003d47625950602136be3e1ed5";
sha256 = "sha256-cDwASlAf/h0fsHtDm9yNBHEHK0uq6do+mIUEgh1i5yg="; sha256 = "sha256-F0qOawdKx7kgiGqwVikYIawL2taJ1XfcgHy0Wn0mho8=";
# To get the compressed Nix sha256, use: # To get the compressed Nix sha256, use:
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz # nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
}; };
+8 -1
View File
@@ -42,12 +42,19 @@ let
# for running gradle by hand # for running gradle by hand
gradle = mkShell { gradle = mkShell {
buildInputs = with pkgs; [ gradle maven goMavenResolver ]; buildInputs = with pkgs; [ gradle maven goMavenResolver ];
inputsFrom = [ nodejs-sh ];
shellHook = '' shellHook = ''
export STATUS_GO_ANDROID_LIBDIR="DUMMY" export STATUS_GO_ANDROID_LIBDIR="DUMMY"
export STATUS_NIX_MAVEN_REPO="${pkgs.deps.gradle}" export STATUS_NIX_MAVEN_REPO="${pkgs.deps.gradle}"
export ANDROID_SDK_ROOT="${pkgs.androidPkgs.sdk}" export ANDROID_SDK_ROOT="${pkgs.androidPkgs.sdk}"
export ANDROID_NDK_ROOT="${pkgs.androidPkgs.ndk}" export ANDROID_NDK_ROOT="${pkgs.androidPkgs.ndk}"
export STATUS_MOBILE_HOME=$(git rev-parse --show-toplevel)
# WARNING: Unpatched Node.js deps allow Gradle to use remote repos.
"$STATUS_MOBILE_HOME/nix/scripts/node_modules.sh" ${pkgs.deps.nodejs}
function restore_patched_modules() {
"$STATUS_MOBILE_HOME/nix/scripts/node_modules.sh" ${pkgs.deps.nodejs-patched}
}
trap restore_patched_modules EXIT
''; '';
}; };
+1 -1
View File
@@ -19,7 +19,7 @@
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.17.12",
"@react-native-async-storage/async-storage": "^1.17.9", "@react-native-async-storage/async-storage": "^1.17.9",
"@react-native-community/audio-toolkit": "git+https://github.com/tbenr/react-native-audio-toolkit.git#refs/tags/v2.0.3-status-v6", "@react-native-community/audio-toolkit": "git+https://github.com/tbenr/react-native-audio-toolkit.git#refs/tags/v2.0.3-status-v6",
"@react-native-community/blur": "git+https://github.com/status-im/react-native-blur#refs/tags/v4.3.1-status", "@react-native-community/blur": "git+https://github.com/status-im/react-native-blur#refs/tags/v4.3.2-status",
"@react-native-community/cameraroll": "git+https://github.com/status-im/react-native-cameraroll.git#refs/tags/v4.0.4-status.0", "@react-native-community/cameraroll": "git+https://github.com/status-im/react-native-cameraroll.git#refs/tags/v4.0.4-status.0",
"@react-native-community/clipboard": "^1.2.2", "@react-native-community/clipboard": "^1.2.2",
"@react-native-community/hooks": "^2.5.1", "@react-native-community/hooks": "^2.5.1",
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+7 -1
View File
@@ -45,7 +45,13 @@
:devtools {:autobuild #shadow/env ["SHADOW_AUTOBUILD_ENABLED" :default true :as :bool]} :devtools {:autobuild #shadow/env ["SHADOW_AUTOBUILD_ENABLED" :default true :as :bool]}
:dev {:devtools {:after-load status-im2.setup.hot-reload/reload :dev {:devtools {:after-load status-im2.setup.hot-reload/reload
:build-notify status-im2.setup.hot-reload/build-notify :build-notify status-im2.setup.hot-reload/build-notify
:preloads [re-frisk-remote.preload]} :preloads [re-frisk-remote.preload
;; In order to use component test helpers in
;; the REPL we need to preload namespaces
;; that are not normally required by
;; production code, such as
;; @testing-library/react-native.
test-helpers.component]}
:closure-defines :closure-defines
{status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN" {status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im2.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"} status-im2.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
@@ -58,6 +58,18 @@
(h/test "Size :small" (h/test "Size :small"
(h/render (user-avatar-component :small)) (h/render (user-avatar-component :small))
(h/is-truthy (h/get-by-text "NU")))
(h/test "Two letters with excess whitespace"
(h/render [user-avatar/user-avatar
{:full-name "New User"
:size :big}])
(h/is-truthy (h/get-by-text "NU")))
(h/test "Two letters with leading whitespace"
(h/render [user-avatar/user-avatar
{:full-name " New User"
:size :big}])
(h/is-truthy (h/get-by-text "NU")))) (h/is-truthy (h/get-by-text "NU"))))
(h/describe "One letter" (h/describe "One letter"
@@ -5,14 +5,18 @@
[react-native.core :as rn] [react-native.core :as rn]
[react-native.fast-image :as fast-image])) [react-native.fast-image :as fast-image]))
(defn trim-whitespace [s] (string/join " " (string/split (string/trim s) #"\s+")))
(defn- extract-initials (defn- extract-initials
[full-name amount-initials] [full-name amount-initials]
(let [upper-case-first-letter (comp string/upper-case first) (let [upper-case-first-letter (comp string/upper-case first)
names-list (string/split full-name " ")] names-list (string/split (trim-whitespace full-name) " ")]
(->> names-list (if (= (first names-list) "")
(map upper-case-first-letter) ""
(take amount-initials) (->> names-list
(string/join)))) (map upper-case-first-letter)
(take amount-initials)
(string/join)))))
(defn initials-avatar (defn initials-avatar
[{:keys [full-name size draw-ring? customization-color]}] [{:keys [full-name size draw-ring? customization-color]}]
+14 -16
View File
@@ -6,12 +6,13 @@
[react-native.core :as rn] [react-native.core :as rn]
[reagent.core :as reagent])) [reagent.core :as reagent]))
(def themes (defn themes
[customization-color]
{:light {:primary {:icon-color colors/white {:light {:primary {:icon-color colors/white
:label-color colors/white :label-color colors/white
:background-color {:default colors/primary-50 :background-color {:default (colors/custom-color customization-color 50)
:pressed colors/primary-60 :pressed (colors/custom-color customization-color 60)
:disabled colors/primary-50}} :disabled (colors/custom-color customization-color 50)}}
:secondary {:icon-color colors/primary-50 :secondary {:icon-color colors/primary-50
:label-color colors/primary-50 :label-color colors/primary-50
:background-color {:default colors/primary-50-opa-20 :background-color {:default colors/primary-50-opa-20
@@ -74,9 +75,9 @@
:disabled colors/neutral-95}}} :disabled colors/neutral-95}}}
:dark {:primary {:icon-color colors/white :dark {:primary {:icon-color colors/white
:label-color colors/white :label-color colors/white
:background-color {:default colors/primary-60 :background-color {:default (colors/custom-color customization-color 60)
:pressed colors/primary-50 :pressed (colors/custom-color customization-color 50)
:disabled colors/primary-60}} :disabled (colors/custom-color customization-color 60)}}
:secondary {:icon-color colors/primary-50 :secondary {:icon-color colors/primary-50
:label-color colors/primary-50 :label-color colors/primary-50
:background-color {:default colors/primary-50-opa-20 :background-color {:default colors/primary-50-opa-20
@@ -218,14 +219,15 @@
(let [pressed (reagent/atom false)] (let [pressed (reagent/atom false)]
(fn (fn
[{:keys [on-press disabled type size community-color community-text-color before after above [{:keys [on-press disabled type size community-color community-text-color before after above
width width customization-color
override-theme override-background-color override-theme override-background-color
on-long-press accessibility-label icon icon-no-color style inner-style test-ID] on-long-press accessibility-label icon icon-no-color style inner-style test-ID]
:or {type :primary :or {type :primary
size 40}} size 40
customization-color :primary}}
children] children]
(let [{:keys [icon-color icon-secondary-color background-color label-color border-color]} (let [{:keys [icon-color icon-secondary-color background-color label-color border-color]}
(get-in themes (get-in (themes customization-color)
[(or [(or
override-theme override-theme
(theme/get-theme)) type]) (theme/get-theme)) type])
@@ -252,11 +254,7 @@
[rn/view [rn/view
{:style (merge {:style (merge
(shape-style-container type icon size) (shape-style-container type icon size)
{:background-color {:width width}
(if (= state :pressed)
(colors/theme-colors colors/neutral-100 colors/white)
:transparent)
:width width}
style)} style)}
[rn/view [rn/view
{:style (merge {:style (merge
@@ -16,15 +16,13 @@
:height 230 :height 230
:border-radius 20} :border-radius 20}
:on-press on-press} :on-press on-press}
[rn/view [rn/view {:flex 1}
{:flex 1}
[rn/view (style/community-cover-container 60) [rn/view (style/community-cover-container 60)
[rn/image [rn/image
{:source cover {:source cover
:style :style {:flex 1
{:flex 1 :border-top-right-radius 20
:border-top-right-radius 20 :border-top-left-radius 20}}]]
:border-top-left-radius 20}}]]
[rn/view (style/card-view-content-container 12) [rn/view (style/card-view-content-container 12)
[rn/view (style/card-view-chat-icon 48) [rn/view (style/card-view-chat-icon 48)
[icon/community-icon {:images images} 48]] [icon/community-icon {:images images} 48]]
@@ -38,7 +36,8 @@
{:title name {:title name
:description description}] :description description}]
[rn/view {:style (style/card-stats-position)} [rn/view {:style (style/card-stats-position)}
[community-view/community-stats-column :card-view]] [community-view/community-stats-column
{:type :card-view}]]
[rn/view {:style (style/community-tags-position)} [rn/view {:style (style/community-tags-position)}
[community-view/community-tags tags]]]]]]]) [community-view/community-tags tags]]]]]]])
@@ -64,7 +64,8 @@
colors/neutral-40 colors/neutral-40
colors/neutral-60))}} colors/neutral-60))}}
name] name]
[community-view/community-stats-column :list-view]] [community-view/community-stats-column
{:type :list-view}]]
(if (= status :gated) (if (= status :gated)
[community-view/permission-tag-container [community-view/permission-tag-container
{:locked? locked? {:locked? locked?
@@ -23,7 +23,7 @@
members-count]]) members-count]])
(defn community-stats-column (defn community-stats-column
[type] [{:keys [type]}]
(let [icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)] (let [icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)]
[rn/view [rn/view
(if (= type :card-view) (if (= type :card-view)
@@ -46,11 +46,12 @@
^{:key name} ^{:key name}
[rn/view {:margin-right 8} [rn/view {:margin-right 8}
[tag/tag [tag/tag
{:size 24 {:size 24
:label name :label name
:type :emoji :type :emoji
:labelled? true :labelled? true
:resource emoji}]])]) :scrollable? true
:resource emoji}]])])
(defn community-title (defn community-title
[{:keys [title description size] :or {size :small}}] [{:keys [title description size] :or {size :small}}]
+1 -1
View File
@@ -62,7 +62,7 @@
:bottom 0 :bottom 0
:left 0 :left 0
:right 0 :right 0
:height 20 :border-radius 20
:padding-horizontal padding-horizontal :padding-horizontal padding-horizontal
:border-top-right-radius 16 :border-top-right-radius 16
:border-top-left-radius 16 :border-top-left-radius 16
+62 -48
View File
@@ -11,10 +11,21 @@
(defn divider-label (defn divider-label
"label -> string "label -> string
chevron-position -> :left, :right chevron-position -> :left, :right
chevron-icon -> keyword
on-press -> function
padding-bottom -> number
counter-value -> number counter-value -> number
increase-padding-top? -> boolean increase-padding-top? -> boolean
blur? -> boolean" blur? -> boolean"
[{:keys [label chevron-position counter-value increase-padding-top? blur? container-style]}] [{:keys [label
chevron-position
chevron-icon
counter-value
increase-padding-top?
padding-bottom
blur?
container-style
on-press]}]
(let [dark? (colors/dark?) (let [dark? (colors/dark?)
border-and-counter-bg-color (if dark? border-and-counter-bg-color (if dark?
(if blur? colors/white-opa-5 colors/neutral-70) (if blur? colors/white-opa-5 colors/neutral-70)
@@ -22,50 +33,53 @@
padding-top (if increase-padding-top? 16 8) padding-top (if increase-padding-top? 16 8)
text-and-icon-color (if dark? colors/neutral-40 colors/neutral-50) text-and-icon-color (if dark? colors/neutral-40 colors/neutral-50)
counter-text-color (if dark? colors/white colors/neutral-100)] counter-text-color (if dark? colors/white colors/neutral-100)]
[rn/view [rn/touchable-without-feedback
{:accessible true {:on-press on-press}
:accessibility-label :divider-label [rn/view
:style (merge {:border-top-width 1 {:accessible true
:border-top-color border-and-counter-bg-color :accessibility-label :divider-label
:padding-top padding-top :style (merge {:border-top-width 1
:padding-horizontal 16 :border-top-color border-and-counter-bg-color
:align-items :center :padding-top padding-top
:flex-direction :row} :padding-bottom padding-bottom
container-style)} :padding-horizontal 16
(when (= chevron-position :left) :align-items :center
[rn/view :flex-direction :row}
{:test-ID :divider-label-icon-left container-style)}
:style {:margin-right 4}} (when (= chevron-position :left)
[icons/icon [rn/view
:main-icons/chevron-down {:test-ID :divider-label-icon-left
{:color text-and-icon-color :style {:margin-right 4}}
:width chevron-icon-container-width [icons/icon
:height chevron-icon-container-height}]]) (or chevron-icon :i/chevron-down)
[markdown.text/text {:color text-and-icon-color
{:size :paragraph-2 :width chevron-icon-container-width
:weight :medium :height chevron-icon-container-height}]])
:style {:color text-and-icon-color [markdown.text/text
:flex 1}} {:size :paragraph-2
label] :weight :medium
(when (= chevron-position :right) :style {:color text-and-icon-color
[rn/view {:test-ID :divider-label-icon-right} :flex 1}}
[icons/icon label]
:main-icons/chevron-down (when (= chevron-position :right)
{:color text-and-icon-color [rn/view {:test-ID :divider-label-icon-right}
:size chevron-icon-container-width}]]) [icons/icon
(when (pos? counter-value) (or chevron-icon :i/chevron-down)
[rn/view {:color text-and-icon-color
{:style {:border-radius 6 :size chevron-icon-container-width}]])
:height 16 (when (pos? counter-value)
:width (case (count counter-value) [rn/view
1 16 {:style {:border-radius 6
2 20 :height 16
28) :width (case (count counter-value)
:background-color border-and-counter-bg-color 1 16
:align-items :center 2 20
:justify-content :center}} 28)
[markdown.text/text :background-color border-and-counter-bg-color
{:size :label :align-items :center
:weight :medium :justify-content :center}}
:style {:color counter-text-color}} [markdown.text/text
counter-value]])])) {:size :label
:weight :medium
:style {:color counter-text-color}}
counter-value]])]]))
+4 -4
View File
@@ -22,18 +22,18 @@
opts opts
{:type :default/:success/:error {:type :default/:success/:error
:size :default/:tiny :size :default/:tiny
:icon :main-icons/info ;; info message icon :icon :i/info ;; info message icon
:text-color colors/white ;; text color override :text-color colors/white ;; text color override
:icon-color colors/white ;; icon color override :icon-color colors/white ;; icon color override
:no-icon-color? false ;; disable tint color for icon" :no-icon-color? false ;; disable tint color for icon"
[{:keys [type size icon text-color icon-color no-icon-color?]} message] [{:keys [type size icon text-color icon-color no-icon-color? style]} message]
(let [weight (if (= size :default) :regular :medium) (let [weight (if (= size :default) :regular :medium)
size (if (= size :default) :paragraph-2 :label) size (if (= size :default) :paragraph-2 :label)
text-color (or text-color (get-color type)) text-color (or text-color (get-color type))
icon-color (or icon-color text-color)] icon-color (or icon-color text-color)]
[rn/view [rn/view
{:style {:flex-direction :row {:style (merge {:flex-direction :row}
:flex 1}} style)}
[quo2.icons/icon icon [quo2.icons/icon icon
{:color icon-color {:color icon-color
:no-color no-icon-color? :no-color no-icon-color?
@@ -0,0 +1,70 @@
(ns quo2.components.inputs.input.component-spec
(:require [quo2.components.inputs.input.view :as input]
[test-helpers.component :as h]))
(h/describe "Input"
(h/test "default render"
(h/render [input/input])
(h/is-truthy (h/query-by-label-text :input))
(h/is-null (h/query-by-label-text :password-input)))
(h/test "Password type"
(h/render [input/input {:type :password}])
(h/is-truthy (h/query-by-label-text :password-input))
(h/is-null (h/query-by-label-text :input)))
(h/describe "Icon"
(h/test "Doesn't exist in base input"
(h/render [input/input])
(h/is-null (h/query-by-label-text :input-icon)))
(h/test "Renders"
(h/render [input/input {:icon-name :i/placeholder}])
(h/is-truthy (h/get-by-label-text :input-icon))))
(h/describe "Right accessory"
(h/test "Doesn't exist in base input"
(h/render [input/input])
(h/is-null (h/query-by-label-text :input-right-icon)))
(h/test "Clear icon"
(h/render [input/input {:clearable? true}])
(h/is-truthy (h/query-by-label-text :input-right-icon)))
(h/test "Password icon"
(h/render [input/input {:type :password}])
(h/is-truthy (h/query-by-label-text :input-right-icon))))
(h/describe "Button"
(h/test "Doesn't exist in base input"
(h/render [input/input])
(h/is-null (h/query-by-label-text :input-button)))
(h/test "Renders with given text and it's pressable"
(let [button-text "This is a button"
button-callback (h/mock-fn)]
(h/render [input/input
{:button {:on-press button-callback
:text button-text}}])
(h/is-truthy (h/query-by-label-text :input-button))
(h/is-truthy (h/get-by-text button-text))
(h/fire-event :press (h/query-by-label-text :input-button))
(h/was-called button-callback))))
(h/describe "Label"
(h/test "Doesn't exist in base input"
(h/render [input/input])
(h/is-null (h/query-by-label-text :input-labels)))
(h/test "Renders with specified text"
(let [input-label "My label"]
(h/render [input/input {:label input-label}])
(h/is-truthy (h/query-by-label-text :input-labels))
(h/is-truthy (h/get-by-text input-label)))))
(h/test "Char limit counter"
(let [char-limit 100
char-limit-str (str "0/" char-limit)]
(h/render [input/input {:char-limit char-limit}])
(h/is-truthy (h/query-by-label-text :input-labels))
(h/is-truthy (h/get-by-text char-limit-str)))))
+71 -91
View File
@@ -2,82 +2,63 @@
(:require [quo2.components.markdown.text :as text] (:require [quo2.components.markdown.text :as text]
[quo2.foundations.colors :as colors])) [quo2.foundations.colors :as colors]))
(def variants-colors (defn variants-colors
"Colors that keep the same across input's status change" [blur? override-theme]
{:light {:label colors/neutral-50 (if blur?
:icon colors/neutral-50 {:label (colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40 override-theme)
:cursor (colors/custom-color :blue 50) :icon (colors/theme-colors colors/neutral-80-opa-70 colors/white-opa-70 override-theme)
:button-border colors/neutral-30 :button-border (colors/theme-colors colors/neutral-80-opa-30 colors/white-opa-10 override-theme)
:clear-icon colors/neutral-40 :password-icon (colors/theme-colors colors/neutral-100 colors/white override-theme)
:password-icon colors/neutral-50} :clear-icon (colors/theme-colors colors/neutral-80-opa-30 colors/white-opa-10 override-theme)
:light-blur {:label colors/neutral-80-opa-40 :cursor (colors/theme-colors (colors/custom-color :blue 50)
:icon colors/neutral-80-opa-70 colors/white
:cursor (colors/custom-color :blue 50) override-theme)}
:button-border colors/neutral-80-opa-30 {:label (colors/theme-colors colors/neutral-50 colors/neutral-40 override-theme)
:password-icon colors/neutral-100 :icon (colors/theme-colors colors/neutral-50 colors/neutral-40 override-theme)
:clear-icon colors/neutral-80-opa-30} :button-border (colors/theme-colors colors/neutral-30 colors/neutral-70 override-theme)
:dark {:label colors/neutral-40 :clear-icon (colors/theme-colors colors/neutral-40 colors/neutral-60 override-theme)
:icon colors/neutral-40 :password-icon (colors/theme-colors colors/neutral-50 colors/white override-theme)
:cursor (colors/custom-color :blue 60) :cursor (colors/theme-colors (colors/custom-color :blue 50)
:button-border colors/neutral-70 (colors/custom-color :blue 60)
:password-icon colors/white override-theme)}))
:clear-icon colors/neutral-60}
:dark-blur {:label colors/white-opa-40
:icon colors/white-opa-70
:cursor colors/white
:button-border colors/white-opa-10
:password-icon colors/white
:clear-icon colors/white-opa-10}})
(def status-colors (defn status-colors
{:light {:default {:border-color colors/neutral-20 [status blur? override-theme]
:placeholder colors/neutral-40 (if blur?
:text colors/neutral-100} (case status
:focus {:border-color colors/neutral-40 :focus
:placeholder colors/neutral-30 {:border-color (colors/theme-colors colors/neutral-80-opa-20 colors/white-opa-40 override-theme)
:text colors/neutral-100} :placeholder (colors/theme-colors colors/neutral-80-opa-20 colors/white-opa-20 override-theme)
:error {:border-color colors/danger-opa-40 :text (colors/theme-colors colors/neutral-100 colors/white override-theme)}
:placeholder colors/neutral-40 :error
:text colors/neutral-100} {:border-color (colors/theme-colors colors/danger-opa-40 colors/danger-opa-40 override-theme)
:disabled {:border-color colors/neutral-20 :placeholder (colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40 override-theme)
:placeholder colors/neutral-40 :text (colors/theme-colors colors/neutral-100 colors/white override-theme)}
:text colors/neutral-40}} :disabled
:light-blur {:default {:border-color colors/neutral-80-opa-10 {:border-color (colors/theme-colors colors/neutral-80-opa-10 colors/white-opa-10 override-theme)
:placeholder colors/neutral-80-opa-40 :placeholder (colors/theme-colors colors/neutral-80-opa-30 colors/white-opa-20 override-theme)
:text colors/neutral-100} :text (colors/theme-colors colors/neutral-80-opa-30 colors/white-opa-20 override-theme)}
:focus {:border-color colors/neutral-80-opa-20 ;; :default
:placeholder colors/neutral-80-opa-20 {:border-color (colors/theme-colors colors/neutral-80-opa-10 colors/white-opa-10 override-theme)
:text colors/neutral-100} :placeholder (colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40 override-theme)
:error {:border-color colors/danger-opa-40 :text (colors/theme-colors colors/neutral-100 colors/white override-theme)})
:placeholder colors/neutral-80-opa-40 (case status
:text colors/neutral-100} :focus
:disabled {:border-color colors/neutral-80-opa-10 {:border-color (colors/theme-colors colors/neutral-40 colors/neutral-60 override-theme)
:placeholder colors/neutral-80-opa-30 :placeholder (colors/theme-colors colors/neutral-30 colors/neutral-60 override-theme)
:text colors/neutral-80-opa-30}} :text (colors/theme-colors colors/neutral-100 colors/white override-theme)}
:dark {:default {:border-color colors/neutral-80 :error
:placeholder colors/neutral-50 {:border-color (colors/theme-colors colors/danger-opa-40 colors/danger-opa-40 override-theme)
:text colors/white} :placeholder (colors/theme-colors colors/neutral-40 colors/white-opa-40 override-theme)
:focus {:border-color colors/neutral-60 :text (colors/theme-colors colors/neutral-100 colors/white override-theme)}
:placeholder colors/neutral-60 :disabled
:text colors/white} {:border-color (colors/theme-colors colors/neutral-20 colors/neutral-80 override-theme)
:error {:border-color colors/danger-opa-40 :placeholder (colors/theme-colors colors/neutral-40 colors/neutral-40 override-theme)
:placeholder colors/white-opa-40 :text (colors/theme-colors colors/neutral-40 colors/neutral-40 override-theme)}
:text colors/white} ;; :default
:disabled {:border-color colors/neutral-80 {:border-color (colors/theme-colors colors/neutral-20 colors/neutral-80 override-theme)
:placeholder colors/neutral-40 :placeholder (colors/theme-colors colors/neutral-40 colors/neutral-50 override-theme)
:text colors/neutral-40}} :text (colors/theme-colors colors/neutral-100 colors/white override-theme)})))
:dark-blur {:default {:border-color colors/white-opa-10
:placeholder colors/white-opa-40
:text colors/white}
:focus {:border-color colors/white-opa-40
:placeholder colors/white-opa-20
:text colors/white}
:error {:border-color colors/danger-opa-40
:placeholder colors/white-opa-40
:text colors/white}
:disabled {:border-color colors/white-opa-10
:placeholder colors/white-opa-20
:text colors/white-opa-20}}})
(defn input-container (defn input-container
[colors-by-status small? disabled?] [colors-by-status small? disabled?]
@@ -85,16 +66,15 @@
:padding-horizontal 8 :padding-horizontal 8
:border-width 1 :border-width 1
:border-color (:border-color colors-by-status) :border-color (:border-color colors-by-status)
:border-radius (if small? 10 14) :border-radius (if small? 10 12)
:opacity (if disabled? 0.3 1)}) :opacity (if disabled? 0.3 1)})
(defn left-icon-container (defn left-icon-container
[small?] [small?]
{:margin-left (if small? 0 4) {:margin-left (if small? 0 4)
:margin-right (if small? 4 8) :margin-top (if small? 5 9)
:margin-top (if small? 5 9) :height 20
:height 20 :width 20})
:width 20})
(defn icon (defn icon
[colors-by-variant] [colors-by-variant]
@@ -103,14 +83,15 @@
(defn input (defn input
[colors-by-status small? multiple-lines?] [colors-by-status small? multiple-lines?]
(merge (text/text-style {:size :paragraph-1 :weight :regular}) (let [base-props (assoc (text/text-style {:size :paragraph-1 :weight :regular})
{:flex 1 :flex 1
:text-align-vertical :top :padding-right 0
:padding-horizontal 0 :padding-left (if small? 4 8)
:padding-vertical (if small? 4 8) :padding-vertical (if small? 4 8)
:color (:text colors-by-status)} :color (:text colors-by-status))]
(when-not multiple-lines? (if multiple-lines?
{:height (if small? 30 38)}))) (assoc base-props :text-align-vertical :top)
(assoc base-props :height (if small? 30 38) :line-height nil))))
(defn right-icon-touchable-area (defn right-icon-touchable-area
[small?] [small?]
@@ -129,8 +110,7 @@
:color (:clear-icon variant-colors)}) :color (:clear-icon variant-colors)})
(def texts-container (def texts-container
{:flex 1 {:flex-direction :row
:flex-direction :row
:height 18 :height 18
:margin-bottom 8}) :margin-bottom 8})
+66 -53
View File
@@ -9,7 +9,9 @@
(defn- label-&-counter (defn- label-&-counter
[{:keys [label current-chars char-limit variant-colors]}] [{:keys [label current-chars char-limit variant-colors]}]
(let [count-text (when char-limit (str current-chars "/" char-limit))] (let [count-text (when char-limit (str current-chars "/" char-limit))]
[rn/view {:style style/texts-container} [rn/view
{:accessibility-label :input-labels
:style style/texts-container}
[rn/view {:style style/label-container} [rn/view {:style style/label-container}
[text/text [text/text
{:style (style/label-color variant-colors) {:style (style/label-color variant-colors)
@@ -24,37 +26,41 @@
count-text]]])) count-text]]]))
(defn- left-accessory (defn- left-accessory
[{:keys [variant-colors small icon-name]}] [{:keys [variant-colors small? icon-name]}]
[rn/view {:style (style/left-icon-container small)} [rn/view
{:accessibility-label :input-icon
:style (style/left-icon-container small?)}
[icon/icon icon-name (style/icon variant-colors)]]) [icon/icon icon-name (style/icon variant-colors)]])
(defn- right-accessory (defn- right-accessory
[{:keys [variant-colors small disabled on-press icon-style-fn icon-name]}] [{:keys [variant-colors small? disabled? on-press icon-style-fn icon-name]}]
[rn/touchable-opacity [rn/touchable-opacity
{:style (style/right-icon-touchable-area small) {:accessibility-label :input-right-icon
:disabled disabled :style (style/right-icon-touchable-area small?)
:on-press on-press} :disabled disabled?
:on-press on-press}
[icon/icon icon-name (icon-style-fn variant-colors)]]) [icon/icon icon-name (icon-style-fn variant-colors)]])
(defn- right-button (defn- right-button
[{:keys [variant-colors colors-by-status small disabled on-press text]}] [{:keys [variant-colors colors-by-status small? disabled? on-press text]}]
[rn/touchable-opacity [rn/touchable-opacity
{:style (style/button variant-colors small) {:accessibility-label :input-button
:disabled disabled :style (style/button variant-colors small?)
:on-press on-press} :disabled disabled?
:on-press on-press}
[rn/text {:style (style/button-text colors-by-status)} [rn/text {:style (style/button-text colors-by-status)}
text]]) text]])
(def ^:private custom-props (def ^:private custom-props
"Custom properties that must be removed from properties map passed to InputText." "Custom properties that must be removed from properties map passed to InputText."
[:type :variant :error :right-icon :left-icon :disabled :small :button :label [:type :blur? :override-theme :error? :right-icon :left-icon :disabled? :small? :button
:char-limit :on-char-limit-reach :icon-name]) :label :char-limit :on-char-limit-reach :icon-name :multiline? :on-focus :on-blur])
(defn- base-input (defn- base-input
[{:keys [on-change-text on-char-limit-reach]}] [{:keys [on-change-text on-char-limit-reach]}]
(let [status (reagent/atom :default) (let [status (reagent/atom :default)
on-focus #(reset! status :focus) internal-on-focus #(reset! status :focus)
on-blur #(reset! status :default) internal-on-blur #(reset! status :default)
multiple-lines? (reagent/atom false) multiple-lines? (reagent/atom false)
set-multiple-lines! #(let [height (oops/oget % "nativeEvent.contentSize.height")] set-multiple-lines! #(let [height (oops/oget % "nativeEvent.contentSize.height")]
(if (> height 57) (if (> height 57)
@@ -67,56 +73,61 @@
(reset! char-count amount-chars) (reset! char-count amount-chars)
(when (>= amount-chars char-limit) (when (>= amount-chars char-limit)
(on-char-limit-reach amount-chars))))] (on-char-limit-reach amount-chars))))]
(fn [{:keys [variant error right-icon left-icon disabled small button label char-limit (fn [{:keys [blur? override-theme error? right-icon left-icon disabled? small? button
multiline clearable] label char-limit multiline? clearable? on-focus on-blur]
:or {variant :light}
:as props}] :as props}]
(let [status-path (cond (let [status-kw (cond
disabled :disabled disabled? :disabled
error :error error? :error
:else @status) :else @status)
colors-by-status (get-in style/status-colors [variant status-path]) colors-by-status (style/status-colors status-kw blur? override-theme)
variant-colors (style/variants-colors variant) variant-colors (style/variants-colors blur? override-theme)
clean-props (apply dissoc props custom-props)] clean-props (apply dissoc props custom-props)]
[rn/view [:<>
(when (or label char-limit) (when (or label char-limit)
[label-&-counter [label-&-counter
{:variant-colors variant-colors {:variant-colors variant-colors
:label label :label label
:current-chars @char-count :current-chars @char-count
:char-limit char-limit}]) :char-limit char-limit}])
[rn/view {:style (style/input-container colors-by-status small disabled)} [rn/view {:style (style/input-container colors-by-status small? disabled?)}
(when-let [{:keys [icon-name]} left-icon] (when-let [{:keys [icon-name]} left-icon]
[left-accessory [left-accessory
{:variant-colors variant-colors {:variant-colors variant-colors
:small small :small? small?
:icon-name icon-name}]) :icon-name icon-name}])
[rn/text-input [rn/text-input
(cond-> {:style (style/input colors-by-status small @multiple-lines?) (cond-> {:style (style/input colors-by-status small? @multiple-lines?)
:accessibility-label :input
:placeholder-text-color (:placeholder colors-by-status) :placeholder-text-color (:placeholder colors-by-status)
:cursor-color (:cursor variant-colors) :cursor-color (:cursor variant-colors)
:editable (not disabled) :editable (not disabled?)
:on-focus on-focus :on-focus (fn []
:on-blur on-blur} (when on-focus (on-focus))
(internal-on-focus))
:on-blur (fn []
(when on-blur (on-blur))
(internal-on-blur))}
:always (merge clean-props) :always (merge clean-props)
multiline (assoc :on-content-size-change set-multiple-lines!) multiline? (assoc :multiline true
char-limit (assoc :on-change-text #(update-char-limit! char-limit %)))] :on-content-size-change set-multiple-lines!)
char-limit (assoc :on-change-text #(update-char-limit! % char-limit)))]
(when-let [{:keys [on-press icon-name style-fn]} right-icon] (when-let [{:keys [on-press icon-name style-fn]} right-icon]
[right-accessory [right-accessory
{:variant-colors variant-colors {:variant-colors variant-colors
:small small :small? small?
:disabled disabled :disabled? disabled?
:icon-style-fn style-fn :icon-style-fn style-fn
:icon-name icon-name :icon-name icon-name
:on-press (fn [] :on-press (fn []
(when clearable (reset! char-count 0)) (when clearable? (reset! char-count 0))
(on-press))}]) (on-press))}])
(when-let [{:keys [on-press text]} button] (when-let [{:keys [on-press text]} button]
[right-button [right-button
{:colors-by-status colors-by-status {:colors-by-status colors-by-status
:variant-colors variant-colors :variant-colors variant-colors
:small small :small? small?
:disabled disabled :disabled? disabled?
:on-press on-press :on-press on-press
:text text}])]])))) :text text}])]]))))
@@ -126,26 +137,28 @@
(fn [props] (fn [props]
[base-input [base-input
(assoc props (assoc props
:auto-capitalize :none :accessibility-label :password-input
:auto-complete :new-password :auto-capitalize :none
:secure-text-entry (not @password-shown?) :auto-complete :new-password
:right-icon {:style-fn style/password-icon :secure-text-entry (not @password-shown?)
:icon-name (if @password-shown? :i/hide :i/reveal) :right-icon {:style-fn style/password-icon
:on-press #(swap! password-shown? not)})]))) :icon-name (if @password-shown? :i/hide :i/reveal)
:on-press #(swap! password-shown? not)})])))
(defn input (defn input
"This input supports the following properties: "This input supports the following properties:
- :type - Can be `:text`(default) or `:password`. - :type - Can be `:text`(default) or `:password`.
- :variant - :light(default), :light-blur, :dark or :dark-blur. - :blur? - Boolean to set the blur color variant.
- :small - Boolean to specify if this input is rendered in its small version. - :override-theme - Can be `light` or `:dark`.
- :multiline - Boolean to specify if this input support multiple lines. - :small? - Boolean to specify if this input is rendered in its small version.
- :multiline? - Boolean to specify if this input support multiple lines.
- :icon-name - The name of an icon to display at the left of the input. - :icon-name - The name of an icon to display at the left of the input.
- :error - Boolean to specify it this input marks an error. - :error? - Boolean to specify it this input marks an error.
- :disabled - Boolean to specify if this input is disabled or not. - :disabled? - Boolean to specify if this input is disabled or not.
- :clearable - Booolean to specify if this input has a clear button at the end. - :clearable? - Booolean to specify if this input has a clear button at the end.
- :on-clear - Function executed when the clear button is pressed. - :on-clear - Function executed when the clear button is pressed.
- :button - Map containing `:on-press` & `:text` keys, if provided renders a button - :button - Map containing `:on-press` & `:text` keys, if provided renders a button
- :label - A label for this input. - :label - A string to set as label for this input.
- :char-limit - A number to set a maximum char limit for this input. - :char-limit - A number to set a maximum char limit for this input.
- :on-char-limit-reach - Function executed each time char limit is reached or exceeded. - :on-char-limit-reach - Function executed each time char limit is reached or exceeded.
and supports the usual React Native's TextInput properties to control its behaviour: and supports the usual React Native's TextInput properties to control its behaviour:
@@ -155,12 +168,12 @@
- :on-change-text - :on-change-text
... ...
" "
[{:keys [type clearable on-clear on-change-text icon-name] [{:keys [type clearable? on-clear on-change-text icon-name]
:or {type :text} :or {type :text}
:as props}] :as props}]
(let [base-props (cond-> props (let [base-props (cond-> props
icon-name (assoc-in [:left-icon :icon-name] icon-name) icon-name (assoc-in [:left-icon :icon-name] icon-name)
clearable (assoc :right-icon clearable? (assoc :right-icon
{:style-fn style/clear-icon {:style-fn style/clear-icon
:icon-name :i/clear :icon-name :i/clear
:on-press #(when on-clear (on-clear))}) :on-press #(when on-clear (on-clear))})
@@ -25,13 +25,13 @@
:height 24 :height 24
:borderRadius 12}]} :borderRadius 12}]}
[user-avatar/user-avatar [user-avatar/user-avatar
(merge image-picker-props (assoc image-picker-props
{:customization-color customization-color :customization-color customization-color
:full-name (if (seq full-name) :full-name (if (seq full-name)
full-name full-name
placeholder) placeholder)
:status-indicator? false :status-indicator? false
:size :medium})]] :size :medium)]]
[buttons/button [buttons/button
{:accessibility-label :select-profile-picture-button {:accessibility-label :select-profile-picture-button
:type :grey :type :grey
@@ -47,5 +47,6 @@
[rn/view {:style style/input-container} [rn/view {:style style/input-container}
[title-input/title-input [title-input/title-input
(merge title-input-props (merge title-input-props
{:placeholder placeholder {:override-theme :dark
:placeholder placeholder
:customization-color customization-color})]]])) :customization-color customization-color})]]]))
@@ -34,9 +34,11 @@
(def text-input-container {:flex 1}) (def text-input-container {:flex 1})
(defn title-text (defn title-text
[disabled? blur?] [disabled? blur? override-theme]
{:text-align-vertical :bottom {:text-align-vertical :bottom
:color (when disabled? (get-disabled-color blur?))}) :color (if disabled?
(get-disabled-color blur?)
(colors/theme-colors colors/neutral-100 colors/white override-theme))})
(defn char-count (defn char-count
[blur?] [blur?]
@@ -16,7 +16,8 @@
on-change-text on-change-text
placeholder placeholder
max-length max-length
default-value] default-value
override-theme]
:or {max-length 0 :or {max-length 0
default-value ""}}] default-value ""}}]
(let [focused? (reagent/atom false) (let [focused? (reagent/atom false)
@@ -34,7 +35,7 @@
(text/text-style (text/text-style
{:size :heading-2 {:size :heading-2
:weight :semi-bold :weight :semi-bold
:style (style/title-text disabled? blur?)}) :style (style/title-text disabled? blur? override-theme)})
:default-value default-value :default-value default-value
:accessibility-label :profile-title-input :accessibility-label :profile-title-input
:on-focus #(swap! focused? (fn [] true)) :on-focus #(swap! focused? (fn [] true))
+27 -22
View File
@@ -30,16 +30,16 @@
{:no-color true}))) {:no-color true})))
(defn left-section-view (defn left-section-view
[{:keys [on-press icon accessibility-label type icon-override-theme] :or {type :grey}} [{:keys [on-press icon accessibility-label type icon-background-color] :or {type :grey}}
put-middle-section-on-left?] put-middle-section-on-left?]
[rn/view {:style (when put-middle-section-on-left? {:margin-right 5})} [rn/view {:style (when put-middle-section-on-left? {:margin-right 5})}
[button/button [button/button
{:on-press on-press {:on-press on-press
:icon true :icon true
:type type :type type
:size 32 :size 32
:accessibility-label accessibility-label :accessibility-label accessibility-label
:override-theme icon-override-theme} :override-background-color icon-background-color}
icon]]) icon]])
(defn- mid-section-comp (defn- mid-section-comp
@@ -150,13 +150,15 @@
:justify-content :flex-end)} :justify-content :flex-end)}
(let [last-icon-index (-> right-section-buttons count dec)] (let [last-icon-index (-> right-section-buttons count dec)]
(map-indexed (fn [index (map-indexed (fn [index
{:keys [icon on-press type style icon-override-theme] {:keys [icon on-press type style icon-override-theme accessibility-label]
:or {type :grey}}] :or {type :grey}}]
^{:key index} ^{:key index}
[rn/view [rn/view
{:style (assoc style (cond-> {:style (assoc style
:margin-right :margin-right
(if (= index last-icon-index) 0 8))} (if (= index last-icon-index) 0 8))}
accessibility-label (assoc :accessibility-label accessibility-label
:accessible true))
[button/button [button/button
{:on-press on-press {:on-press on-press
:icon true :icon true
@@ -235,15 +237,18 @@
:align-items :center}} :align-items :center}}
(when left-section (when left-section
[left-section-view left-section put-middle-section-on-left?]) [left-section-view left-section put-middle-section-on-left?])
(when put-middle-section-on-left? (when mid-section
[mid-section-view (cond
(assoc mid-section-props put-middle-section-on-left?
:left-align? true [mid-section-view
:description (:description mid-section) (assoc mid-section-props
:description-color (:description-color mid-section) :left-align? true
:description-icon (:description-icon mid-section) :description (:description mid-section)
:align-mid? align-mid? :description-color (:description-color mid-section)
:description-user-icon (:description-user-icon mid-section))])] :description-icon (:description-icon mid-section)
(when-not put-middle-section-on-left? :align-mid? align-mid?
[mid-section-view mid-section-props]) :description-user-icon (:description-user-icon mid-section))]
(not put-middle-section-on-left?)
[mid-section-view mid-section-props]))]
[right-section-view right-section-buttons]])) [right-section-view right-section-buttons]]))
@@ -49,8 +49,8 @@
(defn small-option-card (defn small-option-card
"Variants: `:main` or `:icon`" "Variants: `:main` or `:icon`"
[{:keys [variant title subtitle image max-height on-press] [{:keys [variant title subtitle image max-height on-press accessibility-label]
:or {variant :main}}] :or {variant :main accessibility-label :small-option-card}}]
(let [main-variant? (= variant :main) (let [main-variant? (= variant :main)
card-component (if main-variant? main-variant icon-variant) card-component (if main-variant? main-variant icon-variant)
card-height (cond card-height (cond
@@ -59,7 +59,7 @@
:else style/main-variant-height)] :else style/main-variant-height)]
[rn/view [rn/view
[rn/touchable-highlight [rn/touchable-highlight
{:accessibility-label :small-option-card {:accessibility-label accessibility-label
:style style/touchable-overlay :style style/touchable-overlay
:active-opacity 1 :active-opacity 1
:underlay-color colors/white-opa-5 :underlay-color colors/white-opa-5
+2 -1
View File
@@ -16,7 +16,8 @@
[text/text [text/text
{:style (style/tip-text completed?) {:style (style/tip-text completed?)
:weight :regular :weight :regular
:size :paragraph-2} text] :size :paragraph-2}
text]
(when completed? (when completed?
[rn/view [rn/view
{:style style/strike-through {:style style/strike-through
@@ -2,14 +2,16 @@
(:require [quo2.foundations.colors :as colors])) (:require [quo2.foundations.colors :as colors]))
(defn card-container (defn card-container
[customization-color padding-bottom] [{:keys [customization-color padding-bottom border-bottom-radius]}]
{:flex-direction :column {:padding-horizontal 12
:padding-horizontal 12 :padding-top 12
:padding-top 12 :padding-bottom padding-bottom
:padding-bottom padding-bottom :flex 1
:flex 1 :border-top-left-radius 16
:border-radius 16 :border-top-right-radius 16
:background-color (colors/custom-color customization-color 50 40)}) :border-bottom-left-radius border-bottom-radius
:border-bottom-right-radius border-bottom-radius
:background-color (colors/custom-color customization-color 50 40)})
(def card-header (def card-header
{:flex-direction :row {:flex-direction :row
@@ -4,77 +4,104 @@
[quo2.components.icon :as icon] [quo2.components.icon :as icon]
[quo2.components.tags.tag :as tag] [quo2.components.tags.tag :as tag]
[quo2.foundations.colors :as colors] [quo2.foundations.colors :as colors]
[react-native.hole-view :as hole-view]
[quo2.components.markdown.text :as text] [quo2.components.markdown.text :as text]
[quo2.components.buttons.button :as button] [quo2.components.buttons.button :as button]
[quo2.components.avatars.user-avatar.view :as user-avatar] [quo2.components.profile.profile-card.style :as style]
[quo2.components.profile.profile-card.style :as style])) [quo2.components.avatars.user-avatar.view :as user-avatar]))
(defn profile-card (defn- profile-card-component
[{:keys [key-card? profile-picture name hash customization-color [{:keys [keycard-account? profile-picture name hash
emoji-hash on-options-press show-emoji-hash? padding-bottom customization-color emoji-hash on-options-press
show-options-button? show-user-hash? show-logged-in? on-card-press] show-emoji-hash? show-options-button? show-user-hash?
show-logged-in? on-card-press login-card? last-item? card-style]
:or {show-emoji-hash? false :or {show-emoji-hash? false
show-user-hash? false show-user-hash? false
customization-color :turquoise customization-color :turquoise
show-options-button? false show-options-button? false
show-logged-in? false show-logged-in? false
key-card? false}}] keycard-account? false
[rn/touchable-without-feedback login-card? false
{:on-press on-card-press last-item? false
:flex 1 card-style {:padding-horizontal 20
:accessibility-label :profile-card} :flex 1}}}]
[rn/view (let [{:keys [width]} (rn/use-window-dimensions)
(style/card-container padding-bottom (cond
customization-color login-card? 38
(or padding-bottom (if show-emoji-hash? 12 10))) show-emoji-hash? 12
[rn/view :else 10)
{:style style/card-header} border-bottom-radius (if (or (not login-card?) last-item?) 16 0)]
[user-avatar/user-avatar [rn/touchable-without-feedback
{:full-name name {:on-press on-card-press
:profile-picture profile-picture :accessibility-label :profile-card}
:override-theme :dark [hole-view/hole-view
:size :medium {:key (str name last-item?) ;; Key is required to force removal of holes
:status-indicator? false}] :style (merge {:flex-direction :row} card-style)
[rn/view {:flex-direction :row} :holes (if (or (not login-card?) last-item?)
(when show-logged-in? []
[tag/tag [{:x 20
{:type :icon :y 108
:size 32 :width (- width 40)
:blurred? true :height 50
:labelled? true :borderRadius 16}])}
:resource :main-icons2/check [rn/view
:accessibility-label :logged-in-tag {:style (style/card-container
:icon-color colors/success-50 {:customization-color customization-color
:padding-bottom padding-bottom
:border-bottom-radius border-bottom-radius})}
[rn/view
{:style style/card-header}
[user-avatar/user-avatar
{:full-name name
:profile-picture profile-picture
:override-theme :dark :override-theme :dark
:label (i18n/label :t/logged-in)}]) :size :medium
(when show-options-button? :status-indicator? false
[button/button :customization-color customization-color}]
{:size 32 [rn/view {:flex-direction :row}
:type :blur-bg (when show-logged-in?
:icon true [tag/tag
:override-theme :dark {:type :icon
:style style/option-button :size 32
:on-press on-options-press :blurred? true
:accessibility-label :profile-card-options} :labelled? true
:i/options])]] :resource :main-icons2/check
[rn/view :accessibility-label :logged-in-tag
{:style style/name-container} :icon-color colors/success-50
[text/text :override-theme :dark
{:size :heading-2 :label (i18n/label :t/logged-in)}])
:weight :semi-bold (when show-options-button?
:number-of-lines 1 [button/button
:style style/user-name} name] {:size 32
(when key-card? :type :blur-bg
(icon/icon :icon true
:i/keycard :override-theme :dark
style/keycard-icon))] :style style/option-button
(when show-user-hash? :on-press on-options-press
[text/text :accessibility-label :profile-card-options}
{:weight :monospace :i/options])]]
:number-of-lines 1 [rn/view
:style style/user-hash} hash]) {:style style/name-container}
(when (and show-emoji-hash? emoji-hash) [text/text
[text/text {:size :heading-2
{:weight :monospace :weight :semi-bold
:number-of-lines 1 :number-of-lines 1
:style style/emoji-hash} emoji-hash])]]) :style style/user-name} name]
(when keycard-account?
(icon/icon
:i/keycard
style/keycard-icon))]
(when show-user-hash?
[text/text
{:weight :monospace
:number-of-lines 1
:style style/user-hash} hash])
(when (and show-emoji-hash? emoji-hash)
[text/text
{:weight :monospace
:number-of-lines 1
:style style/emoji-hash} emoji-hash])]]]))
(defn profile-card
[props]
[:f> profile-card-component props])
@@ -0,0 +1,29 @@
(ns quo2.components.selectors.disclaimer.component-spec
(:require [quo2.components.selectors.disclaimer.view :as disclaimer]
[test-helpers.component :as h]))
(h/describe "Disclaimer tests"
(h/test "Default render of toggle component"
(h/render [disclaimer/view {:on-change (h/mock-fn)} "test"])
(h/is-truthy (h/get-by-label-text :checkbox-off)))
(h/test "Renders its text"
(let [text "I accept this disclaimer"]
(h/render [disclaimer/view {} text])
(h/is-truthy (h/get-by-text text))))
(h/test "On change event gets fire after press"
(let [mock-fn (h/mock-fn)]
(h/render [disclaimer/view {:on-change mock-fn} "test"])
(h/fire-event :press (h/get-by-label-text :checkbox-off))
(h/was-called mock-fn)))
(h/describe "It's rendered according to its `checked?` property"
(h/test "checked? true"
(h/render [disclaimer/view {:checked? true} "test"])
(h/is-null (h/query-by-label-text :checkbox-off))
(h/is-truthy (h/query-by-label-text :checkbox-on)))
(h/test "checked? false"
(h/render [disclaimer/view {:checked? false} "test"])
(h/is-null (h/query-by-label-text :checkbox-on))
(h/is-truthy (h/query-by-label-text :checkbox-off)))))
@@ -2,14 +2,16 @@
(:require [quo2.foundations.colors :as colors])) (:require [quo2.foundations.colors :as colors]))
(defn container (defn container
[] [blur?]
{:flex-direction :row (let [dark-background (if blur? colors/white-opa-5 colors/neutral-80-opa-40)
:background-color (colors/theme-colors colors/neutral-5 colors/neutral-80-opa-40) dark-border (if blur? colors/white-opa-10 colors/neutral-70)]
:padding 11 {:flex-direction :row
:align-self :stretch :background-color (colors/theme-colors colors/neutral-5 dark-background)
:border-radius 12 :padding 11
:border-width 1 :align-self :stretch
:border-color (colors/theme-colors colors/neutral-20 colors/neutral-70)}) :border-radius 12
:border-width 1
:border-color (colors/theme-colors colors/neutral-20 dark-border)}))
(def text (def text
{:margin-left 8}) {:margin-left 8})
@@ -5,12 +5,13 @@
[react-native.core :as rn])) [react-native.core :as rn]))
(defn view (defn view
[{:keys [on-change accessibility-label container-style]} label] [{:keys [checked? blur? on-change accessibility-label container-style]} label]
[rn/view [rn/view
{:style (merge container-style (style/container))} {:style (merge container-style (style/container blur?))}
[selectors/checkbox [selectors/checkbox
{:accessibility-label accessibility-label {:accessibility-label accessibility-label
:on-change on-change}] :on-change on-change
:checked? checked?}]
[text/text [text/text
{:size :paragraph-2 {:size :paragraph-2
:style style/text} :style style/text}
+17 -10
View File
@@ -5,6 +5,10 @@
[react-native.core :as rn] [react-native.core :as rn]
[reagent.core :as reagent])) [reagent.core :as reagent]))
(def themes-for-blur
{:light {:background-color colors/neutral-80-opa-5}
:dark {:background-color colors/white-opa-5}})
(def themes (def themes
{:light {:background-color colors/neutral-20} {:light {:background-color colors/neutral-20}
:dark {:background-color colors/neutral-80}}) :dark {:background-color colors/neutral-80}})
@@ -12,11 +16,12 @@
(defn segmented-control (defn segmented-control
[{:keys [default-active on-change]}] [{:keys [default-active on-change]}]
(let [active-tab-id (reagent/atom default-active)] (let [active-tab-id (reagent/atom default-active)]
(fn [{:keys [data size]}] (fn [{:keys [data size override-theme blur?]}]
(let [active-id @active-tab-id] (let [active-id @active-tab-id]
[rn/view [rn/view
{:flex-direction :row {:flex-direction :row
:background-color (get-in themes [(theme/get-theme) :background-color]) :background-color (get-in (if blur? themes-for-blur themes)
[(or override-theme (theme/get-theme)) :background-color])
:border-radius (case size :border-radius (case size
32 10 32 10
28 8 28 8
@@ -29,12 +34,14 @@
{:margin-left (if (= 0 indx) 0 2) {:margin-left (if (= 0 indx) 0 2)
:flex 1} :flex 1}
[tab/view [tab/view
{:id id {:id id
:segmented? true :segmented? true
:size size :size size
:active (= id active-id) :override-theme override-theme
:on-press (fn [tab-id] :blur? blur?
(reset! active-tab-id tab-id) :active (= id active-id)
(when on-change :on-press (fn [tab-id]
(on-change tab-id)))} (reset! active-tab-id tab-id)
(when on-change
(on-change tab-id)))}
label]])])))) label]])]))))
+6 -5
View File
@@ -79,11 +79,12 @@
[notification-dot/notification-dot [notification-dot/notification-dot
{:style style/notification-dot}]) {:style style/notification-dot}])
[rn/view [rn/view
{:style (style/tab {:size size {:style (style/tab
:disabled disabled {:size size
:segmented? segmented? :disabled disabled
:background-color background-color :segmented? segmented?
:show-notification-dot? show-notification-dot?})} :background-color (if (and segmented? (not active)) :transparent background-color)
:show-notification-dot? show-notification-dot?})}
(when before (when before
[rn/view [rn/view
[icons/icon before {:color icon-color}]]) [icons/icon before {:color icon-color}]])
+2
View File
@@ -60,6 +60,7 @@
quo2.components.settings.accounts.view quo2.components.settings.accounts.view
quo2.components.settings.privacy-option quo2.components.settings.privacy-option
quo2.components.onboarding.small-option-card.view quo2.components.onboarding.small-option-card.view
quo2.components.tabs.segmented-tab
quo2.components.tabs.account-selector quo2.components.tabs.account-selector
quo2.components.tabs.tabs quo2.components.tabs.tabs
quo2.components.tags.context-tags quo2.components.tags.context-tags
@@ -91,6 +92,7 @@
(def audio-tag quo2.components.tags.context-tags/audio-tag) (def audio-tag quo2.components.tags.context-tags/audio-tag)
(def community-tag quo2.components.tags.context-tags/community-tag) (def community-tag quo2.components.tags.context-tags/community-tag)
(def tabs quo2.components.tabs.tabs/tabs) (def tabs quo2.components.tabs.tabs/tabs)
(def segmented-control quo2.components.tabs.segmented-tab/segmented-control)
(def account-selector quo2.components.tabs.account-selector/account-selector) (def account-selector quo2.components.tabs.account-selector/account-selector)
(def floating-shell-button quo2.components.navigation.floating-shell-button/floating-shell-button) (def floating-shell-button quo2.components.navigation.floating-shell-button/floating-shell-button)
(def page-nav quo2.components.navigation.page-nav/page-nav) (def page-nav quo2.components.navigation.page-nav/page-nav)
+4 -2
View File
@@ -2,21 +2,23 @@
(:require [quo2.components.avatars.user-avatar.component-spec] (:require [quo2.components.avatars.user-avatar.component-spec]
[quo2.components.banners.banner.component-spec] [quo2.components.banners.banner.component-spec]
[quo2.components.buttons.--tests--.buttons-component-spec] [quo2.components.buttons.--tests--.buttons-component-spec]
[quo2.components.colors.color-picker.component-spec]
[quo2.components.counter.--tests--.counter-component-spec] [quo2.components.counter.--tests--.counter-component-spec]
[quo2.components.dividers.--tests--.divider-label-component-spec] [quo2.components.dividers.--tests--.divider-label-component-spec]
[quo2.components.dividers.strength-divider.component-spec] [quo2.components.dividers.strength-divider.component-spec]
[quo2.components.drawers.action-drawers.component-spec] [quo2.components.drawers.action-drawers.component-spec]
[quo2.components.drawers.drawer-buttons.component-spec] [quo2.components.drawers.drawer-buttons.component-spec]
[quo2.components.drawers.permission-context.component-spec] [quo2.components.drawers.permission-context.component-spec]
[quo2.components.colors.color-picker.component-spec] [quo2.components.inputs.input.component-spec]
[quo2.components.inputs.profile-input.component-spec] [quo2.components.inputs.profile-input.component-spec]
[quo2.components.inputs.title-input.component-spec] [quo2.components.inputs.title-input.component-spec]
[quo2.components.markdown.--tests--.text-component-spec] [quo2.components.markdown.--tests--.text-component-spec]
[quo2.components.onboarding.small-option-card.component-spec] [quo2.components.onboarding.small-option-card.component-spec]
[quo2.components.password.tips.component-spec] [quo2.components.password.tips.component-spec]
[quo2.components.profile.select-profile.component-spec]
[quo2.components.record-audio.record-audio.--tests--.record-audio-component-spec] [quo2.components.record-audio.record-audio.--tests--.record-audio-component-spec]
[quo2.components.record-audio.soundtrack.--tests--.soundtrack-component-spec] [quo2.components.record-audio.soundtrack.--tests--.soundtrack-component-spec]
[quo2.components.profile.select-profile.component-spec]
[quo2.components.selectors.--tests--.selectors-component-spec] [quo2.components.selectors.--tests--.selectors-component-spec]
[quo2.components.selectors.disclaimer.component-spec]
[quo2.components.selectors.filter.component-spec] [quo2.components.selectors.filter.component-spec]
[quo2.components.tags.--tests--.status-tags-component-spec])) [quo2.components.tags.--tests--.status-tags-component-spec]))
+6 -1
View File
@@ -85,6 +85,7 @@
;;100 with transparency ;;100 with transparency
(def neutral-100-opa-0 (alpha neutral-100 0)) (def neutral-100-opa-0 (alpha neutral-100 0))
(def neutral-100-opa-10 (alpha neutral-100 0.1)) (def neutral-100-opa-10 (alpha neutral-100 0.1))
(def neutral-100-opa-30 (alpha neutral-100 0.3))
(def neutral-100-opa-60 (alpha neutral-100 0.6)) (def neutral-100-opa-60 (alpha neutral-100 0.6))
(def neutral-100-opa-70 (alpha neutral-100 0.7)) (def neutral-100-opa-70 (alpha neutral-100 0.7))
(def neutral-100-opa-80 (alpha neutral-100 0.8)) (def neutral-100-opa-80 (alpha neutral-100 0.8))
@@ -236,7 +237,11 @@
([color suffix] ([color suffix]
(custom-color color suffix nil)) (custom-color color suffix nil))
([color suffix opacity] ([color suffix opacity]
(let [base-color (get-in colors-map [(keyword color) suffix])] (let [color-keyword (keyword color)
base-color (get-in colors-map
[(if (= color-keyword :yinyang)
(if (theme/dark?) :yang :yin)
(keyword color)) suffix])]
(if opacity (alpha base-color (/ opacity 100)) base-color)))))) (if opacity (alpha base-color (/ opacity 100)) base-color))))))
(defn custom-color-by-theme (defn custom-color-by-theme
+5
View File
@@ -0,0 +1,5 @@
(ns react-native.camera-kit
(:require ["react-native-camera-kit" :refer (CameraKitCamera)]
[reagent.core :as reagent]))
(def camera (reagent/adapt-react-class CameraKitCamera))
+4
View File
@@ -6,3 +6,7 @@
(let [kb (.useKeyboard hooks)] (let [kb (.useKeyboard hooks)]
{:keyboard-shown (.-keyboardShown ^js kb) {:keyboard-shown (.-keyboardShown ^js kb)
:keyboard-height (.-keyboardHeight ^js kb)})) :keyboard-height (.-keyboardHeight ^js kb)}))
(defn use-back-handler
[handler]
(.useBackHandler hooks handler))
+12 -7
View File
@@ -21,6 +21,8 @@
[utils.collection] [utils.collection]
[utils.worklets.core :as worklets.core])) [utils.worklets.core :as worklets.core]))
(def ^:const default-duration 300)
;; Animations ;; Animations
(def slide-in-up-animation SlideInUp) (def slide-in-up-animation SlideInUp)
(def slide-out-up-animation SlideOutUp) (def slide-out-up-animation SlideOutUp)
@@ -65,6 +67,7 @@
(def in-out (def in-out
(.-inOut ^js Easing)) (.-inOut ^js Easing))
;; trying to put default-easing inside easings map causes test to fail
(defn default-easing [] (in-out (.-quad ^js Easing))) (defn default-easing [] (in-out (.-quad ^js Easing)))
(def easings (def easings
@@ -115,13 +118,15 @@
(js-obj "duration" duration (js-obj "duration" duration
"easing" (get easings easing)))))) "easing" (get easings easing))))))
(defn animate-shared-value-with-delay-default-easing (defn animate-delay
[anim val duration delay] ([animation val delay]
(set-shared-value anim (animate-delay animation val delay default-duration))
(with-delay delay ([animation val delay duration]
(with-timing val (set-shared-value animation
(js-obj "duration" duration (with-delay delay
"easing" (in-out (.-quad ^js Easing))))))) (with-timing val
(clj->js {:duration duration
:easing (default-easing)}))))))
(defn animate-shared-value-with-repeat (defn animate-shared-value-with-repeat
[anim val duration easing number-of-repetitions reverse?] [anim val duration easing number-of-repetitions reverse?]
+5 -3
View File
@@ -147,8 +147,9 @@
(defn build-image-messages (defn build-image-messages
[{db :db} chat-id input-text] [{db :db} chat-id input-text]
(let [images (get-in db [:chat/inputs chat-id :metadata :sending-image]) (let [images (get-in db [:chat/inputs chat-id :metadata :sending-image])
album-id (str (random-uuid))] {:keys [message-id]} (get-in db [:chat/inputs chat-id :metadata :responding-to-message])
album-id (str (random-uuid))]
(mapv (fn [[_ {:keys [resized-uri width height]}]] (mapv (fn [[_ {:keys [resized-uri width height]}]]
{:chat-id chat-id {:chat-id chat-id
:album-id album-id :album-id album-id
@@ -159,7 +160,8 @@
;; TODO: message not received if text field is ;; TODO: message not received if text field is
;; nil or empty, issue: ;; nil or empty, issue:
;; https://github.com/status-im/status-mobile/issues/14754 ;; https://github.com/status-im/status-mobile/issues/14754
:text (or input-text "placeholder")}) :text (or input-text "placeholder")
:response-to message-id})
images))) images)))
(rf/defn clean-input (rf/defn clean-input
+20 -22
View File
@@ -1,9 +1,9 @@
(ns status-im.chat.models.loading (ns status-im.chat.models.loading
(:require [re-frame.core :as re-frame] (:require [re-frame.core :as re-frame]
[status-im2.contexts.chat.messages.list.events :as message-list]
[status-im2.constants :as constants]
[status-im.data-store.chats :as data-store.chats] [status-im.data-store.chats :as data-store.chats]
[status-im.data-store.messages :as data-store.messages] [status-im.data-store.messages :as data-store.messages]
[status-im2.constants :as constants]
[status-im2.contexts.chat.messages.list.events :as message-list]
[taoensso.timbre :as log] [taoensso.timbre :as log]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
@@ -100,17 +100,6 @@
:on-success #(re-frame/dispatch :on-success #(re-frame/dispatch
[::mark-all-read-in-community-successful %])}]})) [::mark-all-read-in-community-successful %])}]}))
;; For example, when a user receives a list of 4 image messages while inside the chat screen we
;; shouldn't group the images into albums. When the user exists the chat screen then enters the
;; chat screen again, we now need to group the images into albums (like WhatsApp). The albumize?
;; boolean is used to know whether we need to group these images into albums now or not. The
;; album-id can't be used for this because it will always be there.
(defn mark-album
[message]
(if (:album-id message)
(assoc message :albumize? true)
message))
(rf/defn messages-loaded (rf/defn messages-loaded
"Loads more messages for current chat" "Loads more messages for current chat"
{:events [::messages-loaded]} {:events [::messages-loaded]}
@@ -124,15 +113,25 @@
(reduce (fn [{:keys [all-messages] :as acc} (reduce (fn [{:keys [all-messages] :as acc}
{:keys [message-id from] {:keys [message-id from]
:as message}] :as message}]
(cond-> acc (let [message
(not (get-in db [:chats chat-id :users from])) ;; For example, when a user receives a list of 4 image messages while inside
(update :senders assoc from message) ;; the chat screen we shouldn't group the images into albums. When the user
;; exists the chat screen then enters the chat screen again, we now need to
;; group the images into albums (like WhatsApp). The albumize? boolean is used
;; to know whether we need to group these images into albums now or not. The
;; album-id can't be used for this because it will always be there.
(if (and (:album-id message) (nil? (get all-messages message-id)))
(assoc message :albumize? true)
message)]
(cond-> acc
(not (get-in db [:chats chat-id :users from]))
(update :senders assoc from message)
(nil? (get all-messages message-id)) (nil? (get all-messages message-id))
(update :new-messages conj message) (update :new-messages conj message)
:always :always
(update :all-messages assoc message-id message))) (update :all-messages assoc message-id message))))
{:all-messages already-loaded-messages {:all-messages already-loaded-messages
:senders {} :senders {}
:contacts {} :contacts {}
@@ -141,8 +140,7 @@
current-clock-value (get-in db current-clock-value (get-in db
[:pagination-info chat-id [:pagination-info chat-id
:cursor-clock-value]) :cursor-clock-value])
clock-value (when cursor (cursor->clock-value cursor)) clock-value (when cursor (cursor->clock-value cursor))]
new-messages (map mark-album new-messages)]
{:db (-> db {:db (-> db
(update-in [:pagination-info chat-id :cursor-clock-value] (update-in [:pagination-info chat-id :cursor-clock-value]
#(if (and (seq cursor) (or (not %) (< clock-value %))) #(if (and (seq cursor) (or (not %) (< clock-value %)))
+46 -8
View File
@@ -276,7 +276,7 @@
(vals (get-in db [:communities community-id :chats])))] (vals (get-in db [:communities community-id :chats])))]
(when (and id (when (and id
(not= (:current-chat-id db) (str community-id id))) (not= (:current-chat-id db) (str community-id id)))
(chat.events/navigate-to-chat cofx (str community-id id) nil)))) (chat.events/navigate-to-chat cofx (str community-id id)))))
(rf/defn fetch (rf/defn fetch
[_] [_]
@@ -678,12 +678,6 @@
community-id community-id
request-id)}]}) request-id)}]})
(rf/defn switch-communities-enabled
{:events [:multiaccounts.ui/switch-communities-enabled]}
[{:keys [db]} enabled?]
{::async-storage/set! {:communities-enabled? enabled?}
:db (assoc db :communities/enabled? enabled?)})
(rf/defn create-category (rf/defn create-category
{:events [::create-category-confirmation-pressed]} {:events [::create-category-confirmation-pressed]}
[_ community-id category-title chat-ids] [_ community-id category-title chat-ids]
@@ -823,7 +817,7 @@
[cofx community-id] [cofx community-id]
(rf/merge cofx (rf/merge cofx
(navigation/pop-to-root :shell-stack) (navigation/pop-to-root :shell-stack)
(navigation/navigate-to-nav2 :community community-id true))) (navigation/navigate-to-cofx :community-overview community-id)))
(rf/defn member-role-updated (rf/defn member-role-updated
{:events [:community.member/role-updated]} {:events [:community.member/role-updated]}
@@ -860,3 +854,47 @@
:community-id community-id :community-id community-id
:public-key public-key :public-key public-key
:role-id role-id})]}) :role-id role-id})]})
(rf/defn fetched-collapsed-community-categories
{:events [:communities/fetched-collapsed-categories-success]}
[{:keys [db]} categories]
{:db (assoc db
:communities/collapsed-categories
(reduce
(fn [acc {:keys [communityId categoryId]}]
(assoc-in acc [communityId categoryId] true))
{}
categories))})
(rf/defn fetch-collapsed-community-categories
[_]
{:json-rpc/call [{:method "wakuext_collapsedCommunityCategories"
:params []
:on-success #(re-frame/dispatch
[:communities/fetched-collapsed-categories-success %])
:on-error #(log/error "failed to fetch collapsed community categories"
{:error :%})}]})
(rf/defn toggled-collapsed-category
{:events [:communities/toggled-collapsed-category-success]}
[{:keys [db]} community-id category-id collapsed?]
{:db (assoc-in db [:communities/collapsed-categories community-id category-id] collapsed?)})
(rf/defn toggle-collapsed-category
{:events [:communities/toggle-collapsed-category]}
[{:keys [db]} community-id category-id collapse?]
{:json-rpc/call [{:method "wakuext_toggleCollapsedCommunityCategory"
:params [{:communityId community-id
:categoryId category-id
:collapsed collapse?}]
:on-success #(re-frame/dispatch
[:communities/toggled-collapsed-category-success
community-id
category-id
collapse?])
:on-error #(log/error "failed to toggle collapse category"
{:error %
:community-id community-id
:event :communities/toggle-collapsed-category
:category-id category-id
:collapse? collapse?})}]})
+1 -1
View File
@@ -202,7 +202,7 @@
(defn words-count (defn words-count
[s] [s]
(if (empty? s) (if (empty? s)
nil 0
(-> s (-> s
passphrase->words passphrase->words
count))) count)))
+2 -1
View File
@@ -57,6 +57,7 @@
status-im2.contexts.activity-center.events status-im2.contexts.activity-center.events
status-im2.contexts.activity-center.notification.contact-requests.events status-im2.contexts.activity-center.notification.contact-requests.events
status-im2.contexts.shell.events status-im2.contexts.shell.events
status-im2.contexts.onboarding.events
status-im.chat.models.gaps status-im.chat.models.gaps
[status-im2.navigation.events :as navigation])) [status-im2.navigation.events :as navigation]))
@@ -116,7 +117,7 @@
(let [current-theme-type (get-in cofx [:db :multiaccount :appearance])] (let [current-theme-type (get-in cofx [:db :multiaccount :appearance])]
(when (and (multiaccounts.model/logged-in? cofx) (when (and (multiaccounts.model/logged-in? cofx)
(= current-theme-type status-im2.constants/theme-type-system)) (= current-theme-type status-im2.constants/theme-type-system))
{:multiaccounts.ui/switch-theme {:multiaccounts.ui/switch-theme-fx
[(get-in db [:multiaccount :appearance]) [(get-in db [:multiaccount :appearance])
(:view-id db) true]}))) (:view-id db) true]})))
+1 -1
View File
@@ -15,7 +15,7 @@
{:events [:navigate-chat-updated]} {:events [:navigate-chat-updated]}
[cofx chat-id] [cofx chat-id]
(when (get-in cofx [:db :chats chat-id]) (when (get-in cofx [:db :chats chat-id])
(chat.events/navigate-to-chat cofx chat-id nil))) (chat.events/navigate-to-chat cofx chat-id)))
(rf/defn handle-chat-removed (rf/defn handle-chat-removed
{:events [:chat-removed]} {:events [:chat-removed]}
+1 -1
View File
@@ -17,7 +17,7 @@
[{:keys [db] :as cofx}] [{:keys [db] :as cofx}]
(rf/merge cofx (rf/merge cofx
{:db db} {:db db}
(navigation/pop-to-root :multiaccounts-stack))) (navigation/pop-to-root :profiles)))
(rf/defn login-pin-more-icon-pressed (rf/defn login-pin-more-icon-pressed
{:events [:keycard.login.pin.ui/more-icon-pressed]} {:events [:keycard.login.pin.ui/more-icon-pressed]}
+3 -1
View File
@@ -1,5 +1,6 @@
(ns status-im.mobile-sync-settings.core (ns status-im.mobile-sync-settings.core
(:require [status-im2.common.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.mailserver.core :as mailserver]
[status-im.multiaccounts.model :as multiaccounts.model] [status-im.multiaccounts.model :as multiaccounts.model]
[status-im.multiaccounts.update.core :as multiaccounts.update] [status-im.multiaccounts.update.core :as multiaccounts.update]
@@ -42,7 +43,8 @@
(and logged-in? initialized?) (and logged-in? initialized?)
[(mailserver/process-next-messages-request) [(mailserver/process-next-messages-request)
(bottom-sheet/hide-bottom-sheet) (bottom-sheet/hide-bottom-sheet)
(wallet/restart-wallet-service nil)] (wallet/restart-wallet-service nil)
(add-new-contact/set-new-identity-reconnected)]
logged-in? logged-in?
[(mailserver/process-next-messages-request) [(mailserver/process-next-messages-request)
+13 -6
View File
@@ -5,14 +5,13 @@
[status-im2.common.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.multiaccounts.update.core :as multiaccounts.update]
[status-im.native-module.core :as native-module] [status-im.native-module.core :as native-module]
[status-im.theme.core :as theme]
[utils.re-frame :as rf] [utils.re-frame :as rf]
[quo2.foundations.colors :as colors] [quo2.foundations.colors :as colors]
[status-im2.constants :as constants] [status-im2.constants :as constants]
[status-im.utils.gfycat.core :as gfycat] [status-im.utils.gfycat.core :as gfycat]
[status-im.utils.identicon :as identicon] [status-im.utils.identicon :as identicon]
[status-im2.setup.hot-reload :as hot-reload] [status-im2.setup.hot-reload :as hot-reload]
[status-im2.common.theme.core :as utils.theme] [status-im2.common.theme.core :as theme]
[taoensso.timbre :as log] [taoensso.timbre :as log]
[status-im2.contexts.shell.animation :as shell.animation] [status-im2.contexts.shell.animation :as shell.animation]
[status-im.contact.db :as contact.db])) [status-im.contact.db :as contact.db]))
@@ -137,16 +136,16 @@
{::blank-preview-flag-changed private?})) {::blank-preview-flag-changed private?}))
(re-frame/reg-fx (re-frame/reg-fx
:multiaccounts.ui/switch-theme :multiaccounts.ui/switch-theme-fx
(fn [[theme-type view-id reload-ui?]] (fn [[theme-type view-id reload-ui?]]
(let [[theme status-bar-theme nav-bar-color] (let [[theme status-bar-theme nav-bar-color]
;; Status bar theme represents status bar icons colors, so opposite to app theme ;; Status bar theme represents status bar icons colors, so opposite to app theme
(if (or (= theme-type constants/theme-type-dark) (if (or (= theme-type constants/theme-type-dark)
(and (= theme-type constants/theme-type-system) (and (= theme-type constants/theme-type-system)
(utils.theme/dark-mode?))) (theme/device-theme-dark?)))
[:dark :light colors/neutral-100] [:dark :light colors/neutral-100]
[:light :dark colors/white])] [:light :dark colors/white])]
(theme/change-theme theme) (theme/set-theme theme)
(re-frame/dispatch [:change-root-status-bar-style (re-frame/dispatch [:change-root-status-bar-style
(if (shell.animation/home-stack-open?) status-bar-theme :light)]) (if (shell.animation/home-stack-open?) status-bar-theme :light)])
(when reload-ui? (when reload-ui?
@@ -158,9 +157,17 @@
{:events [:multiaccounts.ui/appearance-switched]} {:events [:multiaccounts.ui/appearance-switched]}
[cofx theme] [cofx theme]
(rf/merge cofx (rf/merge cofx
{:multiaccounts.ui/switch-theme [theme :appearance true]} {:multiaccounts.ui/switch-theme-fx [theme :appearance true]}
(multiaccounts.update/multiaccount-update :appearance theme {}))) (multiaccounts.update/multiaccount-update :appearance theme {})))
(rf/defn switch-theme
{:events [:multiaccounts.ui/switch-theme]}
[cofx theme view-id]
(let [theme (or theme
(get-in cofx [:db :multiaccount :appearance])
constants/theme-type-dark)]
{:multiaccounts.ui/switch-theme-fx [theme view-id false]}))
(rf/defn switch-profile-picture-show-to (rf/defn switch-profile-picture-show-to
{:events [:multiaccounts.ui/profile-picture-show-to-switched]} {:events [:multiaccounts.ui/profile-picture-show-to-switched]}
[cofx id] [cofx id]
+19 -27
View File
@@ -44,18 +44,9 @@
[status-im2.navigation.events :as navigation] [status-im2.navigation.events :as navigation]
[status-im2.common.log :as logging] [status-im2.common.log :as logging]
[taoensso.timbre :as log] [taoensso.timbre :as log]
[status-im2.contexts.shell.animation :as shell.animation]
[utils.security.core :as security])) [utils.security.core :as security]))
(re-frame/reg-fx
::initialize-communities-enabled
(fn []
(let [callback #(re-frame/dispatch [:multiaccounts.ui/switch-communities-enabled %])]
(if config/communities-enabled?
(callback true)
(async-storage/get-item
:communities-enabled?
callback)))))
(re-frame/reg-fx (re-frame/reg-fx
::initialize-transactions-management-enabled ::initialize-transactions-management-enabled
(fn [] (fn []
@@ -348,20 +339,12 @@
{:method "permissions_getDappPermissions" {:method "permissions_getDappPermissions"
:on-success #(re-frame/dispatch [::initialize-dapp-permissions %])}]}) :on-success #(re-frame/dispatch [::initialize-dapp-permissions %])}]})
(rf/defn initialize-appearance
[cofx]
{:multiaccounts.ui/switch-theme [(get-in cofx [:db :multiaccount :appearance]) nil false]})
(rf/defn get-group-chat-invitations (rf/defn get-group-chat-invitations
[_] [_]
{:json-rpc/call {:json-rpc/call
[{:method "wakuext_getGroupChatInvitations" [{:method "wakuext_getGroupChatInvitations"
:on-success #(re-frame/dispatch [::initialize-invitations %])}]}) :on-success #(re-frame/dispatch [::initialize-invitations %])}]})
(rf/defn initialize-communities-enabled
[cofx]
{::initialize-communities-enabled nil})
(rf/defn initialize-transactions-management-enabled (rf/defn initialize-transactions-management-enabled
[cofx] [cofx]
{::initialize-transactions-management-enabled nil}) {::initialize-transactions-management-enabled nil})
@@ -407,11 +390,10 @@
#(do (re-frame/dispatch [:chats-list/load-success %]) #(do (re-frame/dispatch [:chats-list/load-success %])
(rf/dispatch [:communities/get-user-requests-to-join]) (rf/dispatch [:communities/get-user-requests-to-join])
(re-frame/dispatch [::get-chats-callback]))}) (re-frame/dispatch [::get-chats-callback]))})
(initialize-appearance)
(initialize-communities-enabled)
(initialize-wallet-connect) (initialize-wallet-connect)
(get-node-config) (get-node-config)
(communities/fetch) (communities/fetch)
(communities/fetch-collapsed-community-categories)
(logging/set-log-level (:log-level multiaccount)) (logging/set-log-level (:log-level multiaccount))
(activity-center/notifications-fetch-pending-contact-requests) (activity-center/notifications-fetch-pending-contact-requests)
(activity-center/update-seen-state) (activity-center/update-seen-state)
@@ -493,8 +475,17 @@
(defn redirect-to-root (defn redirect-to-root
"Decides which root should be initialised depending on user and app state" "Decides which root should be initialised depending on user and app state"
[db] [db]
(if (get db :tos/accepted?) (cond
(get db :local-pairing/completed-pairing?)
(re-frame/dispatch [:syncing/pairing-completed])
(get db :onboarding-2/new-account?)
(re-frame/dispatch [:navigate-to :enable-notifications])
(get db :tos/accepted?)
(re-frame/dispatch [:init-root :shell-stack]) (re-frame/dispatch [:init-root :shell-stack])
:else
(re-frame/dispatch [:init-root :tos]))) (re-frame/dispatch [:init-root :tos])))
(rf/defn login-only-events (rf/defn login-only-events
@@ -528,10 +519,11 @@
tos-accepted? (get db :tos/accepted?) tos-accepted? (get db :tos/accepted?)
{:networks/keys [current-network networks]} db {:networks/keys [current-network networks]} db
network-id (str (get-in networks [current-network :config :NetworkId]))] network-id (str (get-in networks [current-network :config :NetworkId]))]
(shell.animation/change-selected-stack-id :communities-stack true)
(rf/merge cofx (rf/merge cofx
{:db (-> db {:db (-> db
(dissoc :multiaccounts/login) (dissoc :multiaccounts/login)
(assoc :tos/next-root :onboarding-notification :chats/loading? false) (assoc :tos/next-root :enable-notifications :chats/loading? false)
(assoc-in [:multiaccount :multiaccounts/first-account] first-account?)) (assoc-in [:multiaccount :multiaccounts/first-account] first-account?))
::get-tokens [network-id accounts recovered-account?]} ::get-tokens [network-id accounts recovered-account?]}
(finish-keycard-setup) (finish-keycard-setup)
@@ -539,11 +531,10 @@
(communities/fetch) (communities/fetch)
(data-store.chats/fetch-chats-rpc (data-store.chats/fetch-chats-rpc
{:on-success #(re-frame/dispatch [:chats-list/load-success %])}) {:on-success #(re-frame/dispatch [:chats-list/load-success %])})
(initialize-communities-enabled)
(multiaccounts/switch-preview-privacy-mode-flag) (multiaccounts/switch-preview-privacy-mode-flag)
(link-preview/request-link-preview-whitelist) (link-preview/request-link-preview-whitelist)
(logging/set-log-level (:log-level multiaccount)) (logging/set-log-level (:log-level multiaccount))
(navigation/init-root :shell-stack)))) (navigation/init-root :enable-notifications))))
(defn- keycard-setup? (defn- keycard-setup?
[cofx] [cofx]
@@ -646,7 +637,7 @@
(assoc-in [:keycard :pin :login] []))}) (assoc-in [:keycard :pin :login] []))})
#(if keycard-account? #(if keycard-account?
{:init-root-fx :multiaccounts-keycard} {:init-root-fx :multiaccounts-keycard}
{:init-root-fx :multiaccounts}) {:init-root-fx :profiles})
#(when goto-key-storage? #(when goto-key-storage?
(navigation/navigate-to-cofx % :actions-not-logged-in nil)))))) (navigation/navigate-to-cofx % :actions-not-logged-in nil))))))
@@ -745,8 +736,9 @@
keycard-multiaccount? (boolean (:keycard-pairing multiaccount))] keycard-multiaccount? (boolean (:keycard-pairing multiaccount))]
(rf/merge (rf/merge
cofx cofx
{:db (update db :keycard dissoc :application-info) (merge
:navigate-to-fx (if keycard-multiaccount? :keycard-login-pin :login)} {:db (update db :keycard dissoc :application-info)}
(when keycard-multiaccount? {:navigate-to-fx :keycard-login-pin}))
(open-login (select-keys multiaccount [:key-uid :name :public-key :identicon :images]))))) (open-login (select-keys multiaccount [:key-uid :name :public-key :identicon :images])))))
(rf/defn hide-keycard-banner (rf/defn hide-keycard-banner
+20
View File
@@ -91,6 +91,14 @@
key-uid key-uid
#(.loginWithConfig ^js (status) account-data hashed-password config)))) #(.loginWithConfig ^js (status) account-data hashed-password config))))
(defn create-account-and-login
[request]
(.createAccountAndLogin ^js (status) (types/clj->json request)))
(defn restore-account-and-login
[request]
(.restoreAccountAndLogin ^js (status) (types/clj->json request)))
(defn export-db (defn export-db
"NOTE: beware, the password has to be sha3 hashed" "NOTE: beware, the password has to be sha3 hashed"
[key-uid account-data hashed-password callback] [key-uid account-data hashed-password callback]
@@ -611,3 +619,15 @@
current-password# current-password#
new-password new-password
callback)) callback))
(defn backup-disabled-data-dir
[]
(.backupDisabledDataDir ^js (status)))
(defn keystore-dir
[]
(.keystoreDir ^js (status)))
(defn log-file-path
[]
(.logFilePath ^js (status)))
+40 -6
View File
@@ -9,7 +9,10 @@
[status-im.visibility-status-updates.core :as visibility-status-updates] [status-im.visibility-status-updates.core :as visibility-status-updates]
[utils.re-frame :as rf] [utils.re-frame :as rf]
[status-im2.contexts.chat.messages.link-preview.events :as link-preview] [status-im2.contexts.chat.messages.link-preview.events :as link-preview]
[taoensso.timbre :as log])) [taoensso.timbre :as log]
[status-im2.constants :as constants]
[quo2.foundations.colors :as colors]
[status-im.multiaccounts.model :as multiaccounts.model]))
(rf/defn status-node-started (rf/defn status-node-started
[{db :db :as cofx} {:keys [error]}] [{db :db :as cofx} {:keys [error]}]
@@ -53,10 +56,40 @@
:peer-stats peer-stats :peer-stats peer-stats
:peers-count (count (:peers peer-stats)))})) :peers-count (count (:peers peer-stats)))}))
(defn handle-local-pairing-signals (rf/defn handle-local-pairing-signals
[event] [{:keys [db] :as cofx} event]
(log/debug "local pairing signal received" (log/info "local pairing signal received"
{:event event})) {:event event})
(let [connection-success? (= (:type event)
constants/local-pairing-event-connection-success)
error-on-pairing? (contains? constants/local-pairing-event-errors (:type event))
completed-pairing? (and (= (:type event)
constants/local-pairing-event-process-success)
(= (:action event)
constants/local-pairing-action-pairing-account))
logged-in? (multiaccounts.model/logged-in? cofx)
;; since `connection-success` event is received on both sender and receiver devices
;; we check the `logged-in?` status to identify the receiver and take the user to next screen
navigate-to-syncing-devices? (and connection-success? (not logged-in?))
user-in-syncing-devices-screen? (= (:view-id db) :syncing-devices)]
(merge {:db (cond-> db
connection-success?
(assoc :local-pairing/completed-pairing? false)
error-on-pairing?
(dissoc :local-pairing/completed-pairing?)
completed-pairing?
(assoc :local-pairing/completed-pairing? true))}
(when navigate-to-syncing-devices?
{:dispatch [:navigate-to :syncing-devices]})
(when (and error-on-pairing? user-in-syncing-devices-screen?)
{:dispatch-n [[:toasts/upsert
{:icon :i/info
:icon-color colors/danger-50
:override-theme :light
:text (i18n/label :t/error-syncing-connection-failed)}]
[:navigate-back]]}))))
(rf/defn process (rf/defn process
{:events [:signals/signal-received]} {:events [:signals/signal-received]}
@@ -110,5 +143,6 @@
"status.updates.timedout" (visibility-status-updates/handle-visibility-status-updates "status.updates.timedout" (visibility-status-updates/handle-visibility-status-updates
cofx cofx
(js->clj event-js :keywordize-keys true)) (js->clj event-js :keywordize-keys true))
"localPairing" (handle-local-pairing-signals (js->clj event-js :keywordize-keys true)) "localPairing" (handle-local-pairing-signals cofx
(js->clj event-js :keywordize-keys true))
(log/debug "Event " type " not handled")))) (log/debug "Event " type " not handled"))))
-8
View File
@@ -1,8 +0,0 @@
(ns status-im.theme.core
(:require [quo.theme :as quo.theme]
[quo2.theme :as quo2.theme]))
(defn change-theme
[theme]
(quo.theme/set-theme theme)
(quo2.theme/set-theme theme))
@@ -2,15 +2,13 @@
(:require [quo.core :as quo] (:require [quo.core :as quo]
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[status-im.ui.components.list.views :as list] [status-im.ui.components.list.views :as list])
[status-im2.config :as config])
(:require-macros [status-im.utils.views :as views])) (:require-macros [status-im.utils.views :as views]))
(defn- normal-mode-settings-data (defn- normal-mode-settings-data
[{:keys [network-name [{:keys [network-name
current-log-level current-log-level
waku-bloom-filter-mode waku-bloom-filter-mode
communities-enabled?
transactions-management-enabled? transactions-management-enabled?
wakuv2-flag wakuv2-flag
current-fleet current-fleet
@@ -76,17 +74,6 @@
:on-press :on-press
#(re-frame/dispatch [:navigate-to :peers-stats]) #(re-frame/dispatch [:navigate-to :peers-stats])
:chevron true} :chevron true}
;; If it's enabled in the config, we don't show the option
(when (not config/communities-enabled?)
{:size :small
:title (i18n/label :t/communities-enabled)
:accessibility-label :communities-enabled
:container-margin-bottom 8
:on-press
#(re-frame/dispatch
[:multiaccounts.ui/switch-communities-enabled (not communities-enabled?)])
:accessory :switch
:active communities-enabled?})
{:size :small {:size :small
:title (i18n/label :t/transactions-management-enabled) :title (i18n/label :t/transactions-management-enabled)
:accessibility-label :transactions-management-enabled :accessibility-label :transactions-management-enabled
@@ -132,7 +119,6 @@
network-name [:network-name] network-name [:network-name]
waku-bloom-filter-mode [:waku/bloom-filter-mode] waku-bloom-filter-mode [:waku/bloom-filter-mode]
wakuv2-flag [:waku/v2-flag] wakuv2-flag [:waku/v2-flag]
communities-enabled? [:communities/enabled?]
transactions-management-enabled? [:wallet/transactions-management-enabled?] transactions-management-enabled? [:wallet/transactions-management-enabled?]
current-log-level [:log-level/current-log-level] current-log-level [:log-level/current-log-level]
current-fleet [:fleets/current-fleet]] current-fleet [:fleets/current-fleet]]
@@ -140,7 +126,6 @@
{:data (flat-list-data {:data (flat-list-data
{:network-name network-name {:network-name network-name
:current-log-level current-log-level :current-log-level current-log-level
:communities-enabled? communities-enabled?
:transactions-management-enabled? transactions-management-enabled? :transactions-management-enabled? transactions-management-enabled?
:current-fleet current-fleet :current-fleet current-fleet
:dev-mode? false :dev-mode? false
+18 -21
View File
@@ -48,7 +48,7 @@
:on-press (fn [] :on-press (fn []
(rf/dispatch [:communities/load-category-states id]) (rf/dispatch [:communities/load-category-states id])
(rf/dispatch [:dismiss-keyboard]) (rf/dispatch [:dismiss-keyboard])
(rf/dispatch [:navigate-to-nav2 :community {:community-id id}])) (rf/dispatch [:navigate-to :community-overview id]))
:on-long-press #(rf/dispatch [:bottom-sheet/show-sheet :on-long-press #(rf/dispatch [:bottom-sheet/show-sheet
{:content (fn [] {:content (fn []
[community/community-actions community])}])} [community/community-actions community])}])}
@@ -111,7 +111,7 @@
(i18n/label :t/open-membership))]] (i18n/label :t/open-membership))]]
:on-press #(do :on-press #(do
(rf/dispatch [:dismiss-keyboard]) (rf/dispatch [:dismiss-keyboard])
(rf/dispatch [:navigate-to-nav2 :community {:community-id id}]))}])) (rf/dispatch [:navigate-to :community-overview id]))}]))
(defn communities-actions (defn communities-actions
[] []
@@ -142,28 +142,25 @@
(defn communities (defn communities
[] []
(let [communities (rf/sub [:communities/section-list]) (let [communities (rf/sub [:communities/section-list])]
communities-enabled? (rf/sub [:communities/enabled?])]
[:<> [:<>
[topbar/topbar [topbar/topbar
(cond-> {:title (i18n/label :t/communities)} {:title (i18n/label :t/communities)
communities-enabled? :right-accessories
(assoc :right-accessories [{:icon :main-icons/more
[{:icon :main-icons/more :accessibility-label :chat-menu-button
:accessibility-label :chat-menu-button :on-press
:on-press #(rf/dispatch [:bottom-sheet/show-sheet
#(rf/dispatch [:bottom-sheet/show-sheet {:content (fn []
{:content (fn [] [communities-actions])
[communities-actions]) :height 256}])}]}]
:height 256}])}]))]
[communities-list communities] [communities-list communities]
(when communities-enabled? [toolbar/toolbar
[toolbar/toolbar {:show-border? true
{:show-border? true :center [quo/button
:center [quo/button {:on-press #(rf/dispatch [::communities/open-create-community])
{:on-press #(rf/dispatch [::communities/open-create-community]) :type :secondary}
:type :secondary} (i18n/label :t/create-community)]}]]))
(i18n/label :t/create-community)]}])]))
(defn export-community (defn export-community
[] []
@@ -51,13 +51,12 @@
:accessibility-label :join-public-chat-button :accessibility-label :join-public-chat-button
:icon :main-icons/public-chat :icon :main-icons/public-chat
:on-press #(hide-sheet-and-dispatch [:open-modal :new-public-chat])}] :on-press #(hide-sheet-and-dispatch [:open-modal :new-public-chat])}]
(when (rf/sub [:communities/enabled?]) [quo/list-item
[quo/list-item {:theme :accent
{:theme :accent :title (i18n/label :t/communities-alpha)
:title (i18n/label :t/communities-alpha) :accessibility-label :communities-button
:accessibility-label :communities-button :icon :main-icons/communities
:icon :main-icons/communities :on-press #(hide-sheet-and-dispatch [:navigate-to :communities])}]
:on-press #(hide-sheet-and-dispatch [:navigate-to :communities])}])
[invite/list-item [invite/list-item
{:accessibility-label :chats-menu-invite-friends-button}]]) {:accessibility-label :chats-menu-invite-friends-button}]])
@@ -12,7 +12,7 @@
[] []
[quo/list-item [quo/list-item
{:theme :accent {:theme :accent
:on-press #(hide-sheet-and-dispatch [:generate-and-derive-addresses]) :on-press #(hide-sheet-and-dispatch [:navigate-to :intro])
:icon :main-icons/add :icon :main-icons/add
:accessibility-label :generate-a-new-key :accessibility-label :generate-a-new-key
:title (i18n/label :t/generate-a-new-key)}]) :title (i18n/label :t/generate-a-new-key)}])
@@ -9,12 +9,25 @@
(defn quoted-message (defn quoted-message
[pin? in-chat-input?] [pin? in-chat-input?]
(merge {:flex-direction :row (merge {:flex-direction :row
:flex 1
:align-items :center :align-items :center
:width (if in-chat-input? "80%" "45%")} :width (if in-chat-input? "100%" "45%")}
(when-not pin? (when-not pin?
{:position :absolute {:left 22
:left 34 :margin-right 22})))
:top 3})))
(def reply-from
{:flex-direction :row
:align-items :center})
(def message-author-text
{:margin-left 4})
(def message-text
{:text-transform :none
:margin-left 4
:margin-top 2
:flex 1})
(def gradient (def gradient
{:position :absolute {:position :absolute
@@ -64,6 +64,17 @@
:margin-top 2}} :margin-top 2}}
(i18n/label :t/message-deleted)]]) (i18n/label :t/message-deleted)]])
(defn reply-from
[{:keys [from identicon contact-name current-public-key]}]
[rn/view {:style style/reply-from}
[photos/member-photo from identicon 16]
[quo2.text/text
{:weight :semi-bold
:size :paragraph-2
:number-of-lines 1
:style style/message-author-text}
(format-reply-author from contact-name current-public-key)]])
(defn reply-message (defn reply-message
[{:keys [from identicon content-type contentType parsed-text content deleted? deleted-for-me?]} [{:keys [from identicon content-type contentType parsed-text content deleted? deleted-for-me?]}
in-chat-input? pin? recording-audio?] in-chat-input? pin? recording-audio?]
@@ -84,13 +95,11 @@
[rn/view {:style (style/quoted-message pin? in-chat-input?)} [rn/view {:style (style/quoted-message pin? in-chat-input?)}
[reply-deleted-message]] [reply-deleted-message]]
[rn/view {:style (style/quoted-message pin? in-chat-input?)} [rn/view {:style (style/quoted-message pin? in-chat-input?)}
[photos/member-photo from identicon 16] [reply-from
[quo2.text/text {:from from
{:weight :semi-bold :identicon identicon
:size :paragraph-2 :contact-name contact-name
:number-of-lines 1 :current-public-key current-public-key}]
:style {:margin-left 4}}
(format-reply-author from contact-name current-public-key)]
[quo2.text/text [quo2.text/text
{:number-of-lines 1 {:number-of-lines 1
:size :label :size :label
@@ -98,9 +107,7 @@
:accessibility-label :quoted-message :accessibility-label :quoted-message
:ellipsize-mode :tail :ellipsize-mode :tail
:style (merge :style (merge
{:text-transform :none style/message-text
:margin-left 4
:margin-top 2}
(when (or (= constants/content-type-image content-type) (when (or (= constants/content-type-image content-type)
(= constants/content-type-sticker content-type) (= constants/content-type-sticker content-type)
(= constants/content-type-audio content-type)) (= constants/content-type-audio content-type))
@@ -354,9 +354,8 @@
(defview community-content (defview community-content
[{:keys [community-id] :as message}] [{:keys [community-id] :as message}]
(letsubs [{:keys [name description verified] :as community} [:communities/community community-id] (letsubs [{:keys [name description verified] :as community} [:communities/community community-id]]
communities-enabled? [:communities/enabled?]] (when community
(when (and communities-enabled? community)
[rn/view [rn/view
{:style (assoc (style/message-wrapper message) {:style (assoc (style/message-wrapper message)
:margin-vertical 10 :margin-vertical 10
@@ -378,14 +377,14 @@
:height 40}}] :height 40}}]
[communities.icon/community-icon community])] [communities.icon/community-icon community])]
[rn/view {:padding-right 14 :flex 1} [rn/view {:padding-right 14 :flex 1}
[rn/text {:style {:font-weight "700" :font-size 17}} [rn/text {:style {:font-weight "700" :font-size 17 :color quo.colors/black}}
name] name]
[rn/text description]]] [rn/text {:style {:color quo.colors/black}} description]]]
[rn/view (style/community-view-button) [rn/view (style/community-view-button)
[rn/touchable-opacity [rn/touchable-opacity
{:on-press #(re-frame/dispatch {:on-press #(re-frame/dispatch
[:communities/navigate-to-community [:communities/navigate-to-community
{:community-id (:id community)}])} (:id community)])}
[rn/text [rn/text
{:style {:text-align :center {:style {:text-align :center
:color quo.colors/blue}} (i18n/label :t/view)]]]]))) :color quo.colors/blue}} (i18n/label :t/view)]]]])))
+8 -4
View File
@@ -225,8 +225,12 @@
(defn format-members (defn format-members
[count] [count]
(if (> count 1000000) (cond
(> count 1000000)
(str (with-precision (/ count 1000000) 1) (i18n/label :t/M)) (str (with-precision (/ count 1000000) 1) (i18n/label :t/M))
(if (and (> count 999) (< count 1000000))
(str (with-precision (/ count 1000) 1) (i18n/label :t/K)) (< 999 count 1000000)
count))) (str (with-precision (/ count 1000) 1) (i18n/label :t/K))
:else
count))
@@ -0,0 +1,42 @@
(ns status-im2.common.bottom-sheet-screen.style
(:require
[quo2.foundations.colors :as colors]
[react-native.reanimated :as reanimated]))
(defn background
[opacity]
(reanimated/apply-animations-to-style
{:opacity opacity}
{:background-color colors/neutral-100-opa-70
:position :absolute
:top 0
:bottom 0
:left 0
:right 0}))
(defn main-view
[translate-y]
(reanimated/apply-animations-to-style
{:transform [{:translate-y translate-y}]}
{:background-color (colors/theme-colors colors/white colors/neutral-95)
:border-top-left-radius 20
:border-top-right-radius 20
:flex 1
:overflow :hidden}))
(def handle-container
{:left 0
:right 0
:top 0
:height 20
:z-index 1
:position :absolute
:justify-content :center
:align-items :center})
(defn handle
[]
{:width 32
:height 4
:border-radius 100
:background-color (colors/theme-colors colors/neutral-100-opa-30 colors/white-opa-30)})
@@ -0,0 +1,81 @@
(ns status-im2.common.bottom-sheet-screen.view
(:require
[react-native.gesture :as gesture]
[react-native.hooks :as hooks]
[react-native.navigation :as navigation]
[react-native.platform :as platform]
[react-native.reanimated :as reanimated]
[oops.core :as oops]
[react-native.safe-area :as safe-area]
[status-im2.common.bottom-sheet-screen.style :as style]
[react-native.core :as rn]
[reagent.core :as reagent]
[utils.re-frame :as rf]))
(def ^:const drag-threshold 100)
(defn drag-gesture
[translate-y opacity scroll-enabled curr-scroll]
(->
(gesture/gesture-pan)
(gesture/on-start (fn [e]
(when (< (oops/oget e "velocityY") 0)
(reset! scroll-enabled true))))
(gesture/on-update (fn [e]
(let [translation (oops/oget e "translationY")
progress (Math/abs (/ translation drag-threshold))]
(when (pos? translation)
(reanimated/set-shared-value translate-y translation)
(reanimated/set-shared-value opacity (- 1 (/ progress 5)))))))
(gesture/on-end (fn [e]
(if (> (oops/oget e "translationY") drag-threshold)
(do
(reanimated/set-shared-value opacity (reanimated/with-timing-duration 0 100))
(rf/dispatch [:navigate-back]))
(do
(reanimated/set-shared-value opacity (reanimated/with-timing 1))
(reanimated/set-shared-value translate-y (reanimated/with-timing 0))
(reset! scroll-enabled true)))))
(gesture/on-finalize (fn [e]
(when (and (>= (oops/oget e "velocityY") 0)
(<= @curr-scroll (if platform/ios? -1 0)))
(reset! scroll-enabled false))))))
(defn on-scroll
[e curr-scroll]
(let [y (oops/oget e "nativeEvent.contentOffset.y")]
(reset! curr-scroll y)))
(defn view
[content skip-background?]
[:f>
(let [scroll-enabled (reagent/atom true)
curr-scroll (atom 0)]
(fn []
(let [sb-height (navigation/status-bar-height)
insets (safe-area/use-safe-area)
padding-top (Math/max sb-height (:top insets))
padding-top (if platform/ios? padding-top (+ padding-top 10))
opacity (reanimated/use-shared-value 0)
translate-y (reanimated/use-shared-value 0)
close (fn []
(reanimated/set-shared-value opacity (reanimated/with-timing-duration 0 100))
(rf/dispatch [:navigate-back]))]
(rn/use-effect
(fn []
(reanimated/animate-delay opacity 1 (if platform/ios? 300 100))))
(hooks/use-back-handler close)
[rn/view
{:style {:flex 1
:padding-top padding-top}}
(when-not skip-background?
[reanimated/view {:style (style/background opacity)}])
[gesture/gesture-detector
{:gesture (drag-gesture translate-y opacity scroll-enabled curr-scroll)}
[reanimated/view {:style (style/main-view translate-y)}
[rn/view {:style style/handle-container}
[rn/view {:style (style/handle)}]]
[content
{:close close
:scroll-enabled @scroll-enabled
:on-scroll #(on-scroll % curr-scroll)}]]]])))])
@@ -26,18 +26,23 @@
[quo/text {:style {:margin-left 10}} extra-text]])) [quo/text {:style {:margin-left 10}} extra-text]]))
(defn confirmation-drawer (defn confirmation-drawer
[{:keys [title description context button-text on-press extra-action extra-text accessibility-label]}] [{:keys [title description context button-text on-press extra-action extra-text accessibility-label
close-button-text]}]
(let [extra-action-selected? (reagent/atom false)] (let [extra-action-selected? (reagent/atom false)]
(fn [] (fn []
(let [{:keys [group-chat chat-id public-key color name]} context (let [{:keys [group-chat chat-id public-key color profile-picture
id (or chat-id public-key) name]} context
display-name id (or chat-id public-key)
(if-not group-chat (first (rf/sub [:contacts/contact-two-names-by-identity id])) name) display-name (or
contact (when-not group-chat name
(rf/sub [:contacts/contact-by-address (when-not group-chat
id])) (rf/sub [:contacts/contact-name-by-identity id])))
photo-path (when-not (empty? (:images contact)) contact (when-not group-chat
(rf/sub [:chats/photo-path id]))] (rf/sub [:contacts/contact-by-address
id]))
photo-path (or profile-picture
(when-not (empty? (:images contact))
(rf/sub [:chats/photo-path id])))]
[rn/view [rn/view
{:style {:margin-horizontal 20} {:style {:margin-horizontal 20}
:accessibility-label accessibility-label} :accessibility-label accessibility-label}
@@ -57,7 +62,7 @@
{:type :grey {:type :grey
:style {:flex 0.48} ;;WUT? 0.48 , whats that ? :style {:flex 0.48} ;;WUT? 0.48 , whats that ?
:on-press #(rf/dispatch [:bottom-sheet/hide])} :on-press #(rf/dispatch [:bottom-sheet/hide])}
(i18n/label :t/close)] (or close-button-text (i18n/label :t/close))]
[quo/button [quo/button
{:type :danger {:type :danger
:style {:flex 0.48} :style {:flex 0.48}
+26 -1
View File
@@ -58,10 +58,35 @@
:size :small} :size :small}
avatar)]]]) avatar)]]])
(defn connectivity-sheet
[]
(let [peers-count (rf/sub [:peers-count])
network-type (rf/sub [:network/type])]
[rn/view
[quo/text {:accessibility-label :peers-network-type-text} (str "NETWORK TYPE: " network-type)]
[quo/text {:accessibility-label :peers-count-text} (str "PEERS COUNT: " peers-count)]]))
(defn- right-section (defn- right-section
[{:keys [button-type search?]}] [{:keys [button-type search?]}]
(let [button-common-props (get-button-common-props button-type)] (let [button-common-props (get-button-common-props button-type)
network-type (rf/sub [:network/type])]
[rn/view {:style style/right-section} [rn/view {:style style/right-section}
(when (= network-type "cellular")
[quo/button
(merge button-common-props
{:icon false
:accessibility-label :on-cellular-network
:on-press #(rf/dispatch [:bottom-sheet/show-sheet
{:content connectivity-sheet}])})
"🦄"])
(when (= network-type "none")
[quo/button
(merge button-common-props
{:icon false
:accessibility-label :no-network-connection
:on-press #(rf/dispatch [:bottom-sheet/show-sheet
{:content connectivity-sheet}])})
"💀"])
(when search? (when search?
[quo/button [quo/button
(assoc button-common-props :accessibility-label :open-search-button) (assoc button-common-props :accessibility-label :open-search-button)
+25 -21
View File
@@ -89,7 +89,7 @@
(defn display-picture (defn display-picture
[scroll-height cover] [scroll-height logo]
(let [input-range (if platform/ios? [-67 10] [0 150]) (let [input-range (if platform/ios? [-67 10] [0 150])
y (reanimated/use-shared-value scroll-height) y (reanimated/use-shared-value scroll-height)
animation (reanimated/interpolate y animation (reanimated/interpolate y
@@ -104,7 +104,7 @@
[reanimated/view [reanimated/view
{:style (style/display-picture-container animation)} {:style (style/display-picture-container animation)}
[rn/image [rn/image
{:source cover {:source logo
:style style/display-picture}]])) :style style/display-picture}]]))
(defn scroll-page (defn scroll-page
@@ -117,7 +117,7 @@
[:<> [:<>
[:f> scroll-page-header @scroll-height height name page-nav-right-section-buttons [:f> scroll-page-header @scroll-height height name page-nav-right-section-buttons
logo sticky-header top-nav title-colum navigate-back?] logo sticky-header top-nav title-colum navigate-back?]
[rn/scroll-view [rn/flat-list
{:content-container-style (style/scroll-view-container {:content-container-style (style/scroll-view-container
(diff-with-max-min @scroll-height 16 0)) (diff-with-max-min @scroll-height 16 0))
:shows-vertical-scroll-indicator false :shows-vertical-scroll-indicator false
@@ -128,21 +128,25 @@
event event
"nativeEvent.contentOffset.y"))) "nativeEvent.contentOffset.y")))
(when on-scroll (when on-scroll
(on-scroll @scroll-height)))} (on-scroll @scroll-height)))
(when cover-image :header [rn/view
[rn/view {:style {:height 151}} (when cover-image
[rn/image [rn/view {:style {:height 151}}
{:source cover-image [rn/image
;; Using negative margin-bottom as a workaround because on Android, {:source cover-image
;; ScrollView clips its children despite setting overflow: 'visible'. ;; Using negative margin-bottom as a workaround because
;; Related issue: https://github.com/facebook/react-native/issues/31218 ;; on Android,
:style {:margin-bottom -16 ;; ScrollView clips its children despite setting
:flex 1}}]]) ;; overflow: 'visible'.
(when children ;; Related issue:
[rn/view ;; https://github.com/facebook/react-native/issues/31218
{:flex 1 :style {:margin-bottom -16
:border-radius (diff-with-max-min @scroll-height 16 0) :flex 1}}]])
:background-color background-color} (when children
(when cover-image [rn/view
[:f> display-picture @scroll-height logo]) {:flex 1
children])]]))) :border-radius (diff-with-max-min @scroll-height 16 0)
:background-color background-color}
(when cover-image
[:f> display-picture @scroll-height logo])
children])]}]])))
+16 -9
View File
@@ -1,17 +1,24 @@
(ns status-im2.common.theme.core (ns status-im2.common.theme.core
(:require [react-native.core :as rn])) (:require [quo.theme :as quo]
[quo2.theme :as quo2]
[react-native.core :as rn]))
(def initial-mode (atom (rn/get-color-scheme))) (def device-theme (atom (rn/get-color-scheme)))
;; Note - don't use value returned by change listener ;; Note - don't use value returned by change listener
;; https://github.com/facebook/react-native/issues/28525 ;; https://github.com/facebook/react-native/issues/28525
(defn add-mode-change-listener (defn add-device-theme-change-listener
[callback] [callback]
(rn/appearance-add-change-listener #(let [mode (rn/get-color-scheme)] (rn/appearance-add-change-listener #(let [theme (rn/get-color-scheme)]
(when-not (= mode @initial-mode) (when-not (= theme @device-theme)
(reset! initial-mode mode) (reset! device-theme theme)
(callback (keyword mode)))))) (callback (keyword theme))))))
(defn dark-mode? (defn device-theme-dark?
[] []
(= @initial-mode "dark")) (= @device-theme "dark"))
(defn set-theme
[value]
(quo/set-theme value)
(quo2/set-theme value))
-1
View File
@@ -31,7 +31,6 @@
(def keycard-test-menu-enabled? (enabled? (get-config :KEYCARD_TEST_MENU "1"))) (def keycard-test-menu-enabled? (enabled? (get-config :KEYCARD_TEST_MENU "1")))
(def qr-test-menu-enabled? (enabled? (get-config :QR_READ_TEST_MENU "0"))) (def qr-test-menu-enabled? (enabled? (get-config :QR_READ_TEST_MENU "0")))
(def quo-preview-enabled? (enabled? (get-config :ENABLE_QUO_PREVIEW "0"))) (def quo-preview-enabled? (enabled? (get-config :ENABLE_QUO_PREVIEW "0")))
(def communities-enabled? (enabled? (get-config :COMMUNITIES_ENABLED "0")))
(def database-management-enabled? (enabled? (get-config :DATABASE_MANAGEMENT_ENABLED "0"))) (def database-management-enabled? (enabled? (get-config :DATABASE_MANAGEMENT_ENABLED "0")))
(def debug-webview? (enabled? (get-config :DEBUG_WEBVIEW "0"))) (def debug-webview? (enabled? (get-config :DEBUG_WEBVIEW "0")))
(def collectibles-enabled? (enabled? (get-config :COLLECTIBLES_ENABLED "1"))) (def collectibles-enabled? (enabled? (get-config :COLLECTIBLES_ENABLED "1")))
+33
View File
@@ -90,6 +90,9 @@
(def ^:const command-state-transaction-pending 6) (def ^:const command-state-transaction-pending 6)
(def ^:const command-state-transaction-sent 7) (def ^:const command-state-transaction-sent 7)
(def ^:const profile-default-color :blue)
(def ^:const profile-name-max-length 24)
(def ^:const profile-pictures-show-to-contacts-only 1) (def ^:const profile-pictures-show-to-contacts-only 1)
(def ^:const profile-pictures-show-to-everyone 2) (def ^:const profile-pictures-show-to-everyone 2)
(def ^:const profile-pictures-show-to-none 3) (def ^:const profile-pictures-show-to-none 3)
@@ -260,6 +263,27 @@
An example of a connection string is -> cs2:5vd6J6:Jfc:27xMmHKEYwzRGXcvTtuiLZFfXscMx4Mz8d9wEHUxDj4p7:EG7Z13QScfWBJNJ5cprszzDQ5fBVsYMirXo8MaQFJvpF:3 " An example of a connection string is -> cs2:5vd6J6:Jfc:27xMmHKEYwzRGXcvTtuiLZFfXscMx4Mz8d9wEHUxDj4p7:EG7Z13QScfWBJNJ5cprszzDQ5fBVsYMirXo8MaQFJvpF:3 "
"cs") "cs")
;; sender and receiver events
(def ^:const local-pairing-event-connection-success "connection-success")
(def ^:const local-pairing-event-connection-error "connection-error")
(def ^:const local-pairing-event-transfer-success "transfer-success")
(def ^:const local-pairing-event-transfer-error "transfer-error")
;; receiver events
(def ^:const local-pairing-event-received-amount "received-account")
(def ^:const local-pairing-event-process-success "process-success")
(def ^:const local-pairing-event-process-error "process-error")
(def ^:const local-pairing-event-errors
#{local-pairing-event-connection-error
local-pairing-event-transfer-error
local-pairing-event-process-error})
(def ^:const local-pairing-action-connect 1)
(def ^:const local-pairing-action-pairing-account 2)
(def ^:const local-pairing-action-sync-device 3)
(def ^:const local-pairing-action-pairing-installation 4)
(def ^:const serialization-key (def ^:const serialization-key
"We pass this serialization key as a parameter to MultiformatSerializePublicKey "We pass this serialization key as a parameter to MultiformatSerializePublicKey
function at status-go, This key determines the output base of the serialization. function at status-go, This key determines the output base of the serialization.
@@ -290,3 +314,12 @@
(def ^:const local-pair-action-sync-device 3) (def ^:const local-pair-action-sync-device 3)
(def ^:const everyone-mention-id "0x00001") (def ^:const everyone-mention-id "0x00001")
(def ^:const empty-category-id :communities/not-categorized)
(def ^:const seed-phrase-valid-length #{12 18 24})
(def ^:const auth-method-password "password")
(def ^:const auth-method-biometric "biometric")
(def ^:const auth-method-biometric-prepare "biometric-prepare")
(def ^:const auth-method-none "none")
@@ -1,6 +1,5 @@
(ns status-im2.contexts.activity-center.notification.contact-requests.events (ns status-im2.contexts.activity-center.notification.contact-requests.events
(:require [status-im2.contexts.activity-center.events :as ac-events] (:require [taoensso.timbre :as log]
[taoensso.timbre :as log]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
(rf/defn accept-contact-request (rf/defn accept-contact-request
@@ -19,8 +18,7 @@
(log/error "Failed to accept contact-request" (log/error "Failed to accept contact-request"
{:error error {:error error
:event :activity-center.contact-requests/accept :event :activity-center.contact-requests/accept
:contact-id contact-id}) :contact-id contact-id}))
nil)
(rf/defn decline-contact-request (rf/defn decline-contact-request
{:events [:activity-center.contact-requests/decline]} {:events [:activity-center.contact-requests/decline]}
@@ -38,32 +36,4 @@
(log/error "Failed to decline contact-request" (log/error "Failed to decline contact-request"
{:error error {:error error
:event :activity-center.contact-requests/decline :event :activity-center.contact-requests/decline
:contact-id contact-id}) :contact-id contact-id}))
nil)
(rf/defn cancel-outgoing-contact-request
{:events [:activity-center.contact-requests/cancel-outgoing]}
[{:keys [db]} {:keys [contact-id notification-id]}]
(when-let [notification (ac-events/get-notification db notification-id)]
{:json-rpc/call
[{:method "wakuext_cancelOutgoingContactRequest"
:params [{:id contact-id}]
:on-success #(rf/dispatch [:activity-center.contact-requests/cancel-outgoing-success
notification])
:on-error #(rf/dispatch [:activity-center.contact-requests/cancel-outgoing-error contact-id
%])}]}))
(rf/defn cancel-outgoing-contact-request-success
{:events [:activity-center.contact-requests/cancel-outgoing-success]}
[_ notification]
{:dispatch [:activity-center.notifications/reconcile
[(assoc notification :deleted true)]]})
(rf/defn cancel-outgoing-contact-request-error
{:events [:activity-center.contact-requests/cancel-outgoing-error]}
[_ contact-id error]
(log/error "Failed to cancel outgoing contact-request"
{:error error
:event :activity-center.contact-requests/cancel-outgoing
:contact-id contact-id})
nil)

Some files were not shown because too many files have changed in this diff Show More