Merge pull request #493 from status-im/feature/#485

Share Address/Public Key (#485)
This commit is contained in:
Roman Volosovskyi 2016-11-27 17:39:19 +02:00 committed by GitHub
commit d7efde269c
19 changed files with 155 additions and 128 deletions

View File

@ -33,7 +33,8 @@
"web3", "web3",
"eccjs", "eccjs",
"chance", "chance",
"react-native-swiper" "react-native-swiper",
"react-native-share"
], ],
"imageDirs": [ "imageDirs": [
"images" "images"

View File

@ -152,6 +152,7 @@ dependencies {
compile project(':react-native-fs') compile project(':react-native-fs')
compile project(':react-native-image-crop-picker') compile project(':react-native-image-crop-picker')
compile project(':react-native-webview-bridge') compile project(':react-native-webview-bridge')
compile project(':react-native-share')
compile fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"]) compile fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"])
} }

View File

@ -24,6 +24,7 @@ import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
import fr.bamlab.rnimageresizer.ImageResizerPackage; import fr.bamlab.rnimageresizer.ImageResizerPackage;
import com.reactnative.ivpusic.imagepicker.PickerPackage; import com.reactnative.ivpusic.imagepicker.PickerPackage;
import com.github.alinz.reactnativewebviewbridge.WebViewBridgePackage; import com.github.alinz.reactnativewebviewbridge.WebViewBridgePackage;
import cl.json.RNSharePackage;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -56,7 +57,8 @@ public class MainApplication extends Application implements ReactApplication {
new ReactNativeDialogsPackage(), new ReactNativeDialogsPackage(),
new ImageResizerPackage(), new ImageResizerPackage(),
new PickerPackage(), new PickerPackage(),
new WebViewBridgePackage() new WebViewBridgePackage(),
new RNSharePackage()
); );
} }
}; };

View File

@ -37,3 +37,6 @@ project(':react-native-image-crop-picker').projectDir = new File(settingsDir, '.
include ':react-native-webview-bridge' include ':react-native-webview-bridge'
project(':react-native-webview-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview-bridge/android') project(':react-native-webview-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview-bridge/android')
include ':react-native-share'
project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')

View File

@ -14,7 +14,7 @@
(re-frame.core/dispatch [:load-commands!])) (re-frame.core/dispatch [:load-commands!]))
(figwheel/watch-and-reload (figwheel/watch-and-reload
:websocket-url "ws://localhost:3449/figwheel-ws" :websocket-url "ws://10.0.3.2:3449/figwheel-ws"
:heads-up-display false :heads-up-display false
:jsload-callback callback) :jsload-callback callback)

View File

