diff --git a/.gitignore b/.gitignore index 3e79181fd8..3a88223cee 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,6 @@ figwheel_server.log # out doo-index.html + +# Re-natal +re-natal diff --git a/android/app/src/main/assets/fonts/FontAwesome.ttf b/android/app/src/main/assets/fonts/FontAwesome.ttf index 26dea7951a..f221e50a2e 100644 Binary files a/android/app/src/main/assets/fonts/FontAwesome.ttf and b/android/app/src/main/assets/fonts/FontAwesome.ttf differ diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 90015aba8f..995c84454f 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,6 +1,8 @@ + + Status Your phone appears to be ROOTED, by pressing CONTINUE you understand and accept the risks in using this software. Continue diff --git a/env/dev/env/ios/main.cljs b/env/dev/env/ios/main.cljs index 3f518fd9da..07d23b6f62 100644 --- a/env/dev/env/ios/main.cljs +++ b/env/dev/env/ios/main.cljs @@ -1,9 +1,10 @@ (ns ^:figwheel-no-load env.ios.main (:require [reagent.core :as r] [status-im.ios.core :as core] - [figwheel.client :as figwheel :include-macros true])) + [figwheel.client :as figwheel :include-macros true] + [cljs.pprint])) - (enable-console-print!) +(enable-console-print!) (def cnt (r/atom 0)) (defn reloader [] @cnt [core/app-root]) diff --git a/figwheel-bridge.js b/figwheel-bridge.js index 6c02270954..6d44d98094 100644 --- a/figwheel-bridge.js +++ b/figwheel-bridge.js @@ -189,17 +189,11 @@ function loadApp(platform, devHost, onLoadCb) { // callback when app is ready to get the reloadable component var mainJs = '/env/' + platform + '/main.js'; - var mainTestJs = '/env/' + platform + '_test/main.js'; evalListeners.push(function (url) { if (url.indexOf(mainJs) > -1) { onLoadCb(env[platform].main.root_el); console.info('Done loading Clojure app'); } - - if (url.indexOf(mainTestJs) > -1) { - onLoadCb(env[platform + "_test"].main.root_el); - console.log('Done loading Clojure app'); - } }); if (typeof goog === "undefined") { @@ -284,4 +278,4 @@ self = { start: startApp }; -module.exports = self; +module.exports = self; \ No newline at end of file diff --git a/images/cljs.png b/images/cljs.png deleted file mode 100644 index a7eca5dfe0..0000000000 Binary files a/images/cljs.png and /dev/null differ diff --git a/images/cljs@2x.png b/images/cljs@2x.png deleted file mode 100644 index 79af2b668d..0000000000 Binary files a/images/cljs@2x.png and /dev/null differ diff --git a/images/cljs@3x.png b/images/cljs@3x.png deleted file mode 100644 index 685d699682..0000000000 Binary files a/images/cljs@3x.png and /dev/null differ diff --git a/ios/SF-UI-Display-Medium.otf b/ios/SF-UI-Display-Medium.otf new file mode 100644 index 0000000000..dc2df0571e Binary files /dev/null and b/ios/SF-UI-Display-Medium.otf differ diff --git a/ios/SF-UI-Display-Regular.otf b/ios/SF-UI-Display-Regular.otf new file mode 100644 index 0000000000..14c96528c4 Binary files /dev/null and b/ios/SF-UI-Display-Regular.otf differ diff --git a/ios/SF-UI-Display-Semibold.otf b/ios/SF-UI-Display-Semibold.otf new file mode 100644 index 0000000000..4ea7ea73ec Binary files /dev/null and b/ios/SF-UI-Display-Semibold.otf differ diff --git a/ios/SF-UI-Display-Thin.otf b/ios/SF-UI-Display-Thin.otf new file mode 100644 index 0000000000..f02dcda5e4 Binary files /dev/null and b/ios/SF-UI-Display-Thin.otf differ diff --git a/ios/StatusIm.xcodeproj/project.pbxproj b/ios/StatusIm.xcodeproj/project.pbxproj index 86af60ba25..9e042d902c 100644 --- a/ios/StatusIm.xcodeproj/project.pbxproj +++ b/ios/StatusIm.xcodeproj/project.pbxproj @@ -22,9 +22,16 @@ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; + 2028DFF91D4275B600227DCD /* SF-UI-Display-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 2028DFF51D4275B600227DCD /* SF-UI-Display-Medium.otf */; }; + 2028DFFA1D4275B600227DCD /* SF-UI-Display-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 2028DFF61D4275B600227DCD /* SF-UI-Display-Regular.otf */; }; + 2028DFFB1D4275B600227DCD /* SF-UI-Display-Semibold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 2028DFF71D4275B600227DCD /* SF-UI-Display-Semibold.otf */; }; + 2028DFFC1D4275B600227DCD /* SF-UI-Display-Thin.otf in Resources */ = {isa = PBXBuildFile; fileRef = 2028DFF81D4275B600227DCD /* SF-UI-Display-Thin.otf */; }; + 20AB9EC61D47CC0300E7FD9C /* libRCTJail.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 201067C41D4789F700FA83B6 /* libRCTJail.a */; }; + 20B2DBFC1D47C70C00427CD8 /* Statusgo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20B2DBFB1D47C70C00427CD8 /* Statusgo.framework */; }; 213311F38CA74CE280FD09AD /* libRNI18n.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52F6ED6465184513A082652B /* libRNI18n.a */; }; 22118DE1207A419FBFE7B62D /* libRealmReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD48A32459B64E96843BB238 /* libRealmReact.a */; }; 25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */; }; + 3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */; }; 4D3D740D5EFA4F8592B048D7 /* libBVLinearGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF1CD4C3D1254774ACCAE4E8 /* libBVLinearGradient.a */; }; 4FFAE7B0414A463991039A2E /* libRNRandomBytes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C55F15EB4D4DAF9202A662 /* libRNRandomBytes.a */; }; 67F099D82798449FADF8358A /* libRCTOrientation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5535217F57E44D77AA9CF083 /* libRCTOrientation.a */; }; @@ -34,6 +41,7 @@ 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; A39C8FE8BF9E45CF896017A7 /* libRCTCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A50F58D6FC94DE696FC3EB5 /* libRCTCamera.a */; }; A6AF670051B842249D520C7B /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7ED174A34D7D42358313368B /* Foundation.ttf */; }; + AD5063BC2B2A4C52ACE0A0B4 /* libUdpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A96279092BEC4C4B93914F48 /* libUdpSockets.a */; }; AE97D4B08C9F4821B8E9C50B /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 359B076A658B4FBAB5128B03 /* Ionicons.ttf */; }; B45B40B471414274A7A83185 /* libRCTContacts.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3384AFA9609A409B81928AD5 /* libRCTContacts.a */; }; BA68A2377A20496EA737000D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E586E1B0E544F64AA9F5BD1 /* libz.tbd */; }; @@ -107,6 +115,27 @@ remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; remoteInfo = React; }; + 2010676C1D477F5E00FA83B6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 38E1A2C8D0734EE99E2B16CE /* TcpSockets.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = TcpSockets; + }; + 201067711D477F5E00FA83B6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2F0276A9E90843E996A0E762 /* UdpSockets.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = UdpSockets; + }; + 201067C31D4789F700FA83B6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 439B6B4B407A4E2AACAFE5BE /* RCTJail.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 206C9F3A1D474E910063E3E6; + remoteInfo = RCTJail; + }; 20B7D0FD1D3F74CC00B70F14 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 45FB5F523DE04BDE9877869C /* RNRandomBytes.xcodeproj */; @@ -216,10 +245,20 @@ 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = StatusIm/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = StatusIm/main.m; sourceTree = ""; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; + 2028DFF51D4275B600227DCD /* SF-UI-Display-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Display-Medium.otf"; sourceTree = ""; }; + 2028DFF61D4275B600227DCD /* SF-UI-Display-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Display-Regular.otf"; sourceTree = ""; }; + 2028DFF71D4275B600227DCD /* SF-UI-Display-Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Display-Semibold.otf"; sourceTree = ""; }; + 2028DFF81D4275B600227DCD /* SF-UI-Display-Thin.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Display-Thin.otf"; sourceTree = ""; }; + 20B2DBDD1D47BD5E00427CD8 /* Statusgo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Statusgo.framework; path = "../node_modules/react-native-status/ios/RCTJail/Statusgo.framework"; sourceTree = ""; }; + 20B2DBF71D47C25500427CD8 /* Statusgo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Statusgo.framework; sourceTree = ""; }; + 20B2DBFB1D47C70C00427CD8 /* Statusgo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Statusgo.framework; path = "../node_modules/react-native-status/ios/Statusgo.framework"; sourceTree = ""; }; 2756305FAFF144C4A6B0A039 /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = ""; }; + 2F0276A9E90843E996A0E762 /* UdpSockets.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = UdpSockets.xcodeproj; path = "../node_modules/react-native-udp/ios/UdpSockets.xcodeproj"; sourceTree = ""; }; 305F194186D848FDB07AF34C /* RNFS.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFS.xcodeproj; path = "../node_modules/react-native-fs/RNFS.xcodeproj"; sourceTree = ""; }; 3384AFA9609A409B81928AD5 /* libRCTContacts.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTContacts.a; sourceTree = ""; }; 359B076A658B4FBAB5128B03 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; }; + 38E1A2C8D0734EE99E2B16CE /* TcpSockets.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = TcpSockets.xcodeproj; path = "../node_modules/react-native-tcp/ios/TcpSockets.xcodeproj"; sourceTree = ""; }; + 439B6B4B407A4E2AACAFE5BE /* RCTJail.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTJail.xcodeproj; path = "../node_modules/react-native-status/ios/RCTJail/RCTJail.xcodeproj"; sourceTree = ""; }; 43A6FA689D844B0BAF3AA8B4 /* RCTOrientation.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTOrientation.xcodeproj; path = "../node_modules/react-native-orientation/iOS/RCTOrientation.xcodeproj"; sourceTree = ""; }; 45FB5F523DE04BDE9877869C /* RNRandomBytes.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNRandomBytes.xcodeproj; path = "../node_modules/react-native-randombytes/RNRandomBytes.xcodeproj"; sourceTree = ""; }; 46E2F6052EB44C698C680894 /* RNI18n.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNI18n.xcodeproj; path = "../node_modules/react-native-i18n/RNI18n.xcodeproj"; sourceTree = ""; }; @@ -238,7 +277,9 @@ 8AE71EE8751F4652B13BFE83 /* RNVectorIcons.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNVectorIcons.xcodeproj; path = "../node_modules/react-native-vector-icons/RNVectorIcons.xcodeproj"; sourceTree = ""; }; 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; 9F1854E6D9654226B1FC8308 /* RCTCamera.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTCamera.xcodeproj; path = "../node_modules/react-native-camera/ios/RCTCamera.xcodeproj"; sourceTree = ""; }; + A96279092BEC4C4B93914F48 /* libUdpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libUdpSockets.a; sourceTree = ""; }; B3B19223008342D096AA356E /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = ""; }; + C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libTcpSockets.a; sourceTree = ""; }; CD48A32459B64E96843BB238 /* libRealmReact.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRealmReact.a; sourceTree = ""; }; CEB0E2659D1A4F5FA842057A /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = ""; }; DF1CD4C3D1254774ACCAE4E8 /* libBVLinearGradient.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libBVLinearGradient.a; sourceTree = ""; }; @@ -257,6 +298,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 20B2DBFC1D47C70C00427CD8 /* Statusgo.framework in Frameworks */, + 20AB9EC61D47CC0300E7FD9C /* libRCTJail.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, @@ -278,6 +321,8 @@ 22118DE1207A419FBFE7B62D /* libRealmReact.a in Frameworks */, 25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */, BA68A2377A20496EA737000D /* libz.tbd in Frameworks */, + 3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */, + AD5063BC2B2A4C52ACE0A0B4 /* libUdpSockets.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -382,6 +427,7 @@ 1E7837547A9A40E18AD63CF3 /* Resources */ = { isa = PBXGroup; children = ( + 2028E0111D4275BD00227DCD /* SF */, 52E205D210BC48B7A553BB62 /* Entypo.ttf */, CEB0E2659D1A4F5FA842057A /* EvilIcons.ttf */, 7B5870D9ED504F32B6A09C35 /* FontAwesome.ttf */, @@ -394,6 +440,41 @@ name = Resources; sourceTree = ""; }; + 201067551D477F5E00FA83B6 /* Products */ = { + isa = PBXGroup; + children = ( + 2010676D1D477F5E00FA83B6 /* libTcpSockets.a */, + ); + name = Products; + sourceTree = ""; + }; + 2010676E1D477F5E00FA83B6 /* Products */ = { + isa = PBXGroup; + children = ( + 201067721D477F5E00FA83B6 /* libUdpSockets.a */, + ); + name = Products; + sourceTree = ""; + }; + 201067BA1D4789F700FA83B6 /* Products */ = { + isa = PBXGroup; + children = ( + 201067C41D4789F700FA83B6 /* libRCTJail.a */, + ); + name = Products; + sourceTree = ""; + }; + 2028E0111D4275BD00227DCD /* SF */ = { + isa = PBXGroup; + children = ( + 2028DFF51D4275B600227DCD /* SF-UI-Display-Medium.otf */, + 2028DFF61D4275B600227DCD /* SF-UI-Display-Regular.otf */, + 2028DFF71D4275B600227DCD /* SF-UI-Display-Semibold.otf */, + 2028DFF81D4275B600227DCD /* SF-UI-Display-Thin.otf */, + ); + name = SF; + sourceTree = ""; + }; 20B7D0F01D3F74CC00B70F14 /* Products */ = { isa = PBXGroup; children = ( @@ -497,6 +578,9 @@ 45FB5F523DE04BDE9877869C /* RNRandomBytes.xcodeproj */, 8AE71EE8751F4652B13BFE83 /* RNVectorIcons.xcodeproj */, F090E261B9854867A728CE4F /* RealmReact.xcodeproj */, + 38E1A2C8D0734EE99E2B16CE /* TcpSockets.xcodeproj */, + 2F0276A9E90843E996A0E762 /* UdpSockets.xcodeproj */, + 439B6B4B407A4E2AACAFE5BE /* RCTJail.xcodeproj */, ); name = Libraries; sourceTree = ""; @@ -535,6 +619,9 @@ A97BA941B2FB44B4B66EE6D3 /* Frameworks */ = { isa = PBXGroup; children = ( + 20B2DBFB1D47C70C00427CD8 /* Statusgo.framework */, + 20B2DBF71D47C25500427CD8 /* Statusgo.framework */, + 20B2DBDD1D47BD5E00427CD8 /* Statusgo.framework */, 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */, 4E586E1B0E544F64AA9F5BD1 /* libz.tbd */, ); @@ -631,6 +718,10 @@ ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; }, + { + ProductGroup = 201067BA1D4789F700FA83B6 /* Products */; + ProjectRef = 439B6B4B407A4E2AACAFE5BE /* RCTJail.xcodeproj */; + }, { ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; @@ -683,6 +774,14 @@ ProductGroup = 20B7D0FF1D3F74CD00B70F14 /* Products */; ProjectRef = 8AE71EE8751F4652B13BFE83 /* RNVectorIcons.xcodeproj */; }, + { + ProductGroup = 201067551D477F5E00FA83B6 /* Products */; + ProjectRef = 38E1A2C8D0734EE99E2B16CE /* TcpSockets.xcodeproj */; + }, + { + ProductGroup = 2010676E1D477F5E00FA83B6 /* Products */; + ProjectRef = 2F0276A9E90843E996A0E762 /* UdpSockets.xcodeproj */; + }, ); projectRoot = ""; targets = ( @@ -749,6 +848,27 @@ remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 2010676D1D477F5E00FA83B6 /* libTcpSockets.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libTcpSockets.a; + remoteRef = 2010676C1D477F5E00FA83B6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 201067721D477F5E00FA83B6 /* libUdpSockets.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libUdpSockets.a; + remoteRef = 201067711D477F5E00FA83B6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 201067C41D4789F700FA83B6 /* libRCTJail.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTJail.a; + remoteRef = 201067C31D4789F700FA83B6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 20B7D0FE1D3F74CC00B70F14 /* libRNRandomBytes.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -849,6 +969,10 @@ files = ( 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, + 2028DFFA1D4275B600227DCD /* SF-UI-Display-Regular.otf in Resources */, + 2028DFF91D4275B600227DCD /* SF-UI-Display-Medium.otf in Resources */, + 2028DFFC1D4275B600227DCD /* SF-UI-Display-Thin.otf in Resources */, + 2028DFFB1D4275B600227DCD /* SF-UI-Display-Semibold.otf in Resources */, D28AEFB4C39548EB80416889 /* Entypo.ttf in Resources */, 82E689BAF9FB43C8AC6FF1CA /* EvilIcons.ttf in Resources */, C3EE9AEA6F77464588FBAA64 /* FontAwesome.ttf in Resources */, @@ -946,6 +1070,10 @@ "\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StatusIm.app/StatusIm"; @@ -975,6 +1103,10 @@ "\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StatusIm.app/StatusIm"; @@ -984,8 +1116,13 @@ 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = ( + "$(ARCHS_STANDARD)", + x86_64, + ); ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEAD_CODE_STRIPPING = NO; + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../node_modules/react-native-status/ios"; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, @@ -999,6 +1136,10 @@ "$(SRCROOT)/../node_modules/react-native-randombytes", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/realm/src/**", + "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", + "$(SRCROOT)/../node_modules/react-native-udp/ios/**", + "$(SRCROOT)/../node_modules/react-native-status/ios/RCTJail/RCTJail/**", + "$(SRCROOT)/../node_modules/react-native-status/ios/RCTJail/RCTJail/**", ); INFOPLIST_FILE = StatusIm/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1008,14 +1149,20 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.statusim; PRODUCT_NAME = StatusIm; + VALID_ARCHS = "arm64 armv7 armv7s x86_64"; }; name = Debug; }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = ( + "$(ARCHS_STANDARD)", + x86_64, + ); ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEAD_CODE_STRIPPING = NO; + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../node_modules/react-native-status/ios"; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, @@ -1029,6 +1176,10 @@ "$(SRCROOT)/../node_modules/react-native-randombytes", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/realm/src/**", + "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", + "$(SRCROOT)/../node_modules/react-native-udp/ios/**", + "$(SRCROOT)/../node_modules/react-native-status/ios/RCTJail/RCTJail/**", + "$(SRCROOT)/../node_modules/react-native-status/ios/RCTJail/RCTJail/**", ); INFOPLIST_FILE = StatusIm/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1038,6 +1189,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.statusim; PRODUCT_NAME = StatusIm; + VALID_ARCHS = "arm64 armv7 armv7s x86_64"; }; name = Release; }; @@ -1088,6 +1240,10 @@ "$(SRCROOT)/../node_modules/react-native-randombytes", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/realm/src/**", + "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", + "$(SRCROOT)/../node_modules/react-native-udp/ios/**", + "$(SRCROOT)/../node_modules/react-native-status/ios/RCTJail/RCTJail/**", + "$(SRCROOT)/../node_modules/react-native-status/ios/RCTJail/RCTJail/**", ); IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = YES; @@ -1137,6 +1293,10 @@ "$(SRCROOT)/../node_modules/react-native-randombytes", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/realm/src/**", + "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", + "$(SRCROOT)/../node_modules/react-native-udp/ios/**", + "$(SRCROOT)/../node_modules/react-native-status/ios/RCTJail/RCTJail/**", + "$(SRCROOT)/../node_modules/react-native-status/ios/RCTJail/RCTJail/**", ); IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = NO; diff --git a/ios/StatusIm/AppDelegate.m b/ios/StatusIm/AppDelegate.m index 92f2c6058e..edeb5e5680 100644 --- a/ios/StatusIm/AppDelegate.m +++ b/ios/StatusIm/AppDelegate.m @@ -18,9 +18,8 @@ { NSURL *jsCodeLocation; - [[RCTBundleURLProvider sharedSettings] setDefaults]; jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; - + RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"StatusIm" initialProperties:nil diff --git a/ios/StatusIm/Images.xcassets/Contents.json b/ios/StatusIm/Images.xcassets/Contents.json new file mode 100644 index 0000000000..da4a164c91 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/avatar.imageset/Contents.json b/ios/StatusIm/Images.xcassets/avatar.imageset/Contents.json new file mode 100644 index 0000000000..c995bd82c7 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/avatar.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "avatar.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/avatar.imageset/avatar.png b/ios/StatusIm/Images.xcassets/avatar.imageset/avatar.png new file mode 100644 index 0000000000..7fb2d0b42b Binary files /dev/null and b/ios/StatusIm/Images.xcassets/avatar.imageset/avatar.png differ diff --git a/ios/StatusIm/Images.xcassets/corner_left_bottom.imageset/Contents.json b/ios/StatusIm/Images.xcassets/corner_left_bottom.imageset/Contents.json new file mode 100644 index 0000000000..8f7abaebbb --- /dev/null +++ b/ios/StatusIm/Images.xcassets/corner_left_bottom.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "corner_left_bottom.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/corner_left_bottom.imageset/corner_left_bottom.png b/ios/StatusIm/Images.xcassets/corner_left_bottom.imageset/corner_left_bottom.png new file mode 100644 index 0000000000..0fff341220 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/corner_left_bottom.imageset/corner_left_bottom.png differ diff --git a/ios/StatusIm/Images.xcassets/corner_left_top.imageset/Contents.json b/ios/StatusIm/Images.xcassets/corner_left_top.imageset/Contents.json new file mode 100644 index 0000000000..8a4261dfff --- /dev/null +++ b/ios/StatusIm/Images.xcassets/corner_left_top.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "corner_left_top.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/corner_left_top.imageset/corner_left_top.png b/ios/StatusIm/Images.xcassets/corner_left_top.imageset/corner_left_top.png new file mode 100644 index 0000000000..e25037ece3 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/corner_left_top.imageset/corner_left_top.png differ diff --git a/ios/StatusIm/Images.xcassets/corner_right_bottom.imageset/Contents.json b/ios/StatusIm/Images.xcassets/corner_right_bottom.imageset/Contents.json new file mode 100644 index 0000000000..077dc66507 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/corner_right_bottom.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "corner_right_bottom.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/corner_right_bottom.imageset/corner_right_bottom.png b/ios/StatusIm/Images.xcassets/corner_right_bottom.imageset/corner_right_bottom.png new file mode 100644 index 0000000000..e542ec0d64 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/corner_right_bottom.imageset/corner_right_bottom.png differ diff --git a/ios/StatusIm/Images.xcassets/corner_right_top.imageset/Contents.json b/ios/StatusIm/Images.xcassets/corner_right_top.imageset/Contents.json new file mode 100644 index 0000000000..4a70ee3948 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/corner_right_top.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "corner_right_top.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/corner_right_top.imageset/corner_right_top.png b/ios/StatusIm/Images.xcassets/corner_right_top.imageset/corner_right_top.png new file mode 100644 index 0000000000..a6a65aedc9 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/corner_right_top.imageset/corner_right_top.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_add.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_add.imageset/Contents.json new file mode 100644 index 0000000000..32c01ec112 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_add.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_add.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_add.imageset/icon_add.png b/ios/StatusIm/Images.xcassets/icon_add.imageset/icon_add.png new file mode 100644 index 0000000000..2780585768 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_add.imageset/icon_add.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_add_gray.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_add_gray.imageset/Contents.json new file mode 100644 index 0000000000..bd31b2dad5 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_add_gray.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_add_gray.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_add_gray.imageset/icon_add_gray.png b/ios/StatusIm/Images.xcassets/icon_add_gray.imageset/icon_add_gray.png new file mode 100644 index 0000000000..55a1592352 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_add_gray.imageset/icon_add_gray.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_avatar.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_avatar.imageset/Contents.json new file mode 100644 index 0000000000..d7258658d9 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_avatar.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_avatar.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_avatar.imageset/icon_avatar.png b/ios/StatusIm/Images.xcassets/icon_avatar.imageset/icon_avatar.png new file mode 100644 index 0000000000..f3b8d0770d Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_avatar.imageset/icon_avatar.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_back.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_back.imageset/Contents.json new file mode 100644 index 0000000000..26468eea27 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_back.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_back.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_back.imageset/icon_back.png b/ios/StatusIm/Images.xcassets/icon_back.imageset/icon_back.png new file mode 100644 index 0000000000..4d688372c9 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_back.imageset/icon_back.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_back_white.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_back_white.imageset/Contents.json new file mode 100644 index 0000000000..1a8177ac16 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_back_white.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_back_white.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_back_white.imageset/icon_back_white.png b/ios/StatusIm/Images.xcassets/icon_back_white.imageset/icon_back_white.png new file mode 100644 index 0000000000..166bc865a4 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_back_white.imageset/icon_back_white.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_bin.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_bin.imageset/Contents.json new file mode 100644 index 0000000000..3dd5b54b3c --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_bin.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_bin.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_bin.imageset/icon_bin.png b/ios/StatusIm/Images.xcassets/icon_bin.imageset/icon_bin.png new file mode 100644 index 0000000000..fa960dbf1d Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_bin.imageset/icon_bin.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_close_gray.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_close_gray.imageset/Contents.json new file mode 100644 index 0000000000..cdbac7a9e1 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_close_gray.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_close_gray.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_close_gray.imageset/icon_close_gray.png b/ios/StatusIm/Images.xcassets/icon_close_gray.imageset/icon_close_gray.png new file mode 100644 index 0000000000..c1f1c5f300 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_close_gray.imageset/icon_close_gray.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_close_white.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_close_white.imageset/Contents.json new file mode 100644 index 0000000000..aa3fb77e9e --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_close_white.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_close_white.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_close_white.imageset/icon_close_white.png b/ios/StatusIm/Images.xcassets/icon_close_white.imageset/icon_close_white.png new file mode 100644 index 0000000000..32e84becb6 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_close_white.imageset/icon_close_white.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_dollar.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_dollar.imageset/Contents.json new file mode 100644 index 0000000000..ed48a38167 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_dollar.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_dollar.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_dollar.imageset/icon_dollar.png b/ios/StatusIm/Images.xcassets/icon_dollar.imageset/icon_dollar.png new file mode 100644 index 0000000000..85d93cab2c Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_dollar.imageset/icon_dollar.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_dollar_green.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_dollar_green.imageset/Contents.json new file mode 100644 index 0000000000..4acd2dadd6 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_dollar_green.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_dollar_green.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_dollar_green.imageset/icon_dollar_green.png b/ios/StatusIm/Images.xcassets/icon_dollar_green.imageset/icon_dollar_green.png new file mode 100644 index 0000000000..dac30955fe Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_dollar_green.imageset/icon_dollar_green.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_dots.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_dots.imageset/Contents.json new file mode 100644 index 0000000000..0e5ab17112 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_dots.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_dots.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_dots.imageset/icon_dots.png b/ios/StatusIm/Images.xcassets/icon_dots.imageset/icon_dots.png new file mode 100644 index 0000000000..464cfeb09f Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_dots.imageset/icon_dots.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_drag_down.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_drag_down.imageset/Contents.json new file mode 100644 index 0000000000..25da82bc5e --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_drag_down.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_drag_down.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_drag_down.imageset/icon_drag_down.png b/ios/StatusIm/Images.xcassets/icon_drag_down.imageset/icon_drag_down.png new file mode 100644 index 0000000000..7e7a4912bc Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_drag_down.imageset/icon_drag_down.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_drag_white.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_drag_white.imageset/Contents.json new file mode 100644 index 0000000000..f802fecef4 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_drag_white.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_drag_white.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_drag_white.imageset/icon_drag_white.png b/ios/StatusIm/Images.xcassets/icon_drag_white.imageset/icon_drag_white.png new file mode 100644 index 0000000000..23fa971c5e Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_drag_white.imageset/icon_drag_white.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_group.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_group.imageset/Contents.json new file mode 100644 index 0000000000..1e9bce3278 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_group.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_group.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_group.imageset/icon_group.png b/ios/StatusIm/Images.xcassets/icon_group.imageset/icon_group.png new file mode 100644 index 0000000000..b14d23f73b Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_group.imageset/icon_group.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_group_big.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_group_big.imageset/Contents.json new file mode 100644 index 0000000000..54bb50362d --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_group_big.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_group_big.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_group_big.imageset/icon_group_big.png b/ios/StatusIm/Images.xcassets/icon_group_big.imageset/icon_group_big.png new file mode 100644 index 0000000000..a1bff88bb0 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_group_big.imageset/icon_group_big.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_hamburger.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_hamburger.imageset/Contents.json new file mode 100644 index 0000000000..7466451000 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_hamburger.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_hamburger.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_hamburger.imageset/icon_hamburger.png b/ios/StatusIm/Images.xcassets/icon_hamburger.imageset/icon_hamburger.png new file mode 100644 index 0000000000..8bd85bc66a Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_hamburger.imageset/icon_hamburger.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_input_list.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_input_list.imageset/Contents.json new file mode 100644 index 0000000000..5fcc1377bb --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_input_list.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_input_list.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_input_list.imageset/icon_input_list.png b/ios/StatusIm/Images.xcassets/icon_input_list.imageset/icon_input_list.png new file mode 100644 index 0000000000..9e4fd528b3 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_input_list.imageset/icon_input_list.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_list.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_list.imageset/Contents.json new file mode 100644 index 0000000000..5a463f3dea --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_list.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_list.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_list.imageset/icon_list.png b/ios/StatusIm/Images.xcassets/icon_list.imageset/icon_list.png new file mode 100644 index 0000000000..e253971bae Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_list.imageset/icon_list.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_lock_gray.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_lock_gray.imageset/Contents.json new file mode 100644 index 0000000000..ced131029f --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_lock_gray.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_lock_gray.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_lock_gray.imageset/icon_lock_gray.png b/ios/StatusIm/Images.xcassets/icon_lock_gray.imageset/icon_lock_gray.png new file mode 100644 index 0000000000..f18aaa61e1 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_lock_gray.imageset/icon_lock_gray.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_lock_white.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_lock_white.imageset/Contents.json new file mode 100644 index 0000000000..1ceca537cf --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_lock_white.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_lock_white.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_lock_white.imageset/icon_lock_white.png b/ios/StatusIm/Images.xcassets/icon_lock_white.imageset/icon_lock_white.png new file mode 100644 index 0000000000..ccddc79dec Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_lock_white.imageset/icon_lock_white.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_menu_group.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_menu_group.imageset/Contents.json new file mode 100644 index 0000000000..e499cb9f09 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_menu_group.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_menu_group.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_menu_group.imageset/icon_menu_group.png b/ios/StatusIm/Images.xcassets/icon_menu_group.imageset/icon_menu_group.png new file mode 100644 index 0000000000..a356f7ccdd Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_menu_group.imageset/icon_menu_group.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_more_vertical.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_more_vertical.imageset/Contents.json new file mode 100644 index 0000000000..bb21bc5206 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_more_vertical.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_more_vertical.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_more_vertical.imageset/icon_more_vertical.png b/ios/StatusIm/Images.xcassets/icon_more_vertical.imageset/icon_more_vertical.png new file mode 100644 index 0000000000..d30018f924 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_more_vertical.imageset/icon_more_vertical.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_more_vertical_blue.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_more_vertical_blue.imageset/Contents.json new file mode 100644 index 0000000000..2581b977ee --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_more_vertical_blue.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_more_vertical_blue.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_more_vertical_blue.imageset/icon_more_vertical_blue.png b/ios/StatusIm/Images.xcassets/icon_more_vertical_blue.imageset/icon_more_vertical_blue.png new file mode 100644 index 0000000000..79449d9dff Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_more_vertical_blue.imageset/icon_more_vertical_blue.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_muted.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_muted.imageset/Contents.json new file mode 100644 index 0000000000..052a64996d --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_muted.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_muted.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_muted.imageset/icon_muted.png b/ios/StatusIm/Images.xcassets/icon_muted.imageset/icon_muted.png new file mode 100644 index 0000000000..674a9faa66 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_muted.imageset/icon_muted.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_notifications_on.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_notifications_on.imageset/Contents.json new file mode 100644 index 0000000000..fecfd53e27 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_notifications_on.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_notifications_on.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_notifications_on.imageset/icon_notifications_on.png b/ios/StatusIm/Images.xcassets/icon_notifications_on.imageset/icon_notifications_on.png new file mode 100644 index 0000000000..a0ee3c3fd5 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_notifications_on.imageset/icon_notifications_on.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_ok.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_ok.imageset/Contents.json new file mode 100644 index 0000000000..3fe06efeae --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_ok.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_ok.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_ok.imageset/icon_ok.png b/ios/StatusIm/Images.xcassets/icon_ok.imageset/icon_ok.png new file mode 100644 index 0000000000..4abb3e2e57 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_ok.imageset/icon_ok.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_ok_blue.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_ok_blue.imageset/Contents.json new file mode 100644 index 0000000000..d29ccc9482 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_ok_blue.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_ok_blue.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_ok_blue.imageset/icon_ok_blue.png b/ios/StatusIm/Images.xcassets/icon_ok_blue.imageset/icon_ok_blue.png new file mode 100644 index 0000000000..9e8661249d Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_ok_blue.imageset/icon_ok_blue.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_ok_disabled.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_ok_disabled.imageset/Contents.json new file mode 100644 index 0000000000..66360b34ca --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_ok_disabled.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_ok_disabled.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_ok_disabled.imageset/icon_ok_disabled.png b/ios/StatusIm/Images.xcassets/icon_ok_disabled.imageset/icon_ok_disabled.png new file mode 100644 index 0000000000..513a2177a2 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_ok_disabled.imageset/icon_ok_disabled.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_ok_purple.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_ok_purple.imageset/Contents.json new file mode 100644 index 0000000000..96fbd01abb --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_ok_purple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_ok_purple.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_ok_purple.imageset/icon_ok_purple.png b/ios/StatusIm/Images.xcassets/icon_ok_purple.imageset/icon_ok_purple.png new file mode 100644 index 0000000000..b294224264 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_ok_purple.imageset/icon_ok_purple.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_ok_small.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_ok_small.imageset/Contents.json new file mode 100644 index 0000000000..92a81a0b71 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_ok_small.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_ok_small.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_ok_small.imageset/icon_ok_small.png b/ios/StatusIm/Images.xcassets/icon_ok_small.imageset/icon_ok_small.png new file mode 100644 index 0000000000..e824f5e8eb Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_ok_small.imageset/icon_ok_small.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_ok_small_copy_2.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_ok_small_copy_2.imageset/Contents.json new file mode 100644 index 0000000000..eac35ff2a0 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_ok_small_copy_2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_ok_small_copy_2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_ok_small_copy_2.imageset/icon_ok_small_copy_2.png b/ios/StatusIm/Images.xcassets/icon_ok_small_copy_2.imageset/icon_ok_small_copy_2.png new file mode 100644 index 0000000000..e824f5e8eb Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_ok_small_copy_2.imageset/icon_ok_small_copy_2.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_plus.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_plus.imageset/Contents.json new file mode 100644 index 0000000000..1b8c20f1c6 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_plus.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_plus.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_plus.imageset/icon_plus.png b/ios/StatusIm/Images.xcassets/icon_plus.imageset/icon_plus.png new file mode 100644 index 0000000000..dad95d1814 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_plus.imageset/icon_plus.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_qr.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_qr.imageset/Contents.json new file mode 100644 index 0000000000..bd62d825e7 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_qr.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_qr.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_qr.imageset/icon_qr.png b/ios/StatusIm/Images.xcassets/icon_qr.imageset/icon_qr.png new file mode 100644 index 0000000000..f7b3c5ad15 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_qr.imageset/icon_qr.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_scan_white.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_scan_white.imageset/Contents.json new file mode 100644 index 0000000000..dcdc616423 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_scan_white.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_scan_white.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_scan_white.imageset/icon_scan_white.png b/ios/StatusIm/Images.xcassets/icon_scan_white.imageset/icon_scan_white.png new file mode 100644 index 0000000000..9aeeecba40 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_scan_white.imageset/icon_scan_white.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_search.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_search.imageset/Contents.json new file mode 100644 index 0000000000..aaef9bba5c --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_search.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_search.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_search.imageset/icon_search.png b/ios/StatusIm/Images.xcassets/icon_search.imageset/icon_search.png new file mode 100644 index 0000000000..b057823f3b Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_search.imageset/icon_search.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_search_gray_copy.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_search_gray_copy.imageset/Contents.json new file mode 100644 index 0000000000..90a07d3f4b --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_search_gray_copy.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_search_gray_copy.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_search_gray_copy.imageset/icon_search_gray_copy.png b/ios/StatusIm/Images.xcassets/icon_search_gray_copy.imageset/icon_search_gray_copy.png new file mode 100644 index 0000000000..d138f4e4b9 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_search_gray_copy.imageset/icon_search_gray_copy.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_send.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_send.imageset/Contents.json new file mode 100644 index 0000000000..9498f71507 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_send.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_send.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_send.imageset/icon_send.png b/ios/StatusIm/Images.xcassets/icon_send.imageset/icon_send.png new file mode 100644 index 0000000000..29c51712c3 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_send.imageset/icon_send.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_settings.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_settings.imageset/Contents.json new file mode 100644 index 0000000000..dfa2c91077 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_settings.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_settings.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_settings.imageset/icon_settings.png b/ios/StatusIm/Images.xcassets/icon_settings.imageset/icon_settings.png new file mode 100644 index 0000000000..561a5dcc25 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_settings.imageset/icon_settings.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_smile.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_smile.imageset/Contents.json new file mode 100644 index 0000000000..322839f98e --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_smile.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_smile.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_smile.imageset/icon_smile.png b/ios/StatusIm/Images.xcassets/icon_smile.imageset/icon_smile.png new file mode 100644 index 0000000000..45dfb63996 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_smile.imageset/icon_smile.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_tab_chats.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_tab_chats.imageset/Contents.json new file mode 100644 index 0000000000..02a839408c --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_tab_chats.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_tab_chats.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_tab_chats.imageset/icon_tab_chats.png b/ios/StatusIm/Images.xcassets/icon_tab_chats.imageset/icon_tab_chats.png new file mode 100644 index 0000000000..382bcaaaf6 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_tab_chats.imageset/icon_tab_chats.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_tab_contacts.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_tab_contacts.imageset/Contents.json new file mode 100644 index 0000000000..1bd385d0a8 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_tab_contacts.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_tab_contacts.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_tab_contacts.imageset/icon_tab_contacts.png b/ios/StatusIm/Images.xcassets/icon_tab_contacts.imageset/icon_tab_contacts.png new file mode 100644 index 0000000000..19f17a0942 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_tab_contacts.imageset/icon_tab_contacts.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_tab_discovery.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_tab_discovery.imageset/Contents.json new file mode 100644 index 0000000000..d0cf0bd329 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_tab_discovery.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_tab_discovery.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_tab_discovery.imageset/icon_tab_discovery.png b/ios/StatusIm/Images.xcassets/icon_tab_discovery.imageset/icon_tab_discovery.png new file mode 100644 index 0000000000..8bc25d2ab3 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_tab_discovery.imageset/icon_tab_discovery.png differ diff --git a/ios/StatusIm/Images.xcassets/icon_up.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_up.imageset/Contents.json new file mode 100644 index 0000000000..1b137c08cd --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_up.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_up.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_up.imageset/icon_up.png b/ios/StatusIm/Images.xcassets/icon_up.imageset/icon_up.png new file mode 100644 index 0000000000..01e16f8ce1 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/icon_up.imageset/icon_up.png differ diff --git a/ios/StatusIm/Images.xcassets/scan_blue.imageset/Contents.json b/ios/StatusIm/Images.xcassets/scan_blue.imageset/Contents.json new file mode 100644 index 0000000000..3be5fbd2eb --- /dev/null +++ b/ios/StatusIm/Images.xcassets/scan_blue.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "scan_blue.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/scan_blue.imageset/scan_blue.png b/ios/StatusIm/Images.xcassets/scan_blue.imageset/scan_blue.png new file mode 100644 index 0000000000..b89f57307c Binary files /dev/null and b/ios/StatusIm/Images.xcassets/scan_blue.imageset/scan_blue.png differ diff --git a/ios/StatusIm/Info.plist b/ios/StatusIm/Info.plist index 987f5a738e..ee2fe54827 100644 --- a/ios/StatusIm/Info.plist +++ b/ios/StatusIm/Info.plist @@ -1,58 +1,62 @@ - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSLocationWhenInUseUsageDescription - - UIAppFonts - - Entypo.ttf - EvilIcons.ttf - FontAwesome.ttf - Foundation.ttf - Ionicons.ttf - MaterialIcons.ttf - Octicons.ttf - Zocial.ttf - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationWhenInUseUsageDescription + + UIAppFonts + + SF-UI-Display-Medium.otf + SF-UI-Display-Regular.otf + SF-UI-Display-Semibold.otf + SF-UI-Display-Thin.otf + Entypo.ttf + EvilIcons.ttf + FontAwesome.ttf + Foundation.ttf + Ionicons.ttf + MaterialIcons.ttf + Octicons.ttf + Zocial.ttf + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + \ No newline at end of file diff --git a/package.json b/package.json index 8ba9e933dd..75ed14a03f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "start": "node_modules/react-native/packager/packager.sh", - "postinstall": "./node_modules/.bin/rn-nodeify --install --hack" + "postinstall": "./postinstall.sh" }, "devDependencies": { "rn-nodeify": "^6.0.1" @@ -25,10 +25,11 @@ "process": "^0.11.5", "punycode": "^1.4.1", "querystring-es3": "^0.2.1", + "re-natal": "0.2.38", "react": "^15.2.0", - "react-native": "^0.29.2", + "react-native": "^0.30.0", "react-native-action-button": "^1.1.11", - "react-native-android-sms-listener": "github:alwx/react-native-android-sms-listener#rn0.29-support", + "react-native-android-sms-listener": "github:alwx/react-native-android-sms-listener#listener-bugfix", "react-native-camera": "github:codyhazelwood/react-native-camera", "react-native-circle-checkbox": "github:paramoshkinandrew/ReactNativeCircleCheckbox", "react-native-contacts": "^0.2.4", @@ -42,7 +43,7 @@ "react-native-orientation": "github:youennPennarun/react-native-orientation", "react-native-qrcode": "^0.2.2", "react-native-randombytes": "^2.1.0", - "react-native-status": "github:status-im/react-native-status", + "react-native-status": "github:status-im/react-native-status#ios-module", "react-native-tcp": "^1.0.1", "react-native-udp": "^1.2.5", "react-native-vector-icons": "^2.0.3", @@ -104,4 +105,4 @@ "tty": "tty-browserify", "vm": "vm-browserify" } -} \ No newline at end of file +} diff --git a/postinstall.sh b/postinstall.sh new file mode 100755 index 0000000000..a5dab99b06 --- /dev/null +++ b/postinstall.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# rn-nodeify +./node_modules/.bin/rn-nodeify --install --hack; + +# symlink for re-natal +if ! [ -f re-natal ]; then + ln -s ./node_modules/re-natal/index.js re-natal; +else + echo "exists" +fi diff --git a/project.clj b/project.clj index 45da1f4146..7d8c65b347 100644 --- a/project.clj +++ b/project.clj @@ -6,7 +6,7 @@ :dependencies [[org.clojure/clojure "1.9.0-alpha7"] [org.clojure/clojurescript "1.9.76"] [reagent "0.5.1" :exclusions [cljsjs/react]] - [re-frame "0.6.0"] + [re-frame "0.7.0"] [prismatic/schema "1.0.4"] ^{:voom {:repo "git@github.com:status-im/status-lib.git" :branch "master"}} diff --git a/shim.js b/shim.js new file mode 100644 index 0000000000..872e76863e --- /dev/null +++ b/shim.js @@ -0,0 +1,22 @@ +if (typeof __dirname === 'undefined') global.__dirname = '/' +if (typeof __filename === 'undefined') global.__filename = '' +if (typeof process === 'undefined') { + global.process = require('process') +} else { + var bProcess = require('process') + for (var p in bProcess) { + if (!(p in process)) { + process[p] = bProcess[p] + } + } +} + +process.browser = false +if (typeof Buffer === 'undefined') global.Buffer = require('buffer').Buffer + +// global.location = global.location || { port: 80 } +var isDev = typeof __DEV__ === 'boolean' && __DEV__ +process.env.NODE_ENV = isDev ? 'development' : 'production' +if (typeof localStorage !== 'undefined') { + localStorage.debug = isDev ? '*' : '' +} diff --git a/src/status_im/accounts/handlers.cljs b/src/status_im/accounts/handlers.cljs index c9de35487b..e9117410fd 100644 --- a/src/status_im/accounts/handlers.cljs +++ b/src/status_im/accounts/handlers.cljs @@ -2,7 +2,7 @@ (:require [status-im.models.accounts :as accounts] [re-frame.core :refer [register-handler after dispatch dispatch-sync debug]] [status-im.utils.logging :as log] - [status-im.components.react :refer [geth]] + [status-im.components.geth :as geth] [status-im.utils.types :refer [json->clj]] [status-im.persistence.simple-kv-store :as kv] [status-im.protocol.state.storage :as storage] @@ -45,7 +45,7 @@ (register-handler :create-account (-> (fn [db [_ password]] - (.createAccount geth password (fn [result] (account-created db result password))) + (geth/create-account password (fn [result] (account-created db result password))) db))) (defn initialize-account [db account] @@ -68,14 +68,14 @@ (register-handler :login-account (-> (fn [db [_ address password]] - (.login geth address password (fn [result] - (let [data (json->clj result) - error (:error data) - success (zero? (count error))] - (log/debug "Logged in account: " address result) - (if success - (logged-in db address) - (dispatch [:set-in [:login :error] error]))))) + (geth/login address password (fn [result] + (let [data (json->clj result) + error (:error data) + success (zero? (count error))] + (log/debug "Logged in account: " address result) + (if success + (logged-in db address) + (dispatch [:set-in [:login :error] error]))))) db))) (defn load-accounts! [db _] diff --git a/src/status_im/accounts/login/screen.cljs b/src/status_im/accounts/login/screen.cljs index 490f04e028..765794b907 100644 --- a/src/status_im/accounts/login/screen.cljs +++ b/src/status_im/accounts/login/screen.cljs @@ -2,11 +2,12 @@ (:require-macros [status-im.utils.views :refer [defview]]) (:require [re-frame.core :refer [subscribe dispatch dispatch-sync]] [status-im.components.react :refer [view - text-class + text text-input image linear-gradient touchable-highlight]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.components.text-field.view :refer [text-field]] [status-im.components.styles :refer [color-purple @@ -24,13 +25,15 @@ [status-im.i18n :refer [label]] [status-im.accounts.login.styles :as st])) -(def toolbar-title +(defn toolbar-title [platform-specific] [view toolbar-title-container - [text-class {:style (merge toolbar-title-text {:color color-white})} + [text {:style (merge toolbar-title-text {:color color-white}) + :platform-specific platform-specific + :font :medium} (label :t/login)]]) (defview address-input [address] - [view button-input-container + [view [text-field {:value address :editable false @@ -39,53 +42,57 @@ :lineColor :white :inputStyle st/input-style :wrapperStyle (merge button-input st/address-input-wrapper) - :onChangeText #(dispatch [:set-in [:login :address] %])}] - ;[scan-button {:labelStyle st/scan-label - ; :icon :icon_scan_white - ; :showLabel (zero? (count address)) - ; :handler #(dispatch [:scan-qr-code {:toolbar-title (label :t/login)} :set-address-from-qr])}] - ]) + :onChangeText #(dispatch [:set-in [:login :address] %])}]]) (defview password-input [error] - [text-field - {:value "" - :error (when (pos? (count error)) (label :t/wrong-password)) - :errorColor :white - :label (label :t/password) - :labelColor "#ffffff80" - :lineColor :white - :inputStyle st/input-style - :onChangeText #(do - (dispatch [:set-in [:login :password] %]) - (dispatch [:set-in [:login :error] ""]))}]) + [view + [text-field + {:value "" + :error (when (pos? (count error)) (label :t/wrong-password)) + :errorColor :white + :label (label :t/password) + :labelColor "#ffffff80" + :lineColor :white + :inputStyle st/input-style + :onChangeText #(do + (dispatch [:set-in [:login :password] %]) + (dispatch [:set-in [:login :error] ""]))}]]) -(defview login [] +(defview login [{platform-specific :platform-specific}] [{:keys [address password error]} [:get :login]] - [view st/screen-container - [linear-gradient {:colors ["rgba(182, 116, 241, 1)" "rgba(107, 147, 231, 1)" "rgba(43, 171, 238, 1)"] - :start [0, 0] - :end [0.5, 1] - :locations [0, 0.8, 1] - :style st/gradient-background}] - - [toolbar {:background-color :transparent - :nav-action {:image {:source {:uri :icon_back_white} - :style icon-back} - :handler #(dispatch [:navigate-back])} - :custom-content toolbar-title - :action {:image {:style icon-search} - :handler #()}}] - [view st/form-container + [view st/screen-container + [linear-gradient {:colors ["rgba(182, 116, 241, 1)" "rgba(107, 147, 231, 1)" "rgba(43, 171, 238, 1)"] + :start [0, 0] + :end [0.5, 1] + :locations [0, 0.8, 1] + :style st/gradient-background}] + [status-bar {:platform-specific platform-specific + :type :transparent}] + [toolbar {:background-color :transparent + :nav-action {:image {:source {:uri :icon_back_white} + :style icon-back} + :handler #(dispatch [:navigate-back])} + :custom-content [toolbar-title platform-specific] + :action {:image {:style icon-search} + :handler #()}}] + [view st/form-container + [view st/form-container-inner [address-input (or address "")] - [password-input error] - ] - [view st/bottom-actions-container - [view st/recover-text-container - [touchable-highlight - {:on-press #()} - [text-class {:style st/recover-text} (label :t/recover-access)]]] - [view st/connect-button-container - [touchable-highlight - {:on-press #(dispatch [:login-account address password])} - [view st/connect-button - [text-class {:style st/connect-button-text} (label :t/connect)]]]]]]) + [password-input error]]] + (let [keyboard-height @(subscribe [:get :keyboard-height])] + [view st/bottom-actions-container + (when (= keyboard-height 0) + [view st/recover-button-container + [touchable-highlight + {:on-press #()} + [view st/recover-button + [text {:style st/recover-button-text + :platform-specific platform-specific} + (label :t/recover-access)]]]]) + [view st/connect-button-container + [touchable-highlight + {:on-press #(dispatch [:login-account address password])} + [view st/connect-button + [text {:style st/connect-button-text + :platform-specific platform-specific} + (label :t/connect)]]]]])]) diff --git a/src/status_im/accounts/login/styles.cljs b/src/status_im/accounts/login/styles.cljs index e718fed938..deeff1033a 100644 --- a/src/status_im/accounts/login/styles.cljs +++ b/src/status_im/accounts/login/styles.cljs @@ -1,6 +1,5 @@ (ns status-im.accounts.login.styles - (:require [status-im.components.styles :refer [font - title-font + (:require [status-im.components.styles :refer [title-font text1-color color-white toolbar-background2 @@ -19,8 +18,15 @@ :left 0}) (def form-container - {:marginLeft 16 - :margin-top 70}) + {:flex 1 + :flex-direction "row" + :align-items "center" + :justifyContent "center"}) + +(def form-container-inner + {:flex 1 + :padding-bottom 100 + :margin-left 16}) (def bottom-actions-container {:position :absolute @@ -28,12 +34,16 @@ :right 0 :bottom 0}) -(def recover-text-container - {:flex 1 - :alignItems :center - :padding 16}) +(def recover-button-container + {:flex 1}) -(def recover-text +(def recover-button + {:flex 1 + :alignItems :center + :paddingVertical 16 + :paddingHorizontal 28}) + +(def recover-button-text {:flex 1 :color color-white :fontSize 16}) @@ -46,8 +56,7 @@ :flex 1 :alignItems :center :paddingVertical 16 - :paddingHorizontal 28 - }) + :paddingHorizontal 28}) (def connect-button-text {:color "#7099e6" diff --git a/src/status_im/accounts/screen.cljs b/src/status_im/accounts/screen.cljs index 028ceeeaea..ca5a64ebfc 100644 --- a/src/status_im/accounts/screen.cljs +++ b/src/status_im/accounts/screen.cljs @@ -9,6 +9,7 @@ image linear-gradient touchable-highlight]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.components.styles :refer [color-purple color-white @@ -28,10 +29,13 @@ [status-im.accounts.styles :as st] [status-im.utils.logging :as log])) -(def toolbar-title - [view toolbar-title-container - [text {:style (merge toolbar-title-text {:color color-white})} - (label :t/switch-users)]]) +(defn toolbar-title [platform-specific] + (let [style (merge toolbar-title-text {:color color-white})] + [view toolbar-title-container + [text {:style style + :platform-specific platform-specific + :font :medium} + (label :t/switch-users)]])) (defn render-row [row _ _] (list-item [account-view row])) @@ -46,25 +50,29 @@ (dispatch [:navigate-to-clean :accounts]) (dispatch [:navigate-to :chat "console"])) -(defview accounts [] +(defview accounts [{platform-specific :platform-specific}] [accounts [:get :accounts] stack [:get :navigation-stack]] - (let [accounts (vals accounts) - show-back? (> (count stack) 1)] + (let [accounts (vals accounts) + show-back? (> (count stack) 1)] [view st/screen-container - [linear-gradient {:colors ["rgba(182, 116, 241, 1)" "rgba(107, 147, 231, 1)" "rgba(43, 171, 238, 1)"] + [linear-gradient {:colors ["rgba(182, 116, 241, 1)" + "rgba(107, 147, 231, 1)" + "rgba(43, 171, 238, 1)"] :start [0, 0] :end [0.5, 1] :locations [0, 0.8, 1] :style st/gradient-background} - [toolbar {:background-color :transparent - :nav-action {:image {:source (if show-back? {:uri :icon_back_white} nil) - :style icon-back} - :handler (if show-back? #(dispatch [:navigate-back]) nil)} - :custom-content toolbar-title - :action {:image {:style icon-search} - :handler #()} - :style st/toolbar}] + [status-bar {:platform-specific platform-specific + :type :transparent}] + [toolbar {:background-color :transparent + :nav-action {:image {:source (if show-back? {:uri :icon_back_white} nil) + :style icon-back} + :handler (if show-back? #(dispatch [:navigate-back]) nil)} + :custom-content [toolbar-title platform-specific] + :action {:image {:style icon-search} + :handler #()} + :platform-specific platform-specific}] [list-view {:dataSource (lw/to-datasource accounts) :enableEmptySections true :renderRow render-row @@ -76,4 +84,7 @@ [view st/add-account-button [image {:source {:uri :icon_add} :style st/icon-plus}] - [text {:style st/add-account-text} (label :t/add-account)]]]]]])) + [text {:style st/add-account-text + :platform-specific platform-specific + :font :default} + (label :t/add-account)]]]]]])) diff --git a/src/status_im/accounts/styles.cljs b/src/status_im/accounts/styles.cljs index 52dd53c3c7..91cbbb8b5f 100644 --- a/src/status_im/accounts/styles.cljs +++ b/src/status_im/accounts/styles.cljs @@ -1,7 +1,5 @@ (ns status-im.accounts.styles - (:require [status-im.components.styles :refer [font - title-font - text1-color + (:require [status-im.components.styles :refer [text1-color color-white toolbar-background2 online-color]] @@ -49,18 +47,16 @@ :justifyContent :center}) (def account-photo-container - {:flex 1 - :backgroundColor "rgba(255, 255, 255, 0.2)" - :borderRadius 50 - :width 36 - :height 36 - :alignItems :center - :justifyContent :center}) + {:flex 1 + :width 36 + :height 36 + :alignItems :center + :justifyContent :center}) (def photo-image - {:borderRadius 50 - :width 36 - :height 36}) + {:width 36 + :height 36 + :border-radius 18}) (def name-container {:flex 1 @@ -103,9 +99,3 @@ :color :white :fontSize 16 :marginLeft 8}) - -(def toolbar - {:position :absolute - :top 0 - :left 0 - :right 0}) diff --git a/src/status_im/android/core.cljs b/src/status_im/android/core.cljs index 2b13c9c616..e0b65f4aa6 100644 --- a/src/status_im/android/core.cljs +++ b/src/status_im/android/core.cljs @@ -5,8 +5,8 @@ [re-frame.core :refer [subscribe dispatch dispatch-sync]] [status-im.handlers] [status-im.subs] - [status-im.components.react :refer [navigator - app-registry + [status-im.android.styles :refer [styles]] + [status-im.components.react :refer [app-registry keyboard orientation]] [status-im.components.main-tabs :refer [main-tabs]] @@ -45,10 +45,10 @@ (keyword (.toLowerCase o))) (defn app-root [] - (let [signed-up (subscribe [:get :signed-up]) - _ (log/debug "signed up: " @signed-up) - view-id (subscribe [:get :view-id]) - account (subscribe [:get :user-identity]) + (let [signed-up (subscribe [:get :signed-up]) + _ (log/debug "signed up: " @signed-up) + view-id (subscribe [:get :view-id]) + account (subscribe [:get :user-identity]) keyboard-height (subscribe [:get :keyboard-height])] (log/debug "Current account: " @account) (r/create-class @@ -72,37 +72,38 @@ (dispatch [:set :keyboard-height 0])))) :render (fn [] - (let [startup-view (if @account + (let [startup-view (if @account (if @signed-up @view-id :chat) - (if (contains? #{:login :chat} @view-id) - @view-id + (if (contains? #{:login :chat} @view-id) + @view-id :accounts))] (log/debug startup-view) - (case (if true startup-view :chat) - :discovery [main-tabs] - :discovery-tag [discovery-tag] - :add-participants [new-participants] - :remove-participants [remove-participants] - :chat-list [main-tabs] - :new-group [new-group] - :group-settings [group-settings] - :contact-list [main-tabs] - :group-contacts [contact-list] - :new-contact [new-contact] - :qr-scanner [qr-scanner] - :chat [chat] - :profile [profile] - :accounts [accounts] - :login [login] - :my-profile [my-profile])))}))) + (let [component (case (if true startup-view :chat) + :discovery main-tabs + :discovery-tag discovery-tag + :add-participants new-participants + :remove-participants remove-participants + :chat-list main-tabs + :new-group new-group + :group-settings group-settings + :contact-list main-tabs + :group-contacts contact-list + :new-contact new-contact + :qr-scanner qr-scanner + :chat chat + :profile profile + :accounts accounts + :login login + :my-profile my-profile)] + [component {:platform-specific {:styles styles}}])))}))) (defn init [& [env]] (dispatch-sync [:reset-app]) (dispatch [:initialize-crypt]) (dispatch [:initialize-geth]) - (.setSoftInputMode j/jail j/adjust-resize) + (j/set-soft-input-mode j/adjust-resize) (dispatch [:load-user-phone-number]) (init-back-button-handler!) (.registerComponent app-registry "StatusIm" #(r/reactify-component app-root))) diff --git a/src/status_im/android/styles.cljs b/src/status_im/android/styles.cljs new file mode 100644 index 0000000000..e38eae689f --- /dev/null +++ b/src/status_im/android/styles.cljs @@ -0,0 +1,19 @@ +(ns status-im.android.styles + (:require [status-im.components.styles :as styles])) + +(def components + {:status-bar {:default {:height 0 + :bar-style "default" + :color styles/color-gray} + :transparent {:height 20 + :bar-style "default" + :translucent? true + :color styles/color-transparent}}}) + +(def fonts + {:default {:font-family "sans-serif"} + :medium {:font-family "sans-serif-medium"}}) + +(def styles + {:components components + :fonts fonts}) \ No newline at end of file diff --git a/src/status_im/chat/handlers.cljs b/src/status_im/chat/handlers.cljs index 815fb08756..5966c78926 100644 --- a/src/status_im/chat/handlers.cljs +++ b/src/status_im/chat/handlers.cljs @@ -21,7 +21,6 @@ [status-im.utils.phone-number :refer [format-phone-number valid-mobile-number?]] [status-im.utils.datetime :as time] - [status-im.components.react :refer [geth]] [status-im.components.jail :as j] [status-im.utils.types :refer [json->clj]] [status-im.commands.utils :refer [generate-hiccup]] @@ -545,8 +544,8 @@ (after (fn [{:keys [current-chat-id]} [_ mode chat-id]] (when (or (nil? chat-id) (= current-chat-id chat-id)) - (.setSoftInputMode j/jail (if (= :pan mode) - j/adjust-pan - j/adjust-resize))))) + (j/set-soft-input-mode (if (= :pan mode) + j/adjust-pan + j/adjust-resize))))) (fn [db [_ chat-id mode]] (assoc-in db [:kb-mode chat-id] mode))) diff --git a/src/status_im/chat/screen.cljs b/src/status_im/chat/screen.cljs index d2b7126cbb..af1aa1993e 100644 --- a/src/status_im/chat/screen.cljs +++ b/src/status_im/chat/screen.cljs @@ -5,11 +5,11 @@ [status-im.components.react :refer [view animated-view text - image icon touchable-highlight list-view list-item]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.chat-icon.screen :refer [chat-icon-view-action chat-icon-view-menu-item]] [status-im.chat.styles.screen :as st] @@ -48,25 +48,27 @@ ;; TODO stub data ('online' property) [chat-icon-view-action chat-id group-chat name color true]) -(defn typing [member] +(defn typing [member platform-specific] [view st/typing-view [view st/typing-background - [text {:style st/typing-text} + [text {:style st/typing-text + :platform-specific platform-specific + :font :default} (str member " " (label :t/is-typing))]]]) -(defn typing-all [] +(defn typing-all [platform-specific] [view st/typing-all ;; TODO stub data (for [member ["Geoff" "Justas"]] - ^{:key member} [typing member])]) + ^{:key member} [typing member platform-specific])]) -(defn message-row [contact-by-identity group-chat messages-count] +(defn message-row [{:keys [contact-by-identity platform-specific group-chat messages-count]}] (fn [row _ idx] (let [msg (-> row (add-msg-color contact-by-identity) (assoc :group-chat group-chat) (assoc :last-msg (= (js/parseInt idx) (dec messages-count))))] - (list-item [chat-message msg])))) + (list-item [chat-message msg platform-specific])))) (defn on-action-selected [position] (case position @@ -81,8 +83,13 @@ [view nil]] items]) -(defn action-view [{:keys [icon-style custom-icon handler title subtitle] - icon-name :icon}] +(defn action-view [{{:keys [icon-style + custom-icon + handler + title + subtitle] + icon-name :icon} :action + platform-specific :platform-specific}] [touchable-highlight {:on-press (fn [] (dispatch [:set-show-actions false]) (when handler @@ -92,9 +99,13 @@ (or custom-icon [icon icon-name icon-style])] [view st/action-view - [text {:style st/action-title} title] + [text {:style st/action-title + :platform-specific platform-specific + :font :medium} title] (when-let [subtitle subtitle] - [text {:style st/action-subtitle} + [text {:style st/action-subtitle + :platform-specific platform-specific + :font :default} subtitle])]]]) (defview menu-item-icon-profile [] @@ -108,10 +119,10 @@ (defn members-text [members] (truncate-str (str (s/join ", " (map #(:name %) members)) " " (label :t/and-you)) 35)) -(defn actions-list-view [] - (let [{:keys [group-chat chat-id]} - (subscribe [:chat-properties [:group-chat :chat-id]]) - members (subscribe [:current-chat-contacts])] +(defn actions-list-view [{styles :styles :as platform-specific}] + (let [{:keys [group-chat chat-id]} (subscribe [:chat-properties [:group-chat :chat-id]]) + members (subscribe [:current-chat-contacts]) + status-bar-height (get-in styles [:components :status-bar :default :height])] (when-let [actions (if @group-chat [{:title (label :t/members-title) :subtitle (members-text @members) @@ -168,32 +179,41 @@ :height 13} ;; TODO not implemented: action Settings :handler nil}])] - [view st/actions-wrapper + [view (-> (st/actions-wrapper status-bar-height) + (merge (get-in styles [:components :actions-list-view]))) [view st/actions-separator] [view st/actions-view (for [action actions] - ^{:key action} [action-view action])]]))) + ^{:key action} [action-view {:platform-specific platform-specific + :action action}])]]))) -(defn actions-view [] +(defn actions-view [platform-specific] [overlay {:on-click-outside #(dispatch [:set-show-actions false])} - [actions-list-view]]) + [actions-list-view platform-specific]]) -(defn toolbar-content [] +(defn toolbar-content [platform-specific] (let [{:keys [group-chat name contacts]} (subscribe [:chat-properties [:group-chat :name :contacts]]) show-actions (subscribe [:show-actions])] (fn [] [view (st/chat-name-view @show-actions) - [text {:style st/chat-name-text} + [text {:style st/chat-name-text + :platform-specific platform-specific + :font :medium} (truncate-str (or @name (label :t/chat-name)) 30)] (if @group-chat [view {:flexDirection :row} [icon :group st/group-icon] - [text {:style st/members} + [text {:style st/members + :platform-specific platform-specific + :font :medium} (let [cnt (inc (count @contacts))] (label-pluralize cnt :t/members))]] ;; TODO stub data: last activity - [text {:style st/last-activity} (label :t/last-active)])]))) + [text {:style st/last-activity + :platform-specific platform-specific + :font :default} + (label :t/last-active)])]))) (defn toolbar-action [] (let [show-actions (subscribe [:show-actions])] @@ -208,20 +228,24 @@ [view st/action [chat-icon]]])))) -(defn chat-toolbar [] - (let [{:keys [group-chat name contacts]} - (subscribe [:chat-properties [:group-chat :name :contacts]]) - show-actions (subscribe [:show-actions])] - (fn [] - [toolbar {:hide-nav? @show-actions - :custom-content [toolbar-content] - :custom-action [toolbar-action]}]))) +(defn chat-toolbar [platform-specific] + (let [{:keys [group-chat name contacts]} (subscribe [:chat-properties [:group-chat :name :contacts]]) + show-actions (subscribe [:show-actions])] + [view + [status-bar {:platform-specific platform-specific}] + [toolbar {:hide-nav? @show-actions + :custom-content [toolbar-content platform-specific] + :custom-action [toolbar-action] + :style (get-in platform-specific [:styles :components :toolbar])}]])) -(defview messages-view [group-chat] +(defview messages-view [platform-specific group-chat] [messages [:chat :messages] contacts [:chat :contacts]] (let [contacts' (contacts-by-identity contacts)] - [list-view {:renderRow (message-row contacts' group-chat (count messages)) + [list-view {:renderRow (message-row {:contact-by-identity contacts' + :platform-specific platform-specific + :group-chat group-chat + :messages-count (count messages)}) :renderScrollComponent #(invertible-scroll-view (js->clj %)) :onEndReached #(dispatch [:load-more-messages]) :enableEmptySections true @@ -250,7 +274,7 @@ [animated-view {:style (st/messages-container messages-offset)} messages])}))) -(defview chat [] +(defview chat [{platform-specific :platform-specific}] [group-chat [:chat :group-chat] show-actions-atom [:show-actions] command [:get-chat-command] @@ -263,11 +287,11 @@ (let [height (.. event -nativeEvent -layout -height)] (when (not= height layout-height) (dispatch [:set-layout-height height]))))} - [chat-toolbar] + [chat-toolbar platform-specific] [messages-container - [messages-view group-chat]] - (when group-chat [typing-all]) + [messages-view platform-specific group-chat]] + (when group-chat [typing-all platform-specific]) [response-view] (when-not command? [suggestion-container]) - [chat-message-new] - (when show-actions-atom [actions-view])]) + [chat-message-new platform-specific] + (when show-actions-atom [actions-view platform-specific])]) diff --git a/src/status_im/chat/styles/message.cljs b/src/status_im/chat/styles/message.cljs index 7996abac00..80edef0a43 100644 --- a/src/status_im/chat/styles/message.cljs +++ b/src/status_im/chat/styles/message.cljs @@ -1,6 +1,5 @@ (ns status-im.chat.styles.message - (:require [status-im.components.styles :refer [font - color-light-blue-transparent + (:require [status-im.components.styles :refer [color-light-blue-transparent color-white color-black color-blue @@ -13,13 +12,11 @@ (def style-message-text {:fontSize 14 - :fontFamily font :lineHeight 21 :color text1-color}) (def style-sub-text {:top -2 - :fontFamily font :fontSize 12 :color text2-color :lineHeight 14 @@ -66,7 +63,6 @@ (def selected-message {:marginTop 18 :marginLeft 40 - :fontFamily font :fontSize 12 :color text2-color}) @@ -81,9 +77,9 @@ (def message-author {:width 24}) -(def photo-view {:borderRadius 50}) +(def photo-view {:borderRadius 12}) (def photo - {:borderRadius 50 + {:borderRadius 12 :width 24 :height 24}) @@ -97,8 +93,7 @@ :height 7}) (def delivery-text - {:fontFamily font - :fontSize 12 + {:fontSize 12 :color text2-color :marginLeft 5}) @@ -149,7 +144,7 @@ (defn command-request-image-view [command scale] {:width 32 :height 32 - :borderRadius 50 + :borderRadius 16 :backgroundColor (:color command) :transform [{:scale scale}]}) @@ -189,7 +184,6 @@ (def command-name {:fontSize 12 - :fontFamily font :color color-white}) (def command-image @@ -203,11 +197,6 @@ {:marginTop 8 :marginHorizontal 0})) -(def message-author-text - {:marginTop 0 - :fontSize 12 - :fontFamily font}) - (def audio-container {:flexDirection :row :alignItems :center}) @@ -215,7 +204,7 @@ (def play-view {:width 33 :height 33 - :borderRadius 50 + :borderRadius 16 :elevation 1}) (def play-image @@ -248,17 +237,17 @@ {:position :absolute :left 1 :top 11 - :fontFamily font :fontSize 11 :color :#4A5258 :letterSpacing 1 :lineHeight 15}) (def status-container - {:flex 1 - :alignSelf :center - :alignItems :center - :width 249}) + {:flex 1 + :alignSelf :center + :alignItems :center + :width 249 + :padding-bottom 16}) (def status-image-view {:marginTop 20}) @@ -266,12 +255,10 @@ (def status-from {:marginTop 20 :fontSize 18 - :fontFamily font :color text1-color}) (def status-text {:marginTop 10 - :fontFamily font :fontSize 14 :lineHeight 20 :textAlign :center @@ -283,7 +270,7 @@ :left 44 :width 24 :height 24 - :borderRadius 50 + :borderRadius 12 :backgroundColor online-color :borderWidth 2 :borderColor color-white}) @@ -293,7 +280,7 @@ :top 8 :width 4 :height 4 - :borderRadius 50 + :borderRadius 2 :backgroundColor color-white}) (def online-dot-left @@ -303,17 +290,17 @@ (assoc online-dot :left 11)) (def contact-photo-container - {:borderRadius 50}) + {:borderRadius 32}) (def contact-photo - {:borderRadius 50 + {:borderRadius 32 :width 64 :height 64}) (def message-date-container {:backgroundColor color-light-blue-transparent :height 24 - :borderRadius 50 + :borderRadius 12 :alignSelf :center :marginTop 20 :marginBottom 20 diff --git a/src/status_im/chat/styles/message_input.cljs b/src/status_im/chat/styles/message_input.cljs index c27a359646..e48f7efa5c 100644 --- a/src/status_im/chat/styles/message_input.cljs +++ b/src/status_im/chat/styles/message_input.cljs @@ -26,5 +26,5 @@ :marginRight 10 :width 36 :height 36 - :borderRadius 50 + :borderRadius 18 :backgroundColor color-blue}) diff --git a/src/status_im/chat/styles/plain_message.cljs b/src/status_im/chat/styles/plain_message.cljs index fa639b39fa..429982957f 100644 --- a/src/status_im/chat/styles/plain_message.cljs +++ b/src/status_im/chat/styles/plain_message.cljs @@ -16,7 +16,7 @@ :justifyContent :center}) (def list-icon - {:width 16 + {:width 20 :height 16}) (def requests-icon diff --git a/src/status_im/chat/styles/response.cljs b/src/status_im/chat/styles/response.cljs index a0a5c08cd5..01024dcfba 100644 --- a/src/status_im/chat/styles/response.cljs +++ b/src/status_im/chat/styles/response.cljs @@ -25,7 +25,7 @@ :height 32 :alignItems :center :justifyContent :center - :borderRadius 50 + :borderRadius 16 :backgroundColor color-white}) (def command-icon diff --git a/src/status_im/chat/styles/screen.cljs b/src/status_im/chat/styles/screen.cljs index e7ae9e22d9..d71bbf2a83 100644 --- a/src/status_im/chat/styles/screen.cljs +++ b/src/status_im/chat/styles/screen.cljs @@ -1,14 +1,14 @@ (ns status-im.chat.styles.screen (:require [status-im.components.styles :refer [font - title-font - color-white - chat-background - online-color - selected-message-color - separator-color - text1-color - text2-color - toolbar-background1]])) + title-font + color-white + chat-background + online-color + selected-message-color + separator-color + text1-color + text2-color + toolbar-background1]])) (def chat-view {:flex 1 @@ -74,11 +74,11 @@ :fontSize 12 :fontFamily font}) -(def actions-wrapper +(defn actions-wrapper [status-bar-height] {:backgroundColor toolbar-background1 :elevation 2 :position :absolute - :top 56 + :top (+ 55 status-bar-height) :left 0 :right 0}) @@ -105,16 +105,14 @@ :justifyContent :center}) (def action-title - {:marginTop -2.5 + {:margin-top -2.5 :color text1-color - :fontSize 14 - :fontFamily font}) + :font-size 14}) (def action-subtitle - {:marginTop 1 + {:margin-top 1 :color text2-color - :fontSize 12 - :fontFamily font}) + :font-size 12}) (def typing-all {:marginBottom 20}) diff --git a/src/status_im/chat/subs.cljs b/src/status_im/chat/subs.cljs index f21124a4fc..18614dd638 100644 --- a/src/status_im/chat/subs.cljs +++ b/src/status_im/chat/subs.cljs @@ -1,6 +1,7 @@ (ns status-im.chat.subs (:require-macros [reagent.ratom :refer [reaction]]) (:require [re-frame.core :refer [register-sub dispatch subscribe path]] + [status-im.components.react :refer [ios?]] [status-im.models.commands :as commands] [status-im.constants :refer [response-suggesstion-resize-duration]] [status-im.chat.constants :as c] @@ -220,12 +221,14 @@ command (subscribe [:get-chat-command]) focused (subscribe [:get :focused]) mode (subscribe [:kb-mode])] - (reaction (cond (and (not @focused) - (= :on-send (keyword (:suggestions-trigger @command))) - (pos? @kb-height)) - @kb-height + (reaction + (cond (or ios? + (and (not @focused) + (= :on-send (keyword (:suggestions-trigger @command))) + (pos? @kb-height))) + @kb-height - (and @focused (= :pan @mode) (pos? @kb-height)) - 20 + (and @focused (= :pan @mode) (pos? @kb-height)) + 20 - :else 0))))) + :else 0))))) diff --git a/src/status_im/chat/views/message.cljs b/src/status_im/chat/views/message.cljs index 58ceabe552..2248746dcd 100644 --- a/src/status_im/chat/views/message.cljs +++ b/src/status_im/chat/views/message.cljs @@ -20,10 +20,13 @@ content-type-command content-type-command-request]])) -(defn message-date [timestamp] +(defn message-date [timestamp platform-specific] [view {} [view st/message-date-container - [text {:style st/message-date-text} (time/to-short-str timestamp)]]]) + [text {:style st/message-date-text + :platform-specific platform-specific + :font :default} + (time/to-short-str timestamp)]]]) (defn contact-photo [{:keys [photo-path]}] [view st/contact-photo-container @@ -38,15 +41,21 @@ [view st/online-dot-left] [view st/online-dot-right]])) -(defn message-content-status [{:keys [from content]}] +(defn message-content-status [{:keys [from content]} platform-specific] [view st/status-container [view st/status-image-view [contact-photo {}] [contact-online {:online true}]] - [text {:style st/status-from} from] - [text {:style st/status-text} content]]) + [text {:style st/status-from + :platform-specific platform-specific + :font :default} + from] + [text {:style st/status-text + :platform-specific platform-specific + :font :default} + content]]) -(defn message-content-audio [_] +(defn message-content-audio [{:keys [platform-specific]}] [view st/audio-container [view st/play-view [image {:source res/play @@ -54,16 +63,21 @@ [view st/track-container [view st/track] [view st/track-mark] - [text {:style st/track-duration-text} "03:39"]]]) + [text {:style st/track-duration-text + :platform-specific platform-specific + :font :default} + "03:39"]]]) -(defview message-content-command [content preview] +(defview message-content-command [content preview platform-specific] [commands [:get-commands-and-responses]] (let [{:keys [command content]} (parse-command-msg-content commands content) {:keys [name icon type]} command] [view st/content-command-view [view st/command-container [view (st/command-view command) - [text {:style st/command-name} + [text {:style st/command-name + :platform-specific platform-specific + :font :default} (str (if (= :command type) "!" "") name)]]] (when icon [view st/command-image-view @@ -71,7 +85,10 @@ :style st/command-image}]]) (if preview preview - [text {:style st/command-text} content])])) + [text {:style st/command-text + :platform-specific platform-specific + :font :default} + content])])) (defn set-chat-command [msg-id command] (dispatch [:set-response-chat-command msg-id (keyword (:name command))])) @@ -84,40 +101,46 @@ "Justas"]) content]) -(defmulti message-content (fn [_ message] +(defmulti message-content (fn [_ message _] (message :content-type))) (defmethod message-content content-type-command-request - [wrapper message] - [wrapper message [message-content-command-request message]]) + [wrapper message platform-specific] + [wrapper message [message-content-command-request message platform-specific] platform-specific]) (defn text-message - [{:keys [content] :as message}] + [{:keys [content] :as message} platform-specific] [message-view message - [text {:style (st/text-message message)} content]]) + [text {:style (st/text-message message) + :platform-specific platform-specific + :font :default} + content]]) (defmethod message-content text-content-type - [wrapper message] - [wrapper message [text-message message]]) + [wrapper message platform-specific] + [wrapper message [text-message message platform-specific] platform-specific]) (defmethod message-content content-type-status - [_ message] - [message-content-status message]) + [_ message platform-specific] + [message-content-status message platform-specific]) (defmethod message-content content-type-command - [wrapper {:keys [content rendered-preview] :as message}] + [wrapper {:keys [content rendered-preview] :as message} platform-specific] [wrapper message - [message-view message [message-content-command content rendered-preview]]]) + [message-view message [message-content-command content rendered-preview platform-specific]] + platform-specific]) (defmethod message-content :default - [wrapper {:keys [content-type content] :as message}] + [wrapper {:keys [content-type content] :as message} platform-specific] [wrapper message [message-view message - [message-content-audio {:content content - :content-type content-type}]]]) + [message-content-audio {:content content + :content-type content-type + :platform-specific platform-specific}]] + platform-specific]) (defview message-delivery-status - [{:keys [delivery-status msg-id to] :as m}] + [{:keys [delivery-status msg-id to] :as m} platform-specific] [status [:get-in [:message-status to msg-id]]] [view st/delivery-view [image {:source (case (or status delivery-status) @@ -126,7 +149,9 @@ :failed res/delivery-failed-icon nil) :style st/delivery-image}] - [text {:style st/delivery-text} + [text {:style st/delivery-text + :platform-specific platform-specific + :font :default} (case (or status delivery-status) :delivered "Sent" :seen "Seen" @@ -142,11 +167,13 @@ :style st/photo}]]) (defn incoming-group-message-body - [{:keys [selected same-author] :as message} content] + [{:keys [selected same-author] :as message} content platform-specific] (let [delivery-status :seen-by-everyone] [view st/group-message-wrapper (when selected - [text {:style st/selected-message} + [text {:style st/selected-message + :platform-specific platform-specific + :font :default} "Mar 7th, 15:22"]) [view (st/incoming-group-message-body-st message) [view st/message-author @@ -155,14 +182,14 @@ content ;; TODO show for last or selected (when (and selected delivery-status) - [message-delivery-status {:delivery-status delivery-status}])]]])) + [message-delivery-status {:delivery-status delivery-status} platform-specific])]]])) (defn message-body - [{:keys [outgoing delivery-status] :as message} content] + [{:keys [outgoing delivery-status] :as message} content platform-specific] [view (st/message-body message) content (when outgoing - [message-delivery-status message])]) + [message-delivery-status message platform-specific])]) (defn message-container-animation-logic [{:keys [to-value val callback]}] (fn [_] @@ -202,7 +229,8 @@ (defn chat-message [{:keys [outgoing delivery-status timestamp new-day group-chat msg-id chat-id] - :as message}] + :as message} + platform-specific] (let [status (subscribe [:get-in [:message-status chat-id msg-id]])] (r/create-class {:component-did-mount @@ -217,7 +245,7 @@ [message-container message ;; TODO there is no new-day info in message (when new-day - [message-date timestamp]) + [message-date timestamp platform-specific]) [view (let [incoming-group (and group-chat (not outgoing))] [message-content @@ -225,4 +253,5 @@ incoming-group-message-body message-body) (merge message {:delivery-status (keyword delivery-status) - :incoming-group incoming-group})])]])}))) + :incoming-group incoming-group}) + platform-specific])]])}))) diff --git a/src/status_im/chat/views/message_input.cljs b/src/status_im/chat/views/message_input.cljs index 9032b5beb1..28759ea9e7 100644 --- a/src/status_im/chat/views/message_input.cljs +++ b/src/status_im/chat/views/message_input.cljs @@ -22,10 +22,10 @@ (defn message-input-container [input] [view st/message-input-container input]) -(defn plain-input-options [disbale?] +(defn plain-input-options [disable?] {:style st-message/message-input - :onChangeText (when-not disbale? plain-message/set-input-message) - :editable (not disbale?) + :onChangeText (when-not disable? plain-message/set-input-message) + :editable (not disable?) :onSubmitEditing plain-message/send}) (defn on-press-commands-handler @@ -34,9 +34,9 @@ #(dispatch [:invoke-commands-suggestions!]) command/send-command)) -(defn command-input-options [command icon-width disbale?] - {:style (st-response/command-input icon-width disbale?) - :onChangeText (when-not disbale? command/set-input-message) +(defn command-input-options [command icon-width disable?] + {:style (st-response/command-input icon-width disable?) + :onChangeText (when-not disable? command/set-input-message) :onSubmitEditing (on-press-commands-handler command)}) (defview message-input [input-options {:keys [suggestions-trigger] :as command}] @@ -44,18 +44,18 @@ input-message [:get-chat-input-text] input-command [:get-chat-command-content] icon-width [:command-icon-width] - disbale? [:get :disable-input]] + disable? [:get :disable-input]] [text-input (merge (if command? - (command-input-options command icon-width disbale?) - (plain-input-options disbale?)) + (command-input-options command icon-width disable?) + (plain-input-options disable?)) {:autoFocus false :blurOnSubmit false :accessibility-label :input - :on-focus #(dispatch [:set :focused true]) - :on-blur #(dispatch [:set :focused false])} - input-options) - (if command? input-command input-message)]) + :on-focus #(dispatch [:set :focused true]) + :on-blur #(dispatch [:set :focused false]) + :default-value (if command? input-command input-message)} + input-options)]) (defview plain-message-input-view [{:keys [input-options]}] [command? [:command?] @@ -66,7 +66,7 @@ [view st/input-view [plain-message/commands-button] [message-input-container - [message-input input-options command]] + [message-input input-options]] ;; TODO emoticons: not implemented [plain-message/smile-button] (when (or command? valid-plain-message?) diff --git a/src/status_im/chat/views/new_message.cljs b/src/status_im/chat/views/new_message.cljs index 25e2e2751f..96baedc04f 100644 --- a/src/status_im/chat/views/new_message.cljs +++ b/src/status_im/chat/views/new_message.cljs @@ -36,10 +36,12 @@ [plain-message-input-view (when command? (get-options parameter type))]) -(defview chat-message-new [] +(defview chat-message-new [platform-specific] [staged-commands [:get-chat-staged-commands] margin [:input-margin]] - [view (st/new-message-container margin) - (when (seq staged-commands) - [staged-commands-view staged-commands]) - [show-input]]) + (let [style (get-in platform-specific [:styles :components :chat :new-message])] + [view (merge (st/new-message-container margin) + style) + (when (seq staged-commands) + [staged-commands-view staged-commands]) + [show-input]])) diff --git a/src/status_im/chat/views/plain_message.cljs b/src/status_im/chat/views/plain_message.cljs index f1dc3a0cde..e609ebd5e1 100644 --- a/src/status_im/chat/views/plain_message.cljs +++ b/src/status_im/chat/views/plain_message.cljs @@ -60,13 +60,14 @@ :disabled @command?} [animated-view {:style (st/message-input-button-touchable container-width)} - [animated-view {:style (st/message-input-button buttons-scale)} - (if (seq @suggestions) - [icon :close_gray st/close-icon] - [icon :input_list st/list-icon]) - (when (and (seq @requests) - (not (seq @suggestions))) - [view st/requests-icon])]]])}))) + (when-not @command? + [animated-view {:style (st/message-input-button buttons-scale)} + (if (seq @suggestions) + [icon :close_gray st/close-icon] + [icon :input_list st/list-icon]) + (when (and (seq @requests) + (not (seq @suggestions))) + [view st/requests-icon])])]])}))) (defn smile-animation-logic [{:keys [command? val width]}] (fn [_] diff --git a/src/status_im/chat/views/request_message.cljs b/src/status_im/chat/views/request_message.cljs index 380c154d1e..af4793e6d6 100644 --- a/src/status_im/chat/views/request_message.cljs +++ b/src/status_im/chat/views/request_message.cljs @@ -57,17 +57,18 @@ #(reset! loop? false) :reagent-render (fn [msg-id command] - [touchable-highlight - {:on-press (when-not @answered? - #(set-chat-command msg-id command)) - :style st/command-request-image-touchable - :accessibility-label (label command)} - [animated-view {:style (st/command-request-image-view command scale-anim-val)} - [image {:source {:uri (:icon command)} - :style st/command-request-image}]]])}))) + (if command + [touchable-highlight + {:on-press (when-not @answered? + #(set-chat-command msg-id command)) + :style st/command-request-image-touchable + :accessibility-label (label command)} + [animated-view {:style (st/command-request-image-view command scale-anim-val)} + [image {:source {:uri (:icon command)} + :style st/command-request-image}]]]))}))) (defn message-content-command-request - [{:keys [msg-id content from incoming-group]}] + [{:keys [msg-id content from incoming-group]} platform-specific] (let [commands-atom (subscribe [:get-responses])] (fn [{:keys [msg-id content from incoming-group]}] (let [commands @commands-atom @@ -75,12 +76,18 @@ [view st/comand-request-view [view st/command-request-message-view (when incoming-group - [text {:style st/command-request-from-text} + [text {:style st/command-request-from-text + :platform-specific platform-specific + :font :default} from]) - [text {:style st/style-message-text} + [text {:style st/style-message-text + :platform-specific platform-specific + :font :default} content]] [request-button msg-id command] (when (:request-text command) [view st/command-request-text-view - [text {:style st/style-sub-text} + [text {:style st/style-sub-text + :platform-specific platform-specific + :font :default} (:request-text command)]])])))) diff --git a/src/status_im/chat/views/suggestions.cljs b/src/status_im/chat/views/suggestions.cljs index d7de8feed6..b7f5540a3b 100644 --- a/src/status_im/chat/views/suggestions.cljs +++ b/src/status_im/chat/views/suggestions.cljs @@ -29,8 +29,9 @@ [view st/request-container [view st/request-icon-container [view (st/request-icon-background color) - [image {:source {:uri icon} - :style st/request-icon}]]] + (if icon + [image {:source {:uri icon} + :style st/request-icon}])]] [view st/request-info-container [text {:style st/request-info-description} description] ;; todo stub diff --git a/src/status_im/chats_list/screen.cljs b/src/status_im/chats_list/screen.cljs index 7bcfb38a83..c5347f57b2 100644 --- a/src/status_im/chats_list/screen.cljs +++ b/src/status_im/chats_list/screen.cljs @@ -17,28 +17,32 @@ [status-im.components.styles :refer [color-blue toolbar-background1 toolbar-background2]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.components.icons.ionicons :refer [icon]] [status-im.i18n :refer [label]] [status-im.chats-list.styles :as st] + [status-im.components.styles :as cst] [status-im.components.tabs.bottom-gradient :refer [bottom-gradient]] [status-im.components.tabs.styles :refer [tabs-height]])) -(defview chats-list-toolbar [] +(defview chats-list-toolbar [platform-specific] [chats-scrolled? [:get :chats-scrolled?]] - [toolbar {:nav-action {:image {:source {:uri :icon_hamburger} - :style st/hamburger-icon} - :handler open-drawer} - :title (label :t/chats) - :background-color (if chats-scrolled? - toolbar-background1 - toolbar-background2) - ;; TODO implement search - :action {:image {:source {:uri :icon_search} - :style st/search-icon} - :handler (fn [])}}]) + [view + [status-bar {:platform-specific platform-specific}] + [toolbar {:nav-action {:image {:source {:uri :icon_hamburger} + :style st/hamburger-icon} + :handler open-drawer} + :title (label :t/chats) + :background-color (if chats-scrolled? + toolbar-background1 + toolbar-background2) + ;; TODO implement search + :action {:image {:source {:uri :icon_search} + :style st/search-icon} + :handler (fn [])}}]]) -(defn chats-list [] +(defn chats-list [{platform-specific :platform-specific}] (let [chats (subscribe [:get :chats]) chats-scrolled? (subscribe [:get :chats-scrolled?]) animation? (subscribe [:animations :tabs-bar-animation?]) @@ -48,7 +52,7 @@ (dispatch [:set :chats-scrolled? false]) (fn [] [view st/chats-container - [chats-list-toolbar] + [chats-list-toolbar platform-specific] [list-view {:dataSource (to-datasource @chats) :renderRow (fn [row _ _] (list-item [chat-list-item row])) diff --git a/src/status_im/components/chat_icon/styles.cljs b/src/status_im/components/chat_icon/styles.cljs index 41fbcf75ee..977af624d6 100644 --- a/src/status_im/components/chat_icon/styles.cljs +++ b/src/status_im/components/chat_icon/styles.cljs @@ -16,7 +16,7 @@ :height 36 :alignItems :center :justifyContent :center - :borderRadius 50 + :borderRadius 18 :backgroundColor color}) (defn default-chat-icon-chat-list [color] @@ -43,7 +43,7 @@ (def chat-icon {:margin 4 - :borderRadius 50 + :borderRadius 18 :width 36 :height 36}) @@ -68,7 +68,7 @@ :right 0 :width 20 :height 20 - :borderRadius 50 + :borderRadius 10 :backgroundColor online-color :borderWidth 2 :borderColor color-white}) @@ -88,7 +88,7 @@ :top 6 :width 4 :height 4 - :borderRadius 50 + :borderRadius 2 :backgroundColor color-white}) (def online-dot-left (merge online-dot {:left 3})) (def online-dot-right (merge online-dot {:left 9})) diff --git a/src/status_im/components/drawer/styles.cljs b/src/status_im/components/drawer/styles.cljs index 01955625a0..15a974152b 100644 --- a/src/status_im/components/drawer/styles.cljs +++ b/src/status_im/components/drawer/styles.cljs @@ -13,7 +13,7 @@ text3-color]])) (def user-photo - {:borderRadius 50 + {:borderRadius 32 :width 64 :height 64}) diff --git a/src/status_im/components/drawer/view.cljs b/src/status_im/components/drawer/view.cljs index a85d4c40bf..dc2cf8d46d 100644 --- a/src/status_im/components/drawer/view.cljs +++ b/src/status_im/components/drawer/view.cljs @@ -7,7 +7,6 @@ text image navigator - toolbar-android drawer-layout-android touchable-opacity]] [status-im.resources :as res] diff --git a/src/status_im/components/geth.cljs b/src/status_im/components/geth.cljs new file mode 100644 index 0000000000..94141d278f --- /dev/null +++ b/src/status_im/components/geth.cljs @@ -0,0 +1,18 @@ +(ns status-im.components.geth + (:require [status-im.components.react :as r])) + +(def geth + (when (exists? (.-NativeModules r/react-native)) + (.-Geth (.-NativeModules r/react-native)))) + +(defn start-node [on-result on-already-running] + (when geth + (.startNode geth on-result on-already-running))) + +(defn create-account [password on-result] + (when geth + (.createAccount geth password on-result))) + +(defn login [address password on-result] + (when geth + (.login geth address password on-result))) \ No newline at end of file diff --git a/src/status_im/components/jail.cljs b/src/status_im/components/jail.cljs index b80077e4ac..4e2f896d62 100644 --- a/src/status_im/components/jail.cljs +++ b/src/status_im/components/jail.cljs @@ -13,18 +13,24 @@ (.init jail status-js)) (defn parse [chat-id file callback] - (.parse jail chat-id file callback)) + (when jail + (.parse jail chat-id file callback))) (defn cljs->json [data] (.stringify js/JSON (clj->js data))) (defn call [chat-id path params callback] - (println :call chat-id (cljs->json path) (cljs->json params)) - (let [cb (fn [r] - (let [r' (t/json->clj r)] - (println r') - (callback r')))] - (.call jail chat-id (cljs->json path) (cljs->json params) cb))) + (when jail + (println :call chat-id (cljs->json path) (cljs->json params)) + (let [cb (fn [r] + (let [r' (t/json->clj r)] + (println r') + (callback r')))] + (.call jail chat-id (cljs->json path) (cljs->json params) cb)))) + +(defn set-soft-input-mode [mode] + (when jail + (.setSoftInputMode jail mode))) (def adjust-resize 16) (def adjust-pan 32) diff --git a/src/status_im/components/react.cljs b/src/status_im/components/react.cljs index e73c31b076..3e0134262d 100644 --- a/src/status_im/components/react.cljs +++ b/src/status_im/components/react.cljs @@ -5,52 +5,49 @@ (def react-native (u/require "react-native")) (def native-modules (.-NativeModules react-native)) +(def geth (.-Geth native-modules)) -(defn get-react-property [name] +(def linear-gradient-module (u/require "react-native-linear-gradient")) +(def dismiss-keyboard! (u/require "dismissKeyboard")) +(def orientation (u/require "react-native-orientation")) + +;; Getters + +(defn- get-react-property [name] (aget react-native name)) -(defn adapt-class [class] - (when class (r/adapt-react-class class))) +(defn- adapt-class [class] + (when class + (r/adapt-react-class class))) -(defn get-class [name] +(defn- get-class [name] (adapt-class (get-react-property name))) + +;; React Components + (def app-registry (get-react-property "AppRegistry")) (def navigator (get-class "Navigator")) -(def text-class (get-class "Text")) -(defn text - ([s] [text-class s]) - ([{:keys [style] :as opts} s] - [text-class (if style opts {:style opts}) s])) (def view (get-class "View")) -(def image (get-class "Image")) -(def touchable-highlight-class (get-class "TouchableHighlight")) -(defn touchable-highlight [props content] - [touchable-highlight-class - (merge {:underlay-color :transparent} props) - content]) -(def toolbar-android (get-class "ToolbarAndroid")) +(def linear-gradient-class (adapt-class linear-gradient-module)) + +(def status-bar (get-class "StatusBar")) +(def drawer-layout-android (get-class "DrawerLayoutAndroid")) + (def list-view-class (get-class "ListView")) -(defn list-view [props] - [list-view-class (merge {:enableEmptySections true} props)]) (def scroll-view (get-class "ScrollView")) (def web-view (get-class "WebView")) -(def touchable-without-feedback (get-class "TouchableWithoutFeedback")) + +(def text-class (get-class "Text")) (def text-input-class (get-class "TextInput")) -(defn text-input [props text] - [text-input-class (merge - {:underlineColorAndroid :transparent - :placeholderTextColor st/text2-color - :placeholder "Type"} - props) - text]) -(def drawer-layout-android (get-class "DrawerLayoutAndroid")) +(def image (get-class "Image")) + +(def touchable-without-feedback (get-class "TouchableWithoutFeedback")) +(def touchable-highlight-class (get-class "TouchableHighlight")) (def touchable-opacity (get-class "TouchableOpacity")) + (def modal (get-class "Modal")) (def picker (get-class "Picker")) -(def picker-item - (when-let [picker (get-react-property "Picker")] - (adapt-class (.-Item picker)))) (def pan-responder (.-PanResponder js/ReactNative)) (def animated (.-Animated js/ReactNative)) @@ -58,8 +55,32 @@ (def animated-text (r/adapt-react-class (.-Text animated))) (def dimensions (.-Dimensions js/ReactNative)) -(defn get-dimensions [name] - (js->clj (.get dimensions name) :keywordize-keys true)) +(def keyboard (.-Keyboard react-native)) + + +;; Accessor methods for React Components + +(defn text + ([t] + (r/as-element [text-class t])) + ([{:keys [style platform-specific font] :as opts + :or {font :default}} t] + (r/as-element + [text-class + (if (and platform-specific font) + (-> opts + (dissoc :platform-specific :font) + (assoc :style (st/with-font style platform-specific font))) + opts) + t]))) + +(defn text-input [props text] + [text-input-class (merge + {:underlineColorAndroid :transparent + :placeholderTextColor st/text2-color + :placeholder "Type"} + props) + text]) (defn icon ([n] (icon n {})) @@ -67,22 +88,35 @@ [image {:source {:uri (keyword (str "icon_" (name n)))} :style style}])) -(def linear-gradient-class - (r/adapt-react-class (u/require "react-native-linear-gradient"))) +(defn list-view [props] + [list-view-class (merge {:enableEmptySections true} props)]) + +(defn touchable-highlight [props content] + [touchable-highlight-class + (merge {:underlay-color :transparent} props) + content]) + +(def picker-item + (when-let [picker (get-react-property "Picker")] + (adapt-class (.-Item picker)))) + +(defn get-dimensions [name] + (js->clj (.get dimensions name) :keywordize-keys true)) + (defn linear-gradient [props & children] (vec (concat [linear-gradient-class (merge {:inverted true} props)] children))) +;; Platform + (def platform (when-let [pl (.-Platform react-native)] (.-OS pl))) (def android? (= platform "android")) +(def ios? (= platform "ios")) + (defn list-item [component] (r/as-element component)) -(def orientation (u/require "react-native-orientation")) -(def keyboard (.-Keyboard react-native)) - -(def geth (.-Geth native-modules)) diff --git a/src/status_im/components/status_bar.cljs b/src/status_im/components/status_bar.cljs new file mode 100644 index 0000000000..83d0d9e3cb --- /dev/null +++ b/src/status_im/components/status_bar.cljs @@ -0,0 +1,17 @@ +(ns status-im.components.status-bar + (:require [status-im.components.react :as ui] + [status-im.components.styles :as cst])) + +(defn status-bar [{{styles :styles} :platform-specific + type :type + :or {type :default}}] + (let [{:keys [height + bar-style + translucent? + color]} (get-in styles [:components :status-bar type])] + [ui/view + [ui/status-bar {:background-color color + :translucent translucent? + :bar-style bar-style}] + [ui/view {:style {:height height + :background-color color}}]])) \ No newline at end of file diff --git a/src/status_im/components/styles.cljs b/src/status_im/components/styles.cljs index 22f6705300..b534ad840b 100644 --- a/src/status_im/components/styles.cljs +++ b/src/status_im/components/styles.cljs @@ -1,16 +1,18 @@ (ns status-im.components.styles) -(def font "sans-serif") +(def font "HelveticaNeue") ;; (def font "Avenir-Roman") (def font-medium "sans-serif-medium") (def title-font font-medium) +(def color-transparent "transparent") (def color-blue "#7099e6") (def color-blue-transparent "#7099e632") (def color-black "#000000de") (def color-purple "#a187d5") (def color-gray "#838c93de") (def color-gray2 "#8f838c93") +(def color-gray3 "#00000040") (def color-white :white) (def color-light-blue "#bbc4cb") (def color-light-blue-transparent "#bbc4cb32") @@ -33,6 +35,10 @@ (def toolbar-height 56) +(defn with-font [style platform-specific font] + (let [font (get-in platform-specific [:styles :fonts font])] + (merge style font))) + (def flex {:flex 1}) @@ -70,7 +76,7 @@ :height 18}) (def icon-plus - {:width 18 + {:width 18 :height 18}) (def form-text-input @@ -91,10 +97,9 @@ :justifyContent :center}) (def toolbar-title-text - {:marginTop -2.5 + {:margin-top -2.5 :color text1-color - :fontSize 16 - :fontFamily font}) + :font-size 16}) (def button-input-container {:flex 1 diff --git a/src/status_im/components/toolbar.cljs b/src/status_im/components/toolbar.cljs index d9e3c4bcb6..4204f8c3af 100644 --- a/src/status_im/components/toolbar.cljs +++ b/src/status_im/components/toolbar.cljs @@ -6,9 +6,7 @@ text image touchable-highlight]] - [status-im.components.styles :refer [font - title-font - color-white + [status-im.components.styles :refer [color-white color-purple text1-color text2-color @@ -18,8 +16,15 @@ icon-back toolbar-height]])) -(defn toolbar [{:keys [title nav-action hide-nav? action custom-action - background-color custom-content style]}] +(defn toolbar [{title :title + nav-action :nav-action + hide-nav? :hide-nav? + action :action + custom-action :custom-action + background-color :background-color + custom-content :custom-content + style :style + platform-specific :platform-specific}] (let [style (merge {:flexDirection :row :backgroundColor (or background-color toolbar-background1) :height toolbar-height @@ -35,22 +40,23 @@ [image (:image nav-action)]]] [touchable-highlight {:on-press #(dispatch [:navigate-back]) :accessibility-label :navigate-back} - [view {:width 56 - :height 56 + [view {:width 56 + :height 56 :alignItems :center :justifyContent :center} [image {:source {:uri :icon_back} :style icon-back}]]])) (or custom-content [view {:style toolbar-title-container} - [text {:style toolbar-title-text} + [text {:style toolbar-title-text + :platform-specific platform-specific + :font :medium} title]]) custom-action (when action [touchable-highlight {:on-press (:handler action)} [view {:width 56 :height 56 - :alignItems :center :justifyContent :center} [image (:image action)]]])])) diff --git a/src/status_im/contacts/screen.cljs b/src/status_im/contacts/screen.cljs index 7cd360f7d1..1d5c54c260 100644 --- a/src/status_im/contacts/screen.cljs +++ b/src/status_im/contacts/screen.cljs @@ -12,6 +12,7 @@ [status-im.components.action-button :refer [action-button action-button-item]] [status-im.contacts.views.contact :refer [contact-extended-view]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.components.drawer.view :refer [open-drawer]] [status-im.components.icons.ionicons :refer [icon]] @@ -22,18 +23,21 @@ toolbar-background2]] [status-im.components.tabs.bottom-gradient :refer [bottom-gradient]] [status-im.contacts.styles :as st] - [status-im.i18n :refer [label]])) + [status-im.i18n :refer [label]] + [status-im.components.styles :as cst])) -(defn contact-list-toolbar [] - [toolbar {:nav-action {:image {:source {:uri :icon_hamburger} - :style hamburger-icon} - :handler open-drawer} - :title (label :t/contacts) - :background-color toolbar-background2 - :style {:elevation 0} - :action {:image {:source {:uri :icon_search} - :style icon-search} - :handler (fn [])}}]) +(defn contact-list-toolbar [platform-specific] + [view + [status-bar {:platform-specific platform-specific}] + [toolbar {:nav-action {:image {:source {:uri :icon_hamburger} + :style hamburger-icon} + :handler open-drawer} + :title (label :t/contacts) + :background-color toolbar-background2 + :style {:elevation 0} + :action {:image {:source {:uri :icon_search} + :style icon-search} + :handler (fn [])}}]]) (def contacts-limit 10) @@ -59,13 +63,13 @@ [touchable-highlight {:on-press #(dispatch [:show-group-contacts group])} [text {:style st/show-all-text} (label :show-all)]]])]) -(defn contact-list [] +(defn contact-list [{platform-specific :platform-specific}] (let [contacts (subscribe [:get-contacts-with-limit contacts-limit]) contcats-count (subscribe [:contacts-count]) show-toolbar-shadow? (r/atom false)] (fn [] [view st/contacts-list-container - [contact-list-toolbar] + [contact-list-toolbar platform-specific] [view {:style st/toolbar-shadow} (when @show-toolbar-shadow? [linear-gradient {:style st/contact-group-header-gradient-bottom diff --git a/src/status_im/contacts/views/contact_list.cljs b/src/status_im/contacts/views/contact_list.cljs index 9a346e3829..5453ddede6 100644 --- a/src/status_im/contacts/views/contact_list.cljs +++ b/src/status_im/contacts/views/contact_list.cljs @@ -7,6 +7,7 @@ list-view list-item]] [status-im.contacts.views.contact :refer [contact-with-letter-view]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.components.drawer.view :refer [drawer-view open-drawer]] [status-im.components.icons.ionicons :refer [icon]] @@ -17,26 +18,30 @@ toolbar-background1]] [status-im.contacts.styles :as st] [status-im.utils.listview :as lw] - [status-im.i18n :refer [label]])) + [status-im.i18n :refer [label]] + [status-im.components.styles :as cst])) (defn render-row [row _ _] (list-item [contact-with-letter-view row])) -(defview contact-list-toolbar [] - [group [:get :contacts-group]] - [toolbar {:title (label (if (= group :dapps) - :t/contacs-group-dapps - :t/contacs-group-people)) - :background-color toolbar-background1 - :action {:image {:source {:uri :icon_search} - :style icon-search} - :handler (fn [])}}]) -(defview contact-list [] +(defview contact-list-toolbar [platform-specific] + [group [:get :contacts-group]] + [view + [status-bar {:platform-specific platform-specific}] + [toolbar {:title (label (if (= group :dapps) + :t/contacs-group-dapps + :t/contacs-group-people)) + :background-color toolbar-background1 + :action {:image {:source {:uri :icon_search} + :style icon-search} + :handler (fn [])}}]]) + +(defview contact-list [{platform-specific :platform-specific}] [contacts [:contacts-with-letters]] [drawer-view [view st/contacts-list-container - [contact-list-toolbar] + [contact-list-toolbar platform-specific] ;; todo what if there is no contacts, should we show some information ;; about this? (when contacts diff --git a/src/status_im/contacts/views/new_contact.cljs b/src/status_im/contacts/views/new_contact.cljs index d0673a22ea..850d9c3995 100644 --- a/src/status_im/contacts/views/new_contact.cljs +++ b/src/status_im/contacts/views/new_contact.cljs @@ -10,6 +10,7 @@ touchable-highlight]] [status-im.components.text-field.view :refer [text-field]] [status-im.utils.identicon :refer [identicon]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.utils.utils :refer [log on-error http-post toast]] [status-im.components.styles :refer [color-purple @@ -27,7 +28,8 @@ [status-im.i18n :refer [label]] [cljs.spec :as s] [status-im.contacts.validations :as v] - [status-im.contacts.styles :as st])) + [status-im.contacts.styles :as st] + [status-im.components.styles :as cst])) (def toolbar-title @@ -91,16 +93,18 @@ new-contact)] (on-add-contact whisper-identity contact)))})) -(defview new-contact [] +(defview new-contact [{platform-specific :platform-specific}] [{:keys [name whisper-identity phone-number] :as new-contact} [:get :new-contact] error [:get :new-contact-address-error]] [view st/contact-form-container - [toolbar {:background-color :white - :nav-action {:image {:source {:uri :icon_back} - :style icon-back} - :handler #(dispatch [:navigate-back])} - :custom-content toolbar-title - :action (toolbar-action whisper-identity new-contact error)}] + [view + [status-bar {:platform-specific platform-specific}] + [toolbar {:background-color :white + :nav-action {:image {:source {:uri :icon_back} + :style icon-back} + :handler #(dispatch [:navigate-back])} + :custom-content toolbar-title + :action (toolbar-action whisper-identity new-contact error)}]] [view st/form-container [contact-name-input name] [contact-whisper-id-input whisper-identity error]] diff --git a/src/status_im/db.cljs b/src/status_im/db.cljs index 2fd469e69a..730415ac69 100644 --- a/src/status_im/db.cljs +++ b/src/status_im/db.cljs @@ -39,6 +39,7 @@ :address "" :whisper-identity "" :phone-number ""} + :keyboard-height 0 :disable-group-creation false :animations {;; todo clear this :tabs-bar-value (anim/create-value 0)}}) diff --git a/src/status_im/discovery/screen.cljs b/src/status_im/discovery/screen.cljs index 1e04f418a7..78f995dd50 100644 --- a/src/status_im/discovery/screen.cljs +++ b/src/status_im/discovery/screen.cljs @@ -6,10 +6,12 @@ scroll-view text text-input]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.discovery.views.popular :refer [popular]] [status-im.discovery.views.recent :refer [discovery-recent]] [status-im.discovery.styles :as st] + [status-im.components.styles :as cst] [status-im.components.tabs.bottom-gradient :refer [bottom-gradient]] [status-im.i18n :refer [label]])) @@ -33,9 +35,9 @@ (defn toogle-search [current-value] (dispatch [:set ::show-search (not current-value)])) -(defview discovery [] - [show-search [:get ::show-search]] - [view st/discovery-container +(defn discovery-toolbar [show-search platform-specific] + [view + [status-bar {:platform-specific platform-specific}] [toolbar {:style st/discovery-toolbar :nav-action {:image {:source {:uri :icon_hamburger} @@ -44,7 +46,12 @@ :custom-content [title-content show-search] :action {:image {:source {:uri :icon_search} :style st/search-icon} - :handler #(toogle-search show-search)}}] + :handler #(toogle-search show-search)}}]]) + +(defview discovery [{platform-specific :platform-specific}] + [show-search [:get ::show-search]] + [view st/discovery-container + [discovery-toolbar show-search platform-specific] [scroll-view st/scroll-view-container [view st/section-spacing [text {:style st/discovery-subtitle} (label :t/popular-tags)]] diff --git a/src/status_im/discovery/styles.cljs b/src/status_im/discovery/styles.cljs index 540dc04a03..ee9782f800 100644 --- a/src/status_im/discovery/styles.cljs +++ b/src/status_im/discovery/styles.cljs @@ -146,7 +146,7 @@ (def popular-list-item-avatar {:resizeMode "contain" - :borderRadius 150 + :borderRadius 20 :width 40 :height 40}) diff --git a/src/status_im/discovery/views/popular_list.cljs b/src/status_im/discovery/views/popular_list.cljs index a1d539aa14..8aae75b569 100644 --- a/src/status_im/discovery/views/popular_list.cljs +++ b/src/status_im/discovery/views/popular_list.cljs @@ -24,7 +24,8 @@ [view st/row [view st/tag-name-container [touchable-highlight {:onPress #(dispatch [:show-discovery-tag tag])} - [text {:style st/tag-name} (str " #" (name tag))]]] + [view + [text {:style st/tag-name} (str " #" (name tag))]]]] [view st/tag-count-container [text {:style st/tag-count} count]]] [list-view {:dataSource (to-datasource discoveries) diff --git a/src/status_im/group_settings/screen.cljs b/src/status_im/group_settings/screen.cljs index a35bdbcf53..ce71578906 100644 --- a/src/status_im/group_settings/screen.cljs +++ b/src/status_im/group_settings/screen.cljs @@ -11,11 +11,13 @@ picker-item scroll-view touchable-highlight]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.components.chat-icon.screen :refer [chat-icon-view-action]] [status-im.group-settings.styles.group-settings :as st] [status-im.group-settings.views.member :refer [member-view]] - [status-im.i18n :refer [label]])) + [status-im.i18n :refer [label]] + [status-im.components.styles :as cst])) (defn remove-member [] (dispatch [:remove-participants])) @@ -130,9 +132,11 @@ [view st/action [chat-icon-view-action chat-id group-chat name color false]]) -(defn new-group-toolbar [] - [toolbar {:title (label :t/chat-settings) - :custom-action [chat-icon]}]) +(defn new-group-toolbar [platform-specific] + [view + [status-bar {:platform-specific platform-specific}] + [toolbar {:title (label :t/chat-settings) + :custom-action [chat-icon]}]]) (defn focus [] (dispatch [:set ::name-input-focused true])) @@ -168,10 +172,10 @@ (when (pos? (count validation-messages)) [text {:style st/chat-name-validation-message} (first validation-messages)])]) -(defview group-settings [] +(defview group-settings [{platform-specific :platform-specific}] [show-color-picker [:group-settings :show-color-picker]] [view st/group-settings - [new-group-toolbar] + [new-group-toolbar platform-specific] [scroll-view st/body [chat-name] [text {:style st/members-text} (label :t/members-title)] diff --git a/src/status_im/group_settings/styles/group_settings.cljs b/src/status_im/group_settings/styles/group_settings.cljs index 9950bb2f9c..81b0386c3d 100644 --- a/src/status_im/group_settings/styles/group_settings.cljs +++ b/src/status_im/group_settings/styles/group_settings.cljs @@ -176,7 +176,7 @@ :fontFamily font}) (defn chat-color-icon [color] - {:borderRadius 50 + {:borderRadius 12 :width 24 :height 24 :backgroundColor color}) diff --git a/src/status_im/handlers.cljs b/src/status_im/handlers.cljs index cc3cc2fb1e..58d6a406a8 100644 --- a/src/status_im/handlers.cljs +++ b/src/status_im/handlers.cljs @@ -8,7 +8,7 @@ [status-im.protocol.state.storage :as storage] [status-im.utils.logging :as log] [status-im.utils.crypt :refer [gen-random-bytes]] - [status-im.components.react :refer [geth]] + [status-im.components.geth :as geth] [status-im.utils.handlers :refer [register-handler] :as u] status-im.chat.handlers status-im.group-settings.handlers @@ -104,9 +104,8 @@ (u/side-effect! (fn [db _] (log/debug "Starting node") - (.startNode geth - (fn [result] (node-started db result)) - #(log/debug "Geth already initialized"))))) + (geth/start-node (fn [result] (node-started db result)) + #(log/debug "Geth already initialized"))))) (register-handler :crypt-initialized (u/side-effect! diff --git a/src/status_im/ios/core.cljs b/src/status_im/ios/core.cljs index 97cbc651dc..1e3bcd8ad0 100644 --- a/src/status_im/ios/core.cljs +++ b/src/status_im/ios/core.cljs @@ -1,30 +1,93 @@ (ns status-im.ios.core (:require [reagent.core :as r :refer [atom]] - [re-frame.core :refer [subscribe dispatch dispatch-sync]])) + [re-frame.core :refer [subscribe dispatch dispatch-sync]] + [status-im.handlers] + [status-im.subs] + [status-im.ios.styles :refer [styles]] + [status-im.components.react :refer [app-registry + keyboard + orientation]] + [status-im.components.main-tabs :refer [main-tabs]] + [status-im.contacts.views.contact-list :refer [contact-list]] + [status-im.contacts.views.new-contact :refer [new-contact]] + [status-im.qr-scanner.screen :refer [qr-scanner]] + [status-im.discovery.screen :refer [discovery]] + [status-im.discovery.tag :refer [discovery-tag]] + [status-im.chat.screen :refer [chat]] + [status-im.accounts.login.screen :refer [login]] + [status-im.accounts.screen :refer [accounts]] + [status-im.chats-list.screen :refer [chats-list]] + [status-im.new-group.screen :refer [new-group]] + [status-im.participants.views.add :refer [new-participants]] + [status-im.participants.views.remove :refer [remove-participants]] + [status-im.group-settings.screen :refer [group-settings]] + [status-im.profile.screen :refer [profile my-profile]] + [status-im.utils.utils :refer [toast]] + [status-im.utils.encryption] + status-im.persistence.realm.core + [status-im.utils.logging :as log])) -(set! js/window.React (js/require "react")) -(set! js/ReactNative (js/require "react-native")) - -(def app-registry (.-AppRegistry js/ReactNative)) -(def text (r/adapt-react-class (.-Text js/ReactNative))) -(def view (r/adapt-react-class (.-View js/ReactNative))) -(def image (r/adapt-react-class (.-Image js/ReactNative))) -(def touchable-highlight (r/adapt-react-class (.-TouchableHighlight js/ReactNative))) - -(def logo-img (js/require "./images/cljs.png")) - -(defn alert [title] - (.alert (.-Alert js/ReactNative) title)) +(defn orientation->keyword [o] + (keyword (.toLowerCase o))) (defn app-root [] - (fn [] - [view {:style {:flex-direction "column" :margin 40 :align-items :center}} - [text {:style {:font-size 30 :font-weight "100" :margin-bottom 20 :text-align :center}} "Test"] - [image {:source logo-img - :style {:width 80 :height 80 :margin-bottom 30}}] - [touchable-highlight {:style {:background-color "#999" :padding 10 :border-radius 5} - :on-press #(alert "HELLO!")} - [text {:style {:color :white :text-align :center :font-weight "bold"}} "press me"]]])) + (let [signed-up (subscribe [:get :signed-up]) + _ (log/debug "signed up: " @signed-up) + view-id (subscribe [:get :view-id]) + account (subscribe [:get :user-identity]) + keyboard-height (subscribe [:get :keyboard-height])] + (log/debug "Current account: " @account) + (r/create-class + {:component-will-mount + (fn [] + (let [o (orientation->keyword (.getInitialOrientation orientation))] + (dispatch [:set :orientation o])) + (.addOrientationListener + orientation + #(dispatch [:set :orientation (orientation->keyword %)])) + (.lockToPortrait orientation) + (.addListener keyboard + "keyboardDidShow" + (fn [e] + (let [h (.. e -endCoordinates -height)] + (when-not (= h @keyboard-height) + (dispatch [:set :keyboard-height h]))))) + (.addListener keyboard + "keyboardDidHide" + (when-not (= 0 @keyboard-height) + #(dispatch [:set :keyboard-height 0])))) + :render + (fn [] + (let [startup-view (if @account + (if @signed-up + @view-id + :chat) + (if (contains? #{:login :chat} @view-id) + @view-id + :accounts))] + (log/debug startup-view) + (let [component (case (if true startup-view :chat) + :discovery main-tabs + :discovery-tag discovery-tag + :add-participants new-participants + :remove-participants remove-participants + :chat-list main-tabs + :new-group new-group + :group-settings group-settings + :contact-list main-tabs + :group-contacts contact-list + :new-contact new-contact + :qr-scanner qr-scanner + :chat chat + :profile profile + :accounts accounts + :login login + :my-profile my-profile)] + [component {:platform-specific {:styles styles}}])))}))) (defn init [] - (.registerComponent app-registry "StatusIm" #(r/reactify-component app-root))) + (dispatch-sync [:reset-app]) + (dispatch [:initialize-crypt]) + (dispatch [:initialize-geth]) + (dispatch [:load-user-phone-number]) + (.registerComponent app-registry "StatusIm" #(r/reactify-component app-root))) diff --git a/src/status_im/ios/styles.cljs b/src/status_im/ios/styles.cljs new file mode 100644 index 0000000000..563cefbab8 --- /dev/null +++ b/src/status_im/ios/styles.cljs @@ -0,0 +1,24 @@ +(ns status-im.ios.styles + (:require [status-im.components.styles :as styles])) + +(def components + {:status-bar {:default {:height 20 + :bar-style "default" + :color styles/color-white} + :transparent {:height 20 + :bar-style "light-content" + :color styles/color-transparent}} + :toolbar {:border-bottom-color styles/color-gray3 + :border-bottom-width 0.5} + :actions-list-view {:border-bottom-color styles/color-gray3 + :border-bottom-width 0.5} + :chat {:new-message {:border-top-color styles/color-gray3 + :border-top-width 0.5}}}) + +(def fonts + {:default {:font-family "SFUIDisplay-Regular"} + :medium {:font-family "SFUIDisplay-Medium"}}) + +(def styles + {:components components + :fonts fonts}) \ No newline at end of file diff --git a/src/status_im/new_group/screen.cljs b/src/status_im/new_group/screen.cljs index 9e81f77b89..e728761f23 100644 --- a/src/status_im/new_group/screen.cljs +++ b/src/status_im/new_group/screen.cljs @@ -11,24 +11,28 @@ list-view list-item]] [status-im.components.styles :refer [color-purple]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.utils.listview :refer [to-datasource]] [status-im.new-group.views.contact :refer [new-group-contact]] [status-im.new-group.styles :as st] - [status-im.i18n :refer [label]])) + [status-im.i18n :refer [label]] + [status-im.components.styles :as cst])) -(defview new-group-toolbar [] +(defview new-group-toolbar [platform-specific] [group-name [:get :new-chat-name] creation-disabled? [:get :disable-group-creation] valid? [:new-chat-name-valid?]] (let [create-btn-enabled? (and valid? (not creation-disabled?))] - [toolbar - {:title (label :t/new-group-chat) - :action {:image {:source res/v ;; {:uri "icon_search"} - :style (st/toolbar-icon create-btn-enabled?)} - :handler (when create-btn-enabled? - #(dispatch [:init-group-creation group-name]))}}])) + [view + [status-bar {:platform-specific platform-specific}] + [toolbar + {:title (label :t/new-group-chat) + :action {:image {:source res/v ;; {:uri "icon_search"} + :style (st/toolbar-icon create-btn-enabled?)} + :handler (when create-btn-enabled? + #(dispatch [:init-group-creation group-name]))}}]])) (defview group-name-input [] [group-name [:get :new-chat-name] @@ -44,10 +48,10 @@ (when (pos? (count validation-messages)) [text {:style st/group-name-validation-message} (first validation-messages)])]) -(defview new-group [] +(defview new-group [{platform-specific :platform-specific}] [contacts [:all-contacts]] [view st/new-group-container - [new-group-toolbar] + [new-group-toolbar platform-specific] [view st/chat-name-container [text {:style st/chat-name-text} (label :t/chat-name)] [group-name-input] diff --git a/src/status_im/participants/views/add.cljs b/src/status_im/participants/views/add.cljs index e708b9a7c2..4ee928e732 100644 --- a/src/status_im/participants/views/add.cljs +++ b/src/status_im/participants/views/add.cljs @@ -3,29 +3,33 @@ (:require [re-frame.core :refer [subscribe dispatch]] [status-im.resources :as res] [status-im.components.react :refer [view list-view list-item]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.utils.listview :refer [to-datasource]] [status-im.participants.views.contact :refer [participant-contact]] [reagent.core :as r] [status-im.participants.styles :as st] - [status-im.i18n :refer [label]])) + [status-im.i18n :refer [label]] + [status-im.components.styles :as cst])) -(defn new-participants-toolbar [] - [toolbar - {:title (label :t/add-participants) - :action {:image {:source res/v ;; {:uri "icon_search"} - :style st/new-participant-image} - :handler #(do (dispatch [:add-new-participants]) - (dispatch [:navigate-back]))}}]) +(defn new-participants-toolbar [platform-specific] + [view + [status-bar {:platform-specific platform-specific}] + [toolbar + {:title (label :t/add-participants) + :action {:image {:source res/v ;; {:uri "icon_search"} + :style st/new-participant-image} + :handler #(do (dispatch [:add-new-participants]) + (dispatch [:navigate-back]))}}]]) (defn new-participants-row [row _ _] (list-item [participant-contact row])) -(defview new-participants [] +(defview new-participants [{platform-specific :platform-specific}] [contacts [:all-new-contacts]] [view st/participants-container - [new-participants-toolbar] + [new-participants-toolbar platform-specific] [list-view {:dataSource (to-datasource contacts) :renderRow new-participants-row :style st/participants-list}]]) diff --git a/src/status_im/participants/views/remove.cljs b/src/status_im/participants/views/remove.cljs index 6469371a3f..a6760a4bff 100644 --- a/src/status_im/participants/views/remove.cljs +++ b/src/status_im/participants/views/remove.cljs @@ -2,33 +2,41 @@ (:require-macros [status-im.utils.views :refer [defview]]) (:require [re-frame.core :refer [subscribe dispatch]] [status-im.resources :as res] - [status-im.components.react :refer [view text-input text image - touchable-highlight list-view - list-item]] + [status-im.components.react :refer [view + text-input + text + image + touchable-highlight + list-view + list-item]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.utils.listview :refer [to-datasource]] [status-im.participants.views.contact :refer [participant-contact]] [reagent.core :as r] [status-im.participants.styles :as st] - [status-im.i18n :refer [label]])) + [status-im.i18n :refer [label]] + [status-im.components.styles :as cst])) -(defn remove-participants-toolbar [] - [toolbar - {:title (label :t/remove-participants) - :action {:handler #(do (dispatch [:remove-participants]) - (dispatch [:navigate-back])) - :image {:source res/trash-icon ;; {:uri "icon_search"} - :style st/remove-participants-image}}}]) +(defn remove-participants-toolbar [platform-specific] + [view + [status-bar {:platform-specific platform-specific}] + [toolbar + {:title (label :t/remove-participants) + :action {:handler #(do (dispatch [:remove-participants]) + (dispatch [:navigate-back])) + :image {:source res/trash-icon ;; {:uri "icon_search"} + :style st/remove-participants-image}}}]]) (defn remove-participants-row [row _ _] (r/as-element [participant-contact row])) -(defview remove-participants [] +(defview remove-participants [{platform-specific :platform-specific}] [contacts [:current-chat-contacts]] [view st/participants-container - [remove-participants-toolbar] + [remove-participants-toolbar platform-specific] [list-view {:dataSource (to-datasource contacts) :renderRow remove-participants-row :style st/participants-list}]]) diff --git a/src/status_im/profile/screen.cljs b/src/status_im/profile/screen.cljs index 87dd677dbc..e4ee787838 100644 --- a/src/status_im/profile/screen.cljs +++ b/src/status_im/profile/screen.cljs @@ -61,7 +61,7 @@ )} [view [text {:style st/report-user-text} (label :t/report-user)]]]]]]) -(defview my-profile [] +(defview my-profile [_] [username [:get :username] photo-path [:get :photo-path] phone-number [:get :phone-number] diff --git a/src/status_im/profile/styles.cljs b/src/status_im/profile/styles.cljs index fcaaad9b54..1650bb20a2 100644 --- a/src/status_im/profile/styles.cljs +++ b/src/status_im/profile/styles.cljs @@ -96,7 +96,7 @@ :backgroundColor color-blue :paddingLeft 25 :paddingRight 25 - :borderRadius 50}) + :borderRadius 20}) (def message-btn-text {:marginTop -2.5 @@ -112,7 +112,7 @@ :justifyContent :center :backgroundColor color-blue-transparent :padding 8 - :borderRadius 50}) + :borderRadius 20}) (def more-btn-image {:width 4 diff --git a/src/status_im/qr_scanner/screen.cljs b/src/status_im/qr_scanner/screen.cljs index 2f27d30b9f..173b3ac6cb 100644 --- a/src/status_im/qr_scanner/screen.cljs +++ b/src/status_im/qr_scanner/screen.cljs @@ -6,21 +6,25 @@ [status-im.components.camera :refer [camera]] [status-im.components.styles :refer [toolbar-background1 icon-search]] + [status-im.components.status-bar :refer [status-bar]] [status-im.components.toolbar :refer [toolbar]] [status-im.qr-scanner.styles :as st] - [status-im.utils.types :refer [json->clj]])) + [status-im.utils.types :refer [json->clj]] + [status-im.components.styles :as cst])) -(defn qr-scanner-toolbar [title] - [toolbar {:title title - :background-color toolbar-background1 - :action {:image {:source {:uri :icon_lock_white} - :style icon-search} - :handler #()}}]) +(defn qr-scanner-toolbar [title platform-specific] + [view + [status-bar {:platform-specific platform-specific}] + [toolbar {:title title + :background-color toolbar-background1 + :action {:image {:source {:uri :icon_lock_white} + :style icon-search} + :handler #()}}]]) -(defview qr-scanner [] +(defview qr-scanner [{platform-specific :platform-specific}] [identifier [:get :current-qr-context]] [view st/barcode-scanner-container - [qr-scanner-toolbar (:toolbar-title identifier)] + [qr-scanner-toolbar (:toolbar-title identifier) platform-specific] [camera {;:on-bar-code-read #(js/alert "ok") :onBarCodeRead #(let [data (json->clj (.-data %))] (dispatch [:set-qr-code identifier data])) diff --git a/src/status_im/resources.cljs b/src/status_im/resources.cljs index e8c41190d6..4b49c06d0e 100644 --- a/src/status_im/resources.cljs +++ b/src/status_im/resources.cljs @@ -1,19 +1,19 @@ (ns status-im.resources) +(def add-icon (js/require "./images/add.png")) +(def att (js/require "./images/att.png")) +(def chat-icon (js/require "./images/chat.png")) +(def delivered-icon (js/require "./images/delivered.png")) +(def delivery-failed-icon (js/require "./images/deliveryfailed.png")) +(def icon-close-gray (js/require "./images/icon_close_gray.png")) +(def leave-icon (js/require "./images/leave.png")) (def logo-icon (js/require "./images/logo.png")) +(def mic (js/require "./images/mic.png")) (def nav-back-icon (js/require "./images/nav-back.png")) (def user-no-photo (js/require "./images/no-photo.png")) (def online-icon (js/require "./images/online.png")) -(def seen-icon (js/require "./images/seen.png")) -(def delivered-icon (js/require "./images/delivered.png")) -(def delivery-failed-icon (js/require "./images/deliveryfailed.png")) -(def chat-icon (js/require "./images/chat.png")) (def play (js/require "./images/play.png")) -(def mic (js/require "./images/mic.png")) +(def seen-icon (js/require "./images/seen.png")) (def smile (js/require "./images/smile.png")) -(def att (js/require "./images/att.png")) -(def v (js/require "./images/v.png")) -(def add-icon (js/require "./images/add.png")) (def trash-icon (js/require "./images/trash.png")) -(def leave-icon (js/require "./images/leave.png")) -(def icon-close-gray (js/require "./images/icon_close_gray.png")) +(def v (js/require "./images/v.png"))