Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f3c12d39c | ||
|
|
bc3e3d30bd | ||
|
|
9f9124aa0b | ||
|
|
33674861d0 | ||
|
|
32d8a52acf | ||
|
|
d3635b7c91 |
@@ -30,7 +30,6 @@
|
||||
"list-comp" :binding
|
||||
"defview" :arg1-body
|
||||
"letsubs" :binding
|
||||
"with-let" "let"
|
||||
"testing" :arg1-body
|
||||
"deftest-sub" :arg1-body
|
||||
"wait-for" :arg1-body
|
||||
|
||||
@@ -310,7 +310,6 @@ dependencies {
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||
implementation "androidx.core:core-splashscreen:1.0.0"
|
||||
|
||||
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.fbjni'
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
android:allowBackup="false"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:theme="@style/Theme.AppSplash"
|
||||
android:theme="@style/AppTheme"
|
||||
android:name=".MainApplication"
|
||||
android:largeHeap="true"
|
||||
android:usesCleartextTraffic="true">
|
||||
@@ -38,7 +38,6 @@
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.AppSplash"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||
|
||||
@@ -21,7 +21,6 @@ import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.provider.Settings;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import com.facebook.react.ReactActivityDelegate;
|
||||
import com.facebook.react.ReactRootView;
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||
@@ -32,7 +31,7 @@ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
||||
import com.facebook.react.ReactFragmentActivity;
|
||||
import com.reactnativenavigation.NavigationActivity;
|
||||
import com.facebook.react.modules.core.PermissionListener;
|
||||
import androidx.core.splashscreen.SplashScreen;
|
||||
import org.devio.rn.splashscreen.SplashScreen;
|
||||
|
||||
import java.util.Properties;
|
||||
import im.status.ethereum.module.StatusThreadPoolExecutor;
|
||||
@@ -43,8 +42,6 @@ public class MainActivity extends NavigationActivity
|
||||
|
||||
|
||||
@Nullable private PermissionListener mPermissionListener;
|
||||
private boolean keepSplash = true;
|
||||
private final int SPLASH_DELAY = 3200;
|
||||
|
||||
private static void registerUncaughtExceptionHandler(final Context context) {
|
||||
final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
@@ -124,8 +121,21 @@ public class MainActivity extends NavigationActivity
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
SplashScreen splashScreen = SplashScreen.installSplashScreen(this);
|
||||
setTheme(R.style.DarkTheme);
|
||||
|
||||
switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) {
|
||||
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
|
||||
registerUncaughtExceptionHandler(MainActivity.this);
|
||||
|
||||
@@ -187,11 +197,6 @@ public class MainActivity extends NavigationActivity
|
||||
}
|
||||
};
|
||||
|
||||
splashScreen.setKeepOnScreenCondition(() -> keepSplash);
|
||||
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(() -> keepSplash = false, SPLASH_DELAY);
|
||||
|
||||
StatusThreadPoolExecutor.getInstance().execute(r);
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -2,6 +2,4 @@
|
||||
<resources>
|
||||
<color name="alert_background">#ffffff</color>
|
||||
<color name="alert_text">#000000</color>
|
||||
<color name="splash_background">#09101C</color>
|
||||
<color name="splash_status_bar_color">#ffffff</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<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>
|
||||
@@ -1,24 +1,24 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (3.0.6)
|
||||
CFPropertyList (3.0.5)
|
||||
rexml
|
||||
addressable (2.8.1)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
artifactory (3.0.15)
|
||||
atomos (0.1.3)
|
||||
aws-eventstream (1.2.0)
|
||||
aws-partitions (1.728.0)
|
||||
aws-sdk-core (3.170.0)
|
||||
aws-partitions (1.644.0)
|
||||
aws-sdk-core (3.159.0)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
aws-partitions (~> 1, >= 1.651.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
aws-sdk-kms (1.63.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-partitions (~> 1, >= 1.525.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.119.1)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
aws-sdk-kms (1.58.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.114.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.4)
|
||||
aws-sigv4 (1.5.2)
|
||||
@@ -36,8 +36,8 @@ GEM
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
dotenv (2.8.1)
|
||||
emoji_regex (3.2.3)
|
||||
excon (0.99.0)
|
||||
faraday (1.10.3)
|
||||
excon (0.93.0)
|
||||
faraday (1.10.2)
|
||||
faraday-em_http (~> 1.0)
|
||||
faraday-em_synchrony (~> 1.0)
|
||||
faraday-excon (~> 1.1)
|
||||
@@ -66,7 +66,7 @@ GEM
|
||||
faraday_middleware (1.2.0)
|
||||
faraday (~> 1.0)
|
||||
fastimage (2.2.6)
|
||||
fastlane (2.212.1)
|
||||
fastlane (2.210.1)
|
||||
CFPropertyList (>= 2.3, < 4.0.0)
|
||||
addressable (>= 2.8, < 3.0.0)
|
||||
artifactory (~> 3.0)
|
||||
@@ -109,9 +109,9 @@ GEM
|
||||
fastlane-plugin-diawi (2.1.0)
|
||||
rest-client (>= 2.0.0)
|
||||
gh_inspector (1.1.3)
|
||||
google-apis-androidpublisher_v3 (0.36.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-core (0.11.0)
|
||||
google-apis-androidpublisher_v3 (0.29.0)
|
||||
google-apis-core (>= 0.9.0, < 2.a)
|
||||
google-apis-core (0.9.0)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
httpclient (>= 2.8.1, < 3.a)
|
||||
@@ -120,10 +120,10 @@ GEM
|
||||
retriable (>= 2.0, < 4.a)
|
||||
rexml
|
||||
webrick
|
||||
google-apis-iamcredentials_v1 (0.17.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-playcustomapp_v1 (0.13.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-iamcredentials_v1 (0.15.0)
|
||||
google-apis-core (>= 0.9.0, < 2.a)
|
||||
google-apis-playcustomapp_v1 (0.11.0)
|
||||
google-apis-core (>= 0.9.0, < 2.a)
|
||||
google-apis-storage_v1 (0.19.0)
|
||||
google-apis-core (>= 0.9.0, < 2.a)
|
||||
google-cloud-core (1.6.0)
|
||||
@@ -131,8 +131,8 @@ GEM
|
||||
google-cloud-errors (~> 1.0)
|
||||
google-cloud-env (1.6.0)
|
||||
faraday (>= 0.17.3, < 3.0)
|
||||
google-cloud-errors (1.3.1)
|
||||
google-cloud-storage (1.44.0)
|
||||
google-cloud-errors (1.3.0)
|
||||
google-cloud-storage (1.43.0)
|
||||
addressable (~> 2.8)
|
||||
digest-crc (~> 0.4)
|
||||
google-apis-iamcredentials_v1 (~> 0.1)
|
||||
@@ -140,7 +140,7 @@ GEM
|
||||
google-cloud-core (~> 1.6)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
mini_mime (~> 1.0)
|
||||
googleauth (1.3.0)
|
||||
googleauth (1.2.0)
|
||||
faraday (>= 0.17.3, < 3.a)
|
||||
jwt (>= 1.4, < 3.0)
|
||||
memoist (~> 0.16)
|
||||
@@ -152,14 +152,14 @@ GEM
|
||||
http-cookie (1.0.5)
|
||||
domain_name (~> 0.5)
|
||||
httpclient (2.8.3)
|
||||
jmespath (1.6.2)
|
||||
json (2.6.3)
|
||||
jwt (2.7.0)
|
||||
jmespath (1.6.1)
|
||||
json (2.6.2)
|
||||
jwt (2.5.0)
|
||||
memoist (0.16.2)
|
||||
mime-types (3.4.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2023.0218.1)
|
||||
mini_magick (4.12.0)
|
||||
mime-types-data (3.2022.0105)
|
||||
mini_magick (4.11.0)
|
||||
mini_mime (1.1.2)
|
||||
multi_json (1.15.0)
|
||||
multipart-post (2.0.0)
|
||||
@@ -168,8 +168,8 @@ GEM
|
||||
netrc (0.11.0)
|
||||
optparse (0.1.1)
|
||||
os (1.1.4)
|
||||
plist (3.7.0)
|
||||
public_suffix (5.0.1)
|
||||
plist (3.6.0)
|
||||
public_suffix (5.0.0)
|
||||
rake (13.0.6)
|
||||
representable (3.2.0)
|
||||
declarative (< 0.1.0)
|
||||
@@ -191,7 +191,7 @@ GEM
|
||||
faraday (>= 0.17.5, < 3.a)
|
||||
jwt (>= 1.5, < 3.0)
|
||||
multi_json (~> 1.10)
|
||||
simctl (1.6.10)
|
||||
simctl (1.6.8)
|
||||
CFPropertyList
|
||||
naturally
|
||||
terminal-notifier (2.0.0)
|
||||
@@ -207,7 +207,7 @@ GEM
|
||||
unf_ext
|
||||
unf_ext (0.0.8.2)
|
||||
unicode-display_width (1.8.0)
|
||||
webrick (1.8.1)
|
||||
webrick (1.7.0)
|
||||
word_wrap (1.0.0)
|
||||
xcodeproj (1.22.0)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
@@ -230,4 +230,4 @@ DEPENDENCIES
|
||||
fastlane-plugin-diawi
|
||||
|
||||
BUNDLED WITH
|
||||
2.4.6
|
||||
2.3.20
|
||||
|
||||
@@ -45,10 +45,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0q3q19insq5ablmr6ypq033qg1gsar5mdphhp7xg80rd615cnq97";
|
||||
sha256 = "0x58gl654kcx65wyrix5swh5f9y431881a5mql8g3zwshd81fyb3";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.728.0";
|
||||
version = "1.644.0";
|
||||
};
|
||||
aws-sdk-core = {
|
||||
dependencies = ["aws-eventstream" "aws-partitions" "aws-sigv4" "jmespath"];
|
||||
@@ -56,10 +56,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0zc4zhv2wq7s5p8c9iaplama1lpg2kwldg81j83c8w4xydf1wd2r";
|
||||
sha256 = "0cdjmpblskjmhag7wx6scwkd3cw1gfh85syr599s05k8zp6y4qw8";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.170.0";
|
||||
version = "3.159.0";
|
||||
};
|
||||
aws-sdk-kms = {
|
||||
dependencies = ["aws-sdk-core" "aws-sigv4"];
|
||||
@@ -67,10 +67,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0v87zi28dfmrv7bv91yfldccnpd63n295siirbz7wqv1rajn8n02";
|
||||
sha256 = "1p2dbmb1vl8vk2xchrrsp2sxa95ya5w7ll1jlw89yyhls3l2l1ag";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.63.0";
|
||||
version = "1.58.0";
|
||||
};
|
||||
aws-sdk-s3 = {
|
||||
dependencies = ["aws-sdk-core" "aws-sdk-kms" "aws-sigv4"];
|
||||
@@ -78,10 +78,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1rpnlzsl52znhcki13jkwdshgwf51pn26267481f4fa842gr7xgp";
|
||||
sha256 = "1r6dxz3llgxbbm66jq5mkzk0i6qsxwv0d9s0ipwb23vv3bgp23yf";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.119.1";
|
||||
version = "1.114.0";
|
||||
};
|
||||
aws-sigv4 = {
|
||||
dependencies = ["aws-eventstream"];
|
||||
@@ -110,10 +110,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1a36zn77yyibqsfpka0i8vgf3yv98ic2b9wwlbc29566y8wpa2bq";
|
||||
sha256 = "193l8r1ycd3dcxa7lsb4pqcghbk56dzc5244m6y8xmv88z6m31d7";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.0.6";
|
||||
version = "3.0.5";
|
||||
};
|
||||
claide = {
|
||||
groups = ["default"];
|
||||
@@ -213,10 +213,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0j826kfvzn7nc5pv950n270r0sx1702k988ad11cdlav3dcxxw09";
|
||||
sha256 = "0b3rfqy87yiv9xmh260nyddxxjqj0vy32xvajvyn5jnjx96jwa24";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.99.0";
|
||||
version = "0.93.0";
|
||||
};
|
||||
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"];
|
||||
@@ -224,10 +224,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1c760q0ks4vj4wmaa7nh1dgvgqiwaw0mjr7v8cymy7i3ffgjxx90";
|
||||
sha256 = "1d5ipsv069dhgv9zhxgj8pz4j52yhgvfm01aq881yz7qgjd7ilxp";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.10.3";
|
||||
version = "1.10.2";
|
||||
};
|
||||
faraday-cookie_jar = {
|
||||
dependencies = ["faraday" "http-cookie"];
|
||||
@@ -368,10 +368,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0b22m2dkydyv2si55b1jzznzgxf2ycx2aarv1j5p25k861h2gsml";
|
||||
sha256 = "1wxzcs81c5ji30hrz64884rg0w56v2nwjyiyc8daka578bg7s8d6";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.212.1";
|
||||
version = "2.210.1";
|
||||
};
|
||||
fastlane-plugin-clean_testflight_testers = {
|
||||
groups = ["default"];
|
||||
@@ -410,10 +410,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1mbnmn36z1cnsd6ar76p9wvqi0ac6wlpm1p1lqczivain16qma76";
|
||||
sha256 = "0z2i5wpkawkf4f42i55b1240iw8819wx828579s4vavhd9s17yik";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.36.0";
|
||||
version = "0.29.0";
|
||||
};
|
||||
google-apis-core = {
|
||||
dependencies = ["addressable" "googleauth" "httpclient" "mini_mime" "representable" "retriable" "rexml" "webrick"];
|
||||
@@ -421,10 +421,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "184zkm5agi7r5fl79hgahjpydsc4d23nd2ynh2sr9z8gs2w4h82f";
|
||||
sha256 = "1w9m4zc5xswz2h7gj4jvnb1ivzb6lcsl75fnw8ip7qz6hzwfgrlc";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.11.0";
|
||||
version = "0.9.0";
|
||||
};
|
||||
google-apis-iamcredentials_v1 = {
|
||||
dependencies = ["google-apis-core"];
|
||||
@@ -432,10 +432,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0ysil0bkh755kmf9xvw5szhk1yyh3gqzwfsrbwsrl77gsv7jarcs";
|
||||
sha256 = "06smnmn2s460xl9x9rh07a3fkqdrjjy6azmx8iywggqgv2k5d8p9";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.17.0";
|
||||
version = "0.15.0";
|
||||
};
|
||||
google-apis-playcustomapp_v1 = {
|
||||
dependencies = ["google-apis-core"];
|
||||
@@ -443,10 +443,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1mlgwiid5lgg41y7qk8ca9lzhwx5njs25hz5fbf1mdal0kwm37lm";
|
||||
sha256 = "00nfh3xh51mbh02f8nqlsijdh59k9vjs5sglvpv09pl3wnhirf7w";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.13.0";
|
||||
version = "0.11.0";
|
||||
};
|
||||
google-apis-storage_v1 = {
|
||||
dependencies = ["google-apis-core"];
|
||||
@@ -486,10 +486,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0flpj7v196c3xsqx4yjb7rjcj8p0by4rhj6qf5zanw4p1i41ssf0";
|
||||
sha256 = "0jynh1s93nl8njm5l5wcy86pnjmv112cq6m0443s52f04hg6h2s5";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.3.1";
|
||||
version = "1.3.0";
|
||||
};
|
||||
google-cloud-storage = {
|
||||
dependencies = ["addressable" "digest-crc" "google-apis-iamcredentials_v1" "google-apis-storage_v1" "google-cloud-core" "googleauth" "mini_mime"];
|
||||
@@ -497,10 +497,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1skhlpcykxxzw3050cwngdyc3n746wfx443w1w9chxwjbh2ix6i9";
|
||||
sha256 = "0j3hqyb4zgj6az6p0bz0kgskl6fddrwb095kxfbdx8r11m07mfr8";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.44.0";
|
||||
version = "1.43.0";
|
||||
};
|
||||
googleauth = {
|
||||
dependencies = ["faraday" "jwt" "memoist" "multi_json" "os" "signet"];
|
||||
@@ -508,10 +508,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1hpwgwhk0lmnknkw8kbdfxn95qqs6aagpq815l5fkw9w6mi77pai";
|
||||
sha256 = "030bcdnffwndk8h270cmbndixb5h3ss860yifv6bkfys95s5fjpp";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.3.0";
|
||||
version = "1.2.0";
|
||||
};
|
||||
highline = {
|
||||
groups = ["default"];
|
||||
@@ -559,30 +559,30 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1cdw9vw2qly7q7r41s7phnac264rbsdqgj4l0h4nqgbjb157g393";
|
||||
sha256 = "1mnvb80cdg7fzdcs3xscv21p28w4igk5sj5m7m81xp8v2ks87jj0";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.6.2";
|
||||
version = "1.6.1";
|
||||
};
|
||||
json = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0nalhin1gda4v8ybk6lq8f407cgfrj6qzn234yra4ipkmlbfmal6";
|
||||
sha256 = "0yk5d10yvspkc5jyvx9gc1a9pn1z8v4k2hvjk1l88zixwf3wf3cl";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.6.3";
|
||||
version = "2.6.2";
|
||||
};
|
||||
jwt = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "09yj3z5snhaawh2z1w45yyihzmh57m6m7dp8ra8gxavhj5kbiq5p";
|
||||
sha256 = "0kcmnx6rgjyd7sznai9ccns2nh7p7wnw3mi8a7vf2wkm51azwddq";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.7.0";
|
||||
version = "2.5.0";
|
||||
};
|
||||
memoist = {
|
||||
groups = ["default"];
|
||||
@@ -610,20 +610,20 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1pky3vzaxlgm9gw5wlqwwi7wsw3jrglrfflrppvvnsrlaiz043z9";
|
||||
sha256 = "003gd7mcay800k2q4pb2zn8lwwgci4bhi42v2jvlidm8ksx03i6q";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.2023.0218.1";
|
||||
version = "3.2022.0105";
|
||||
};
|
||||
mini_magick = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0slh78f9z6n0l1i2km7m48yz7l4fjrk88sj1f4mh1wb39sl2yc37";
|
||||
sha256 = "1aj604x11d9pksbljh0l38f70b558rhdgji1s9i763hiagvvx2hs";
|
||||
type = "gem";
|
||||
};
|
||||
version = "4.12.0";
|
||||
version = "4.11.0";
|
||||
};
|
||||
mini_mime = {
|
||||
groups = ["default"];
|
||||
@@ -710,20 +710,20 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0wzhnbzraz60paxhm48c50fp9xi7cqka4gfhxmiq43mhgh5ajg3h";
|
||||
sha256 = "1whhr897z6z6av85x2cipyjk46bwh6s4wx6nbrcd3iifnzvbqs7l";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.7.0";
|
||||
version = "3.6.0";
|
||||
};
|
||||
public_suffix = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0hz0bx2qs2pwb0bwazzsah03ilpf3aai8b7lk7s35jsfzwbkjq35";
|
||||
sha256 = "0sqw1zls6227bgq38sxb2hs8nkdz4hn1zivs27mjbniswfy4zvi6";
|
||||
type = "gem";
|
||||
};
|
||||
version = "5.0.1";
|
||||
version = "5.0.0";
|
||||
};
|
||||
rake = {
|
||||
groups = ["default"];
|
||||
@@ -834,10 +834,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0sr3z4kmp6ym7synicyilj9vic7i9nxgaszqx6n1xn1ss7s7g45r";
|
||||
sha256 = "1v9rsdmg5c5kkf8ps47xnrfbvjnq11sbaifr186jwkh4npawz00x";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.6.10";
|
||||
version = "1.6.8";
|
||||
};
|
||||
terminal-notifier = {
|
||||
groups = ["default"];
|
||||
@@ -947,10 +947,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "13qm7s0gr2pmfcl7dxrmq38asaza4w0i2n9my4yzs499j731wh8r";
|
||||
sha256 = "1d4cvgmxhfczxiq5fr534lmizkhigd15bsx5719r5ds7k7ivisc7";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.8.1";
|
||||
version = "1.7.0";
|
||||
};
|
||||
word_wrap = {
|
||||
groups = ["default"];
|
||||
|
||||
@@ -35,6 +35,26 @@ abstract_target 'Status' do
|
||||
target 'StatusImPR' do
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
# some of libs wouldn't be build for x86_64 otherwise and that is
|
||||
# necessary for ios simulators
|
||||
installer.pods_project.targets.each do |target|
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
|
||||
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
|
||||
|
||||
use_native_modules!
|
||||
end
|
||||
|
||||
|
||||
@@ -27,15 +27,15 @@ PODS:
|
||||
- CryptoSwift
|
||||
- secp256k1
|
||||
- SSZipArchive
|
||||
- libwebp (1.2.4):
|
||||
- libwebp/demux (= 1.2.4)
|
||||
- libwebp/mux (= 1.2.4)
|
||||
- libwebp/webp (= 1.2.4)
|
||||
- libwebp/demux (1.2.4):
|
||||
- libwebp (1.2.3):
|
||||
- libwebp/demux (= 1.2.3)
|
||||
- libwebp/mux (= 1.2.3)
|
||||
- libwebp/webp (= 1.2.3)
|
||||
- libwebp/demux (1.2.3):
|
||||
- libwebp/webp
|
||||
- libwebp/mux (1.2.4):
|
||||
- libwebp/mux (1.2.3):
|
||||
- libwebp/demux
|
||||
- libwebp/webp (1.2.4)
|
||||
- libwebp/webp (1.2.3)
|
||||
- Permission-Camera (2.1.5):
|
||||
- RNPermissions
|
||||
- Permission-Microphone (2.1.5):
|
||||
@@ -645,10 +645,10 @@ SPEC CHECKSUMS:
|
||||
FBLazyVector: 352a8ca9bbc8e2f097d680747a8c97ecef12d469
|
||||
FBReactNativeSpec: 7dfb84f624136a45727c813ed21d130cd3e61beb
|
||||
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
|
||||
glog: 6934faae5afbec23475648c8aeb6047ce973af65
|
||||
glog: 997518ea2aa2d8cd5df9797b641b758d52ecf2bc
|
||||
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
|
||||
Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8
|
||||
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
|
||||
libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c
|
||||
Permission-Camera: afad27bf90337684d4a86f3825112d648c8c4d3b
|
||||
Permission-Microphone: 0ffabc3fe1c75cfb260525ee3f529383c9f4368c
|
||||
RCTRequired: 5520387431beaa5f32aa8726bf746cd5353119fe
|
||||
@@ -716,6 +716,6 @@ SPEC CHECKSUMS:
|
||||
TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4
|
||||
Yoga: 0276e9f20976c8568e107cfc1163a8629051adc0
|
||||
|
||||
PODFILE CHECKSUM: dd4d6510a5580d20adac6c8a8dad97a0bc7d6508
|
||||
PODFILE CHECKSUM: ca5d07911eadc1267649ecc15379e5127a0cc839
|
||||
|
||||
COCOAPODS: 1.12.0
|
||||
COCOAPODS: 1.11.3
|
||||
|
||||
@@ -49,12 +49,6 @@
|
||||
B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
@@ -148,9 +142,6 @@
|
||||
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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
@@ -215,9 +206,6 @@
|
||||
13B07FAE1A68108700A75B9A /* StatusIm */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C14C5F9229C0ADB5005C58A7 /* launch-icon.png */,
|
||||
C14C5F9029C0AD9C005C58A7 /* launch-icon@2x.png */,
|
||||
C14C5F8C29C0A149005C58A7 /* launch-icon@3x.png */,
|
||||
922C4CA61F4D5F8B0033C753 /* StatusIm.entitlements */,
|
||||
B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */,
|
||||
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
|
||||
@@ -489,10 +477,8 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C14C5F9329C0ADB5005C58A7 /* launch-icon.png in Resources */,
|
||||
74B758FC20D7C00B003343C3 /* launch-image-universal.storyboard in Resources */,
|
||||
715D8132290BE850006F5C88 /* UbuntuMono-Regular.ttf in Resources */,
|
||||
C14C5F9129C0AD9C005C58A7 /* launch-icon@2x.png in Resources */,
|
||||
B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */,
|
||||
D84616FB563A48EBB1678699 /* Inter-Bold.otf in Resources */,
|
||||
D99C50E5E18942A39C8DDF61 /* Inter-BoldItalic.otf in Resources */,
|
||||
@@ -503,7 +489,6 @@
|
||||
70ADBB5ECF934DCF8A0E4919 /* Inter-Regular.otf in Resources */,
|
||||
3870E1E692E24133A80B07DE /* Inter-SemiBold.otf in Resources */,
|
||||
8391E8E0E93C41A98AAA6631 /* Inter-SemiBoldItalic.otf in Resources */,
|
||||
C14C5F8D29C0A149005C58A7 /* launch-icon@3x.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -516,16 +501,13 @@
|
||||
3AAD2ACB24A3A60E0075D594 /* Images.xcassets in Resources */,
|
||||
3AAD2ACC24A3A60E0075D594 /* Inter-Bold.otf in Resources */,
|
||||
3AAD2ACD24A3A60E0075D594 /* Inter-BoldItalic.otf in Resources */,
|
||||
C1715FFA29C0BCE10088FA8B /* launch-icon@2x.png in Resources */,
|
||||
3AAD2ACE24A3A60E0075D594 /* InterStatus-Regular.otf in Resources */,
|
||||
3AAD2ACF24A3A60E0075D594 /* Inter-Italic.otf in Resources */,
|
||||
3AAD2AD024A3A60E0075D594 /* Inter-Medium.otf in Resources */,
|
||||
3AAD2AD124A3A60E0075D594 /* Inter-MediumItalic.otf in Resources */,
|
||||
3AAD2AD224A3A60E0075D594 /* Inter-Regular.otf in Resources */,
|
||||
C1715FFC29C0BCE80088FA8B /* launch-icon.png in Resources */,
|
||||
3AAD2AD324A3A60E0075D594 /* Inter-SemiBold.otf in Resources */,
|
||||
3AAD2AD424A3A60E0075D594 /* Inter-SemiBoldItalic.otf in Resources */,
|
||||
C1715FFB29C0BCE50088FA8B /* launch-icon@3x.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -119,8 +119,6 @@
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UIStatusBarStyle</key>
|
||||
<string>UIStatusBarStyleLightContent</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
@@ -123,8 +123,6 @@
|
||||
<string>armv7</string>
|
||||
<string>gamekit</string>
|
||||
</array>
|
||||
<key>UIStatusBarStyle</key>
|
||||
<string>UIStatusBarStyleLightContent</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<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">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -16,20 +17,14 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch-icon.png" translatesAutoresizingMaskIntoConstraints="NO" id="cqW-9w-FC0">
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="launch_image" translatesAutoresizingMaskIntoConstraints="NO" id="cqW-9w-FC0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<color key="backgroundColor" red="0.035294117647058823" green="0.062745098039215685" blue="0.10980392156862745" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="2aN-f8-qiu"/>
|
||||
<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>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="hOp-FG-FML" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
@@ -38,7 +33,7 @@
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="launch-icon.png" width="84" height="88"/>
|
||||
<image name="launch_image" width="90" height="101"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
|
||||
@@ -479,21 +479,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"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",
|
||||
"repo": "https://dl.google.com/dl/android/maven2",
|
||||
@@ -10587,21 +10572,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"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",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -11052,21 +11022,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"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",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
|
||||
@@ -25,7 +25,6 @@ androidx.constraintlayout:constraintlayout:2.0.4
|
||||
androidx.coordinatorlayout:coordinatorlayout:1.0.0
|
||||
androidx.coordinatorlayout:coordinatorlayout:1.1.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.1.0
|
||||
androidx.core:core:1.6.0
|
||||
@@ -518,7 +517,6 @@ 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.5.10
|
||||
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.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50
|
||||
@@ -538,7 +536,6 @@ org.jetbrains.kotlin:kotlin-stdlib:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.5.10
|
||||
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.4.31
|
||||
org.jetbrains.kotlin:kotlin-util-klib:1.4.31
|
||||
|
||||
@@ -30,7 +30,6 @@ 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.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-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.1/core-1.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.1.0/core-1.1.0.pom
|
||||
@@ -734,7 +733,6 @@ 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.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.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.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
|
||||
@@ -765,7 +763,6 @@ 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.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.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.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
|
||||
|
||||
@@ -11,10 +11,10 @@ let
|
||||
# We follow the master branch of official nixpkgs.
|
||||
nixpkgsSrc = fetchFromGitHub {
|
||||
name = "nixpkgs-source";
|
||||
owner = "status-im"; # FIXME: Fork used to get Cocoapods 1.12.0.
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
rev = "b9b2ed705edc00003d47625950602136be3e1ed5";
|
||||
sha256 = "sha256-F0qOawdKx7kgiGqwVikYIawL2taJ1XfcgHy0Wn0mho8=";
|
||||
rev = "579238da5f431b7833a9f0681663900aaf0dd1e8";
|
||||
sha256 = "sha256-cDwASlAf/h0fsHtDm9yNBHEHK0uq6do+mIUEgh1i5yg=";
|
||||
# To get the compressed Nix sha256, use:
|
||||
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
|
||||
};
|
||||
|
||||
@@ -11,21 +11,10 @@
|
||||
(defn divider-label
|
||||
"label -> string
|
||||
chevron-position -> :left, :right
|
||||
chevron-icon -> keyword
|
||||
on-press -> function
|
||||
padding-bottom -> number
|
||||
counter-value -> number
|
||||
increase-padding-top? -> boolean
|
||||
blur? -> boolean"
|
||||
[{:keys [label
|
||||
chevron-position
|
||||
chevron-icon
|
||||
counter-value
|
||||
increase-padding-top?
|
||||
padding-bottom
|
||||
blur?
|
||||
container-style
|
||||
on-press]}]
|
||||
[{:keys [label chevron-position counter-value increase-padding-top? blur? container-style]}]
|
||||
(let [dark? (colors/dark?)
|
||||
border-and-counter-bg-color (if dark?
|
||||
(if blur? colors/white-opa-5 colors/neutral-70)
|
||||
@@ -33,53 +22,50 @@
|
||||
padding-top (if increase-padding-top? 16 8)
|
||||
text-and-icon-color (if dark? colors/neutral-40 colors/neutral-50)
|
||||
counter-text-color (if dark? colors/white colors/neutral-100)]
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press on-press}
|
||||
[rn/view
|
||||
{:accessible true
|
||||
:accessibility-label :divider-label
|
||||
:style (merge {:border-top-width 1
|
||||
:border-top-color border-and-counter-bg-color
|
||||
:padding-top padding-top
|
||||
:padding-bottom padding-bottom
|
||||
:padding-horizontal 16
|
||||
:align-items :center
|
||||
:flex-direction :row}
|
||||
container-style)}
|
||||
(when (= chevron-position :left)
|
||||
[rn/view
|
||||
{:test-ID :divider-label-icon-left
|
||||
:style {:margin-right 4}}
|
||||
[icons/icon
|
||||
(or chevron-icon :i/chevron-down)
|
||||
{:color text-and-icon-color
|
||||
:width chevron-icon-container-width
|
||||
:height chevron-icon-container-height}]])
|
||||
[markdown.text/text
|
||||
{:size :paragraph-2
|
||||
:weight :medium
|
||||
:style {:color text-and-icon-color
|
||||
:flex 1}}
|
||||
label]
|
||||
(when (= chevron-position :right)
|
||||
[rn/view {:test-ID :divider-label-icon-right}
|
||||
[icons/icon
|
||||
(or chevron-icon :i/chevron-down)
|
||||
{:color text-and-icon-color
|
||||
:size chevron-icon-container-width}]])
|
||||
(when (pos? counter-value)
|
||||
[rn/view
|
||||
{:style {:border-radius 6
|
||||
:height 16
|
||||
:width (case (count counter-value)
|
||||
1 16
|
||||
2 20
|
||||
28)
|
||||
:background-color border-and-counter-bg-color
|
||||
:align-items :center
|
||||
:justify-content :center}}
|
||||
[markdown.text/text
|
||||
{:size :label
|
||||
:weight :medium
|
||||
:style {:color counter-text-color}}
|
||||
counter-value]])]]))
|
||||
[rn/view
|
||||
{:accessible true
|
||||
:accessibility-label :divider-label
|
||||
:style (merge {:border-top-width 1
|
||||
:border-top-color border-and-counter-bg-color
|
||||
:padding-top padding-top
|
||||
:padding-horizontal 16
|
||||
:align-items :center
|
||||
:flex-direction :row}
|
||||
container-style)}
|
||||
(when (= chevron-position :left)
|
||||
[rn/view
|
||||
{:test-ID :divider-label-icon-left
|
||||
:style {:margin-right 4}}
|
||||
[icons/icon
|
||||
:main-icons/chevron-down
|
||||
{:color text-and-icon-color
|
||||
:width chevron-icon-container-width
|
||||
:height chevron-icon-container-height}]])
|
||||
[markdown.text/text
|
||||
{:size :paragraph-2
|
||||
:weight :medium
|
||||
:style {:color text-and-icon-color
|
||||
:flex 1}}
|
||||
label]
|
||||
(when (= chevron-position :right)
|
||||
[rn/view {:test-ID :divider-label-icon-right}
|
||||
[icons/icon
|
||||
:main-icons/chevron-down
|
||||
{:color text-and-icon-color
|
||||
:size chevron-icon-container-width}]])
|
||||
(when (pos? counter-value)
|
||||
[rn/view
|
||||
{:style {:border-radius 6
|
||||
:height 16
|
||||
:width (case (count counter-value)
|
||||
1 16
|
||||
2 20
|
||||
28)
|
||||
:background-color border-and-counter-bg-color
|
||||
:align-items :center
|
||||
:justify-content :center}}
|
||||
[markdown.text/text
|
||||
{:size :label
|
||||
:weight :medium
|
||||
:style {:color counter-text-color}}
|
||||
counter-value]])]))
|
||||
|
||||
@@ -2,63 +2,82 @@
|
||||
(:require [quo2.components.markdown.text :as text]
|
||||
[quo2.foundations.colors :as colors]))
|
||||
|
||||
(defn variants-colors
|
||||
[blur? override-theme]
|
||||
(if blur?
|
||||
{:label (colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40 override-theme)
|
||||
:icon (colors/theme-colors colors/neutral-80-opa-70 colors/white-opa-70 override-theme)
|
||||
:button-border (colors/theme-colors colors/neutral-80-opa-30 colors/white-opa-10 override-theme)
|
||||
:password-icon (colors/theme-colors colors/neutral-100 colors/white override-theme)
|
||||
:clear-icon (colors/theme-colors colors/neutral-80-opa-30 colors/white-opa-10 override-theme)
|
||||
:cursor (colors/theme-colors (colors/custom-color :blue 50)
|
||||
colors/white
|
||||
override-theme)}
|
||||
{:label (colors/theme-colors colors/neutral-50 colors/neutral-40 override-theme)
|
||||
:icon (colors/theme-colors colors/neutral-50 colors/neutral-40 override-theme)
|
||||
:button-border (colors/theme-colors colors/neutral-30 colors/neutral-70 override-theme)
|
||||
:clear-icon (colors/theme-colors colors/neutral-40 colors/neutral-60 override-theme)
|
||||
:password-icon (colors/theme-colors colors/neutral-50 colors/white override-theme)
|
||||
:cursor (colors/theme-colors (colors/custom-color :blue 50)
|
||||
(colors/custom-color :blue 60)
|
||||
override-theme)}))
|
||||
(def variants-colors
|
||||
"Colors that keep the same across input's status change"
|
||||
{:light {:label colors/neutral-50
|
||||
:icon colors/neutral-50
|
||||
:cursor (colors/custom-color :blue 50)
|
||||
:button-border colors/neutral-30
|
||||
:clear-icon colors/neutral-40
|
||||
:password-icon colors/neutral-50}
|
||||
:light-blur {:label colors/neutral-80-opa-40
|
||||
:icon colors/neutral-80-opa-70
|
||||
:cursor (colors/custom-color :blue 50)
|
||||
:button-border colors/neutral-80-opa-30
|
||||
:password-icon colors/neutral-100
|
||||
:clear-icon colors/neutral-80-opa-30}
|
||||
:dark {:label colors/neutral-40
|
||||
:icon colors/neutral-40
|
||||
:cursor (colors/custom-color :blue 60)
|
||||
:button-border colors/neutral-70
|
||||
:password-icon colors/white
|
||||
: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}})
|
||||
|
||||
(defn status-colors
|
||||
[status blur? override-theme]
|
||||
(if blur?
|
||||
(case status
|
||||
:focus
|
||||
{:border-color (colors/theme-colors colors/neutral-80-opa-20 colors/white-opa-40 override-theme)
|
||||
:placeholder (colors/theme-colors colors/neutral-80-opa-20 colors/white-opa-20 override-theme)
|
||||
:text (colors/theme-colors colors/neutral-100 colors/white override-theme)}
|
||||
:error
|
||||
{:border-color (colors/theme-colors colors/danger-opa-40 colors/danger-opa-40 override-theme)
|
||||
:placeholder (colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40 override-theme)
|
||||
:text (colors/theme-colors colors/neutral-100 colors/white override-theme)}
|
||||
:disabled
|
||||
{:border-color (colors/theme-colors colors/neutral-80-opa-10 colors/white-opa-10 override-theme)
|
||||
:placeholder (colors/theme-colors colors/neutral-80-opa-30 colors/white-opa-20 override-theme)
|
||||
:text (colors/theme-colors colors/neutral-80-opa-30 colors/white-opa-20 override-theme)}
|
||||
;; :default
|
||||
{:border-color (colors/theme-colors colors/neutral-80-opa-10 colors/white-opa-10 override-theme)
|
||||
:placeholder (colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40 override-theme)
|
||||
:text (colors/theme-colors colors/neutral-100 colors/white override-theme)})
|
||||
(case status
|
||||
:focus
|
||||
{:border-color (colors/theme-colors colors/neutral-40 colors/neutral-60 override-theme)
|
||||
:placeholder (colors/theme-colors colors/neutral-30 colors/neutral-60 override-theme)
|
||||
:text (colors/theme-colors colors/neutral-100 colors/white override-theme)}
|
||||
:error
|
||||
{:border-color (colors/theme-colors colors/danger-opa-40 colors/danger-opa-40 override-theme)
|
||||
:placeholder (colors/theme-colors colors/neutral-40 colors/white-opa-40 override-theme)
|
||||
:text (colors/theme-colors colors/neutral-100 colors/white override-theme)}
|
||||
:disabled
|
||||
{:border-color (colors/theme-colors colors/neutral-20 colors/neutral-80 override-theme)
|
||||
:placeholder (colors/theme-colors colors/neutral-40 colors/neutral-40 override-theme)
|
||||
:text (colors/theme-colors colors/neutral-40 colors/neutral-40 override-theme)}
|
||||
;; :default
|
||||
{:border-color (colors/theme-colors colors/neutral-20 colors/neutral-80 override-theme)
|
||||
:placeholder (colors/theme-colors colors/neutral-40 colors/neutral-50 override-theme)
|
||||
:text (colors/theme-colors colors/neutral-100 colors/white override-theme)})))
|
||||
(def status-colors
|
||||
{:light {:default {:border-color colors/neutral-20
|
||||
:placeholder colors/neutral-40
|
||||
:text colors/neutral-100}
|
||||
:focus {:border-color colors/neutral-40
|
||||
:placeholder colors/neutral-30
|
||||
:text colors/neutral-100}
|
||||
:error {:border-color colors/danger-opa-40
|
||||
:placeholder colors/neutral-40
|
||||
:text colors/neutral-100}
|
||||
:disabled {:border-color colors/neutral-20
|
||||
:placeholder colors/neutral-40
|
||||
:text colors/neutral-40}}
|
||||
:light-blur {:default {:border-color colors/neutral-80-opa-10
|
||||
:placeholder colors/neutral-80-opa-40
|
||||
:text colors/neutral-100}
|
||||
:focus {:border-color colors/neutral-80-opa-20
|
||||
:placeholder colors/neutral-80-opa-20
|
||||
:text colors/neutral-100}
|
||||
:error {:border-color colors/danger-opa-40
|
||||
:placeholder colors/neutral-80-opa-40
|
||||
:text colors/neutral-100}
|
||||
:disabled {:border-color colors/neutral-80-opa-10
|
||||
:placeholder colors/neutral-80-opa-30
|
||||
:text colors/neutral-80-opa-30}}
|
||||
:dark {:default {:border-color colors/neutral-80
|
||||
:placeholder colors/neutral-50
|
||||
:text colors/white}
|
||||
:focus {:border-color colors/neutral-60
|
||||
:placeholder colors/neutral-60
|
||||
:text colors/white}
|
||||
:error {:border-color colors/danger-opa-40
|
||||
:placeholder colors/white-opa-40
|
||||
:text colors/white}
|
||||
:disabled {:border-color colors/neutral-80
|
||||
:placeholder colors/neutral-40
|
||||
:text colors/neutral-40}}
|
||||
: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
|
||||
[colors-by-status small? disabled?]
|
||||
@@ -71,10 +90,11 @@
|
||||
|
||||
(defn left-icon-container
|
||||
[small?]
|
||||
{:margin-left (if small? 0 4)
|
||||
:margin-top (if small? 5 9)
|
||||
:height 20
|
||||
:width 20})
|
||||
{:margin-left (if small? 0 4)
|
||||
:margin-right (if small? 4 8)
|
||||
:margin-top (if small? 5 9)
|
||||
:height 20
|
||||
:width 20})
|
||||
|
||||
(defn icon
|
||||
[colors-by-variant]
|
||||
@@ -86,8 +106,7 @@
|
||||
(merge (text/text-style {:size :paragraph-1 :weight :regular})
|
||||
{:flex 1
|
||||
:text-align-vertical :top
|
||||
:padding-right 0
|
||||
:padding-left (if small? 4 8)
|
||||
:padding-horizontal 0
|
||||
:padding-vertical (if small? 4 8)
|
||||
:color (:text colors-by-status)}
|
||||
(when-not multiple-lines?
|
||||
|
||||
@@ -24,31 +24,31 @@
|
||||
count-text]]]))
|
||||
|
||||
(defn- left-accessory
|
||||
[{:keys [variant-colors small? icon-name]}]
|
||||
[rn/view {:style (style/left-icon-container small?)}
|
||||
[{:keys [variant-colors small icon-name]}]
|
||||
[rn/view {:style (style/left-icon-container small)}
|
||||
[icon/icon icon-name (style/icon variant-colors)]])
|
||||
|
||||
(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
|
||||
{:style (style/right-icon-touchable-area small?)
|
||||
:disabled disabled?
|
||||
{:style (style/right-icon-touchable-area small)
|
||||
:disabled disabled
|
||||
:on-press on-press}
|
||||
[icon/icon icon-name (icon-style-fn variant-colors)]])
|
||||
|
||||
(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
|
||||
{:style (style/button variant-colors small?)
|
||||
:disabled disabled?
|
||||
{:style (style/button variant-colors small)
|
||||
:disabled disabled
|
||||
:on-press on-press}
|
||||
[rn/text {:style (style/button-text colors-by-status)}
|
||||
text]])
|
||||
|
||||
(def ^:private custom-props
|
||||
"Custom properties that must be removed from properties map passed to InputText."
|
||||
[:type :blur? :override-theme :error? :right-icon :left-icon :disabled? :small? :button
|
||||
:label :char-limit :on-char-limit-reach :icon-name :multiline?])
|
||||
[:type :variant :error :right-icon :left-icon :disabled :small :button :label
|
||||
:char-limit :on-char-limit-reach :icon-name])
|
||||
|
||||
(defn- base-input
|
||||
[{:keys [on-change-text on-char-limit-reach]}]
|
||||
@@ -67,15 +67,16 @@
|
||||
(reset! char-count amount-chars)
|
||||
(when (>= amount-chars char-limit)
|
||||
(on-char-limit-reach amount-chars))))]
|
||||
(fn [{:keys [blur? override-theme error? right-icon left-icon disabled? small? button
|
||||
label char-limit multiline? clearable?]
|
||||
(fn [{:keys [variant error right-icon left-icon disabled small button label char-limit
|
||||
multiline clearable]
|
||||
:or {variant :light}
|
||||
:as props}]
|
||||
(let [status-kw (cond
|
||||
disabled? :disabled
|
||||
error? :error
|
||||
:else @status)
|
||||
colors-by-status (style/status-colors status-kw blur? override-theme)
|
||||
variant-colors (style/variants-colors blur? override-theme)
|
||||
(let [status-path (cond
|
||||
disabled :disabled
|
||||
error :error
|
||||
:else @status)
|
||||
colors-by-status (get-in style/status-colors [variant status-path])
|
||||
variant-colors (style/variants-colors variant)
|
||||
clean-props (apply dissoc props custom-props)]
|
||||
[rn/view
|
||||
(when (or label char-limit)
|
||||
@@ -84,39 +85,38 @@
|
||||
:label label
|
||||
:current-chars @char-count
|
||||
: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]
|
||||
[left-accessory
|
||||
{:variant-colors variant-colors
|
||||
:small? small?
|
||||
:small small
|
||||
:icon-name icon-name}])
|
||||
[rn/text-input
|
||||
(cond-> {:style (style/input colors-by-status small? @multiple-lines?)
|
||||
(cond-> {:style (style/input colors-by-status small @multiple-lines?)
|
||||
:placeholder-text-color (:placeholder colors-by-status)
|
||||
:cursor-color (:cursor variant-colors)
|
||||
:editable (not disabled?)
|
||||
:editable (not disabled)
|
||||
:on-focus on-focus
|
||||
:on-blur on-blur}
|
||||
:always (merge clean-props)
|
||||
multiline? (assoc :multiline true
|
||||
:on-content-size-change set-multiple-lines!)
|
||||
char-limit (assoc :on-change-text #(update-char-limit! % char-limit)))]
|
||||
multiline (assoc :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]
|
||||
[right-accessory
|
||||
{:variant-colors variant-colors
|
||||
:small? small?
|
||||
:disabled? disabled?
|
||||
:small small
|
||||
:disabled disabled
|
||||
:icon-style-fn style-fn
|
||||
:icon-name icon-name
|
||||
:on-press (fn []
|
||||
(when clearable? (reset! char-count 0))
|
||||
(when clearable (reset! char-count 0))
|
||||
(on-press))}])
|
||||
(when-let [{:keys [on-press text]} button]
|
||||
[right-button
|
||||
{:colors-by-status colors-by-status
|
||||
:variant-colors variant-colors
|
||||
:small? small?
|
||||
:disabled? disabled?
|
||||
:small small
|
||||
:disabled disabled
|
||||
:on-press on-press
|
||||
:text text}])]]))))
|
||||
|
||||
@@ -136,14 +136,13 @@
|
||||
(defn input
|
||||
"This input supports the following properties:
|
||||
- :type - Can be `:text`(default) or `:password`.
|
||||
- :blur? - Boolean to set the blur color variant.
|
||||
- :override-theme - Can be `light` or `:dark`.
|
||||
- :small? - Boolean to specify if this input is rendered in its small version.
|
||||
- :multiline? - Boolean to specify if this input support multiple lines.
|
||||
- :variant - :light(default), :light-blur, :dark or :dark-blur.
|
||||
- :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.
|
||||
- :error? - Boolean to specify it this input marks an error.
|
||||
- :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.
|
||||
- :error - Boolean to specify it this input marks an error.
|
||||
- :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.
|
||||
- :on-clear - Function executed when the clear button is pressed.
|
||||
- :button - Map containing `:on-press` & `:text` keys, if provided renders a button
|
||||
- :label - A label for this input.
|
||||
@@ -156,12 +155,12 @@
|
||||
- :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}
|
||||
:as props}]
|
||||
(let [base-props (cond-> props
|
||||
icon-name (assoc-in [:left-icon :icon-name] icon-name)
|
||||
clearable? (assoc :right-icon
|
||||
clearable (assoc :right-icon
|
||||
{:style-fn style/clear-icon
|
||||
:icon-name :i/clear
|
||||
:on-press #(when on-clear (on-clear))})
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
|
||||
(defn small-option-card
|
||||
"Variants: `:main` or `:icon`"
|
||||
[{:keys [variant title subtitle image max-height on-press accessibility-label]
|
||||
:or {variant :main accessibility-label :small-option-card}}]
|
||||
[{:keys [variant title subtitle image max-height on-press]
|
||||
:or {variant :main}}]
|
||||
(let [main-variant? (= variant :main)
|
||||
card-component (if main-variant? main-variant icon-variant)
|
||||
card-height (cond
|
||||
@@ -59,7 +59,7 @@
|
||||
:else style/main-variant-height)]
|
||||
[rn/view
|
||||
[rn/touchable-highlight
|
||||
{:accessibility-label accessibility-label
|
||||
{:accessibility-label :small-option-card
|
||||
:style style/touchable-overlay
|
||||
:active-opacity 1
|
||||
:underlay-color colors/white-opa-5
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
(ns status-im.chat.models.loading
|
||||
(: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.messages :as data-store.messages]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im2.contexts.chat.messages.list.events :as message-list]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
@@ -100,6 +100,17 @@
|
||||
:on-success #(re-frame/dispatch
|
||||
[::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
|
||||
"Loads more messages for current chat"
|
||||
{:events [::messages-loaded]}
|
||||
@@ -113,25 +124,15 @@
|
||||
(reduce (fn [{:keys [all-messages] :as acc}
|
||||
{:keys [message-id from]
|
||||
:as message}]
|
||||
(let [message
|
||||
;; 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.
|
||||
(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)
|
||||
(cond-> acc
|
||||
(not (get-in db [:chats chat-id :users from]))
|
||||
(update :senders assoc from message)
|
||||
|
||||
(nil? (get all-messages message-id))
|
||||
(update :new-messages conj message)
|
||||
(nil? (get all-messages message-id))
|
||||
(update :new-messages conj message)
|
||||
|
||||
:always
|
||||
(update :all-messages assoc message-id message))))
|
||||
:always
|
||||
(update :all-messages assoc message-id message)))
|
||||
{:all-messages already-loaded-messages
|
||||
:senders {}
|
||||
:contacts {}
|
||||
@@ -140,7 +141,8 @@
|
||||
current-clock-value (get-in db
|
||||
[:pagination-info chat-id
|
||||
: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
|
||||
(update-in [:pagination-info chat-id :cursor-clock-value]
|
||||
#(if (and (seq cursor) (or (not %) (< clock-value %)))
|
||||
|
||||
@@ -678,6 +678,12 @@
|
||||
community-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
|
||||
{:events [::create-category-confirmation-pressed]}
|
||||
[_ community-id category-title chat-ids]
|
||||
@@ -854,47 +860,3 @@
|
||||
:community-id community-id
|
||||
:public-key public-key
|
||||
: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?})}]})
|
||||
|
||||
@@ -46,6 +46,16 @@
|
||||
[taoensso.timbre :as log]
|
||||
[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
|
||||
::initialize-transactions-management-enabled
|
||||
(fn []
|
||||
@@ -348,6 +358,10 @@
|
||||
[{:method "wakuext_getGroupChatInvitations"
|
||||
:on-success #(re-frame/dispatch [::initialize-invitations %])}]})
|
||||
|
||||
(rf/defn initialize-communities-enabled
|
||||
[cofx]
|
||||
{::initialize-communities-enabled nil})
|
||||
|
||||
(rf/defn initialize-transactions-management-enabled
|
||||
[cofx]
|
||||
{::initialize-transactions-management-enabled nil})
|
||||
@@ -394,10 +408,10 @@
|
||||
(rf/dispatch [:communities/get-user-requests-to-join])
|
||||
(re-frame/dispatch [::get-chats-callback]))})
|
||||
(initialize-appearance)
|
||||
(initialize-communities-enabled)
|
||||
(initialize-wallet-connect)
|
||||
(get-node-config)
|
||||
(communities/fetch)
|
||||
(communities/fetch-collapsed-community-categories)
|
||||
(logging/set-log-level (:log-level multiaccount))
|
||||
(activity-center/notifications-fetch-pending-contact-requests)
|
||||
(activity-center/update-seen-state)
|
||||
@@ -525,6 +539,7 @@
|
||||
(communities/fetch)
|
||||
(data-store.chats/fetch-chats-rpc
|
||||
{:on-success #(re-frame/dispatch [:chats-list/load-success %])})
|
||||
(initialize-communities-enabled)
|
||||
(multiaccounts/switch-preview-privacy-mode-flag)
|
||||
(link-preview/request-link-preview-whitelist)
|
||||
(logging/set-log-level (:log-level multiaccount))
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
(:require [quo.core :as quo]
|
||||
[re-frame.core :as re-frame]
|
||||
[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]))
|
||||
|
||||
(defn- normal-mode-settings-data
|
||||
[{:keys [network-name
|
||||
current-log-level
|
||||
waku-bloom-filter-mode
|
||||
communities-enabled?
|
||||
transactions-management-enabled?
|
||||
wakuv2-flag
|
||||
current-fleet
|
||||
@@ -74,6 +76,17 @@
|
||||
:on-press
|
||||
#(re-frame/dispatch [:navigate-to :peers-stats])
|
||||
: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
|
||||
:title (i18n/label :t/transactions-management-enabled)
|
||||
:accessibility-label :transactions-management-enabled
|
||||
@@ -119,6 +132,7 @@
|
||||
network-name [:network-name]
|
||||
waku-bloom-filter-mode [:waku/bloom-filter-mode]
|
||||
wakuv2-flag [:waku/v2-flag]
|
||||
communities-enabled? [:communities/enabled?]
|
||||
transactions-management-enabled? [:wallet/transactions-management-enabled?]
|
||||
current-log-level [:log-level/current-log-level]
|
||||
current-fleet [:fleets/current-fleet]]
|
||||
@@ -126,6 +140,7 @@
|
||||
{:data (flat-list-data
|
||||
{:network-name network-name
|
||||
:current-log-level current-log-level
|
||||
:communities-enabled? communities-enabled?
|
||||
:transactions-management-enabled? transactions-management-enabled?
|
||||
:current-fleet current-fleet
|
||||
:dev-mode? false
|
||||
|
||||
@@ -142,25 +142,28 @@
|
||||
|
||||
(defn communities
|
||||
[]
|
||||
(let [communities (rf/sub [:communities/section-list])]
|
||||
(let [communities (rf/sub [:communities/section-list])
|
||||
communities-enabled? (rf/sub [:communities/enabled?])]
|
||||
[:<>
|
||||
[topbar/topbar
|
||||
{:title (i18n/label :t/communities)
|
||||
:right-accessories
|
||||
[{:icon :main-icons/more
|
||||
:accessibility-label :chat-menu-button
|
||||
:on-press
|
||||
#(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[communities-actions])
|
||||
:height 256}])}]}]
|
||||
(cond-> {:title (i18n/label :t/communities)}
|
||||
communities-enabled?
|
||||
(assoc :right-accessories
|
||||
[{:icon :main-icons/more
|
||||
:accessibility-label :chat-menu-button
|
||||
:on-press
|
||||
#(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
[communities-actions])
|
||||
:height 256}])}]))]
|
||||
[communities-list communities]
|
||||
[toolbar/toolbar
|
||||
{:show-border? true
|
||||
:center [quo/button
|
||||
{:on-press #(rf/dispatch [::communities/open-create-community])
|
||||
:type :secondary}
|
||||
(i18n/label :t/create-community)]}]]))
|
||||
(when communities-enabled?
|
||||
[toolbar/toolbar
|
||||
{:show-border? true
|
||||
:center [quo/button
|
||||
{:on-press #(rf/dispatch [::communities/open-create-community])
|
||||
:type :secondary}
|
||||
(i18n/label :t/create-community)]}])]))
|
||||
|
||||
(defn export-community
|
||||
[]
|
||||
|
||||
@@ -51,12 +51,13 @@
|
||||
:accessibility-label :join-public-chat-button
|
||||
:icon :main-icons/public-chat
|
||||
:on-press #(hide-sheet-and-dispatch [:open-modal :new-public-chat])}]
|
||||
[quo/list-item
|
||||
{:theme :accent
|
||||
:title (i18n/label :t/communities-alpha)
|
||||
:accessibility-label :communities-button
|
||||
:icon :main-icons/communities
|
||||
:on-press #(hide-sheet-and-dispatch [:navigate-to :communities])}]
|
||||
(when (rf/sub [:communities/enabled?])
|
||||
[quo/list-item
|
||||
{:theme :accent
|
||||
:title (i18n/label :t/communities-alpha)
|
||||
:accessibility-label :communities-button
|
||||
:icon :main-icons/communities
|
||||
:on-press #(hide-sheet-and-dispatch [:navigate-to :communities])}])
|
||||
[invite/list-item
|
||||
{:accessibility-label :chats-menu-invite-friends-button}]])
|
||||
|
||||
|
||||
@@ -9,25 +9,12 @@
|
||||
(defn quoted-message
|
||||
[pin? in-chat-input?]
|
||||
(merge {:flex-direction :row
|
||||
:flex 1
|
||||
:align-items :center
|
||||
:width (if in-chat-input? "100%" "45%")}
|
||||
:width (if in-chat-input? "80%" "45%")}
|
||||
(when-not pin?
|
||||
{:left 22
|
||||
:margin-right 22})))
|
||||
|
||||
(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})
|
||||
{:position :absolute
|
||||
:left 34
|
||||
:top 3})))
|
||||
|
||||
(def gradient
|
||||
{:position :absolute
|
||||
|
||||
@@ -64,17 +64,6 @@
|
||||
:margin-top 2}}
|
||||
(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
|
||||
[{:keys [from identicon content-type contentType parsed-text content deleted? deleted-for-me?]}
|
||||
in-chat-input? pin? recording-audio?]
|
||||
@@ -95,11 +84,13 @@
|
||||
[rn/view {:style (style/quoted-message pin? in-chat-input?)}
|
||||
[reply-deleted-message]]
|
||||
[rn/view {:style (style/quoted-message pin? in-chat-input?)}
|
||||
[reply-from
|
||||
{:from from
|
||||
:identicon identicon
|
||||
:contact-name contact-name
|
||||
:current-public-key current-public-key}]
|
||||
[photos/member-photo from identicon 16]
|
||||
[quo2.text/text
|
||||
{:weight :semi-bold
|
||||
:size :paragraph-2
|
||||
:number-of-lines 1
|
||||
:style {:margin-left 4}}
|
||||
(format-reply-author from contact-name current-public-key)]
|
||||
[quo2.text/text
|
||||
{:number-of-lines 1
|
||||
:size :label
|
||||
@@ -107,7 +98,9 @@
|
||||
:accessibility-label :quoted-message
|
||||
:ellipsize-mode :tail
|
||||
:style (merge
|
||||
style/message-text
|
||||
{:text-transform :none
|
||||
:margin-left 4
|
||||
:margin-top 2}
|
||||
(when (or (= constants/content-type-image content-type)
|
||||
(= constants/content-type-sticker content-type)
|
||||
(= constants/content-type-audio content-type))
|
||||
|
||||
@@ -354,8 +354,9 @@
|
||||
|
||||
(defview community-content
|
||||
[{:keys [community-id] :as message}]
|
||||
(letsubs [{:keys [name description verified] :as community} [:communities/community community-id]]
|
||||
(when community
|
||||
(letsubs [{:keys [name description verified] :as community} [:communities/community community-id]
|
||||
communities-enabled? [:communities/enabled?]]
|
||||
(when (and communities-enabled? community)
|
||||
[rn/view
|
||||
{:style (assoc (style/message-wrapper message)
|
||||
:margin-vertical 10
|
||||
|
||||
@@ -58,35 +58,10 @@
|
||||
:size :small}
|
||||
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
|
||||
[{:keys [button-type search?]}]
|
||||
(let [button-common-props (get-button-common-props button-type)
|
||||
network-type (rf/sub [:network/type])]
|
||||
(let [button-common-props (get-button-common-props button-type)]
|
||||
[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?
|
||||
[quo/button
|
||||
(assoc button-common-props :accessibility-label :open-search-button)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
(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 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 debug-webview? (enabled? (get-config :DEBUG_WEBVIEW "0")))
|
||||
(def collectibles-enabled? (enabled? (get-config :COLLECTIBLES_ENABLED "1")))
|
||||
|
||||
@@ -290,5 +290,3 @@
|
||||
(def ^:const local-pair-action-sync-device 3)
|
||||
|
||||
(def ^:const everyone-mention-id "0x00001")
|
||||
|
||||
(def ^:const empty-category-id :communities/not-categorized)
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
[status-im2.contexts.contacts.events :as contacts-store]
|
||||
[status-im.multiaccounts.model :as multiaccounts.model]
|
||||
[status-im.utils.clocks :as utils.clocks]
|
||||
[status-im.utils.types :as types]
|
||||
[reagent.core :as reagent]))
|
||||
[status-im.utils.types :as types]))
|
||||
|
||||
(defn- get-chat
|
||||
[cofx chat-id]
|
||||
@@ -339,13 +338,6 @@
|
||||
[{:keys [db]} shared-element-id]
|
||||
{:db (assoc db :shared-element-id shared-element-id)})
|
||||
|
||||
(rf/defn navigate-to-lightbox
|
||||
{:events [:chat.ui/navigate-to-lightbox]}
|
||||
[{:keys [db]} shared-element-id screen-params]
|
||||
(let [updated-db (assoc db :shared-element-id shared-element-id)]
|
||||
(reagent/next-tick #(rf/dispatch [:navigate-to :lightbox screen-params]))
|
||||
{:db updated-db}))
|
||||
|
||||
(rf/defn exit-lightbox-signal
|
||||
{:events [:chat.ui/exit-lightbox-signal]}
|
||||
[{:keys [db]} value]
|
||||
@@ -365,3 +357,4 @@
|
||||
{:events [:chat.ui/lightbox-scale]}
|
||||
[{:keys [db]} value]
|
||||
{:db (assoc db :lightbox/scale value)})
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
(anim/animate background-color :transparent)
|
||||
(anim/animate opacity 0)
|
||||
(rf/dispatch (if platform/ios?
|
||||
[:navigate-back]
|
||||
[:chat.ui/exit-lightbox-signal @index]
|
||||
[:navigate-back])))
|
||||
:style style/close-container}
|
||||
[quo/icon :close {:size 20 :color colors/white}]]
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
[clojure.string :as string]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[react-native.fast-image :as fast-image]
|
||||
[react-native.navigation :as navigation]
|
||||
[react-native.orientation :as orientation]
|
||||
[react-native.platform :as platform]
|
||||
@@ -190,7 +189,6 @@
|
||||
(rf/dispatch [:chat.ui/zoom-out-signal nil])
|
||||
(when platform/android?
|
||||
(rf/dispatch [:chat.ui/lightbox-scale 1])))))
|
||||
|
||||
[:f>
|
||||
(fn []
|
||||
(let [curr-orientation (or (rf/sub [:lightbox/orientation]) orientation/portrait)
|
||||
@@ -204,18 +202,13 @@
|
||||
window-height
|
||||
window-width)
|
||||
item-width (if (and landscape? platform/ios?) screen-height screen-width)]
|
||||
;[gesture/flat-list
|
||||
; {:data [1]
|
||||
; :horizontal true
|
||||
; :render-fn (fn [] [rn/view {:style {:width 300 :height 300 :background-color :red}
|
||||
; :native-ID :shared-element}])}]
|
||||
[reanimated/view
|
||||
{:style (reanimated/apply-animations-to-style {:background-color (:background-color
|
||||
animations)}
|
||||
{:height screen-height})}
|
||||
;(when-not @transparent?
|
||||
; [top-view/top-view (first messages) insets scroll-index animations derived landscape?
|
||||
; screen-width])
|
||||
(when-not @transparent?
|
||||
[top-view/top-view (first messages) insets scroll-index animations derived landscape?
|
||||
screen-width])
|
||||
[gesture/gesture-detector
|
||||
{:gesture (drag-gesture animations (and landscape? platform/ios?) set-full-height?)}
|
||||
[reanimated/view
|
||||
@@ -228,8 +221,7 @@
|
||||
:key-fn :message-id
|
||||
:style {:width (+ screen-width seperator-width)}
|
||||
:data @data
|
||||
:render-fn (fn [] [rn/view {:style {:width 300 :height 300 :background-color :red}
|
||||
:native-ID :shared-element}])
|
||||
:render-fn image
|
||||
:render-data {:opacity-value (:opacity animations)
|
||||
:border-value (:border animations)
|
||||
:transparent? transparent?
|
||||
@@ -248,9 +240,6 @@
|
||||
:shows-vertical-scroll-indicator false
|
||||
:shows-horizontal-scroll-indicator false
|
||||
:on-viewable-items-changed callback}]]]
|
||||
;(when (and (not @transparent?) (not landscape?))
|
||||
; [bottom-view/bottom-view messages index scroll-index insets animations derived
|
||||
; item-width atoms])
|
||||
]
|
||||
))]
|
||||
))])
|
||||
(when (and (not @transparent?) (not landscape?))
|
||||
[bottom-view/bottom-view messages index scroll-index insets animations derived
|
||||
item-width atoms])]))]))])
|
||||
|
||||
@@ -272,12 +272,7 @@
|
||||
animations
|
||||
@set-full-height?
|
||||
(= curr-orientation orientation/portrait))}
|
||||
[rn/view {:style {:width 300 :height 300 :background-color :red}
|
||||
:native-ID :shared-element}]
|
||||
;[reanimated/fast-image
|
||||
; {:source {:uri (:image content)}
|
||||
; ;:native-ID (when focused? :shared-element)
|
||||
; :native-ID :shared-element
|
||||
; :style (style/image dimensions animations (:border-value args))}]
|
||||
]]
|
||||
))]))])
|
||||
[reanimated/fast-image
|
||||
{:source {:uri (:image content)}
|
||||
:native-ID (when focused? :shared-element)
|
||||
:style (style/image dimensions animations (:border-value args))}]]]))]))])
|
||||
|
||||
@@ -52,19 +52,19 @@
|
||||
{:key (:message-id item)
|
||||
:active-opacity 1
|
||||
:on-long-press #(on-long-press message context)
|
||||
:on-press #(rf/dispatch [:chat.ui/navigate-to-lightbox
|
||||
(:message-id item)
|
||||
{:messages (:album message)
|
||||
:index index
|
||||
:insets insets}])}
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:chat.ui/update-shared-element-id (:message-id item)])
|
||||
(js/setTimeout #(rf/dispatch [:navigate-to :lightbox
|
||||
{:messages (:album message)
|
||||
:index index
|
||||
:insets insets}])
|
||||
100))}
|
||||
[fast-image/fast-image
|
||||
{:style (style/image dimensions index portrait? images-count)
|
||||
:source {:uri (:image (:content item))}
|
||||
:native-ID :source-image
|
||||
;:native-ID (when (and (= shared-element-id (:message-id item))
|
||||
; (< index constants/max-album-photos))
|
||||
; :shared-element)
|
||||
}]
|
||||
:native-ID (when (and (= shared-element-id (:message-id item))
|
||||
(< index constants/max-album-photos))
|
||||
:shared-element)}]
|
||||
(when (and (> images-count constants/max-album-photos)
|
||||
(= index (- constants/max-album-photos 1)))
|
||||
[rn/view
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
(:require
|
||||
[react-native.core :as rn]
|
||||
[react-native.fast-image :as fast-image]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[react-native.safe-area :as safe-area]
|
||||
[status-im2.constants :as constants]
|
||||
[utils.re-frame :as rf]
|
||||
@@ -25,23 +24,19 @@
|
||||
(let [shared-element-id (rf/sub [:shared-element-id])]
|
||||
[rn/touchable-opacity
|
||||
{:active-opacity 1
|
||||
;:native-ID :source-image
|
||||
:key message-id
|
||||
:style {:margin-top (when (pos? index) 10)}
|
||||
:on-long-press on-long-press
|
||||
:on-press #(rf/dispatch [:chat.ui/navigate-to-lightbox
|
||||
message-id
|
||||
{:messages [message]
|
||||
:index 0
|
||||
:insets insets}])}
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:chat.ui/update-shared-element-id message-id])
|
||||
(js/setTimeout #(rf/dispatch [:navigate-to :lightbox
|
||||
{:messages (:album message)
|
||||
:index index
|
||||
:insets insets}])
|
||||
100))}
|
||||
(when (and (not= text "placeholder") (= index 0))
|
||||
[rn/view {:style {:margin-bottom 10}} [text/text-content message context]])
|
||||
[rn/view {:style {:width 300 :height 300 :background-color :red}
|
||||
:native-ID :shared-element}]
|
||||
;[fast-image/fast-image
|
||||
; {:source {:uri (:image content)}
|
||||
; :style (merge dimensions {:border-radius 12})
|
||||
; :native-ID :shared-element
|
||||
; ;:native-ID (when (= shared-element-id message-id) :shared-element)
|
||||
; }]
|
||||
]))))])
|
||||
[fast-image/fast-image
|
||||
{:source {:uri (:image content)}
|
||||
:style (merge dimensions {:border-radius 12})
|
||||
:native-ID (when (= shared-element-id message-id) :shared-element)}]]))))])
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
(ns status-im2.contexts.chat.messages.list.events
|
||||
(:require [status-im2.constants :as constants]
|
||||
(:require [utils.red-black-tree :as red-black-tree]
|
||||
[utils.datetime :as datetime]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.red-black-tree :as red-black-tree]))
|
||||
[status-im2.constants :as constants]))
|
||||
|
||||
(defn- add-datemark
|
||||
[{:keys [whisper-timestamp] :as msg}]
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
(ns status-im2.contexts.chat.photo-selector.view
|
||||
(:require
|
||||
[react-native.navigation :as navigation]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[status-im2.constants :as constants]
|
||||
[utils.i18n :as i18n]
|
||||
[react-native.safe-area :as safe-area]
|
||||
@@ -108,43 +110,63 @@
|
||||
(fn []
|
||||
(let [selected (reagent/atom []) ; currently selected
|
||||
selected-images (rf/sub [:chats/sending-image]) ; already selected and dispatched
|
||||
selected-album (or (rf/sub [:camera-roll/selected-album]) (i18n/label :t/recent))]
|
||||
selected-album (or (rf/sub [:camera-roll/selected-album]) (i18n/label :t/recent))
|
||||
bg-color (reanimated/use-shared-value "rgba(0,0,0,0)")]
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
(rf/dispatch [:chat.ui/camera-roll-get-photos 20 nil selected-album])
|
||||
(if (seq selected-images)
|
||||
(reset! selected (vec (vals selected-images)))
|
||||
(reset! selected @temporary-selected)))
|
||||
[selected-album])
|
||||
[safe-area/consumer
|
||||
(fn [insets]
|
||||
(let [window-width (:width (rn/get-window))
|
||||
(fn []
|
||||
(reanimated/animate-shared-value-with-delay-default-easing bg-color "rgba(9, 16, 28, 0.7)" 300 100)
|
||||
;(js/setTimeout #(reanimated/set-shared-value bg-color (reanimated/with-timing "rgba(9, 16, 28, 0.7)")) 300)
|
||||
(rf/dispatch [:chat.ui/camera-roll-get-photos 20 nil selected-album])
|
||||
(if (seq selected-images)
|
||||
(reset! selected (vec (vals selected-images)))
|
||||
(reset! selected @temporary-selected)))
|
||||
[selected-album])
|
||||
;[safe-area/consumer
|
||||
; (fn [insets]
|
||||
(let [insets {:top 20 :bottom 20}
|
||||
window-width (:width (rn/get-window))
|
||||
camera-roll-photos (rf/sub [:camera-roll/photos])
|
||||
end-cursor (rf/sub [:camera-roll/end-cursor])
|
||||
loading? (rf/sub [:camera-roll/loading-more])
|
||||
has-next-page? (rf/sub [:camera-roll/has-next-page])]
|
||||
[rn/view {:style {:flex 1}}
|
||||
[rn/view
|
||||
{:style style/buttons-container}
|
||||
(when platform/android?
|
||||
[rn/touchable-opacity
|
||||
{:active-opacity 1
|
||||
:on-press #(rf/dispatch [:navigate-back])
|
||||
:style (style/close-button-container)}
|
||||
[quo/icon :i/close
|
||||
{:size 20 :color (colors/theme-colors colors/black colors/white)}]])
|
||||
[album-title true selected-album selected temporary-selected]
|
||||
[clear-button selected]]
|
||||
[rn/flat-list
|
||||
{:key-fn identity
|
||||
:render-fn image
|
||||
:render-data {:window-width window-width :selected selected}
|
||||
:data camera-roll-photos
|
||||
:num-columns 3
|
||||
:content-container-style {:width "100%"
|
||||
:padding-bottom (+ (:bottom insets) 100)
|
||||
:padding-top 80}
|
||||
:on-end-reached #(rf/dispatch [:camera-roll/on-end-reached end-cursor
|
||||
selected-album loading?
|
||||
has-next-page?])}]
|
||||
[bottom-gradient selected-images insets selected]]))])))])
|
||||
[rn/view {:style {:flex 1
|
||||
:padding-top (if platform/ios? (navigation/status-bar-height) (+ (navigation/status-bar-height) 30))}}
|
||||
[reanimated/view {:style (reanimated/apply-animations-to-style {:background-color bg-color}
|
||||
{:position :absolute
|
||||
:top 0
|
||||
:bottom 0
|
||||
:left 0
|
||||
:right 0})}]
|
||||
[rn/view {:style {:margin-top 0 :background-color :white
|
||||
:border-top-left-radius 20
|
||||
:border-top-right-radius 20
|
||||
:overflow :hidden}}
|
||||
[rn/view
|
||||
{:style style/buttons-container}
|
||||
(when true
|
||||
[rn/touchable-opacity
|
||||
{:active-opacity 1
|
||||
:on-press (fn []
|
||||
(reanimated/set-shared-value bg-color (reanimated/with-timing "transparent" (clj->js {:duration 100})))
|
||||
(rf/dispatch [:navigate-back]))
|
||||
:style (style/close-button-container)}
|
||||
[quo/icon :i/close
|
||||
{:size 20 :color (colors/theme-colors colors/black colors/white)}]])
|
||||
[album-title true selected-album selected temporary-selected]
|
||||
[clear-button selected]]
|
||||
[rn/flat-list
|
||||
{:key-fn identity
|
||||
:render-fn image
|
||||
:render-data {:window-width window-width :selected selected}
|
||||
:data camera-roll-photos
|
||||
:num-columns 3
|
||||
:content-container-style {:width "100%"
|
||||
:padding-bottom (+ (:bottom insets) 100)
|
||||
:padding-top 80}
|
||||
:on-end-reached #(rf/dispatch [:camera-roll/on-end-reached end-cursor
|
||||
selected-album loading?
|
||||
has-next-page?])}]
|
||||
[bottom-gradient selected-images insets selected]
|
||||
]])
|
||||
;)]
|
||||
)))])
|
||||
|
||||
@@ -60,45 +60,35 @@
|
||||
(defn add-category-height
|
||||
[categories-heights category height]
|
||||
(swap! categories-heights
|
||||
(fn [heights]
|
||||
(assoc heights category height))))
|
||||
|
||||
(defn collapse-category
|
||||
[community-id category-id collapsed?]
|
||||
(rf/dispatch [:communities/toggle-collapsed-category community-id category-id (not collapsed?)]))
|
||||
(fn []
|
||||
(sort-by :height
|
||||
(conj @categories-heights
|
||||
{:height height
|
||||
:label category})))))
|
||||
|
||||
(defn channel-list-component
|
||||
[{:keys [on-category-layout
|
||||
community-id
|
||||
[{:keys [on-categories-heights-changed
|
||||
on-first-channel-height-changed]}
|
||||
channels-list]
|
||||
[rn/view
|
||||
{:on-layout #(on-first-channel-height-changed (+ (if platform/ios?
|
||||
0
|
||||
38)
|
||||
(int (Math/ceil (layout-y %))))
|
||||
(into #{} (map (comp :name second) channels-list)))
|
||||
:style {:margin-top 20 :flex 1}}
|
||||
(map
|
||||
(fn [[category-id {:keys [chats name collapsed?]}]]
|
||||
[rn/view
|
||||
{:flex 1
|
||||
:key category-id
|
||||
;; on-layout fires only when the component re-renders, so
|
||||
;; in case the category hasn't changed, it will not be fired
|
||||
:on-layout #(on-category-layout name (int (layout-y %)))}
|
||||
(let [categories-heights (reagent/atom [])]
|
||||
[rn/view
|
||||
{:on-layout #(on-first-channel-height-changed (+ (if platform/ios?
|
||||
0
|
||||
38)
|
||||
(int (Math/ceil (layout-y %)))))
|
||||
:style {:margin-top 20 :flex 1}}
|
||||
(map-indexed
|
||||
(fn [index [category channels-for-category]]
|
||||
[rn/view
|
||||
{:flex 1
|
||||
:key (str index category)
|
||||
:on-layout #(do
|
||||
(add-category-height categories-heights category (int (layout-y %)))
|
||||
(on-categories-heights-changed @categories-heights))}
|
||||
|
||||
(when-not (= constants/empty-category-id category-id)
|
||||
[quo/divider-label
|
||||
{:label name
|
||||
:on-press #(collapse-category
|
||||
community-id
|
||||
category-id
|
||||
collapsed?)
|
||||
:chevron-icon (if collapsed? :main-icons/chevron-right :main-icons/chevron-down)
|
||||
:padding-bottom (if collapsed? 7 0)
|
||||
:chevron-position :left}])
|
||||
(when-not collapsed?
|
||||
{:label category
|
||||
:chevron-position :left}]
|
||||
[rn/view
|
||||
{:margin-left 8
|
||||
:margin-top 10
|
||||
@@ -108,8 +98,8 @@
|
||||
{:key (:id channel)
|
||||
:margin-top 4}
|
||||
[quo/channel-list-item channel]])
|
||||
chats)])])
|
||||
channels-list)])
|
||||
channels-for-category)]])
|
||||
channels-list)]))
|
||||
|
||||
(defn request-to-join-text
|
||||
[is-open?]
|
||||
@@ -202,10 +192,10 @@
|
||||
|
||||
(defn add-on-press-handler-to-categorized-chats
|
||||
[community-id categorized-chats]
|
||||
(let [add-on-press (partial add-on-press-handler-to-chats community-id)]
|
||||
(map (fn [[category v]]
|
||||
[category (update v :chats add-on-press)])
|
||||
categorized-chats)))
|
||||
(reduce-kv (fn [acc category chats]
|
||||
(assoc acc category (add-on-press-handler-to-chats community-id chats)))
|
||||
{}
|
||||
categorized-chats))
|
||||
|
||||
(defn community-header
|
||||
[name]
|
||||
@@ -231,9 +221,8 @@
|
||||
(defn community-content
|
||||
[{:keys [name description locked joined images
|
||||
status tokens tags id]
|
||||
:as community}
|
||||
pending?
|
||||
{:keys [on-category-layout
|
||||
:as community} pending?
|
||||
{:keys [on-categories-heights-changed
|
||||
on-first-channel-height-changed]}]
|
||||
(let [thumbnail-image (:thumbnail images)
|
||||
chats-by-category (rf/sub [:communities/categorized-channels id])
|
||||
@@ -275,14 +264,13 @@
|
||||
[preview-user-list users]
|
||||
[join-community community pending?]]
|
||||
[channel-list-component
|
||||
{:on-category-layout on-category-layout
|
||||
:community-id id
|
||||
:on-first-channel-height-changed on-first-channel-height-changed}
|
||||
{:on-categories-heights-changed #(on-categories-heights-changed %)
|
||||
:on-first-channel-height-changed #(on-first-channel-height-changed %)}
|
||||
(add-on-press-handler-to-categorized-chats id chats-by-category)]]))
|
||||
|
||||
(defn sticky-category-header
|
||||
[_]
|
||||
(fn [{:keys [enabled label]}]
|
||||
(fn [{:keys [:enabled :label]}]
|
||||
(when enabled
|
||||
[blur/view
|
||||
{:style style/blur-channel-header
|
||||
@@ -290,7 +278,7 @@
|
||||
:blur-type :transparent
|
||||
:overlay-color :transparent}
|
||||
[quo/divider-label
|
||||
{:label label
|
||||
{:label (:label label)
|
||||
:chevron-position :left}]])))
|
||||
|
||||
(defn page-nav-right-section-buttons
|
||||
@@ -304,18 +292,9 @@
|
||||
[options/community-options-bottom-sheet
|
||||
id])}])}])
|
||||
|
||||
(defn pick-first-category-by-height
|
||||
[scroll-height first-channel-height categories-heights]
|
||||
(->> categories-heights
|
||||
(sort-by (comp - second))
|
||||
(some (fn [[category height]]
|
||||
(and
|
||||
(>= scroll-height (+ height first-channel-height))
|
||||
category)))))
|
||||
|
||||
(defn community-card-page-view
|
||||
[{:keys [name images id]}]
|
||||
(let [categories-heights (reagent/atom {})
|
||||
(let [categories-heights (reagent/atom [])
|
||||
first-channel-height (reagent/atom 0)
|
||||
scroll-height (reagent/atom 0)
|
||||
cover {:uri (get-in images [:banner :uri])}
|
||||
@@ -337,21 +316,14 @@
|
||||
|
||||
[sticky-category-header
|
||||
{:enabled (> @scroll-height @first-channel-height)
|
||||
:label (pick-first-category-by-height
|
||||
@scroll-height
|
||||
@first-channel-height
|
||||
@categories-heights)}]
|
||||
|
||||
:label (last (filter (fn [{:keys [height]}]
|
||||
(>= @scroll-height (+ height @first-channel-height)))
|
||||
@categories-heights))}]
|
||||
[community-content
|
||||
community
|
||||
pending?
|
||||
{:on-category-layout (partial add-category-height categories-heights)
|
||||
:on-first-channel-height-changed
|
||||
;; Here we set the height of the component
|
||||
;; and we filter out the categories, as some might have been removed
|
||||
(fn [height categories]
|
||||
(swap! categories-heights select-keys categories)
|
||||
(reset! first-channel-height height))}]])))
|
||||
{:on-categories-heights-changed #(reset! categories-heights %)
|
||||
:on-first-channel-height-changed #(reset! first-channel-height %)}]])))
|
||||
|
||||
(defn overview
|
||||
[]
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
(ns status-im2.contexts.onboarding.common.background.view
|
||||
(ns status-im2.contexts.onboarding.common.background
|
||||
(:require [react-native.core :as rn]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[status-im2.common.resources :as resources]
|
||||
[react-native.linear-gradient :as linear-gradient]
|
||||
[status-im2.contexts.onboarding.common.background.style :as style]))
|
||||
[status-im2.contexts.onboarding.common.style :as style]))
|
||||
|
||||
(defn view
|
||||
[dark-overlay?]
|
||||
[rn/view
|
||||
{:style style/background-container}
|
||||
;; Todo - add carousel component as background once ready
|
||||
;; https://github.com/status-im/status-mobile/issues/15012
|
||||
[rn/image
|
||||
{:blur-radius (if dark-overlay? 13 0)
|
||||
:style {:flex 1}
|
||||
;; Todo - get background image from sub using carousel index on landing page
|
||||
:source (resources/get-image :onboarding-bg-1)}]
|
||||
[linear-gradient/linear-gradient
|
||||
{:colors [(if dark-overlay? (colors/custom-color :yin 50) "#000716")
|
||||
@@ -51,38 +51,41 @@
|
||||
|
||||
(defn view
|
||||
[]
|
||||
(reagent/with-let [carousel-index (reagent/atom 0)
|
||||
interval-id (js/setInterval #(swap! carousel-index set-index)
|
||||
1500)]
|
||||
[rn/view {:style style/page-container}
|
||||
[carousel @carousel-index]
|
||||
[rn/image
|
||||
{:style style/page-image
|
||||
:source (get-in carousels [@carousel-index :image])}]
|
||||
[quo/drawer-buttons
|
||||
{:top-card {:on-press (fn []
|
||||
(rf/dispatch [:navigate-to :new-to-status])
|
||||
(rf/dispatch [:hide-terms-of-services-opt-in-screen]))
|
||||
:heading (i18n/label :t/sign-in)
|
||||
:accessibility-label :already-use-status-button}
|
||||
:bottom-card {:on-press (fn []
|
||||
(rf/dispatch [:navigate-to :new-to-status])
|
||||
(rf/dispatch [:hide-terms-of-services-opt-in-screen]))
|
||||
:heading (i18n/label :t/new-to-status)
|
||||
:accessibility-label :new-to-status-button}}
|
||||
(i18n/label :t/you-already-use-status)
|
||||
(reagent/with-let
|
||||
[carousel-index (reagent/atom 0)
|
||||
interval-id
|
||||
(js/setInterval
|
||||
#(swap! carousel-index set-index)
|
||||
1500)]
|
||||
[rn/view {:style style/page-container}
|
||||
[carousel @carousel-index]
|
||||
[rn/image
|
||||
{:style style/page-image
|
||||
:source (get-in carousels [@carousel-index :image])}]
|
||||
[quo/drawer-buttons
|
||||
{:top-card {:on-press (fn []
|
||||
(rf/dispatch [:navigate-to :new-to-status])
|
||||
(rf/dispatch [:hide-terms-of-services-opt-in-screen]))
|
||||
:heading (i18n/label :t/sign-in)
|
||||
:accessibility-label :already-use-status-button}
|
||||
:bottom-card {:on-press (fn []
|
||||
(rf/dispatch [:navigate-to :new-to-status])
|
||||
(rf/dispatch [:hide-terms-of-services-opt-in-screen]))
|
||||
:heading (i18n/label :t/new-to-status)
|
||||
:accessibility-label :new-to-status-button}}
|
||||
(i18n/label :t/you-already-use-status)
|
||||
[quo/text
|
||||
{:style style/text-container}
|
||||
[quo/text
|
||||
{:style style/text-container}
|
||||
[quo/text
|
||||
{:size :paragraph-2
|
||||
:style style/plain-text
|
||||
:weight :semi-bold}
|
||||
(i18n/label :t/by-continuing-you-accept)]
|
||||
[quo/text
|
||||
{:on-press #(rf/dispatch [:open-modal :privacy-policy])
|
||||
:size :paragraph-2
|
||||
:style style/highlighted-text
|
||||
:weight :semi-bold}
|
||||
(i18n/label :t/terms-of-service)]]]]
|
||||
(finally
|
||||
(js/clearInterval interval-id))))
|
||||
{:size :paragraph-2
|
||||
:style style/plain-text
|
||||
:weight :semi-bold}
|
||||
(i18n/label :t/by-continuing-you-accept)]
|
||||
[quo/text
|
||||
{:on-press #(rf/dispatch [:open-modal :privacy-policy])
|
||||
:size :paragraph-2
|
||||
:style style/highlighted-text
|
||||
:weight :semi-bold}
|
||||
(i18n/label :t/terms-of-service)]]]]
|
||||
(finally
|
||||
(js/clearInterval interval-id))))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(ns status-im2.contexts.onboarding.common.background.style
|
||||
(ns status-im2.contexts.onboarding.common.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
|
||||
(def background-container
|
||||
@@ -1,14 +0,0 @@
|
||||
(ns status-im2.contexts.onboarding.create-password.style
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[react-native.platform :as platform]))
|
||||
|
||||
(def navigation-bar {:height 56})
|
||||
|
||||
(def page-container
|
||||
{:padding-top (if platform/ios? 44 0)
|
||||
:position :absolute
|
||||
:top 0
|
||||
:bottom 0
|
||||
:left 0
|
||||
:right 0
|
||||
:background-color colors/neutral-80-opa-80-blur})
|
||||
@@ -1,42 +0,0 @@
|
||||
(ns status-im2.contexts.onboarding.create-password.view
|
||||
(:require [quo2.core :as quo]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[status-im2.contexts.onboarding.create-password.style :as style]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im2.contexts.onboarding.common.background.view :as background]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn navigation-bar
|
||||
[]
|
||||
[rn/view {:style style/navigation-bar}
|
||||
[quo/page-nav
|
||||
{:align-mid? true
|
||||
:mid-section {:type :text-only :main-text ""}
|
||||
:left-section {:type :blur-bg
|
||||
:icon :i/arrow-left
|
||||
:icon-override-theme :dark
|
||||
:on-press #(rf/dispatch [:navigate-back])}
|
||||
:right-section-buttons [{:type :blur-bg
|
||||
:icon :i/info
|
||||
:icon-override-theme :dark
|
||||
:on-press #(js/alert "Pending")}]}]])
|
||||
|
||||
(defn page
|
||||
[]
|
||||
[rn/view {:style style/page-container}
|
||||
[navigation-bar]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[quo/text
|
||||
{:size :heading-1
|
||||
:weight :semi-bold
|
||||
:style {:color colors/white}} "Create profile password"]
|
||||
[quo/button
|
||||
{:on-press #(rf/dispatch [:navigate-to :enable-biometrics])
|
||||
:style {}} (i18n/label :t/continue)]]])
|
||||
|
||||
(defn create-password
|
||||
[]
|
||||
[rn/view {:style {:flex 1}}
|
||||
[background/view true]
|
||||
[page]])
|
||||
@@ -1,15 +0,0 @@
|
||||
(ns status-im2.contexts.onboarding.create-profile.style
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[react-native.platform :as platform]))
|
||||
|
||||
(def page-container
|
||||
{:padding-top (if platform/ios? 44 0)
|
||||
:position :absolute
|
||||
:top 0
|
||||
:bottom 0
|
||||
:left 0
|
||||
:right 0
|
||||
:background-color colors/neutral-80-opa-80-blur})
|
||||
|
||||
(def navigation-bar {:height 56})
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
(ns status-im2.contexts.onboarding.create-profile.view
|
||||
(:require [quo2.core :as quo]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[status-im2.contexts.onboarding.create-profile.style :as style]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im2.contexts.onboarding.common.background.view :as background]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn navigation-bar
|
||||
[]
|
||||
[rn/view {:style style/navigation-bar}
|
||||
[quo/page-nav
|
||||
{:align-mid? true
|
||||
:mid-section {:type :text-only :main-text ""}
|
||||
:left-section {:type :blur-bg
|
||||
:icon :i/arrow-left
|
||||
:icon-override-theme :dark
|
||||
:on-press #(rf/dispatch [:navigate-back])}}]])
|
||||
|
||||
(defn page
|
||||
[]
|
||||
[rn/view {:style style/page-container}
|
||||
[navigation-bar]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[quo/text
|
||||
{:size :heading-1
|
||||
:weight :semi-bold
|
||||
:style {:color colors/white}} "Create Profile"]
|
||||
[quo/button
|
||||
{:on-press #(rf/dispatch [:navigate-to :create-profile-password])
|
||||
:style {}} (i18n/label :t/continue)]]])
|
||||
|
||||
(defn create-profile
|
||||
[]
|
||||
[rn/view {:style {:flex 1}}
|
||||
[background/view true]
|
||||
[page]])
|
||||
@@ -1,14 +0,0 @@
|
||||
(ns status-im2.contexts.onboarding.enable-biometrics.style
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[react-native.platform :as platform]))
|
||||
|
||||
(def page-container
|
||||
{:padding-top (if platform/ios? 44 0)
|
||||
:position :absolute
|
||||
:top 0
|
||||
:bottom 0
|
||||
:left 0
|
||||
:right 0
|
||||
:background-color colors/neutral-80-opa-80-blur})
|
||||
|
||||
(def navigation-bar {:height 56})
|
||||
@@ -1,37 +0,0 @@
|
||||
(ns status-im2.contexts.onboarding.enable-biometrics.view
|
||||
(:require [quo2.core :as quo]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[status-im2.contexts.onboarding.enable-biometrics.style :as style]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im2.contexts.onboarding.common.background.view :as background]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn navigation-bar
|
||||
[]
|
||||
[rn/view {:style style/navigation-bar}
|
||||
[quo/page-nav
|
||||
{:align-mid? true
|
||||
:mid-section {:type :text-only :main-text ""}
|
||||
}]])
|
||||
|
||||
(defn page
|
||||
[]
|
||||
[rn/view {:style style/page-container}
|
||||
[navigation-bar]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[quo/text
|
||||
{:size :heading-1
|
||||
:weight :semi-bold
|
||||
:style {:color colors/white}} "Enable-biometrics"]
|
||||
[quo/button
|
||||
{:on-press #(rf/dispatch [:navigate-to :enable-notifications])
|
||||
:type :grey
|
||||
:override-theme :dark
|
||||
:style {}} (i18n/label :t/continue)]]])
|
||||
|
||||
(defn enable-biometrics
|
||||
[]
|
||||
[rn/view {:style {:flex 1}}
|
||||
[background/view true]
|
||||
[page]])
|
||||
@@ -1,14 +0,0 @@
|
||||
(ns status-im2.contexts.onboarding.enable-notifications.style
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[react-native.platform :as platform]))
|
||||
|
||||
(def page-container
|
||||
{:padding-top (if platform/ios? 44 0)
|
||||
:position :absolute
|
||||
:top 0
|
||||
:bottom 0
|
||||
:left 0
|
||||
:right 0
|
||||
:background-color colors/neutral-80-opa-80-blur})
|
||||
|
||||
(def navigation-bar {:height 56})
|
||||
@@ -1,37 +0,0 @@
|
||||
(ns status-im2.contexts.onboarding.enable-notifications.view
|
||||
(:require [quo2.core :as quo]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[status-im2.contexts.onboarding.enable-notifications.style :as style]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im2.contexts.onboarding.common.background.view :as background]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn navigation-bar
|
||||
[]
|
||||
[rn/view {:style style/navigation-bar}
|
||||
[quo/page-nav
|
||||
{:align-mid? true
|
||||
:mid-section {:type :text-only :main-text ""}
|
||||
}]])
|
||||
|
||||
(defn page
|
||||
[]
|
||||
[rn/view {:style style/page-container}
|
||||
[navigation-bar]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[quo/text
|
||||
{:size :heading-1
|
||||
:weight :semi-bold
|
||||
:style {:color colors/white}} "Enable-notifications"]
|
||||
[quo/button
|
||||
{:on-press #(rf/dispatch [:navigate-to :shell-stack])
|
||||
:type :grey
|
||||
:override-theme :dark
|
||||
:style {}} (i18n/label :t/continue)]]])
|
||||
|
||||
(defn enable-notifications
|
||||
[]
|
||||
[rn/view {:style {:flex 1}}
|
||||
[background/view true]
|
||||
[page]])
|
||||
@@ -49,7 +49,7 @@
|
||||
(* 2 56) ;; two other list items
|
||||
(* 2 16) ;; spacing between items
|
||||
220) ;; extra spacing (top bar)
|
||||
:on-press #(rf/dispatch [:navigate-to :create-profile])}]
|
||||
:on-press #(rf/dispatch [:generate-and-derive-addresses])}]
|
||||
|
||||
[rn/view {:style style/subtitle-container}
|
||||
[quo/text
|
||||
@@ -59,14 +59,6 @@
|
||||
(i18n/label :t/experienced-web3)]]
|
||||
|
||||
[rn/view {:style style/suboptions}
|
||||
[quo/small-option-card
|
||||
{:variant :icon
|
||||
:title "Temporary (old) generate keys flow"
|
||||
:subtitle "generate keys"
|
||||
:image (resources/get-image :use-keycard)
|
||||
:accessibility-label :generate-old-key
|
||||
:on-press #(rf/dispatch [:generate-and-derive-addresses])}]
|
||||
[rn/view {:style style/space-between-suboptions}]
|
||||
[quo/small-option-card
|
||||
{:variant :icon
|
||||
:title (i18n/label :t/use-recovery-phrase)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
(ns status-im2.contexts.onboarding.profiles.view
|
||||
(:require [status-im2.contexts.onboarding.common.background.view :as background]))
|
||||
(:require [status-im2.contexts.onboarding.common.background :as background]))
|
||||
|
||||
(defn views
|
||||
[]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
(ns status-im2.contexts.quo-preview.inputs.input
|
||||
(:require [clojure.string :as string]
|
||||
[quo2.core :as quo]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[status-im2.contexts.quo-preview.preview :as preview]))
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[quo2.core :as quo]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[status-im2.contexts.quo-preview.preview :as preview]))
|
||||
|
||||
(def descriptor
|
||||
[{:label "Type:"
|
||||
@@ -14,30 +15,31 @@
|
||||
:value "Text"}
|
||||
{:key :password
|
||||
:value "Password"}]}
|
||||
{:label "Blur:"
|
||||
:key :blur?
|
||||
:type :boolean}
|
||||
{:label "Override Theme:"
|
||||
:key :override-theme
|
||||
{:label "Variant:"
|
||||
:key :variant
|
||||
:type :select
|
||||
:options [{:key :dark
|
||||
:options [{:key :light
|
||||
:value "Light"}
|
||||
{:key :dark
|
||||
:value "Dark"}
|
||||
{:key :light
|
||||
:value "Light"}]}
|
||||
{:key :light-blur
|
||||
:value "Light blur"}
|
||||
{:key :dark-blur
|
||||
:value "Dark blur"}]}
|
||||
{:label "Error:"
|
||||
:key :error?
|
||||
:key :error
|
||||
:type :boolean}
|
||||
{:label "Icon:"
|
||||
:key :icon-name
|
||||
:type :boolean}
|
||||
{:label "Disabled:"
|
||||
:key :disabled?
|
||||
:key :disabled
|
||||
:type :boolean}
|
||||
{:label "Clearable:"
|
||||
:key :clearable?
|
||||
:key :clearable
|
||||
:type :boolean}
|
||||
{:label "Small:"
|
||||
:key :small?
|
||||
:key :small
|
||||
:type :boolean}
|
||||
{:label "Multiline:"
|
||||
:key :multiline
|
||||
@@ -64,8 +66,7 @@
|
||||
(defn cool-preview
|
||||
[]
|
||||
(let [state (reagent/atom {:type :text
|
||||
:blur false
|
||||
:override-theme nil
|
||||
:variant :light-blur
|
||||
:placeholder "Type something"
|
||||
:error false
|
||||
:icon-name false
|
||||
@@ -74,24 +75,29 @@
|
||||
:on-char-limit-reach #(js/alert
|
||||
(str "Char limit reached: " %))})]
|
||||
(fn []
|
||||
(let [blank-label? (string/blank? (:label @state))
|
||||
icon? (boolean (:icon-name @state))
|
||||
button-props {:on-press #(js/alert "Button pressed!")
|
||||
:text "My button"}]
|
||||
(let [background-color (case (:variant @state)
|
||||
:dark-blur "rgb(39, 61, 81)"
|
||||
:dark colors/neutral-95
|
||||
:light-blur "rgb(233,247,247)"
|
||||
:white)
|
||||
blank-label? (string/blank? (:label @state))
|
||||
icon? (boolean (:icon-name @state))
|
||||
button-props {:on-press #(js/alert "Button pressed!")
|
||||
:text "My button"}]
|
||||
[rn/touchable-without-feedback {:on-press rn/dismiss-keyboard!}
|
||||
[rn/view {:style {:padding-bottom 150}}
|
||||
[rn/view {:style {:flex 1}}
|
||||
[preview/customizer state descriptor]]
|
||||
[preview/blur-view
|
||||
{:style {:flex 1
|
||||
:align-items :center
|
||||
:margin-vertical 20}
|
||||
:show-blur-background? (:blur? @state)}
|
||||
[rn/view
|
||||
{:style {:flex 1
|
||||
:align-items :center
|
||||
:padding-vertical 60
|
||||
:background-color background-color}}
|
||||
[rn/view {:style {:width 300}}
|
||||
[quo/input
|
||||
(cond-> @state
|
||||
:always (assoc
|
||||
:on-clear? #(swap! state assoc :value "")
|
||||
:on-clear #(swap! state assoc :value "")
|
||||
:on-change-text #(swap! state assoc :value %))
|
||||
(:button @state) (assoc :button button-props)
|
||||
blank-label? (dissoc :label)
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
[status-im2.contexts.communities.discover.view :as communities.discover]
|
||||
[status-im2.contexts.communities.overview.view :as communities.overview]
|
||||
[status-im2.contexts.onboarding.common.intro.view :as intro]
|
||||
[status-im2.contexts.onboarding.create-password.view :as create-password]
|
||||
[status-im2.contexts.onboarding.create-profile.view :as create-profile]
|
||||
[status-im2.contexts.onboarding.enable-biometrics.view :as enable-biometrics]
|
||||
[status-im2.contexts.onboarding.enable-notifications.view :as enable-notifications]
|
||||
[status-im2.contexts.onboarding.new-to-status.view :as new-to-status]
|
||||
[status-im2.contexts.onboarding.profiles.view :as profiles]
|
||||
[status-im2.contexts.quo-preview.main :as quo.preview]
|
||||
@@ -28,133 +24,106 @@
|
||||
|
||||
(def transparent-screen-options
|
||||
(merge
|
||||
{:topBar {:visible false}
|
||||
:modalPresentationStyle :overCurrentContext
|
||||
:layout {:componentBackgroundColor :transparent
|
||||
:orientation :portrait
|
||||
:backgroundColor :transparent}}
|
||||
(if platform/android?
|
||||
{:navigationBar {:backgroundColor colors/neutral-100}
|
||||
:statusBar {:backgroundColor :transparent
|
||||
:style :light
|
||||
:drawBehind true}}
|
||||
{:statusBar {:style :light}})))
|
||||
{:topBar {:visible false}
|
||||
:modalPresentationStyle :overCurrentContext
|
||||
:layout {:componentBackgroundColor :transparent
|
||||
:orientation :portrait
|
||||
:backgroundColor :transparent}}
|
||||
(if platform/android?
|
||||
{:navigationBar {:backgroundColor colors/neutral-100}
|
||||
:statusBar {:backgroundColor :transparent
|
||||
:style :light
|
||||
:drawBehind true}}
|
||||
{:statusBar {:style :light}})))
|
||||
|
||||
(defn screens
|
||||
[]
|
||||
(concat
|
||||
(old-screens/screens)
|
||||
[{:name :intro
|
||||
:options {:topBar {:visible false}}
|
||||
:insets {:top false}
|
||||
:component intro/view}
|
||||
(old-screens/screens)
|
||||
[{:name :intro
|
||||
:options {:topBar {:visible false}}
|
||||
:insets {:top false}
|
||||
:component intro/view}
|
||||
|
||||
{:name :activity-center
|
||||
:insets {:top false}
|
||||
:options transparent-screen-options
|
||||
:component activity-center/view}
|
||||
{:name :activity-center
|
||||
:insets {:top false}
|
||||
:options transparent-screen-options
|
||||
:component activity-center/view}
|
||||
|
||||
{:name :shell-stack
|
||||
:insets {:top false}
|
||||
:component shell/shell-stack}
|
||||
{:name :shell-stack
|
||||
:insets {:top false}
|
||||
:component shell/shell-stack}
|
||||
|
||||
{:name :chat
|
||||
:options {:topBar {:visible false}}
|
||||
:component chat/chat}
|
||||
{:name :chat
|
||||
:options {:topBar {:visible false}}
|
||||
:component chat/chat}
|
||||
|
||||
{:name :lightbox
|
||||
:insets {:top false :bottom false}
|
||||
:options {
|
||||
:topBar {:visible false}
|
||||
:statusBar {:backgroundColor :transparent
|
||||
:style :light
|
||||
:animate true
|
||||
:drawBehind true
|
||||
:translucent true}
|
||||
:navigationBar {:backgroundColor colors/black}
|
||||
:layout {:componentBackgroundColor :transparent
|
||||
:backgroundColor :transparent}
|
||||
:animations {:push {:sharedElementTransitions [{:fromId :shared-element
|
||||
:toId :shared-element
|
||||
:interpolation {:type
|
||||
:decelerate
|
||||
:factor 1.5}}]}
|
||||
:pop {:sharedElementTransitions [{:fromId :shared-element
|
||||
:toId :shared-element
|
||||
:interpolation {:type
|
||||
:decelerate
|
||||
:factor 1.5}}]}
|
||||
}}
|
||||
:component lightbox/lightbox}
|
||||
{:name :photo-selector
|
||||
:options {:topBar {:visible false}}
|
||||
:component photo-selector/photo-selector}
|
||||
{:name :lightbox
|
||||
:insets {:top false :bottom false}
|
||||
:options {:topBar {:visible false}
|
||||
:statusBar {:backgroundColor :transparent
|
||||
:style :light
|
||||
:animate true
|
||||
:drawBehind true
|
||||
:translucent true}
|
||||
:navigationBar {:backgroundColor colors/black}
|
||||
:layout {:componentBackgroundColor :transparent
|
||||
:backgroundColor :transparent}
|
||||
:animations {:push {:sharedElementTransitions [{:fromId :shared-element
|
||||
:toId :shared-element
|
||||
:interpolation {:type :decelerate
|
||||
:factor 1.5}}]}
|
||||
:pop {:sharedElementTransitions [{:fromId :shared-element
|
||||
:toId :shared-element
|
||||
:interpolation {:type
|
||||
:decelerate
|
||||
:factor 1.5}}]}}}
|
||||
:component lightbox/lightbox}
|
||||
{:name :photo-selector
|
||||
:insets {:top false}
|
||||
:options {:topBar {:visible false}
|
||||
:layout {:componentBackgroundColor :transparent
|
||||
:backgroundColor :transparent}
|
||||
:modalPresentationStyle :overCurrentContext}
|
||||
:component photo-selector/photo-selector}
|
||||
|
||||
{:name :album-selector
|
||||
:options {:topBar {:visible false}
|
||||
:modalPresentationStyle (if platform/ios? :overCurrentContext :none)}
|
||||
:component album-selector/album-selector}
|
||||
{:name :album-selector
|
||||
:options {:topBar {:visible false}
|
||||
:modalPresentationStyle (if platform/ios? :overCurrentContext :none)}
|
||||
:component album-selector/album-selector}
|
||||
|
||||
{:name :new-contact
|
||||
:options {:topBar {:visible false}}
|
||||
:component add-new-contact/new-contact}
|
||||
{:name :new-contact
|
||||
:options {:topBar {:visible false}}
|
||||
:component add-new-contact/new-contact}
|
||||
|
||||
{:name :discover-communities
|
||||
:options {:topBar {:visible false}}
|
||||
:component communities.discover/discover}
|
||||
{:name :discover-communities
|
||||
:options {:topBar {:visible false}}
|
||||
:component communities.discover/discover}
|
||||
|
||||
{:name :community-overview
|
||||
:options {:topBar {:visible false}}
|
||||
:component communities.overview/overview}
|
||||
{:name :community-overview
|
||||
:options {:topBar {:visible false}}
|
||||
:component communities.overview/overview}
|
||||
|
||||
{:name :settings-syncing
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/syncing)}}}
|
||||
:component settings-syncing/views}
|
||||
{:name :settings-syncing
|
||||
:insets {:bottom true}
|
||||
:options {:topBar {:title {:text (i18n/label :t/syncing)}}}
|
||||
:component settings-syncing/views}
|
||||
|
||||
;; Onboarding
|
||||
{:name :profiles
|
||||
:insets {:top false}
|
||||
:component profiles/views}
|
||||
;; Onboarding
|
||||
{:name :profiles
|
||||
:insets {:top false}
|
||||
:component profiles/views}
|
||||
|
||||
;; Onboarding - new to Status
|
||||
{:name :new-to-status
|
||||
:options {:statusBar {:style :light}
|
||||
:topBar {:visible false}
|
||||
:navigationBar {:backgroundColor colors/black}}
|
||||
:insets {:top false}
|
||||
:component new-to-status/new-to-status}
|
||||
;; Onboarding - new to Status
|
||||
{:name :new-to-status
|
||||
:options {:statusBar {:style :light}
|
||||
:topBar {:visible false}
|
||||
:navigationBar {:backgroundColor colors/black}}
|
||||
:insets {:top false}
|
||||
:component new-to-status/new-to-status}]
|
||||
|
||||
{:name :create-profile
|
||||
:options {:statusBar {:style :light}
|
||||
:topBar {:visible false}
|
||||
:navigationBar {:backgroundColor colors/black}}
|
||||
:insets {:top false}
|
||||
:component create-profile/create-profile}
|
||||
(when config/quo-preview-enabled?
|
||||
quo.preview/screens)
|
||||
|
||||
{:name :create-profile-password
|
||||
:options {:statusBar {:style :light}
|
||||
:topBar {:visible false}
|
||||
:navigationBar {:backgroundColor colors/black}}
|
||||
:insets {:top false}
|
||||
:component create-password/create-password}
|
||||
|
||||
{:name :enable-biometrics
|
||||
:options {:statusBar {:style :light}
|
||||
:topBar {:visible false}
|
||||
:navigationBar {:backgroundColor colors/black}}
|
||||
:insets {:top false}
|
||||
:component enable-biometrics/enable-biometrics}
|
||||
|
||||
{:name :enable-notifications
|
||||
:options {:statusBar {:style :light}
|
||||
:topBar {:visible false}
|
||||
:navigationBar {:backgroundColor colors/black}}
|
||||
:insets {:top false}
|
||||
:component enable-notifications/enable-notifications}]
|
||||
|
||||
(when config/quo-preview-enabled?
|
||||
quo.preview/screens)
|
||||
|
||||
(when config/quo-preview-enabled?
|
||||
quo.preview/main-screens)))
|
||||
(when config/quo-preview-enabled?
|
||||
quo.preview/main-screens)))
|
||||
|
||||
@@ -6,6 +6,15 @@
|
||||
[status-im2.constants :as constants]
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:communities
|
||||
:<- [:raw-communities]
|
||||
:<- [:communities/enabled?]
|
||||
(fn [[raw-communities communities-enabled?]]
|
||||
(if communities-enabled?
|
||||
raw-communities
|
||||
[])))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:communities/fetching-community
|
||||
:<- [:communities/resolve-community-info]
|
||||
@@ -72,13 +81,16 @@
|
||||
|
||||
(re-frame/reg-sub
|
||||
:communities/featured-communities
|
||||
:<- [:communities/enabled?]
|
||||
:<- [:search/home-filter]
|
||||
:<- [:communities]
|
||||
(fn [[search-filter communities]]
|
||||
(fn [[communities-enabled? search-filter communities]]
|
||||
(filterv
|
||||
(fn [{:keys [name]}]
|
||||
(or (empty? search-filter)
|
||||
(string/includes? (string/lower-case (str name)) search-filter)))
|
||||
(fn [{:keys [name id]}]
|
||||
(and (or communities-enabled?
|
||||
(= id constants/status-community-id))
|
||||
(or (empty? search-filter)
|
||||
(string/includes? (string/lower-case (str name)) search-filter))))
|
||||
(vals communities))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
@@ -89,13 +101,17 @@
|
||||
|
||||
(re-frame/reg-sub
|
||||
:communities/communities
|
||||
:<- [:communities/enabled?]
|
||||
:<- [:search/home-filter]
|
||||
:<- [:communities]
|
||||
(fn [[search-filter communities]]
|
||||
(fn [[communities-enabled? search-filter communities]]
|
||||
(filterv
|
||||
(fn [{:keys [name]}]
|
||||
(or (empty? search-filter)
|
||||
(string/includes? (string/lower-case (str name)) search-filter)))
|
||||
(fn [{:keys [name id]}]
|
||||
(and
|
||||
(or communities-enabled?
|
||||
(= id constants/status-community-id))
|
||||
(or (empty? search-filter)
|
||||
(string/includes? (string/lower-case (str name)) search-filter))))
|
||||
(vals communities))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
@@ -135,7 +151,7 @@
|
||||
(re-frame/reg-sub
|
||||
:communities/home-item
|
||||
(fn [[_ community-id]]
|
||||
[(re-frame/subscribe [:communities])
|
||||
[(re-frame/subscribe [:raw-communities])
|
||||
(re-frame/subscribe [:communities/unviewed-counts community-id])])
|
||||
(fn [[communities counts] [_ identity]]
|
||||
(community->home-item
|
||||
@@ -214,62 +230,31 @@
|
||||
(sort-by :position)
|
||||
(into []))))
|
||||
|
||||
(defn reduce-over-categories
|
||||
[community-id
|
||||
joined
|
||||
categories
|
||||
collapsed-categories
|
||||
full-chats-data]
|
||||
(fn [acc
|
||||
[_ {:keys [name categoryID position id emoji can-post?]}]]
|
||||
(let [category-id (if (seq categoryID) categoryID constants/empty-category-id)
|
||||
{:keys [unviewed-messages-count
|
||||
unviewed-mentions-count]} (get full-chats-data
|
||||
(str community-id id))
|
||||
acc-with-category (if (get acc category-id)
|
||||
acc
|
||||
(assoc acc
|
||||
category-id
|
||||
(assoc
|
||||
(or (get categories category-id)
|
||||
{:name (i18n/label :t/none)})
|
||||
:collapsed? (get collapsed-categories
|
||||
category-id)
|
||||
:chats [])))
|
||||
chat {:name name
|
||||
:emoji emoji
|
||||
:unread-messages? (pos? unviewed-messages-count)
|
||||
:position position
|
||||
:mentions-count (or unviewed-mentions-count 0)
|
||||
:locked? (or (not joined)
|
||||
(not can-post?))
|
||||
:id id}]
|
||||
(update-in acc-with-category [category-id :chats] conj chat))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:communities/categorized-channels
|
||||
(fn [[_ community-id]]
|
||||
[(re-frame/subscribe [:communities/community community-id])
|
||||
(re-frame/subscribe [:chats/chats])
|
||||
(re-frame/subscribe [:communities/collapsed-categories-for-community community-id])])
|
||||
(fn [[{:keys [joined categories chats]} full-chats-data collapsed-categories] [_ community-id]]
|
||||
(let [reduce-fn (reduce-over-categories
|
||||
community-id
|
||||
joined
|
||||
categories
|
||||
collapsed-categories
|
||||
full-chats-data)
|
||||
categories-and-chats
|
||||
(->>
|
||||
chats
|
||||
(reduce
|
||||
reduce-fn
|
||||
{})
|
||||
(sort-by (comp :position second))
|
||||
(map (fn [[k v]]
|
||||
[k (update v :chats #(sort-by :position %))])))]
|
||||
|
||||
categories-and-chats)))
|
||||
(re-frame/subscribe [:chats/chats])])
|
||||
(fn [[{:keys [joined categories chats]} full-chats-data] [_ community-id]]
|
||||
(reduce
|
||||
(fn [acc [_ {:keys [name categoryID id emoji can-post?]}]]
|
||||
(let [category (keyword
|
||||
(get-in categories
|
||||
[categoryID :name]
|
||||
(i18n/label :t/none)))
|
||||
{:keys [unviewed-messages-count unviewed-mentions-count]} (get full-chats-data
|
||||
(str community-id id))]
|
||||
(update acc
|
||||
category
|
||||
#(vec (conj %1 %2))
|
||||
{:name name
|
||||
:emoji emoji
|
||||
:unread-messages? (pos? unviewed-messages-count)
|
||||
:mentions-count (or unviewed-mentions-count 0)
|
||||
:locked? (or (not joined) (not can-post?))
|
||||
:id id})))
|
||||
{}
|
||||
chats)))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:communities/users
|
||||
@@ -279,9 +264,3 @@
|
||||
{:full-name "Marcus C"}
|
||||
{:full-name "MNO PQR"}
|
||||
{:full-name "STU VWX"}]))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:communities/collapsed-categories-for-community
|
||||
:<- [:communities/collapsed-categories]
|
||||
(fn [collapsed-categories [_ community-id]]
|
||||
(get collapsed-categories community-id)))
|
||||
|
||||
@@ -3,22 +3,25 @@
|
||||
[re-frame.db :as rf-db]
|
||||
[test-helpers.unit :as h]
|
||||
status-im2.subs.communities
|
||||
[status-im2.constants :as constants]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
(use-fixtures :each
|
||||
{:before #(reset! rf-db/app-db {})})
|
||||
{:before #(reset! rf-db/app-db {:communities/enabled? true})})
|
||||
|
||||
(def community-id "0x1")
|
||||
|
||||
(h/deftest-sub :communities
|
||||
[sub-name]
|
||||
(testing "returns raw communities"
|
||||
(testing "returns empty vector if flag is disabled"
|
||||
(swap! rf-db/app-db assoc :communities/enabled? false)
|
||||
(is (= [] (rf/sub [sub-name]))))
|
||||
|
||||
(testing "returns raw communities if flag is enabled"
|
||||
(let [raw-communities {"0x1" {:id "0x1"}}]
|
||||
(swap! rf-db/app-db assoc
|
||||
:communities
|
||||
raw-communities)
|
||||
:communities/enabled? true
|
||||
:communities raw-communities)
|
||||
(is (= raw-communities (rf/sub [sub-name]))))))
|
||||
|
||||
(h/deftest-sub :communities/section-list
|
||||
@@ -82,12 +85,13 @@
|
||||
[sub-name]
|
||||
(testing "Empty communities list"
|
||||
(swap! rf-db/app-db assoc
|
||||
:communities
|
||||
{})
|
||||
:communities/enabled? true
|
||||
:communities {})
|
||||
(is (= []
|
||||
(rf/sub [sub-name]))))
|
||||
(testing "communities sorted by name"
|
||||
(swap! rf-db/app-db assoc
|
||||
:communities/enabled? true
|
||||
:communities
|
||||
{"0x1" {:id "0x1" :name "Civilized monkeys"}
|
||||
"0x2" {:id "0x2" :name "Civilized rats"}
|
||||
@@ -101,127 +105,56 @@
|
||||
[sub-name]
|
||||
(testing "Channels with categories"
|
||||
(swap! rf-db/app-db assoc
|
||||
:communities/enabled? true
|
||||
:communities
|
||||
{"0x1" {:id "0x1"
|
||||
:chats {"0x1" {:id "0x1" :position 1 :name "chat1" :categoryID "1" :can-post? true}
|
||||
"0x2" {:id "0x2" :position 2 :name "chat2" :categoryID "1" :can-post? false}
|
||||
"0x3" {:id "0x3" :position 3 :name "chat3" :categoryID "2" :can-post? true}}
|
||||
:categories {"1" {:id "1"
|
||||
:position 2
|
||||
:name "category1"}
|
||||
"2" {:id "2"
|
||||
:position 1
|
||||
:name "category2"}}
|
||||
:chats {"0x1" {:id "0x1" :name "chat1" :categoryID 1 :can-post? true}
|
||||
"0x2" {:id "0x2" :name "chat2" :categoryID 1 :can-post? false}
|
||||
"0x3" {:id "0x3" :name "chat3" :categoryID 2 :can-post? true}}
|
||||
:categories {1 {:id 1 :name "category1"}
|
||||
2 {:id 2 :name "category2"}}
|
||||
:joined true}})
|
||||
(is
|
||||
(= [["2"
|
||||
{:id "2"
|
||||
:name "category2"
|
||||
:collapsed? nil
|
||||
:position 1
|
||||
:chats [{:name "chat3"
|
||||
:position 3
|
||||
:emoji nil
|
||||
:locked? false
|
||||
:id "0x3"
|
||||
:unread-messages? false
|
||||
:mentions-count 0}]}]
|
||||
["1"
|
||||
{:id "1"
|
||||
:name "category1"
|
||||
:collapsed? nil
|
||||
:position 2
|
||||
:chats [{:name "chat1"
|
||||
:emoji nil
|
||||
:position 1
|
||||
:locked? false
|
||||
:id "0x1"
|
||||
:unread-messages? false
|
||||
:mentions-count 0}
|
||||
{:name "chat2"
|
||||
:emoji nil
|
||||
:position 2
|
||||
:locked? true
|
||||
:id "0x2"
|
||||
:unread-messages? false
|
||||
:mentions-count 0}]}]]
|
||||
(= {:category1
|
||||
[{:name "chat1" :emoji nil :locked? false :id "0x1" :unread-messages? false :mentions-count 0}
|
||||
{:name "chat2" :emoji nil :locked? true :id "0x2" :unread-messages? false :mentions-count 0}]
|
||||
:category2
|
||||
[{:name "chat3" :emoji nil :locked? false :id "0x3" :unread-messages? false :mentions-count 0}]}
|
||||
(rf/sub [sub-name "0x1"]))))
|
||||
(testing "Channels without categories"
|
||||
(swap! rf-db/app-db assoc
|
||||
:communities/enabled? true
|
||||
:communities
|
||||
{"0x1" {:id "0x1"
|
||||
:chats {"0x1" {:id "0x1" :position 1 :name "chat1" :categoryID "1" :can-post? true}
|
||||
"0x2" {:id "0x2" :position 2 :name "chat2" :categoryID "1" :can-post? false}
|
||||
"0x3" {:id "0x3" :position 3 :name "chat3" :can-post? true}}
|
||||
:categories {"1" {:id "1"
|
||||
:position 1
|
||||
:name "category1"}
|
||||
"2" {:id "2"
|
||||
:position 2
|
||||
:name "category2"}}
|
||||
:chats {"0x1" {:id "0x1" :name "chat1" :categoryID 1 :can-post? true}
|
||||
"0x2" {:id "0x2" :name "chat2" :categoryID 1 :can-post? false}
|
||||
"0x3" {:id "0x3" :name "chat3" :can-post? true}}
|
||||
:categories {1 {:id 1 :name "category1"}
|
||||
2 {:id 2 :name "category2"}}
|
||||
:joined true}})
|
||||
(is
|
||||
(=
|
||||
[[constants/empty-category-id
|
||||
{:name (i18n/label :t/none)
|
||||
:collapsed? nil
|
||||
:chats [{:name "chat3"
|
||||
:emoji nil
|
||||
:position 3
|
||||
:locked? false
|
||||
:id "0x3"
|
||||
:unread-messages? false
|
||||
:mentions-count 0}]}]
|
||||
["1"
|
||||
{:name "category1"
|
||||
:id "1"
|
||||
:position 1
|
||||
:collapsed? nil
|
||||
:chats [{:name "chat1"
|
||||
:emoji nil
|
||||
:position 1
|
||||
:locked? false
|
||||
:id "0x1"
|
||||
:unread-messages? false
|
||||
:mentions-count 0}
|
||||
{:name "chat2"
|
||||
:emoji nil
|
||||
:position 2
|
||||
:locked? true
|
||||
:id "0x2"
|
||||
:unread-messages? false
|
||||
:mentions-count 0}]}]]
|
||||
(rf/sub [sub-name "0x1"]))))
|
||||
(= {:category1
|
||||
[{:name "chat1" :emoji nil :locked? false :id "0x1" :unread-messages? false :mentions-count 0}
|
||||
{:name "chat2" :emoji nil :locked? true :id "0x2" :unread-messages? false :mentions-count 0}]
|
||||
(keyword (i18n/label :t/none))
|
||||
[{:name "chat3" :emoji nil :locked? false :id "0x3" :unread-messages? false :mentions-count 0}]}
|
||||
(rf/sub [sub-name "0x1"]))))
|
||||
(testing "Unread messages"
|
||||
(swap! rf-db/app-db assoc
|
||||
:communities/enabled? true
|
||||
:communities
|
||||
{"0x1" {:id "0x1"
|
||||
:chats {"0x1" {:id "0x1" :position 1 :name "chat1" :categoryID "1" :can-post? true}
|
||||
"0x2" {:id "0x2" :position 2 :name "chat2" :categoryID "1" :can-post? false}}
|
||||
:categories {"1" {:id "1" :name "category1"}}
|
||||
:chats {"0x1" {:id "0x1" :name "chat1" :categoryID 1 :can-post? true}
|
||||
"0x2" {:id "0x2" :name "chat2" :categoryID 1 :can-post? false}}
|
||||
:categories {1 {:id 1 :name "category1"}}
|
||||
:joined true}}
|
||||
:chats
|
||||
{"0x10x1" {:unviewed-messages-count 1 :unviewed-mentions-count 2}
|
||||
"0x10x2" {:unviewed-messages-count 0 :unviewed-mentions-count 0}})
|
||||
(is
|
||||
(= [["1"
|
||||
{:name "category1"
|
||||
:id "1"
|
||||
:collapsed? nil
|
||||
:chats [{:name "chat1"
|
||||
:emoji nil
|
||||
:position 1
|
||||
:locked? false
|
||||
:id "0x1"
|
||||
:unread-messages? true
|
||||
:mentions-count 2}
|
||||
{:name "chat2"
|
||||
:emoji nil
|
||||
:position 2
|
||||
:locked? true
|
||||
:id "0x2"
|
||||
:unread-messages? false
|
||||
:mentions-count 0}]}]]
|
||||
(= {:category1
|
||||
[{:name "chat1" :emoji nil :locked? false :id "0x1" :unread-messages? true :mentions-count 2}
|
||||
{:name "chat2" :emoji nil :locked? true :id "0x2" :unread-messages? false :mentions-count 0}]}
|
||||
(rf/sub [sub-name "0x1"])))))
|
||||
|
||||
(h/deftest-sub :communities/my-pending-requests-to-join
|
||||
|
||||
@@ -238,14 +238,14 @@
|
||||
|
||||
;; communities
|
||||
|
||||
(reg-root-key-sub :communities :communities)
|
||||
(reg-root-key-sub :raw-communities :communities)
|
||||
(reg-root-key-sub :communities/create :communities/create)
|
||||
(reg-root-key-sub :communities/create-channel :communities/create-channel)
|
||||
(reg-root-key-sub :communities/requests-to-join :communities/requests-to-join)
|
||||
(reg-root-key-sub :communities/community-id-input :communities/community-id-input)
|
||||
(reg-root-key-sub :communities/enabled? :communities/enabled?)
|
||||
(reg-root-key-sub :communities/resolve-community-info :communities/resolve-community-info)
|
||||
(reg-root-key-sub :communities/my-pending-requests-to-join :communities/my-pending-requests-to-join)
|
||||
(reg-root-key-sub :communities/collapsed-categories :communities/collapsed-categories)
|
||||
|
||||
(reg-root-key-sub :activity-center :activity-center)
|
||||
|
||||
@@ -254,7 +254,6 @@
|
||||
|
||||
(reg-root-key-sub :backup/performing-backup :backup/performing-backup)
|
||||
|
||||
|
||||
;; wallet connect
|
||||
(reg-root-key-sub :wallet-connect/proposal-metadata :wallet-connect/proposal-metadata)
|
||||
(reg-root-key-sub :wallet-connect/enabled? :wallet-connect/enabled?)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "94cd1ec",
|
||||
"commit-sha1": "94cd1ec",
|
||||
"src-sha256": "1inm5x6wwfm2v45aq0jyaq52lw6hpgkyy82h3v1bh2bs7bl1yd26"
|
||||
"version": "v0.138.3",
|
||||
"commit-sha1": "290579f74f10a374ffb8c37abc47dbe2c1e90f5d",
|
||||
"src-sha256": "0vgs3m1fbyri9r1wqxfanzxlx24yzx9zaabflk26qc9d4pclmi7i"
|
||||
}
|
||||
|
||||
@@ -153,27 +153,13 @@ class TestActivityCenterContactRequestMultipleDevicePR(MultipleSharedDeviceTestC
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702851)
|
||||
def test_activity_center_contact_request_accept_swipe_mark_all_as_read(self):
|
||||
def test_activity_center_contact_request_accept(self):
|
||||
self.device_2.just_fyi('Device2 re-sends a contact request to Device1')
|
||||
self.home_2.add_contact(self.public_key_1, remove_from_contacts=True)
|
||||
|
||||
self.device_1.just_fyi('Device1 accepts pending contact request by swiping')
|
||||
self.device_1.just_fyi('Device1 accepts pending contact request and check contact list')
|
||||
self.home_1.chats_tab.click()
|
||||
self.home_1.notifications_unread_badge.wait_for_visibility_of_element(30)
|
||||
self.home_1.open_activity_center_button.click()
|
||||
|
||||
self.home_1.just_fyi("Mark all as read")
|
||||
cr_element = self.home_1.get_element_from_activity_center_view(self.default_username_2)
|
||||
self.home_1.more_options_activity_button.click()
|
||||
self.home_1.mark_all_read_activity_button.click()
|
||||
if cr_element.is_element_displayed():
|
||||
self.errors.append("Contact request is still shown in activity centre after marking all messages as read!")
|
||||
|
||||
self.home_1.just_fyi("Check that can accept contact request from read notifications")
|
||||
self.home_1.activity_unread_filter_button.click()
|
||||
cr_element.swipe_right_on_element()
|
||||
self.home_1.activity_notification_swipe_button.click()
|
||||
self.home_1.close_activity_centre.click()
|
||||
self.home_1.handle_contact_request(username=self.default_username_2)
|
||||
self.home_1.contacts_tab.click()
|
||||
if not self.home_1.contact_details(username=self.default_username_2).is_element_displayed(20):
|
||||
self.errors.append("Contact was not added to contact list after accepting contact request (as receiver)")
|
||||
@@ -260,7 +246,7 @@ class TestActivityMultipleDevicePR(MultipleSharedDeviceTestCase):
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702947)
|
||||
def test_activity_center_reply_read_unread_delete_filter_swipe(self):
|
||||
def test_activity_center_reply_read_unread_delete_filter(self):
|
||||
message_to_reply, reply_to_message_from_sender = 'something to reply to', 'this is a reply'
|
||||
self.home_1.jump_to_communities_home()
|
||||
self.home_1.get_chat(self.community_name, community=True).click()
|
||||
@@ -329,89 +315,5 @@ class TestActivityMultipleDevicePR(MultipleSharedDeviceTestCase):
|
||||
if reply_element.is_element_displayed():
|
||||
self.errors.append("Reply is still shown after removing from activity centre!")
|
||||
|
||||
self.home_1.just_fyi("Reset filter to show all AC notifications again")
|
||||
self.home_1.reply_activity_tab_button.click()
|
||||
self.home_1.mention_activity_tab_button.click()
|
||||
self.home_1.all_activity_tab_button.click()
|
||||
self.home_1.close_activity_centre.click()
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702957)
|
||||
def test_activity_center_mentions(self):
|
||||
self.home_1.jump_to_communities_home()
|
||||
self.home_2.jump_to_card_by_text('# %s' % self.channel_name)
|
||||
|
||||
self.device_2.just_fyi("Invited member sends a message with a mention")
|
||||
self.channel_2.mention_user(self.default_username_1)
|
||||
self.channel_2.send_message_button.click()
|
||||
|
||||
self.home_1.just_fyi("Checking unread indicators")
|
||||
self.home_1.notifications_unread_badge.wait_for_visibility_of_element(120)
|
||||
community_element_1 = self.home_1.get_chat(self.community_name, community=True)
|
||||
for unread_counter in community_element_1.new_messages_counter, self.home_1.communities_tab.counter:
|
||||
if not unread_counter.is_element_displayed(60):
|
||||
self.errors.append('New message counter badge is not shown while mentioned!')
|
||||
if int(unread_counter.text) != 1:
|
||||
self.errors.append('New message counter badge is not 1, it is %s!' % unread_counter.text)
|
||||
|
||||
self.home_1.just_fyi("Checking mention attributes in activity center")
|
||||
self.home_1.open_activity_center_button.click()
|
||||
mention_element = self.home_1.get_element_from_activity_center_view('@%s' % self.default_username_1)
|
||||
if mention_element.title.text != 'Mention':
|
||||
self.errors.append("Expected title is not shown, '%s' is instead!" % mention_element.title)
|
||||
if not mention_element.unread_indicator.is_element_displayed():
|
||||
self.errors.append("No unread dot is shown on activity center element (mention)!")
|
||||
if mention_element.message_body.text != '@%s' % self.default_username_1:
|
||||
self.errors.append("Mention body in activity center does not match expected, it is %s!" % mention_element.message_body.text)
|
||||
|
||||
self.home_1.just_fyi("Tap on it and check redirect to channel")
|
||||
mention_element.click()
|
||||
if not self.channel_1.chat_element_by_text(self.default_username_1).is_element_displayed():
|
||||
self.errors.append("Was not redirected to chat after tapping on mention!")
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702958)
|
||||
def test_activity_center_admin_notification_accept_swipe(self):
|
||||
self.home_2.just_fyi("Clearing history")
|
||||
self.home_2.jump_to_messages_home()
|
||||
self.home_2.clear_chat_long_press(self.default_username_1)
|
||||
|
||||
[home.jump_to_communities_home() for home in (self.home_1, self.home_2)]
|
||||
self.home_1.just_fyi("Open community to message")
|
||||
self.home_1.communities_tab.click()
|
||||
community_name = 'commun_to_check_notif'
|
||||
self.channel_name = self.home_1.get_random_chat_name()
|
||||
self.home_1.create_community(name=community_name, description='community to test', require_approval=True)
|
||||
self.home_1.click_system_back_button_until_element_is_shown()
|
||||
community_element = self.home_1.get_chat(community_name, community=True)
|
||||
self.community_1.share_community(community_element, self.default_username_2)
|
||||
|
||||
self.home_1.just_fyi("Request access to community")
|
||||
self.home_2.jump_to_messages_home()
|
||||
self.chat_2 = self.home_2.get_chat(self.default_username_1).click()
|
||||
self.chat_2.element_by_text_part('View').click()
|
||||
self.community_2.request_access_button.click()
|
||||
self.community_2.jump_to_communities_home()
|
||||
|
||||
self.home_1.just_fyi("Checking unread indicators")
|
||||
self.home_1.notifications_unread_badge.wait_for_visibility_of_element(120)
|
||||
self.home_1.open_activity_center_button.click()
|
||||
reply_element = self.home_1.get_element_from_activity_center_view(self.default_username_2)
|
||||
if reply_element.title.text != 'Join request':
|
||||
self.errors.append("Expected title is not shown, '%s' is instead!" % reply_element.title)
|
||||
if not reply_element.unread_indicator.is_element_displayed():
|
||||
self.errors.append("No unread dot is shown on activity center element!")
|
||||
reply_element.swipe_right_on_element()
|
||||
self.home_1.activity_notification_swipe_button.click()
|
||||
self.home_1.close_activity_centre.click()
|
||||
|
||||
self.home_2.just_fyi("Checking that community appeared on thr list")
|
||||
if not self.home_2.element_by_text_part(community_name).is_element_displayed(30):
|
||||
self.errors.append("Community is not appeared in the list after accepting admin request from activity centre")
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -347,8 +347,6 @@ class CommunityView(HomeView):
|
||||
self.community_info_picture = Button(self.driver, accessibility_id="chat-icon")
|
||||
self.leave_community_button = Button(self.driver, translation_id="leave-community")
|
||||
self.edit_community_button = Button(self.driver, translation_id="edit-community")
|
||||
self.share_community_button = Button(self.driver, accessibility_id="share-community")
|
||||
self.share_community_link_button = Button(self.driver, accessibility_id="share-community-link")
|
||||
|
||||
# Members
|
||||
self.invite_people_button = Button(self.driver, accessibility_id="community-invite-people")
|
||||
@@ -420,21 +418,11 @@ class CommunityView(HomeView):
|
||||
self.share_invite_button.click_until_presence_of_element(self.invite_button)
|
||||
self.back_button.click_until_presence_of_element(self.plus_button)
|
||||
|
||||
def share_community(self, coummunity_element, user_names_to_share):
|
||||
if isinstance(user_names_to_share, str):
|
||||
user_names_to_share = [user_names_to_share]
|
||||
self.driver.info("Share to %s community" % ', '.join(map(str, user_names_to_share)))
|
||||
coummunity_element.long_press_until_element_is_shown(self.share_community_button)
|
||||
self.share_community_button.click()
|
||||
for user_name in user_names_to_share:
|
||||
user_contact = self.element_by_text_part(user_name)
|
||||
user_contact.scroll_and_click()
|
||||
self.share_community_link_button.click()
|
||||
|
||||
|
||||
class PreviewMessage(ChatElementByText):
|
||||
def __init__(self, driver, text: str):
|
||||
super().__init__(driver, text=text)
|
||||
# self.locator += "/android.view.ViewGroup/android.view.ViewGroup"
|
||||
|
||||
@staticmethod
|
||||
def return_element_or_empty(obj):
|
||||
@@ -682,7 +670,7 @@ class ChatView(BaseView):
|
||||
self.clear_history_button = Button(self.driver, translation_id="clear-history")
|
||||
self.reply_message_button = Button(self.driver, translation_id="message-reply")
|
||||
self.share_chat_button = Button(self.driver, accessibility_id="share-chat-button")
|
||||
self.clear_button = Button(self.driver, translation_id="clear-history")
|
||||
self.clear_button = Button(self.driver, translation_id="clear", uppercase=True)
|
||||
self.view_profile_button = ViewProfileButton(self.driver)
|
||||
self.view_profile_by_avatar_button = Button(self.driver, accessibility_id="member-photo")
|
||||
self.user_options = Button(self.driver, accessibility_id="options")
|
||||
|
||||
@@ -126,10 +126,6 @@ class ActivityCenterElement(SilentButton):
|
||||
def unread_indicator(self):
|
||||
return Button(self.driver, xpath=self.locator + '//*[@content-desc="activity-unread-indicator"]')
|
||||
|
||||
@property
|
||||
def message_body(self):
|
||||
return Button(self.driver, xpath=self.locator + '//*[@content-desc="activity-message-body"]')
|
||||
|
||||
def handle_cr(self, element_accessibility: str):
|
||||
try:
|
||||
accept_element = Button(self.driver,
|
||||
@@ -224,7 +220,7 @@ class HomeView(BaseView):
|
||||
# Options on long tap
|
||||
self.chats_menu_invite_friends_button = Button(self.driver, accessibility_id="chats-menu-invite-friends-button")
|
||||
self.delete_chat_button = Button(self.driver, translation_id="delete-chat")
|
||||
self.clear_history_button = Button(self.driver, accessibility_id="clear-history")
|
||||
self.clear_history_button = Button(self.driver, accessibility_id="clear-history-button")
|
||||
self.mark_all_messages_as_read_button = Button(self.driver, accessibility_id="mark-all-read-button")
|
||||
|
||||
# Connection icons
|
||||
@@ -256,13 +252,11 @@ class HomeView(BaseView):
|
||||
self.setup_chat_button = Button(self.driver, accessibility_id="next-button")
|
||||
|
||||
# Activity centre
|
||||
self.all_activity_tab_button = ActivityTabButton(self.driver, translation_id="all")
|
||||
self.mention_activity_tab_button = ActivityTabButton(self.driver, accessibility_id="tab-mention")
|
||||
self.reply_activity_tab_button = ActivityTabButton(self.driver, accessibility_id="tab-reply")
|
||||
self.activity_notification_swipe_button = Button(self.driver, accessibility_id="notification-swipe")
|
||||
self.activity_unread_filter_button = Button(self.driver, accessibility_id="selector-filter")
|
||||
self.more_options_activity_button = Button(self.driver, accessibility_id="activity-center-open-more")
|
||||
self.mark_all_read_activity_button = Button(self.driver, translation_id="mark-all-notifications-as-read")
|
||||
|
||||
|
||||
def wait_for_syncing_complete(self):
|
||||
self.driver.info('Waiting for syncing to complete')
|
||||
|
||||
@@ -133,7 +133,7 @@ class SignInView(BaseView):
|
||||
self.migration_password_input = EditBox(self.driver, accessibility_id="enter-password-input")
|
||||
self.sign_in_button = SignInButton(self.driver)
|
||||
self.access_key_button = AccessKeyButton(self.driver)
|
||||
self.generate_key_button = Button(self.driver, accessibility_id="generate-old-key")
|
||||
self.generate_key_button = Button(self.driver, translation_id="generate-new-key")
|
||||
self.your_keys_more_icon = Button(self.driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat")
|
||||
self.generate_new_key_button = Button(self.driver, accessibility_id="generate-a-new-key")
|
||||
self.create_password_input = EditBox(self.driver,
|
||||
|
||||