@ -33,7 +33,6 @@
213311F38CA74CE280FD09AD /* libRNI18n.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52F6ED6465184513A082652B /* libRNI18n.a */; }; 213311F38CA74CE280FD09AD /* libRNI18n.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52F6ED6465184513A082652B /* libRNI18n.a */; };
22118DE1207A419FBFE7B62D /* libRealmReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD48A32459B64E96843BB238 /* libRealmReact.a */; }; 22118DE1207A419FBFE7B62D /* libRealmReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD48A32459B64E96843BB238 /* libRealmReact.a */; };
25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */; }; 25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */; };
3A7EB04F1DD9CAFC00A4FCC8 /* libSplashScreen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A7EB04E1DD9CABC00A4FCC8 /* libSplashScreen.a */; };
3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */; }; 3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */; };
4D3D740D5EFA4F8592B048D7 /* libBVLinearGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF1CD4C3D1254774ACCAE4E8 /* libBVLinearGradient.a */; }; 4D3D740D5EFA4F8592B048D7 /* libBVLinearGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF1CD4C3D1254774ACCAE4E8 /* libBVLinearGradient.a */; };
4FFAE7B0414A463991039A2E /* libRNRandomBytes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C55F15EB4D4DAF9202A662 /* libRNRandomBytes.a */; }; 4FFAE7B0414A463991039A2E /* libRNRandomBytes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C55F15EB4D4DAF9202A662 /* libRNRandomBytes.a */; };
@ -54,6 +53,10 @@
A6AF670051B842249D520C7B /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7ED174A34D7D42358313368B /* Foundation.ttf */; }; A6AF670051B842249D520C7B /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7ED174A34D7D42358313368B /* Foundation.ttf */; };
AD5063BC2B2A4C52ACE0A0B4 /* libUdpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A96279092BEC4C4B93914F48 /* libUdpSockets.a */; }; AD5063BC2B2A4C52ACE0A0B4 /* libUdpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A96279092BEC4C4B93914F48 /* libUdpSockets.a */; };
AE97D4B08C9F4821B8E9C50B /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 359B076A658B4FBAB5128B03 /* Ionicons.ttf */; }; AE97D4B08C9F4821B8E9C50B /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 359B076A658B4FBAB5128B03 /* Ionicons.ttf */; };
B24FC7FB1DE7192200D694FF /* libRNShare.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7FA1DE7190C00D694FF /* libRNShare.a */; };
B24FC7FD1DE7195700D694FF /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7FC1DE7195700D694FF /* Social.framework */; };
B24FC7FF1DE7195F00D694FF /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7FE1DE7195F00D694FF /* MessageUI.framework */; };
B24FC8001DE71C0E00D694FF /* libSplashScreen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7F21DE718EF00D694FF /* libSplashScreen.a */; };
B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */; }; B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */; };
B45B40B471414274A7A83185 /* libRCTContacts.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3384AFA9609A409B81928AD5 /* libRCTContacts.a */; }; B45B40B471414274A7A83185 /* libRCTContacts.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3384AFA9609A409B81928AD5 /* libRCTContacts.a */; };
BA68A2377A20496EA737000D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E586E1B0E544F64AA9F5BD1 /* libz.tbd */; }; BA68A2377A20496EA737000D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E586E1B0E544F64AA9F5BD1 /* libz.tbd */; };
@ -227,62 +230,6 @@
remoteGlobalIDString = F60690131CA2766F0003FB26; remoteGlobalIDString = F60690131CA2766F0003FB26;
remoteInfo = RealmReact; remoteInfo = RealmReact;
}; };
3A7EB01D1DD9C37800A4FCC8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
remoteInfo = "RCTImage-tvOS";
};
3A7EB0221DD9C37800A4FCC8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28471D9B043800D4039D;
remoteInfo = "RCTLinking-tvOS";
};
3A7EB0261DD9C37800A4FCC8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
remoteInfo = "RCTNetwork-tvOS";
};
3A7EB02B1DD9C37800A4FCC8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28611D9B046600D4039D;
remoteInfo = "RCTSettings-tvOS";
};
3A7EB0301DD9C37800A4FCC8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
remoteInfo = "RCTText-tvOS";
};
3A7EB0351DD9C37800A4FCC8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28881D9B049200D4039D;
remoteInfo = "RCTWebSocket-tvOS";
};
3A7EB03A1DD9C37800A4FCC8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
remoteInfo = "React-tvOS";
};
3A7EB04D1DD9CABC00A4FCC8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D7682761D8E76B80014119E;
remoteInfo = SplashScreen;
};
78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
@ -360,6 +307,20 @@
remoteGlobalIDString = 24DF11ED1DA3A2B90056F77C; remoteGlobalIDString = 24DF11ED1DA3A2B90056F77C;
remoteInfo = RNInstabug; remoteInfo = RNInstabug;
}; };
B24FC7F11DE718EF00D694FF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D7682761D8E76B80014119E;
remoteInfo = SplashScreen;
};
B24FC7F91DE7190C00D694FF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B24FC7F51DE7190C00D694FF /* RNShare.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RNShare;
};
CE4E319D1D8693090033ED64 /* PBXContainerItemProxy */ = { CE4E319D1D8693090033ED64 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
containerPortal = 5E5A7625B76441D984EA8C0D /* RCTImageResizer.xcodeproj */; containerPortal = 5E5A7625B76441D984EA8C0D /* RCTImageResizer.xcodeproj */;
@ -453,6 +414,9 @@
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 = "<group>"; }; 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 = "<group>"; };
A96279092BEC4C4B93914F48 /* libUdpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libUdpSockets.a; sourceTree = "<group>"; }; A96279092BEC4C4B93914F48 /* libUdpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libUdpSockets.a; sourceTree = "<group>"; };
ACA66A8F16CD2FE21F38738B /* Pods-StatusIm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StatusIm.debug.xcconfig"; path = "Pods/Target Support Files/Pods-StatusIm/Pods-StatusIm.debug.xcconfig"; sourceTree = "<group>"; }; ACA66A8F16CD2FE21F38738B /* Pods-StatusIm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StatusIm.debug.xcconfig"; path = "Pods/Target Support Files/Pods-StatusIm/Pods-StatusIm.debug.xcconfig"; sourceTree = "<group>"; };
B24FC7F51DE7190C00D694FF /* RNShare.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNShare.xcodeproj; path = "../node_modules/react-native-share/ios/RNShare.xcodeproj"; sourceTree = "<group>"; };
B24FC7FC1DE7195700D694FF /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; };
B24FC7FE1DE7195F00D694FF /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = StatusIm/Images.xcassets; sourceTree = "<group>"; }; B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = StatusIm/Images.xcassets; sourceTree = "<group>"; };
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 = "<group>"; }; 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 = "<group>"; };
C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libTcpSockets.a; sourceTree = "<group>"; }; C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libTcpSockets.a; sourceTree = "<group>"; };
@ -479,7 +443,10 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
3A7EB04F1DD9CAFC00A4FCC8 /* libSplashScreen.a in Frameworks */, B24FC8001DE71C0E00D694FF /* libSplashScreen.a in Frameworks */,
B24FC7FF1DE7195F00D694FF /* MessageUI.framework in Frameworks */,
B24FC7FD1DE7195700D694FF /* Social.framework in Frameworks */,
B24FC7FB1DE7192200D694FF /* libRNShare.a in Frameworks */,
20A5C9711D9283A2002C4965 /* libimageCropPicker.a in Frameworks */, 20A5C9711D9283A2002C4965 /* libimageCropPicker.a in Frameworks */,
9E3AB6D01D87DB2B008846B4 /* libReact-Native-Webview-Bridge.a in Frameworks */, 9E3AB6D01D87DB2B008846B4 /* libReact-Native-Webview-Bridge.a in Frameworks */,
20B6B6841D92C42600CC5C6A /* RSKImageCropper.framework in Frameworks */, 20B6B6841D92C42600CC5C6A /* RSKImageCropper.framework in Frameworks */,
@ -776,6 +743,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = { 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
B24FC7F51DE7190C00D694FF /* RNShare.xcodeproj */,
3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */, 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */,
20A5C94B1D927137002C4965 /* imageCropPicker.xcodeproj */, 20A5C94B1D927137002C4965 /* imageCropPicker.xcodeproj */,
9E3AB6B21D87DA2A008846B4 /* React-Native-Webview-Bridge.xcodeproj */, 9E3AB6B21D87DA2A008846B4 /* React-Native-Webview-Bridge.xcodeproj */,
@ -861,6 +829,8 @@
A97BA941B2FB44B4B66EE6D3 /* Frameworks */ = { A97BA941B2FB44B4B66EE6D3 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
B24FC7FE1DE7195F00D694FF /* MessageUI.framework */,
B24FC7FC1DE7195700D694FF /* Social.framework */,
20A5C96E1D92716C002C4965 /* QBImagePicker.framework */, 20A5C96E1D92716C002C4965 /* QBImagePicker.framework */,
20A5C96C1D92715E002C4965 /* RSKImageCropper.framework */, 20A5C96C1D92715E002C4965 /* RSKImageCropper.framework */,
CE4E31B21D8695250033ED64 /* Statusgo.framework */, CE4E31B21D8695250033ED64 /* Statusgo.framework */,
@ -872,6 +842,22 @@
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
B24FC7BB1DE718EA00D694FF /* Products */ = {
isa = PBXGroup;
children = (
B24FC7F21DE718EF00D694FF /* libSplashScreen.a */,
);
name = Products;
sourceTree = "<group>";
};
B24FC7F61DE7190C00D694FF /* Products */ = {
isa = PBXGroup;
children = (
B24FC7FA1DE7190C00D694FF /* libRNShare.a */,
);
name = Products;
sourceTree = "<group>";
};
CE4E31941D8693090033ED64 /* Products */ = { CE4E31941D8693090033ED64 /* Products */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -1048,12 +1034,16 @@
ProductGroup = 20B7D0F01D3F74CC00B70F14 /* Products */; ProductGroup = 20B7D0F01D3F74CC00B70F14 /* Products */;
ProjectRef = 45FB5F523DE04BDE9877869C /* RNRandomBytes.xcodeproj */; ProjectRef = 45FB5F523DE04BDE9877869C /* RNRandomBytes.xcodeproj */;
}, },
{
ProductGroup = B24FC7F61DE7190C00D694FF /* Products */;
ProjectRef = B24FC7F51DE7190C00D694FF /* RNShare.xcodeproj */;
},
{ {
ProductGroup = 20B7D0FF1D3F74CD00B70F14 /* Products */; ProductGroup = 20B7D0FF1D3F74CD00B70F14 /* Products */;
ProjectRef = 8AE71EE8751F4652B13BFE83 /* RNVectorIcons.xcodeproj */; ProjectRef = 8AE71EE8751F4652B13BFE83 /* RNVectorIcons.xcodeproj */;
}, },
{ {
ProductGroup = 3A7EB04A1DD9CABC00A4FCC8 /* Products */; ProductGroup = B24FC7BB1DE718EA00D694FF /* Products */;
ProjectRef = 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */; ProjectRef = 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */;
}, },
{ {
@ -1228,62 +1218,6 @@
remoteRef = 20B7D1281D3F74CD00B70F14 /* PBXContainerItemProxy */; remoteRef = 20B7D1281D3F74CD00B70F14 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR; sourceTree = BUILT_PRODUCTS_DIR;
}; };
3A7EB01E1DD9C37800A4FCC8 /* libRCTImage-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTImage-tvOS.a";
remoteRef = 3A7EB01D1DD9C37800A4FCC8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3A7EB0231DD9C37800A4FCC8 /* libRCTLinking-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTLinking-tvOS.a";
remoteRef = 3A7EB0221DD9C37800A4FCC8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3A7EB0271DD9C37800A4FCC8 /* libRCTNetwork-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTNetwork-tvOS.a";
remoteRef = 3A7EB0261DD9C37800A4FCC8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3A7EB02C1DD9C37800A4FCC8 /* libRCTSettings-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTSettings-tvOS.a";
remoteRef = 3A7EB02B1DD9C37800A4FCC8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3A7EB0311DD9C37800A4FCC8 /* libRCTText-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTText-tvOS.a";
remoteRef = 3A7EB0301DD9C37800A4FCC8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3A7EB0361DD9C37800A4FCC8 /* libRCTWebSocket-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTWebSocket-tvOS.a";
remoteRef = 3A7EB0351DD9C37800A4FCC8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3A7EB03B1DD9C37800A4FCC8 /* libReact-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libReact-tvOS.a";
remoteRef = 3A7EB03A1DD9C37800A4FCC8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3A7EB04E1DD9CABC00A4FCC8 /* libSplashScreen.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSplashScreen.a;
remoteRef = 3A7EB04D1DD9CABC00A4FCC8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
isa = PBXReferenceProxy; isa = PBXReferenceProxy;
fileType = archive.ar; fileType = archive.ar;
@ -1361,6 +1295,20 @@
remoteRef = 9E3F1C111DDAE781005E4779 /* PBXContainerItemProxy */; remoteRef = 9E3F1C111DDAE781005E4779 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR; sourceTree = BUILT_PRODUCTS_DIR;
}; };
B24FC7F21DE718EF00D694FF /* libSplashScreen.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSplashScreen.a;
remoteRef = B24FC7F11DE718EF00D694FF /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
B24FC7FA1DE7190C00D694FF /* libRNShare.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNShare.a;
remoteRef = B24FC7F91DE7190C00D694FF /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
CE4E319E1D8693090033ED64 /* libRCTImageResizer.a */ = { CE4E319E1D8693090033ED64 /* libRCTImageResizer.a */ = {
isa = PBXReferenceProxy; isa = PBXReferenceProxy;
fileType = archive.ar; fileType = archive.ar;

View File

@ -77,6 +77,10 @@
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
</dict> </dict>

View File

@ -53,6 +53,7 @@
"react-native-orientation": "github:youennPennarun/react-native-orientation", "react-native-orientation": "github:youennPennarun/react-native-orientation",
"react-native-qrcode": "^0.2.2", "react-native-qrcode": "^0.2.2",
"react-native-randombytes": "^2.1.0", "react-native-randombytes": "^2.1.0",
"react-native-share": "^1.0.17",
"react-native-splash-screen": "^1.0.9", "react-native-splash-screen": "^1.0.9",
"react-native-swiper": "1.5.3", "react-native-swiper": "1.5.3",
"react-native-tcp": "^2.0.4", "react-native-tcp": "^2.0.4",

View File

@ -118,3 +118,8 @@
(.then images-fn)))) (.then images-fn))))
(def swiper (adapt-class (js/require "react-native-swiper"))) (def swiper (adapt-class (js/require "react-native-swiper")))
;; Clipboard
(defn copy-to-clipboard [text]
(.setString (.-Clipboard react-native) text))

