diff --git a/.env b/.env index c53b00feb620..8e1b65994fa9 100644 --- a/.env +++ b/.env @@ -19,5 +19,5 @@ SNOOPY=0 RPC_NETWORKS_ONLY=0 PARTITIONED_TOPIC=0 CONTRACT_NODES=1 -MOBILE_UI_FOR_DESKTOP=0 +MOBILE_UI_FOR_DESKTOP=1 STATUS_GO_PROTOCOL=0 diff --git a/clj-rn.conf.edn b/clj-rn.conf.edn index a80905e07946..5362cf7c622c 100644 --- a/clj-rn.conf.edn +++ b/clj-rn.conf.edn @@ -84,6 +84,7 @@ "react-native-desktop-config" "react-native-desktop-shortcuts" "react-native-desktop-notification" + "react-native-desktop-gesture-handler" "text-encoding" "js-sha3" "web3-utils" diff --git a/desktop_files/package.json.orig b/desktop_files/package.json.orig index cee9e4237e90..18e05e5695ba 100644 --- a/desktop_files/package.json.orig +++ b/desktop_files/package.json.orig @@ -20,6 +20,7 @@ "modules/react-native-desktop-config/desktop", "modules/react-native-desktop-shortcuts/desktop", "modules/react-native-desktop-notification/desktop", + "modules/react-native-desktop-gesture-handler/desktop", "node_modules/google-breakpad" ], "desktopFonts": [ @@ -68,7 +69,7 @@ "querystring-es3": "0.2.1", "react": "16.6.1", "react-dom": "16.4.2", - "react-native": "git+https://github.com/status-im/react-native-desktop.git#v0.57.8_10", + "react-native": "git+https://github.com/status-im/react-native-desktop.git#master", "react-native-background-timer": "2.0.0", "react-native-camera": "0.10.0", "react-native-config": "git+https://github.com/status-im/react-native-config.git#v0.11.2-status", @@ -76,6 +77,7 @@ "react-native-dialogs": "0.0.20", "react-native-fetch-polyfill": "1.1.2", "react-native-fs": "git+https://github.com/status-im/react-native-fs.git#v2.9.7-status", + "react-native-gesture-handler": "^1.3.0", "react-native-http": "git+https://github.com/tradle/react-native-http.git#834492d", "react-native-http-bridge": "0.6.1", "react-native-image-crop-picker": "0.18.1", @@ -92,7 +94,7 @@ "react-native-udp": "2.2.1", "react-native-webview-bridge": "git+https://github.com/status-im/react-native-webview-bridge.git#0.33.16-status-rn049-desktop", "react-native-navigation-twopane": "git+https://github.com/status-im/react-native-navigation-twopane.git#v0.0.2-status", - "react-navigation": "^2.12.1", + "react-navigation": "^3.11.0", "realm": "git+https://github.com/status-im/realm-js.git#v2.20.1", "rn-snoopy": "git+https://github.com/status-im/rn-snoopy.git#v2.0.2-status", "status-conan": "git+https://github.com/status-im/status-conan.git#v1.0.0", diff --git a/desktop_files/yarn.lock b/desktop_files/yarn.lock index 19bc7df1967f..f45cd44ccfbb 100644 --- a/desktop_files/yarn.lock +++ b/desktop_files/yarn.lock @@ -1339,6 +1339,25 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== +"@react-navigation/core@~3.4.1": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.4.2.tgz#bec563e94fde40fbab3730cdc97f22afbb2a1498" + integrity sha512-7G+iDzLSTeOUU4vVZeRZKJ+Bd7ds7ZxYNqZcB8i0KlBeQEQfR74Ounfu/p0KIEq2RiNnaE3QT7WVP3C87sebzw== + dependencies: + hoist-non-react-statics "^3.3.0" + path-to-regexp "^1.7.0" + query-string "^6.4.2" + react-is "^16.8.6" + +"@react-navigation/native@~3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.5.0.tgz#f5d16e0845ac26d1147d1caa481f18a00740e7ae" + integrity sha512-TmGOis++ejEXG3sqNJhCSKqB0/qLu3FQgDtO959qpqif36R/diR8SQwJqeSdofoEiK3CepdhFlTCeHdS1/+MsQ== + dependencies: + hoist-non-react-statics "^3.0.1" + react-native-safe-area-view "^0.14.1" + react-native-screens "^1.0.0 || ^1.0.0-alpha" + Base64@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028" @@ -2292,11 +2311,6 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" -clamp@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/clamp/-/clamp-1.0.1.tgz#66a0e64011816e37196828fdc8c8c147312c8634" - integrity sha1-ZqDmQBGBbjcZaCj9yMjBRzEshjQ= - class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2711,14 +2725,6 @@ create-react-class@^15.6.0, create-react-class@^15.6.3: loose-envify "^1.3.1" object-assign "^4.1.1" -create-react-context@0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca" - integrity sha512-KkpaLARMhsTsgp0d2NA/R94F/eDLbhXERdIq3LvX2biCAXcDvHYoOqHfWCHf1+OLj+HKBotLG3KqaOOf+C1C+A== - dependencies: - fbjs "^0.8.0" - gud "^1.0.0" - cross-spawn-async@^2.1.1: version "2.2.5" resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc" @@ -2792,6 +2798,11 @@ dateformat@^3.0.3: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== +debounce@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" + integrity sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg== + debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -3507,7 +3518,7 @@ fbjs-scripts@^1.0.0: semver "^5.1.0" through2 "^2.0.0" -fbjs@^0.8.0, fbjs@^0.8.16, fbjs@^0.8.9: +fbjs@^0.8.16, fbjs@^0.8.9: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= @@ -4044,11 +4055,6 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -gud@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" - integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw== - handlebars@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" @@ -4182,11 +4188,18 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: +hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: version "2.5.5" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== +hoist-non-react-statics@^3.0.1, hoist-non-react-statics@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b" + integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA== + dependencies: + react-is "^16.7.0" + home-or-tmp@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb" @@ -6682,12 +6695,13 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -query-string@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.2.0.tgz#468edeb542b7e0538f9f9b1aeb26f034f19c86e1" - integrity sha512-5wupExkIt8RYL4h/FE+WTg3JHk62e6fFPWtAZA9J5IWK1PfTfKkMS93HBUHcFpeYi9KsY5pFbh+ldvEyaz5MyA== +query-string@^6.4.2: + version "6.8.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.8.1.tgz#62c54a7ef37d01b538c8fd56f95740c81d438a26" + integrity sha512-g6y0Lbq10a5pPQpjlFuojfMfV1Pd2Jw9h75ypiYPPia3Gcq2rgkKiIwbkS6JxH7c5f5u/B/sB+d13PU+g1eu4Q== dependencies: decode-uri-component "^0.2.0" + split-on-first "^1.0.0" strict-uri-encode "^2.0.0" querystring-es3@0.2.1: @@ -6787,12 +6801,12 @@ react-dom@16.4.2: object-assign "^4.1.1" prop-types "^15.6.0" -react-is@^16.5.2: - version "16.8.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.1.tgz#a80141e246eb894824fb4f2901c0c50ef31d4cdb" - integrity sha512-ioMCzVDWvCvKD8eeT+iukyWrBGrA3DiFYkXfBsVYIRdaREZuBjENG+KjrikavCLasozqRWTwFUagU/O4vPpRMA== +react-is@^16.7.0, react-is@^16.8.6: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" + integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== -react-lifecycles-compat@^3, react-lifecycles-compat@^3.0.4: +react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== @@ -6833,25 +6847,6 @@ react-native-dialogs@0.0.20: resolved "https://registry.yarnpkg.com/react-native-dialogs/-/react-native-dialogs-0.0.20.tgz#f3fb48eadba9d83fb9d4e6d7eca573494a8cefaa" integrity sha512-HeoU9d7wWUUAtxjcIJLaeIs/eYS2ZHTNh3kboeCKngLvfvgptd/7vZXwXdQ+xeOEek+cm95kDfMJQd2xnb+4wA== -react-native-dismiss-keyboard@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/react-native-dismiss-keyboard/-/react-native-dismiss-keyboard-1.0.0.tgz#32886242b3f2317e121f3aeb9b0a585e2b879b49" - integrity sha1-MohiQrPyMX4SHzrrmwpYXiuHm0k= - -react-native-drawer-layout-polyfill@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/react-native-drawer-layout-polyfill/-/react-native-drawer-layout-polyfill-1.3.2.tgz#192c84d7a5a6b8a6d2be2c7daa5e4164518d0cc7" - integrity sha512-XzPhfLDJrYHru+e8+dFwhf0FtTeAp7JXPpFYezYV6P1nTeA1Tia/kDpFT+O2DWTrBKBEI8FGhZnThrroZmHIxg== - dependencies: - react-native-drawer-layout "1.3.2" - -react-native-drawer-layout@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/react-native-drawer-layout/-/react-native-drawer-layout-1.3.2.tgz#b9740d7663a1dc4f88a61b9c6d93d2d948ea426e" - integrity sha512-fjO0scqbJUfNu2wuEpvywL7DYLXuCXJ2W/zYhWz986rdLytidbys1QGVvkaszHrb4Y7OqO96mTkgpOcP8KWevw== - dependencies: - react-native-dismiss-keyboard "1.0.0" - react-native-fetch-polyfill@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/react-native-fetch-polyfill/-/react-native-fetch-polyfill-1.1.2.tgz#256b5a0abd78cc4992f7a7cf82543da2f2124a73" @@ -6864,6 +6859,15 @@ react-native-fetch-polyfill@1.1.2: base-64 "^0.1.0" utf8 "^2.1.1" +react-native-gesture-handler@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.3.0.tgz#d0386f565928ccc1849537f03f2e37fd5f6ad43f" + integrity sha512-ASRFIXBuKRvqlmwkWJhV8yP2dTpvcqVrLNpd7FKVBFHYWr6SAxjGyO9Ik8w1lAxDhMlRP2IcJ9p9eq5X2WWeLQ== + dependencies: + hoist-non-react-statics "^2.3.1" + invariant "^2.2.2" + prop-types "^15.5.10" + react-native-http-bridge@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/react-native-http-bridge/-/react-native-http-bridge-0.6.1.tgz#1b85688174870e9b009692e1a6cdc5f5396c5ca4" @@ -6922,17 +6926,19 @@ react-native-qrcode@0.2.6: prop-types "^15.5.10" qr.js "0.0.0" -react-native-safe-area-view@0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.11.0.tgz#4f3dda43c2bace37965e7c6aef5fc83d4f19d174" - integrity sha512-N3nElaahu1Me2ltnfc9acpgt1znm6pi8DSadKy79kvdzKwvVIzw0IXueA/Hjr51eCW1BsfNw7D1SgBT9U6qEkA== +react-native-safe-area-view@^0.14.1: + version "0.14.6" + resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.6.tgz#9a9d37d9f8f3887d60c4076eae7b5d2319539446" + integrity sha512-dbzuvaeHFV1VBpyMaC0gtJ2BqFt6ls/405A0t78YN1sXiTrVr3ki86Ysct8mzifWqLdvWzcWagE5wfMtdxnqoA== dependencies: hoist-non-react-statics "^2.3.1" -react-native-screens@^1.0.0-alpha.11: - version "1.0.0-alpha.22" - resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.22.tgz#7a120377b52aa9bbb94d0b8541a014026be9289b" - integrity sha512-kSyAt0AeVU6N7ZonfV6dP6iZF8B7Bce+tk3eujXhzBGsLg0VSLnU7uE9VqJF0xdQrHR91ZjGgVMieo/8df9KTA== +"react-native-screens@^1.0.0 || ^1.0.0-alpha": + version "1.0.0-alpha.23" + resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.23.tgz#25d7ea4d11bda4fcde2d1da7ae50271c6aa636e0" + integrity sha512-tOxHGQUN83MTmQB4ghoQkibqOdGiX4JQEmeyEv96MKWO/x8T2PJv84ECUos9hD3blPRQwVwSpAid1PPPhrVEaw== + dependencies: + debounce "^1.2.0" react-native-scrollable-mixin@^1.0.1: version "1.0.1" @@ -6959,17 +6965,10 @@ react-native-svg@6.3.1: lodash "^4.16.6" pegjs "^0.10.0" -react-native-tab-view@^0.0.77: - version "0.0.77" - resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.77.tgz#11ceb8e7c23100d07e628dc151b57797524d00d4" - integrity sha512-9vjD4Ly1Zlum1Y4g23ODpi/F3gYIUIsKWrsZO/Oh5cuX1eiB1DRVn11nY1z+j/hsQfhfyW6nDlmySyDvYQvYCA== - dependencies: - prop-types "^15.6.0" - -react-native-tab-view@^1.0.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.3.2.tgz#c4e43a538dcacce151938745cea09176beeccbc3" - integrity sha512-2U+HxDQdjzExoC6gZ+wUhC8v8JjntppsFVU4v4pRvC/1dkN7DJv1k8UEy9+p7ucEaNrcAzu/j5N09Jf4qG36vw== +react-native-tab-view@^1.2.0, react-native-tab-view@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz#f113cd87485808f0c991abec937f70fa380478b9" + integrity sha512-Bke8KkDcDhvB/z0AS7MnQKMD2p6Kwfc1rSKlMOvg9CC5CnClQ2QEnhPSbwegKDYhUkBI92iH/BYy7hNSm5kbUQ== dependencies: prop-types "^15.6.1" @@ -7003,9 +7002,9 @@ react-native-udp@2.2.1: invariant "2.2.0" keymirror "0.1.1" -"react-native@git+https://github.com/status-im/react-native-desktop.git#v0.57.8_10": +"react-native@git+https://github.com/status-im/react-native-desktop.git#master": version "0.57.8" - resolved "git+https://github.com/status-im/react-native-desktop.git#af9f72e6300d08918685f57e249141646400bac0" + resolved "git+https://github.com/status-im/react-native-desktop.git#cad20cb8c42d07473e1bbb7caf8888334d115775" dependencies: "@babel/runtime" "^7.0.0" absolute-path "^0.0.0" @@ -7062,53 +7061,38 @@ react-native-udp@2.2.1: yeoman-environment "^2.3.4" yeoman-generator "^3.2.0" -react-navigation-deprecated-tab-navigator@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.3.0.tgz#015dcae1e977b984ca7e99245261c15439026bb7" - integrity sha512-Cm+qYOPFWbvvcuv0YYX0ioYwLGgw7XAqdhAfpo3sIr3trxRW8871ePmfFOPezjQtz4v6ItjZt6LPgtBAVZoroQ== - dependencies: - react-native-tab-view "^0.0.77" - -react-navigation-drawer@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.5.0.tgz#d91b6a6ec65c34ba78c00f814b1e6508922cc9ec" - integrity sha512-F1y593uC6pqBMGH+Omz75oNODEbxB/s0EGO8QtYwu1NmOOEUuuLA+c14zm+pgMsI4HlDabiHxPkWqsgGz25xVQ== +react-navigation-drawer@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-1.2.1.tgz#7bd5efeee7d2f611d3ebb0933e0c8e8eb7cafe52" + integrity sha512-T2kaBjY2c4/3I6noWFnaf/c18ntNH5DsST38i+pdc2NPxn5Yi5lkK+ZZTeKuHSFD4a7G0jWY9OGf1iRkHWLMAQ== dependencies: - react-native-drawer-layout-polyfill "^1.3.2" + react-native-tab-view "^1.2.0" -react-navigation-stack@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-0.7.0.tgz#0b2f139ee1cba953037ef51353df992ec6c74fa2" - integrity sha512-3Tbb/SsustBrM9R/qaI6XuOfyqYMVbwkeHFC8NbU890vB0aKZvjAtioWLZ18e/4LgbiOCmoTdp37z3gkGDyNDQ== +react-navigation-stack@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-1.4.0.tgz#69cdb029ea4ee5877d7e933b3117dc90bc841eb2" + integrity sha512-zEe9wCA0Ot8agarYb//0nSWYW1GM+1R0tY/nydUV0EizeJ27At0EklYVWvYEuYU6C48va6cu8OPL7QD/CcJACw== -react-navigation-tabs@0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.8.4.tgz#aa767f28b899f13c99f2b034b4a665f8cf0a5737" - integrity sha512-CbS3xIVJVtpu+AYslv0PMLmjddJFVtU3XAhSJ9XnMrKLUJNmnQdW/L0w/Gp5qcBEF9h6bgsY3CoTtp7I6bqyOQ== +react-navigation-tabs@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-1.1.4.tgz#00a312250df3c519c60b7815a523ace5ee11163a" + integrity sha512-py2hLCRxPwXOzmY1W9XcY1rWXxdK6RGW/aXh56G9gIf8cpHNDhy/bJV4e46/JrVcse3ybFaN0liT09/DM/NdwQ== dependencies: hoist-non-react-statics "^2.5.0" prop-types "^15.6.1" react-lifecycles-compat "^3.0.4" - react-native-tab-view "^1.0.0" + react-native-tab-view "^1.4.1" -react-navigation@^2.12.1: - version "2.18.3" - resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.18.3.tgz#de9a24dc37dfc33f3e4779a9f13f45ea97dfe19e" - integrity sha512-/5KGMG1Oj5LN/x/7AKF0MWrpX9Qe29307RxEsMCiRT/A4jCYT0DPY99Bl7ZAGtROxExEy3rwTfTrtvpIT+CU7A== +react-navigation@^3.11.0: + version "3.11.1" + resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-3.11.1.tgz#ba696ad6b512088a97a20cc7e6a250c53dbddd26" + integrity sha512-n64HxLG5s5ucVFo1Gs+D9ujChhHDd98lpQ1p27wL7gq8V1PaRJMvsBEIsguhtc2rTIL/TWDynOesXQDG+Eg6FQ== dependencies: - clamp "^1.0.1" - create-react-context "0.2.2" - hoist-non-react-statics "^2.2.0" - path-to-regexp "^1.7.0" - query-string "^6.1.0" - react-is "^16.5.2" - react-lifecycles-compat "^3" - react-native-safe-area-view "0.11.0" - react-native-screens "^1.0.0-alpha.11" - react-navigation-deprecated-tab-navigator "1.3.0" - react-navigation-drawer "0.5.0" - react-navigation-stack "0.7.0" - react-navigation-tabs "0.8.4" + "@react-navigation/core" "~3.4.1" + "@react-navigation/native" "~3.5.0" + react-navigation-drawer "~1.2.1" + react-navigation-stack "~1.4.0" + react-navigation-tabs "~1.1.4" react-proxy@^1.1.7: version "1.1.8" @@ -7871,6 +7855,11 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" diff --git a/modules/react-native-desktop-gesture-handler/desktop/CMakeLists.txt b/modules/react-native-desktop-gesture-handler/desktop/CMakeLists.txt new file mode 100755 index 000000000000..2524fde7ff04 --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/desktop/CMakeLists.txt @@ -0,0 +1,9 @@ +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_TYPE_NAMES ${REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_TYPE_NAMES} + \"GestureHandlerModule\" PARENT_SCOPE) + +set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_SRC ${REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_SRC} + ${CMAKE_CURRENT_SOURCE_DIR}/gesturehandlermodule.cpp PARENT_SCOPE) + +include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) diff --git a/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.cpp b/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.cpp new file mode 100644 index 000000000000..a594a2daceee --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.cpp @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2017-present, Status Research and Development GmbH. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#include "gesturehandlermodule.h" +#include "bridge.h" +#include "eventdispatcher.h" + +#include +#include +#include + +namespace { +struct RegisterQMLMetaType { + RegisterQMLMetaType() { qRegisterMetaType(); } +} registerMetaType; +} // namespace + + +class GestureHandlerModulePrivate { +public: + Bridge* bridge = nullptr; +}; + +GestureHandlerModule::GestureHandlerModule(QObject* parent) : QObject(parent), d_ptr(new GestureHandlerModulePrivate) {} + +GestureHandlerModule::~GestureHandlerModule() {} + +void GestureHandlerModule::setBridge(Bridge* bridge) { + Q_D(GestureHandlerModule); + d->bridge = bridge; +} + +QString GestureHandlerModule::moduleName() { + return "RNGestureHandlerModule"; +} + +QList GestureHandlerModule::methodsToExport() { + return QList{}; +} + +QVariantMap GestureHandlerModule::constantsToExport() { + Q_D(GestureHandlerModule); + + QVariantMap directionValues{{"RIGHT", 1}, {"LEFT", 2}, {"UP", 4}, {"DOWN", 8}}; + + // QRect screenGeometry = screen->geometry(); + // QVariantMap screenValues{{"fontScale", 8}, + // {"width", screenGeometry.width()}, + // {"height", screenGeometry.height()}, + // {"scale", screen->devicePixelRatio()}}; + + // QVariantMap values{{"screen", screenValues}, {"window", windowValues}}; + + return QVariantMap{{"Direction", directionValues}}; +} + +void GestureHandlerModule::handleSetJSResponder(int viewTag, void* blockNativeResponder) {} + +void GestureHandlerModule::handleClearJSResponder() {} + +void GestureHandlerModule::createGestureHandler(const QString& handlerName, int handlerTag, void* config) {} +void GestureHandlerModule::attachGestureHandler(int handlerTag, int viewTag) {} +void GestureHandlerModule::updateGestureHandler(int handlerTag, void* config) {} +void GestureHandlerModule::dropGestureHandler(int handlerTag) {} diff --git a/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.h b/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.h new file mode 100644 index 000000000000..0d0d2c32a2c5 --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.h @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2017-present, Status Research and Development GmbH. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#ifndef GESTUREHANDLER_H +#define GESTUREHANDLER_H + +#include "moduleinterface.h" + +#include + +class GestureHandlerModulePrivate; +class GestureHandlerModule : public QObject, public ModuleInterface { + Q_OBJECT + Q_INTERFACES(ModuleInterface) + + Q_DECLARE_PRIVATE(GestureHandlerModule) + +public: + Q_INVOKABLE GestureHandlerModule(QObject* parent = 0); + ~GestureHandlerModule(); + + void setBridge(Bridge* bridge) override; + + QString moduleName() override; + QList methodsToExport() override; + QVariantMap constantsToExport() override; + + Q_INVOKABLE void handleSetJSResponder(int viewTag, void* blockNativeResponder); + Q_INVOKABLE void handleClearJSResponder(); + Q_INVOKABLE void createGestureHandler(const QString& handlerName, int handlerTag, void* config); + Q_INVOKABLE void attachGestureHandler(int handlerTag, int viewTag); + Q_INVOKABLE void updateGestureHandler(int handlerTag, void* config); + Q_INVOKABLE void dropGestureHandler(int handlerTag); + + +private: + QScopedPointer d_ptr; +}; + +#endif // GESTUREHANDLER_H diff --git a/modules/react-native-desktop-gesture-handler/index.js b/modules/react-native-desktop-gesture-handler/index.js new file mode 100644 index 000000000000..82276071aaa5 --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var RNGestureHandlerModule = require('react-native').NativeModules.RNGestureHandlerModule; + +module.exports = RNGestureHandlerModule; diff --git a/modules/react-native-desktop-gesture-handler/package.json b/modules/react-native-desktop-gesture-handler/package.json new file mode 100644 index 000000000000..11d321c131df --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/package.json @@ -0,0 +1,13 @@ +{ + "private": true, + "nativePackage": true, + "name": "react-native-desktop-gesture-handler", + "version": "1.0.0", + "description": "Mock for react-native-gesture-handler package", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "" +} diff --git a/react-native/src/desktop/status_im/react_native/js_dependencies.cljs b/react-native/src/desktop/status_im/react_native/js_dependencies.cljs index 94165795a2ec..8aaa5af31b89 100644 --- a/react-native/src/desktop/status_im/react_native/js_dependencies.cljs +++ b/react-native/src/desktop/status_im/react_native/js_dependencies.cljs @@ -34,6 +34,7 @@ (def snoopy-filter (fn [] #js {})) (def snoopy-bars (fn [] #js {})) (def snoopy-buffer (fn [] #js {})) +(def react-native-screens (fn [] #js {})) (def background-timer (fn [] #js {:setTimeout (fn [cb ms] (js/setTimeout cb ms))})) (def react-navigation (js/require "react-navigation")) (def react-native-navigation-twopane (js/require "react-native-navigation-twopane")) diff --git a/scripts/build-desktop.sh b/scripts/build-desktop.sh index 46be089561d3..c6953234c8d0 100755 --- a/scripts/build-desktop.sh +++ b/scripts/build-desktop.sh @@ -27,6 +27,7 @@ external_modules_dir=( \ 'node_modules/google-breakpad' \ 'modules/react-native-desktop-linking/desktop' \ 'modules/react-native-desktop-menu/desktop' \ + 'modules/react-native-desktop-gesture-handler' \ 'modules/react-native-desktop-config/desktop' \ 'modules/react-native-desktop-shortcuts/desktop' \ 'modules/react-native-desktop-notification/desktop' \ @@ -354,7 +355,7 @@ if is_macos; then local exeDir="$contentsDir/MacOS" [ $VERBOSE_LEVEL -ge 1 ] && echo "Checking rpaths in ${dylib}" - + # Walk through the dependencies of $dylib local dependencies=$(otool -L "$dylib" | grep -E "\s+/nix/" | sed "s|@executable_path|$exeDir|" | awk -F "(" '{print $1}' | xargs) local moduleDirPath=$(dirname $dylib) diff --git a/src/status_im/ui/components/bottom_bar/core.cljs b/src/status_im/ui/components/bottom_bar/core.cljs index 6131d41d9262..bf980970d232 100644 --- a/src/status_im/ui/components/bottom_bar/core.cljs +++ b/src/status_im/ui/components/bottom_bar/core.cljs @@ -69,9 +69,10 @@ (when (pos? (if count @count 0)) [react/view tabs.styles/counter [components.common/counter @count]])] - [react/view {:style tabs.styles/tab-title-container} - [react/text {:style (tabs.styles/new-tab-title active?)} - label]]]])) + (when-not platform/desktop? + [react/view {:style tabs.styles/tab-title-container} + [react/text {:style (tabs.styles/new-tab-title active?)} + label]])]])) (defn tabs [current-view-id] [react/view @@ -132,17 +133,26 @@ (when-not (contains? #{:enter-pin-login :enter-pin-sign :enter-pin-settings} view-id) - (if platform/ios? - [tabs-animation-wrapper-ios - [react/animated-view - {:style (tabs.styles/animated-container visible? keyboard-shown?)} - [tabs tab]]] - [tabs-animation-wrapper-android - keyboard-shown? - view-id - [react/animated-view - {:style (tabs.styles/animated-container visible? keyboard-shown?)} - [tabs tab]]])))})) + (case platform/os + "ios" [tabs-animation-wrapper-ios + [react/animated-view + {:style (tabs.styles/animated-container visible? keyboard-shown?)} + [tabs tab]]] + "android" [tabs-animation-wrapper-android + keyboard-shown? + view-id + [react/animated-view + {:style (tabs.styles/animated-container visible? keyboard-shown?)} + [tabs tab]]] + "desktop" + ;[tabs-animation-wrapper-android + ; keyboard-shown? + ; view-id + ; [react/animated-view + ; {:style (tabs.styles/animated-container visible? keyboard-shown?)} + [tabs tab] + ;]] +)))})) (def disappearance-duration 150) (def appearance-duration 100) diff --git a/src/status_im/ui/components/bottom_bar/styles.cljs b/src/status_im/ui/components/bottom_bar/styles.cljs index f0ce27b41761..071f206cf770 100644 --- a/src/status_im/ui/components/bottom_bar/styles.cljs +++ b/src/status_im/ui/components/bottom_bar/styles.cljs @@ -8,7 +8,7 @@ (cond platform/android? 52 platform/ios? 52 - platform/desktop? 68)) + platform/desktop? 36)) (def minimized-tabs-height 36) @@ -86,7 +86,13 @@ :shadow-radius 4 :shadow-offset {:width 0 :height -5} :shadow-opacity 0.3 - :shadow-color "rgba(0, 9, 26, 0.12)"}}) + :shadow-color "rgba(0, 9, 26, 0.12)"} + :desktop {:background-color :white + :shadow-radius 4 + :shadow-offset {:width 0 :height -5} + :shadow-opacity 0.3 + :shadow-color "rgba(0, 9, 26, 0.12)"} + }) (def tabs {:height tabs-height diff --git a/src/status_im/ui/screens/chat/input/input.cljs b/src/status_im/ui/screens/chat/input/input.cljs index 19cb0528820d..8bbb773599fd 100644 --- a/src/status_im/ui/screens/chat/input/input.cljs +++ b/src/status_im/ui/screens/chat/input/input.cljs @@ -89,7 +89,6 @@ :auto-capitalize :sentences} (when cooldown-enabled? {:placeholder (i18n/label :cooldown/text-input-disabled)}))])) -;) (defview invisible-input [{:keys [set-layout-width-fn value]}] (letsubs [{:keys [input-text]} [:chats/current-chat]] diff --git a/src/status_im/ui/screens/chat/styles/main.cljs b/src/status_im/ui/screens/chat/styles/main.cljs index 368c9f76a4bf..c963ae6e3414 100644 --- a/src/status_im/ui/screens/chat/styles/main.cljs +++ b/src/status_im/ui/screens/chat/styles/main.cljs @@ -296,6 +296,9 @@ {:color colors/blue :margin-bottom 40}) +(def select-chat + {:color colors/gray}) + (def messages-list-vertical-padding 46) (def are-you-friends-bubble diff --git a/src/status_im/ui/screens/chat/views.cljs b/src/status_im/ui/screens/chat/views.cljs index 1893d7c8edef..3d76b8ef5198 100644 --- a/src/status_im/ui/screens/chat/views.cljs +++ b/src/status_im/ui/screens/chat/views.cljs @@ -469,5 +469,5 @@ (defview select-chat [] [react/view {:style {:align-items :center :justify-content :center :flex 1}} - [react/text {:style style/decline-chat} + [react/text {:style style/select-chat} (i18n/label :t/select-chat)]]) diff --git a/src/status_im/ui/screens/home/views.cljs b/src/status_im/ui/screens/home/views.cljs index 41b3d4189bfd..2d4bd6a2225b 100644 --- a/src/status_im/ui/screens/home/views.cljs +++ b/src/status_im/ui/screens/home/views.cljs @@ -134,7 +134,7 @@ window-width)] [react/view (merge {:flex 1 :width home-width} (when two-pane-ui-enabled? - {:border-right-width 1 :border-right-color colors/gray-light})) + {:border-right-width 1 :border-right-color colors/gray-lighter})) [status-bar/status-bar {:type :main}] [react/keyboard-avoiding-view {:style {:flex 1 :align-items :center}