View File

@ -8,7 +8,7 @@
[status-im.utils.platform :as p] [status-im.utils.platform :as p]
[taoensso.timbre :as log])) [taoensso.timbre :as log]))
(defn- on-press (defn- on-press-default
[event component] [event component]
(log/debug "Pressed " event component) (log/debug "Pressed " event component)
(r/set-state component {:focused? true})) (r/set-state component {:focused? true}))
@ -29,7 +29,7 @@
:measured? true})))) :measured? true}))))
(defn- reagent-render (defn- reagent-render
[{:keys [label value editable? props] :as data}] [{:keys [label value editable? props on-press] :as data}]
(let [component (r/current-component) (let [component (r/current-component)
{:keys [focused? measured? full-height]} (r/state component)] {:keys [focused? measured? full-height]} (r/state component)]
(log/debug "reagent-render: " data focused? measured? full-height) (log/debug "reagent-render: " data focused? measured? full-height)
@ -49,7 +49,8 @@
:on-blur #(r/set-state component {:focused? false}) :on-blur #(r/set-state component {:focused? false})
:value value}] :value value}]
[text (merge {:style st/text [text (merge {:style st/text
:on-press #(on-press % component) :on-press (or on-press
#(on-press-default % component))
:onLayout #(on-layout-text % component) :onLayout #(on-layout-text % component)
:font :default :font :default
:ellipsizeMode :middle :ellipsizeMode :middle

View File

@ -0,0 +1,7 @@
(ns status-im.components.share
(:require [status-im.utils.platform :as p]))
(def class (js/require "react-native-share"))
(defn open [opts]
(.open class (clj->js opts)))

View File

@ -1,7 +1,9 @@
(ns status-im.profile.handlers (ns status-im.profile.handlers
(:require [re-frame.core :refer [subscribe dispatch]] (:require [re-frame.core :refer [subscribe dispatch]]
[status-im.utils.handlers :refer [register-handler]] [status-im.utils.handlers :refer [register-handler]]
[status-im.components.react :refer [show-image-picker]] [status-im.components.react :refer [show-image-picker
copy-to-clipboard]]
[status-im.components.share :refer [open]]
[status-im.utils.image-processing :refer [img->base64]] [status-im.utils.image-processing :refer [img->base64]]
[status-im.i18n :refer [label]] [status-im.i18n :refer [label]]
[status-im.utils.handlers :as u :refer [get-hashtags]] [status-im.utils.handlers :as u :refer [get-hashtags]]
@ -38,3 +40,15 @@
1 (dispatch [:open-image-picker]) 1 (dispatch [:open-image-picker])
:default)) :default))
:cancel-text (label :t/image-source-cancel)})))) :cancel-text (label :t/image-source-cancel)}))))
(register-handler :open-sharing
(u/side-effect!
(fn [_ [_ list-selection-fn text dialog-title]]
(list-selection-fn {:title dialog-title
:options [(label :t/sharing-copy-to-clipboard) (label :t/sharing-share)]
:callback (fn [index]
(case index
0 (copy-to-clipboard text)
1 (open {:message text})
:default))
:cancel-text (label :t/sharing-cancel)}))))

View File

@ -22,6 +22,7 @@
[status-im.components.text-field.view :refer [text-field]] [status-im.components.text-field.view :refer [text-field]]
[status-im.components.selectable-field.view :refer [selectable-field]] [status-im.components.selectable-field.view :refer [selectable-field]]
[status-im.components.status-view.view :refer [status-view]] [status-im.components.status-view.view :refer [status-view]]
[status-im.components.share :as share]
[status-im.utils.phone-number :refer [format-phone-number]] [status-im.utils.phone-number :refer [format-phone-number]]
[status-im.utils.image-processing :refer [img->base64]] [status-im.utils.image-processing :refer [img->base64]]
[status-im.utils.platform :refer [platform-specific]] [status-im.utils.platform :refer [platform-specific]]
@ -31,7 +32,12 @@
[status-im.utils.random :refer [id]] [status-im.utils.random :refer [id]]
[status-im.utils.utils :refer [clean-text]] [status-im.utils.utils :refer [clean-text]]
[status-im.components.image-button.view :refer [show-qr-button]] [status-im.components.image-button.view :refer [show-qr-button]]
[status-im.i18n :refer [label]])) [status-im.i18n :refer [label]]
[taoensso.timbre :as log]))
(defn share [text dialog-title]
(let [list-selection-fn (:list-selection-fn platform-specific)]
(dispatch [:open-sharing list-selection-fn text dialog-title])))
(defn toolbar [{:keys [account edit?]}] (defn toolbar [{:keys [account edit?]}]
(let [profile-edit-data-valid? (s/valid? ::v/profile account)] (let [profile-edit-data-valid? (s/valid? ::v/profile account)]
@ -74,7 +80,7 @@
(if edit? (if edit?
[touchable-highlight {:on-press (fn [] [touchable-highlight {:on-press (fn []
(let [list-selection-fn (get platform-specific :list-selection-fn)] (let [list-selection-fn (:list-selection-fn platform-specific)]
(dispatch [:open-image-source-selector list-selection-fn])))} (dispatch [:open-image-source-selector list-selection-fn])))}
[view [view
[my-profile-icon {:account {:photo-path photo-path [my-profile-icon {:account {:photo-path photo-path
@ -163,7 +169,8 @@
[view st/profile-property-field [view st/profile-property-field
[selectable-field {:label (label :t/address) [selectable-field {:label (label :t/address)
:editable? false :editable? false
:value address}]] :value address
:on-press #(share address (label :t/address))}]]
[show-qr-button {:handler #(dispatch [:navigate-to-modal :qr-code-view {:contact contact [show-qr-button {:handler #(dispatch [:navigate-to-modal :qr-code-view {:contact contact
:qr-source :whisper-identity}])}]] :qr-source :whisper-identity}])}]]
[view st/underline-container]]) [view st/underline-container]])
@ -173,7 +180,8 @@
[view st/profile-property-field [view st/profile-property-field
[selectable-field {:label (label :t/public-key) [selectable-field {:label (label :t/public-key)
:editable? false :editable? false
:value whisper-identity}]] :value whisper-identity
:on-press #(share whisper-identity (label :t/public-key))}]]
[show-qr-button {:handler #(dispatch [:navigate-to-modal :qr-code-view {:contact contact [show-qr-button {:handler #(dispatch [:navigate-to-modal :qr-code-view {:contact contact
:qr-source :public-key}])}]]] :qr-source :public-key}])}]]]
@ -213,7 +221,8 @@
[view st/profile-property-field [view st/profile-property-field
[selectable-field {:label (label :t/address) [selectable-field {:label (label :t/address)
:editable? edit? :editable? edit?
:value address}]] :value address
:on-press #(share address (label :t/address))}]]
[show-qr-button {:handler #(dispatch [:navigate-to-modal :qr-code-view {:contact account [show-qr-button {:handler #(dispatch [:navigate-to-modal :qr-code-view {:contact account
:qr-source :address}])}]] :qr-source :address}])}]]
[view st/underline-container]] [view st/underline-container]]
@ -223,7 +232,8 @@
[view st/profile-property-field [view st/profile-property-field
[selectable-field {:label (label :t/public-key) [selectable-field {:label (label :t/public-key)
:editable? edit? :editable? edit?
:value public-key}]] :value public-key
:on-press #(share public-key (label :t/public-key))}]]
[show-qr-button {:handler #(dispatch [:navigate-to-modal :qr-code-view {:contact account [show-qr-button {:handler #(dispatch [:navigate-to-modal :qr-code-view {:contact account
:qr-source :public-key}])}]]] :qr-source :public-key}])}]]]

View File

@ -79,6 +79,11 @@
:image-source-gallery "Select from gallery" :image-source-gallery "Select from gallery"
:image-source-cancel "Cancel" :image-source-cancel "Cancel"
;;sharing
:sharing-copy-to-clipboard "Copy to clipboard"
:sharing-share "Share..."
:sharing-cancel "Cancel"
;sign-up ;sign-up
:contacts-syncronized "Your contacts have been synchronized" :contacts-syncronized "Your contacts have been synchronized"
:confirmation-code (str "Thanks! We've sent you a text message with a confirmation " :confirmation-code (str "Thanks! We've sent you a text message with a confirmation "

View File

@ -78,6 +78,11 @@
:image-source-gallery "Seleccionar de la galería" :image-source-gallery "Seleccionar de la galería"
:image-source-cancel "Cancelar" :image-source-cancel "Cancelar"
;;sharing
:sharing-copy-to-clipboard "Copiar"
:sharing-share "Compartir..."
:sharing-cancel "Cancelar"
;sign-up ;sign-up
:contacts-syncronized "Se han sincronizado tus contactos" :contacts-syncronized "Se han sincronizado tus contactos"
:confirmation-code (str "¡Gracias! Te hemos enviado un mensaje de texto con un código" :confirmation-code (str "¡Gracias! Te hemos enviado un mensaje de texto con un código"

View File

@ -78,6 +78,11 @@
:image-source-gallery "Seleccionar de la galería" :image-source-gallery "Seleccionar de la galería"
:image-source-cancel "Cancelar" :image-source-cancel "Cancelar"
;;sharing
:sharing-copy-to-clipboard "Copiar"
:sharing-share "Compartir..."
:sharing-cancel "Cancelar"
;sign-up ;sign-up
:contacts-syncronized "Tus contactos se han sincronizado" :contacts-syncronized "Tus contactos se han sincronizado"
:confirmation-code (str "¡Gracias! Te hemos enviado un código de confirmación por mensaje de texto. " :confirmation-code (str "¡Gracias! Te hemos enviado un código de confirmación por mensaje de texto. "

View File

@ -78,6 +78,11 @@
:image-source-gallery "Выбрать из галереи" :image-source-gallery "Выбрать из галереи"
:image-source-cancel "Отмена" :image-source-cancel "Отмена"
;;sharing
:sharing-copy-to-clipboard "Скопировать"
:sharing-share "Поделиться..."
:sharing-cancel "Отмена"
;sign-up ;sign-up
:contacts-syncronized "Ваши контакты синхронизированы" :contacts-syncronized "Ваши контакты синхронизированы"
:confirmation-code (str "Спасибо! Мы отправили вам СМС с кодом подтверждения." :confirmation-code (str "Спасибо! Мы отправили вам СМС с кодом подтверждения."

View File

@ -78,6 +78,11 @@
:image-source-gallery "Chagua kutoka nyumba ya sanaa" :image-source-gallery "Chagua kutoka nyumba ya sanaa"
:image-source-cancel "Ghairi" :image-source-cancel "Ghairi"
;;sharing
:sharing-copy-to-clipboard "Kopiera"
:sharing-share "Dela..."
:sharing-cancel "Ghairi"
;sign-up ;sign-up
:contacts-syncronized "Mawasiliano yako yamelandanishwa" :contacts-syncronized "Mawasiliano yako yamelandanishwa"
:confirmation-code (str "Asante! Tumekutumia ujumbe mfupi na uthibitisho " :confirmation-code (str "Asante! Tumekutumia ujumbe mfupi na uthibitisho "

View File

@ -78,6 +78,11 @@
:image-source-gallery "Вибрати з галереї" :image-source-gallery "Вибрати з галереї"
:image-source-cancel "Відміна" :image-source-cancel "Відміна"
;;sharing
:sharing-copy-to-clipboard "Скопіювати"
:sharing-share "Поділитися..."
:sharing-cancel "Відміна"
;sign-up ;sign-up
:contacts-syncronized "Ваші контактні дані було синхронізовано" :contacts-syncronized "Ваші контактні дані було синхронізовано"
:confirmation-code (str "Дякуємо! Ми відправили вам текстове повідомлення з кодом " :confirmation-code (str "Дякуємо! Ми відправили вам текстове повідомлення з кодом "