Merge pull request #234 from status-im/feature/ios-registration-#232

iOS registration (#232), other iOS fixes
This commit is contained in:
Roman Volosovskyi 2016-09-22 17:15:53 +03:00 committed by GitHub
commit 6e8f60b777
67 changed files with 540 additions and 489 deletions

View File

@ -9,6 +9,21 @@
# Ignore malformed json
.*/node_modules/y18n/test/.*\.json
# Ignore the website subdir
<PROJECT_ROOT>/website/.*
# Ignore BUCK generated dirs
<PROJECT_ROOT>/\.buckd/
# Ignore unexpected extra @providesModule
.*/node_modules/commoner/test/source/widget/share.js
# Ignore duplicate module providers
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
.*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js
.*/node_modules/jest-runtime/build/__tests__/.*
[include]
[libs]
@ -33,9 +48,11 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
unsafe.enable_getters_and_setters=true
[version]
^0.27.0
^0.30.0

View File

@ -26,7 +26,8 @@
"react-native-dialogs",
"react-native-image-resizer",
"react-native-image-crop-picker",
"react-native-webview-bridge"
"react-native-webview-bridge",
"react-native-drawer-layout"
],
"imageDirs": [
"images"
@ -36,4 +37,4 @@
"dev": "env/dev",
"prod": "env/prod"
}
}
}

View File

@ -20,7 +20,7 @@ import com.github.yamill.orientation.OrientationPackage;
import com.rnfs.RNFSPackage;
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
import fr.bamlab.rnimageresizer.ImageResizerPackage;
import com.reactnative.picker.PickerPackage;
import com.reactnative.ivpusic.imagepicker.PickerPackage;
import com.github.alinz.reactnativewebviewbridge.WebViewBridgePackage;
import java.util.Arrays;
@ -53,7 +53,6 @@ public class MainApplication extends Application implements ReactApplication {
new ImageResizerPackage(),
new PickerPackage(),
new WebViewBridgePackage()
);
}
};

View File

@ -26,7 +26,12 @@
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 */; };
20A5C9711D9283A2002C4965 /* libimageCropPicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 20A5C9531D927137002C4965 /* libimageCropPicker.a */; };
20AB9EC61D47CC0300E7FD9C /* libRCTStatus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 201067C41D4789F700FA83B6 /* libRCTStatus.a */; };
20B6B6841D92C42600CC5C6A /* RSKImageCropper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20B6B6831D92C42600CC5C6A /* RSKImageCropper.framework */; };
20B6B6851D92C42600CC5C6A /* RSKImageCropper.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 20B6B6831D92C42600CC5C6A /* RSKImageCropper.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
20B6B6871D92C42600CC5C6A /* QBImagePicker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20B6B6861D92C42600CC5C6A /* QBImagePicker.framework */; };
20B6B6881D92C42600CC5C6A /* QBImagePicker.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 20B6B6861D92C42600CC5C6A /* QBImagePicker.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
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 */; };
@ -138,6 +143,13 @@
remoteGlobalIDString = 206C9F3A1D474E910063E3E6;
remoteInfo = RCTStatus;
};
20A5C9521D927137002C4965 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 20A5C94B1D927137002C4965 /* imageCropPicker.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3400A8081CEB54A6008A0BC7;
remoteInfo = imageCropPicker;
};
20B7D0FD1D3F74CC00B70F14 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 45FB5F523DE04BDE9877869C /* RNRandomBytes.xcodeproj */;
@ -238,6 +250,21 @@
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
20B6B6891D92C42700CC5C6A /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
20B6B6851D92C42600CC5C6A /* RSKImageCropper.framework in Embed Frameworks */,
20B6B6881D92C42600CC5C6A /* QBImagePicker.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = "<group>"; };
@ -265,6 +292,11 @@
2028DFF61D4275B600227DCD /* SF-UI-Display-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Display-Regular.otf"; sourceTree = "<group>"; };
2028DFF71D4275B600227DCD /* SF-UI-Display-Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Display-Semibold.otf"; sourceTree = "<group>"; };
2028DFF81D4275B600227DCD /* SF-UI-Display-Thin.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Display-Thin.otf"; sourceTree = "<group>"; };
20A5C94B1D927137002C4965 /* imageCropPicker.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = imageCropPicker.xcodeproj; path = "../node_modules/react-native-image-crop-picker/ios/imageCropPicker.xcodeproj"; sourceTree = "<group>"; };
20A5C96C1D92715E002C4965 /* RSKImageCropper.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RSKImageCropper.framework; path = "../node_modules/react-native-image-crop-picker/ios/RSKImageCropper/build/Debug-iphoneos/RSKImageCropper.framework"; sourceTree = "<group>"; };
20A5C96E1D92716C002C4965 /* QBImagePicker.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QBImagePicker.framework; path = "../node_modules/react-native-image-crop-picker/ios/QBImagePicker/build/Debug-iphoneos/QBImagePicker.framework"; sourceTree = "<group>"; };
20B6B6831D92C42600CC5C6A /* RSKImageCropper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RSKImageCropper.framework; sourceTree = BUILT_PRODUCTS_DIR; };
20B6B6861D92C42600CC5C6A /* QBImagePicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = QBImagePicker.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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 = "<group>"; };
2BEE3436791D42248F853999 /* libRCTImageResizer.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTImageResizer.a; sourceTree = "<group>"; };
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 = "<group>"; };
@ -315,9 +347,12 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
20A5C9711D9283A2002C4965 /* libimageCropPicker.a in Frameworks */,
9E3AB6D01D87DB2B008846B4 /* libReact-Native-Webview-Bridge.a in Frameworks */,
20B6B6841D92C42600CC5C6A /* RSKImageCropper.framework in Frameworks */,
CE4E31B31D8695250033ED64 /* Statusgo.framework in Frameworks */,
20AB9EC61D47CC0300E7FD9C /* libRCTStatus.a in Frameworks */,
20B6B6871D92C42600CC5C6A /* QBImagePicker.framework in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
@ -494,6 +529,14 @@
name = SF;
sourceTree = "<group>";
};
20A5C94C1D927137002C4965 /* Products */ = {
isa = PBXGroup;
children = (
20A5C9531D927137002C4965 /* libimageCropPicker.a */,
);
name = Products;
sourceTree = "<group>";
};
20B7D0F01D3F74CC00B70F14 /* Products */ = {
isa = PBXGroup;
children = (
@ -578,6 +621,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
20A5C94B1D927137002C4965 /* imageCropPicker.xcodeproj */,
9E3AB6B21D87DA2A008846B4 /* React-Native-Webview-Bridge.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
@ -617,6 +661,8 @@
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
20B6B6861D92C42600CC5C6A /* QBImagePicker.framework */,
20B6B6831D92C42600CC5C6A /* RSKImageCropper.framework */,
13B07FAE1A68108700A75B9A /* StatusIm */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* StatusImTests */,
@ -648,6 +694,8 @@
A97BA941B2FB44B4B66EE6D3 /* Frameworks */ = {
isa = PBXGroup;
children = (
20A5C96E1D92716C002C4965 /* QBImagePicker.framework */,
20A5C96C1D92715E002C4965 /* RSKImageCropper.framework */,
CE4E31B21D8695250033ED64 /* Statusgo.framework */,
8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */,
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */,
@ -692,6 +740,7 @@
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
20B6B6891D92C42700CC5C6A /* Embed Frameworks */,
);
buildRules = (
);
@ -715,6 +764,10 @@
CreatedOnToolsVersion = 6.2;
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = 259TWTDE52;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "StatusIm" */;
@ -733,6 +786,10 @@
ProductGroup = 20B7D11B1D3F74CD00B70F14 /* Products */;
ProjectRef = 807594C429CA44128AB5666B /* BVLinearGradient.xcodeproj */;
},
{
ProductGroup = 20A5C94C1D927137002C4965 /* Products */;
ProjectRef = 20A5C94B1D927137002C4965 /* imageCropPicker.xcodeproj */;
},
{
ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
@ -912,6 +969,13 @@
remoteRef = 201067C31D4789F700FA83B6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
20A5C9531D927137002C4965 /* libimageCropPicker.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libimageCropPicker.a;
remoteRef = 20A5C9521D927137002C4965 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
20B7D0FE1D3F74CC00B70F14 /* libRNRandomBytes.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@ -1180,7 +1244,9 @@
x86_64,
);
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 259TWTDE52;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../modules/react-native-status/ios/RCTStatus";
HEADER_SEARCH_PATHS = (
"$(inherited)",
@ -1201,10 +1267,12 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
);
INFOPLIST_FILE = StatusIm/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"-ObjC",
"$(inherited)",
"-lc++",
"-ObjC",
);
PRODUCT_BUNDLE_IDENTIFIER = com.statusim;
PRODUCT_NAME = StatusIm;
@ -1220,7 +1288,9 @@
x86_64,
);
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 259TWTDE52;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../modules/react-native-status/ios/RCTStatus";
HEADER_SEARCH_PATHS = (
"$(inherited)",
@ -1241,10 +1311,12 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
);
INFOPLIST_FILE = StatusIm/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"-ObjC",
"$(inherited)",
"-lc++",
"-ObjC",
);
PRODUCT_BUNDLE_IDENTIFIER = com.statusim;
PRODUCT_NAME = StatusIm;

View File

@ -37,10 +37,10 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
@ -62,15 +62,18 @@
ReferencedContainer = "container:StatusIm.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
@ -86,10 +89,10 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View File

@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",

View File

@ -1,62 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string/>
<key>UIAppFonts</key>
<array>
<string>SF-UI-Display-Medium.otf</string>
<string>SF-UI-Display-Regular.otf</string>
<string>SF-UI-Display-Semibold.otf</string>
<string>SF-UI-Display-Thin.otf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>FontAwesome.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
<dict>
<key>NSCameraUsageDescription</key>
<string>We need to access your camera</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>We need to access your photo storage to give you an ability to select photos</string>
<key>NSContactsUsageDescription</key>
<string>We need to access your contacts</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>api.status.im</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>localhost</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>UIAppFonts</key>
<array>
<string>SF-UI-Display-Medium.otf</string>
<string>SF-UI-Display-Regular.otf</string>
<string>SF-UI-Display-Semibold.otf</string>
<string>SF-UI-Display-Thin.otf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>FontAwesome.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
</array>
</dict>
</plist>

View File

@ -2,8 +2,9 @@
#import <Statusgo/Statusgo.h>
static bool isStatusInitialized;
@implementation Status{
bool isStatusInitialized;
}
@ -47,8 +48,7 @@ RCT_EXPORT_METHOD(callJail:(NSString *)chatId
////////////////////////////////////////////////////////////////////
#pragma mark - startNode
//////////////////////////////////////////////////////////////////// startNode
RCT_EXPORT_METHOD(startNode:(RCTResponseSenderBlock)onResultCallback
callback:(RCTResponseSenderBlock)onAlreadyRunningCallback) {
RCT_EXPORT_METHOD(startNode:(RCTResponseSenderBlock)onResultCallback) {
#if DEBUG
NSLog(@"startNode() method called");
#endif
@ -82,7 +82,6 @@ RCT_EXPORT_METHOD(startNode:(RCTResponseSenderBlock)onResultCallback
onResultCallback(@[[NSNull null]]);
return;
}
onAlreadyRunningCallback(@[[NSNull null]]);
}
RCT_EXPORT_METHOD(stopNode:(RCTResponseSenderBlock)callback) {

View File

@ -26,19 +26,20 @@
"punycode": "^1.4.1",
"querystring-es3": "^0.2.1",
"re-natal": "0.2.38",
"react": "^15.2.0",
"react-native": "^0.30.0",
"react": "^15.3.1",
"react-native": "^0.33.0",
"react-native-action-button": "^1.1.11",
"react-native-android-sms-listener": "github:alwx/react-native-android-sms-listener#listener-bugfix",
"react-native-camera": "github:codyhazelwood/react-native-camera",
"react-native-camera": "git+https://github.com/lwansbrough/react-native-camera.git",
"react-native-circle-checkbox": "github:paramoshkinandrew/ReactNativeCircleCheckbox",
"react-native-contacts": "^0.2.4",
"react-native-crypto": "^2.0.1",
"react-native-dialogs": "0.0.16",
"react-native-drawer-layout": "^1.1.0",
"react-native-fs": "^1.5.1",
"react-native-http": "github:tradle/react-native-http#834492d",
"react-native-i18n": "0.0.8",
"react-native-image-crop-picker": "^0.5.4",
"react-native-image-crop-picker": "^0.9.4",
"react-native-image-resizer": "github:danieldunderfelt/react-native-image-resizer",
"react-native-invertible-scroll-view": "^1.0.0",
"react-native-level-fs": "^2.0.1",
@ -46,12 +47,12 @@
"react-native-orientation": "github:youennPennarun/react-native-orientation",
"react-native-qrcode": "^0.2.2",
"react-native-randombytes": "^2.1.0",
"react-native-tcp": "^1.0.1",
"react-native-udp": "^1.2.5",
"react-native-tcp": "^2.0.4",
"react-native-udp": "^1.2.6",
"react-native-vector-icons": "^2.0.3",
"react-native-webview-bridge": "github:rasom/react-native-webview-bridge#master",
"react-native-webview-bridge": "^0.33.0",
"readable-stream": "^1.0.33",
"realm": "^0.14.0",
"realm": "^0.14.3",
"stream-browserify": "^1.0.0",
"timers-browserify": "^1.4.2",
"tty-browserify": "0.0.0",
@ -70,7 +71,6 @@
"console": "console-browserify",
"constants": "constants-browserify",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "react-native-http",
"https": "https-browserify",
@ -81,7 +81,8 @@
"dgram": "react-native-udp",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify"
"vm": "vm-browserify",
"net": "react-native-tcp"
},
"react-native": {
"crypto": "react-native-crypto",
@ -95,7 +96,6 @@
"console": "console-browserify",
"constants": "constants-browserify",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "react-native-http",
"https": "https-browserify",
@ -106,6 +106,7 @@
"dgram": "react-native-udp",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify"
"vm": "vm-browserify",
"net": "react-native-tcp"
}
}

View File

@ -1,7 +1,9 @@
#!/bin/sh
# rn-nodeify
# temporary hack due to https://github.com/facebook/react-native/issues/4968
./node_modules/.bin/rn-nodeify --install --hack;
npm install --save react-native-tcp@2.0.4;
# symlink for re-natal
if ! [ -f re-natal ]; then

View File

@ -6,7 +6,8 @@
text-input
image
linear-gradient
touchable-highlight]]
touchable-highlight
get-dimensions]]
[status-im.components.status-bar :refer [status-bar]]
[status-im.components.toolbar :refer [toolbar]]
[status-im.components.text-field.view :refer [text-field]]
@ -34,33 +35,35 @@
(defview address-input [address]
[view
[text-field
{:value address
:editable false
:label (label :t/address)
:labelColor "#ffffff80"
:lineColor :white
:inputStyle st/input-style
:wrapperStyle (merge button-input st/address-input-wrapper)
:onChangeText #(dispatch [:set-in [:login :address] %])}]])
{:value address
:editable false
:label (label :t/address)
:label-color "#ffffff80"
:line-color :white
:input-style st/input-style
:wrapper-style (merge button-input st/address-input-wrapper)
:on-change-text #(dispatch [:set-in [:login :address] %])}]])
(defview password-input [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] ""]))}]])
{:editable true
:error (when (pos? (count error)) (label :t/wrong-password))
:error-color :white
:label (label :t/password)
:secure-text-entry true
:label-color "#ffffff80"
:line-color :white
:input-style st/input-style
:on-change-text #(do
(dispatch [:set-in [:login :password] %])
(dispatch [:set-in [:login :error] ""]))}]])
(defview login []
[{:keys [address password error]} [:get :login]
keyboard-height [:get :keyboard-height]]
[view st/screen-container
[view (st/screen-container (- (:height (get-dimensions "window"))
keyboard-height))
[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]
@ -80,8 +83,7 @@
[password-input error]]]
[view st/bottom-actions-container
[view st/connect-button-container
[touchable-highlight
{:on-press #(dispatch [:login-account address password])}
[touchable-highlight {:on-press #(dispatch [:login-account address password])}
[view st/connect-button
[text {:style st/connect-button-text}
(label :t/connect)]]]]]])

View File

@ -1,14 +1,12 @@
(ns status-im.accounts.login.styles
(:require [status-im.components.styles :refer [title-font
text1-color
(:require [status-im.components.styles :refer [text1-color
color-white
toolbar-background2
online-color]]))
(def screen-container
{:flex 1
:color :white})
(defn screen-container [height]
{:height height})
(def gradient-background
{:position :absolute

View File

@ -40,15 +40,15 @@
(label :t/enter-valid-passphrase))]
[view
[text-field
{:value passphrase
:error error
:errorColor "#7099e6"
:label (label :t/passphrase)
:labelColor "#838c93de"
:lineColor "#0000001f"
:inputStyle st/input-style
:wrapperStyle (merge button-input st/address-input-wrapper)
:onChangeText #(dispatch [:set-in [:recover :passphrase] %])}]]))
{:value passphrase
:error error
:error-color "#7099e6"
:label (label :t/passphrase)
:label-color "#838c93de"
:line-color "#0000001f"
:input-style st/input-style
:wrapper-style (merge button-input st/address-input-wrapper)
:on-change-text #(dispatch [:set-in [:recover :passphrase] %])}]]))
(defview password-input [password]
[error [:get-in [:recover :password-error]]]
@ -58,14 +58,14 @@
(label :t/enter-valid-password))]
[view
[text-field
{:value password
:error error
:errorColor "#7099e6"
:label (label :t/password)
:labelColor "#838c93de"
:lineColor "#0000001f"
:inputStyle st/input-style
:onChangeText #(dispatch [:set-in [:recover :password] %])}]]))
{:value password
:error error
:error-color "#7099e6"
:label (label :t/password)
:label-color "#838c93de"
:line-color "#0000001f"
:input-style st/input-style
:on-change-text #(dispatch [:set-in [:recover :password] %])}]]))
(defview recover []
[{:keys [passphrase password passphrase-error password-error]} [:get :recover]]

View File

@ -1,6 +1,5 @@
(ns status-im.accounts.recover.styles
(:require [status-im.components.styles :refer [title-font
text1-color
(:require [status-im.components.styles :refer [text1-color
color-white
toolbar-background2
online-color]]))

View File

@ -89,5 +89,4 @@
:style st/icon-plus}]
[text {:style st/add-account-text
:font :default}
(label :t/add-account)]]]]
]]]))
(label :t/add-account)]]]]]]]))

View File

@ -25,8 +25,7 @@
{:flex 1})))
(def account-list
{:margin-top 20
:height 100})
{:margin-bottom 20})
(def row-separator
{:borderBottomWidth 1

View File

@ -26,7 +26,6 @@
[status-im.group-settings.screen :refer [group-settings]]
[status-im.profile.screen :refer [profile my-profile]]
[status-im.profile.photo-capture.screen :refer [profile-photo-capture]]
[status-im.utils.utils :refer [toast]]
status-im.persistence.realm.core
[taoensso.timbre :as log]
[status-im.components.status :as status]))

View File

@ -3,13 +3,17 @@
[status-im.utils.utils :as u]))
(def component-styles
{:status-bar {:default {:height 0
:bar-style "default"
:color styles/color-gray}
:transparent {:height 20
:bar-style "default"
:translucent? true
:color styles/color-transparent}}})
{:status-bar {:default {:height 0
:bar-style "default"
:color styles/color-gray}
:main {:height 0
:bar-style "default"
:color styles/color-gray}
:transparent {:height 20
:bar-style "default"
:translucent? true
:color styles/color-transparent}}
:bottom-gradient {:height 3}})
(def fonts
{:default {:font-family "sans-serif"}

View File

@ -208,7 +208,9 @@
(register-handler :stop-listening-confirmation-code-sms
(fn [db [_]]
(sign-up-service/stop-listening-confirmation-code-sms db)))
(if (:confirmation-code-sms-listener db)
(sign-up-service/stop-listening-confirmation-code-sms db)
db)))
(register-handler :sign-up-confirm
(u/side-effect!

View File

@ -1,7 +1,7 @@
(ns status-im.chat.sign-up
(:require [re-frame.core :refer [subscribe dispatch dispatch-sync]]
[status-im.components.styles :refer [default-chat-color]]
[status-im.utils.utils :refer [on-error http-post toast]]
[status-im.utils.utils :refer [http-post]]
[status-im.utils.random :as random]
[status-im.utils.sms-listener :refer [add-sms-listener
remove-sms-listener]]

View File

@ -9,9 +9,8 @@
:padding-top 12})
(def title
{:color :white
:font-size 14
:font-family st/font})
{:color :white
:font-size 14})
(def description
(assoc title :opacity 0.9

View File

@ -1,6 +1,5 @@
(ns status-im.chat.styles.content-suggestions
(: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
@ -26,13 +25,11 @@
(def value-text
{:marginTop 9
:fontSize 14
:fontFamily font
:color text1-color})
(def description-text
{:marginTop 1.5
:fontSize 14
:fontFamily font
:color text2-color})
(defn suggestions-container [suggestions-count]

View File

@ -1,11 +1,10 @@
(ns status-im.chat.styles.input
(:require [status-im.components.styles :refer [font
color-white
color-blue
text1-color
text2-color
chat-background
color-black]]))
(:require [status-im.components.styles :refer [color-white
color-blue
text1-color
text2-color
chat-background
color-black]]))
(def command-input-and-suggestions-container
{:flexDirection :column})
@ -36,7 +35,6 @@
{:marginTop 3
:marginHorizontal 12
:fontSize 12
:fontFamily font
:color color-white})
(def command-input
@ -45,7 +43,6 @@
:marginTop -2
:padding 0
:fontSize 14
:fontFamily font
:color text1-color})
(def send-container
@ -101,7 +98,6 @@
(def staged-command-text
{:fontSize 12
:fontFamily font
:color color-white})
(def staged-command-cancel
@ -117,5 +113,4 @@
{:marginTop 5
:marginHorizontal 0
:fontSize 14
:fontFamily font
:color color-black})

View File

@ -1,6 +1,5 @@
(ns status-im.chat.styles.plain-message
(:require [status-im.components.styles :refer [font
text2-color]]))
(:require [status-im.components.styles :refer [text2-color]]))
(defn message-input-button-touchable [w]
{:width w
@ -37,7 +36,6 @@
:marginTop -2
:padding 0
:fontSize 14
:fontFamily font
:color text2-color})
(def smile-icon

View File

@ -1,12 +1,12 @@
(ns status-im.chat.styles.response
(:require [status-im.components.styles :refer [font
color-white
(:require [status-im.components.styles :refer [color-white
color-blue
text1-color
text2-color
chat-background
color-black]]
[status-im.chat.constants :refer [input-height request-info-height
[status-im.chat.constants :refer [input-height
request-info-height
response-height-normal]]))
(def drag-container
@ -39,22 +39,20 @@
(def command-name
{:marginTop 0
:fontSize 12
:fontFamily font
:color color-white})
(def message-info
{:marginTop 1
:fontSize 12
:fontFamily font
:opacity 0.69
:color color-white})
(defn response-view [height]
(defn response-view [keyboard-height height]
{:flexDirection :column
:position :absolute
:left 0
:right 0
:bottom 0
:bottom keyboard-height
:height height
:backgroundColor color-white
:elevation 2})
@ -90,5 +88,4 @@
:marginTop -2
:padding 0
:fontSize 14
:fontFamily font
:color (if disbale? color-white text1-color)})

View File

@ -1,7 +1,5 @@
(ns status-im.chat.styles.screen
(:require [status-im.components.styles :refer [font
title-font
color-white
(:require [status-im.components.styles :refer [color-white
color-black
chat-background
online-color
@ -50,8 +48,7 @@
(def chat-name-text
{:marginTop -2.5
:color text1-color
:fontSize 16
:fontFamily font})
:fontSize 16})
(def group-icon
{:marginTop 4
@ -65,15 +62,13 @@
(def members
{:marginTop -0.5
:marginLeft 4
:fontFamily font
:fontSize 12
:color text2-color})
(def last-activity
{:marginTop 1
:color text2-color
:fontSize 12
:fontFamily font})
:fontSize 12})
(defn actions-wrapper [status-bar-height]
{:backgroundColor toolbar-background1
@ -142,7 +137,6 @@
(def typing-text
{:marginTop -2
:fontSize 12
:fontFamily font
:color text2-color})
(def overlay-highlight

View File

@ -1,6 +1,5 @@
(ns status-im.chat.styles.suggestions
(: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-gray
@ -47,7 +46,6 @@
{:marginTop 2.5
:marginHorizontal 12
:fontSize 12
:fontFamily font
:color color-white})
(def title-container
@ -61,21 +59,19 @@
(def value-text
{:marginTop 6
:fontSize 14
:fontFamily font
:color text1-color})
(def description-text
{:marginTop 2
:fontSize 12
:fontFamily font
:color text2-color})
(defn container [height]
(defn container [keyboard-height height]
{:flexDirection :column
:position :absolute
:left 0
:right 0
:bottom 0
:bottom keyboard-height
:height height
:backgroundColor color-white
:elevation 2})
@ -117,6 +113,6 @@
(def header-icon
{:background-color :#838c93
:width 14
:border-radius 1
:height 3})
:width 14
:border-radius 1
:height 3})

View File

@ -4,7 +4,7 @@
[status-im.models.commands :refer [get-commands
get-chat-command-request
get-chat-command-to-message-id]]
[status-im.utils.utils :refer [log on-error http-get]]
[status-im.utils.utils :refer [log http-get]]
[clojure.string :as s]))
(defn suggestion? [text]

View File

@ -114,7 +114,8 @@
[view st/action-view
[text {:style st/action-title
:number-of-lines 1
:font :medium} title]
:font :medium}
title]
(when-let [subtitle subtitle]
[text {:style st/action-subtitle
:number-of-lines 1

View File

@ -23,10 +23,10 @@
[view st/message-input-container input])
(defn plain-input-options [disable?]
{:style st-message/message-input
:onChangeText (when-not disable? plain-message/set-input-message)
:editable (not disable?)
:onSubmitEditing plain-message/send})
{:style st-message/message-input
:on-change-text (when-not disable? plain-message/set-input-message)
:editable (not disable?)
:on-submit-editing plain-message/send})
(defn on-press-commands-handler
[{:keys [suggestions-trigger]}]
@ -35,9 +35,9 @@
command/send-command))
(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)})
{:style (st-response/command-input icon-width disable?)
:on-change-text (when-not disable? command/set-input-message)
:on-submit-editing (on-press-commands-handler command)})
(defview message-input [input-options command]
[command? [:command?]
@ -49,12 +49,13 @@
(if command?
(command-input-options command icon-width disable?)
(plain-input-options disable?))
{:autoFocus false
:blurOnSubmit false
{:auto-focus false
:blur-on-submit false
:editable true
:accessibility-label :input
:on-focus #(dispatch [:set :focused true])
:on-blur #(dispatch [:set :focused false])
:default-value (if command? input-command input-message)}
:default-value (if command? (or input-command "") input-message)}
input-options)])
(defview plain-message-input-view [{:keys [input-options]}]

View File

@ -19,9 +19,9 @@
(defn get-options [{:keys [type placeholder]} command-type]
(let [options (case (keyword type)
:phone {:input-options {:keyboardType :phone-pad}}
:password {:input-options {:secureTextEntry true}}
:number {:input-options {:keyboardType :numeric}}
:phone {:input-options {:keyboard-type "phone-pad"}}
:password {:input-options {:secure-text-entry true}}
:number {:input-options {:keyboard-type "numeric"}}
;; todo maybe nil is fine for now :)
nil #_(throw (js/Error. "Uknown command type")))]
(if (= :response command-type)

View File

@ -56,7 +56,7 @@
:component-will-unmount
#(reset! loop? false)
:reagent-render
(fn [message-id command]
(fn [message-id {command-icon :icon :as command}]
(if command
[touchable-highlight
{:on-press (when-not @answered?
@ -64,8 +64,9 @@
: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-icon
[image {:source {:uri command-icon}
:style st/command-request-image}])]]))})))
(defn message-content-command-request
[{:keys [message-id content from incoming-group]}]

View File

@ -7,7 +7,6 @@
[status-im.components.react :refer [view
animated-view
icon
image
text
text-input
touchable-highlight
@ -20,6 +19,7 @@
[status-im.chat.suggestions-responder :as resp]
[status-im.chat.constants :as c]
[status-im.chat.views.command-validation :as cv]
[status-im.utils.platform :refer [ios?]]
[status-im.components.webview-bridge :refer [webview-bridge]]))
(defn drag-icon []
@ -71,12 +71,13 @@
(let [;; todo to-response-height, cur-response-height must be specific
;; for each chat
to-response-height (subscribe [:response-height])
changed (subscribe [:animations :response-height-changed])
animate? (subscribe [:animate?])
context {:to-value to-response-height
:val response-height
:animate? animate?}
on-update #(container-animation-logic context)]
changed (subscribe [:animations :response-height-changed])
animate? (subscribe [:animate?])
keyboard-height (subscribe [:get :keyboard-height])
context {:to-value to-response-height
:val response-height
:animate? animate?}
on-update #(container-animation-logic context)]
(r/create-class
{:component-did-mount
on-update
@ -85,7 +86,9 @@
:reagent-render
(fn [response-height & children]
@to-response-height @changed
(into [animated-view {:style (st/response-view response-height)}]
(into [animated-view {:style (st/response-view
(if ios? @keyboard-height 0)
response-height)}]
children))})))
(defn on-navigation-change

View File

@ -16,6 +16,7 @@
[reagent.core :as r]
[status-im.components.animation :as anim]
[status-im.components.drag-drop :as drag]
[status-im.utils.platform :refer [ios?]]
[status-im.chat.suggestions-responder :as resp]
[status-im.chat.constants :as c]))
@ -108,6 +109,7 @@
(let [;; todo to-response-height, cur-response-height must be specific
;; for each chat
to-response-height (subscribe [:command-suggestions-height])
keyboard-height (subscribe [:get :keyboard-height])
changed (subscribe [:animations :commands-height-changed])
animate? (subscribe [:animate?])
context {:to-value to-response-height
@ -122,7 +124,7 @@
:reagent-render
(fn [h & elements]
@to-response-height @changed
(into [animated-view {:style (st/container h)}] elements))})))
(into [animated-view {:style (st/container (if ios? @keyboard-height 0) h)}] elements))})))
(defn suggestion-container []
(let [h (anim/create-value c/input-height)]

View File

@ -27,19 +27,17 @@
(defview chats-list-toolbar []
[chats-scrolled? [:get :chats-scrolled?]]
[view
[status-bar]
[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 [])}}]])
[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 [])}}])
(defview chats-list []
[chats [:get :chats]]

View File

@ -1,7 +1,5 @@
(ns status-im.chats-list.styles
(:require [status-im.components.styles :refer [font
title-font
color-white
(:require [status-im.components.styles :refer [color-white
color-blue
online-color
text1-color
@ -32,8 +30,7 @@
(def name-text
{:marginTop -2.5
:color text1-color
:fontSize 14
:fontFamily title-font})
:fontSize 14})
(def group-icon
{:marginTop 4
@ -44,7 +41,6 @@
(def memebers-text
{:marginTop -0.5
:marginLeft 4
:fontFamily font
:fontSize 12
:color text2-color})
@ -52,7 +48,6 @@
{:marginTop 7
:marginRight 40
:color text1-color
:fontFamily font
:fontSize 14
:lineHeight 20})
@ -68,8 +63,7 @@
:height 7})
(def datetime-text
{:fontFamily font
:fontSize 12
{:fontSize 12
:color text2-color
:marginLeft 5})
@ -85,7 +79,6 @@
(def new-messages-text
{:top 4
:left 0
:fontFamily title-font
:fontSize 10
:color color-blue
:textAlign :center})

View File

@ -4,7 +4,6 @@
text
image
touchable-highlight]]
[status-im.components.styles :refer [font]]
[status-im.chats-list.views.inner-item :refer [chat-list-item-inner-view]]))
(defn chat-list-item [[chat-id chat]]

View File

@ -1,7 +1,7 @@
(ns status-im.commands.handlers.jail
(:require [re-frame.core :refer [after dispatch subscribe trim-v debug]]
[status-im.utils.handlers :as u]
[status-im.utils.utils :refer [http-get toast]]
[status-im.utils.utils :refer [http-get show-popup]]
[status-im.components.status :as status]
[status-im.utils.types :refer [json->clj]]
[status-im.commands.utils :refer [generate-hiccup reg-handler]]
@ -76,7 +76,7 @@
(defn print-error-message! [message]
(fn [_ params]
(when (:error (last params))
(toast (s/join "\n" [message params]))
(show-popup "Error" (s/join "\n" [message params]))
(println message params))))
(reg-handler :init-render-command! init-render-command!)

View File

@ -2,7 +2,7 @@
(:require-macros [status-im.utils.slurp :refer [slurp]])
(:require [re-frame.core :refer [path after dispatch subscribe trim-v debug]]
[status-im.utils.handlers :as u]
[status-im.utils.utils :refer [http-get toast]]
[status-im.utils.utils :refer [http-get show-popup]]
[clojure.string :as s]
[status-im.persistence.realm.core :as realm]
[status-im.components.status :as status]
@ -94,7 +94,7 @@
id
(name reason)
details])]
(toast m)
(show-popup "Error" m)
(println m))))
(reg-handler :load-commands! (u/side-effect! load-commands!))

View File

@ -1,14 +1,12 @@
(ns status-im.components.carousel.styles
(: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]]))
(:require [status-im.components.styles :refer [color-white
chat-background
online-color
selected-message-color
separator-color
text1-color
text2-color
toolbar-background1]]))
(def scroll-view-container
{:flex 1})

View File

@ -1,7 +1,5 @@
(ns status-im.components.chat-icon.styles
(:require [status-im.components.styles :refer [font
title-font
color-white
(:require [status-im.components.styles :refer [color-white
chat-background
online-color
selected-message-color
@ -37,7 +35,6 @@
(def default-chat-icon-text
{:marginTop -2
:color color-white
:fontFamily font
:fontSize 16
:lineHeight 20})
@ -97,7 +94,8 @@
(def online-dot-right (merge online-dot {:left 9}))
(def photo-pencil
{:margin-left 6
{:margin-left 5
:margin-right 5
:margin-top 3
:font-size 12
:color :white})

View File

@ -1,6 +1,5 @@
(ns status-im.components.drawer.styles
(: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

View File

@ -7,7 +7,7 @@
view
text
image
drawer-layout-android
drawer-layout
touchable-opacity]]
[status-im.resources :as res]
[status-im.components.drawer.styles :as st]
@ -76,9 +76,8 @@
(label :t/switch-users)]]]])
(defn drawer-view [items]
[drawer-layout-android {:drawerWidth 260
:drawerPosition js/ReactNative.DrawerLayoutAndroid.positions.Left
:render-navigation-view #(r/as-element [drawer-menu])
:ref (fn [drawer]
(reset! drawer-atom drawer))}
[drawer-layout {:drawerWidth 260
:render-navigation-view #(r/as-element [drawer-menu])
:ref (fn [drawer]
(reset! drawer-atom drawer))}
items])

View File

@ -104,7 +104,7 @@
[view-id [:get :view-id]
tab-animation? [:get :prev-tab-view-id]]
[view common-st/flex
[status-bar]
[status-bar {:type :main}]
[view common-st/flex
[drawer-view
[view {:style common-st/flex

View File

@ -12,6 +12,7 @@
(def linear-gradient-module (u/require "react-native-linear-gradient"))
(def dismiss-keyboard! (u/require "dismissKeyboard"))
(def orientation (u/require "react-native-orientation"))
(def drawer (u/require "react-native-drawer-layout"))
;; Getters
@ -34,7 +35,7 @@
(def linear-gradient-class (adapt-class linear-gradient-module))
(def status-bar (get-class "StatusBar"))
(def drawer-layout-android (get-class "DrawerLayoutAndroid"))
(def drawer-layout (adapt-class drawer))
(def list-view-class (get-class "ListView"))
(def scroll-view (get-class "ScrollView"))
@ -76,11 +77,11 @@
(defn text-input [props text]
[text-input-class (merge
{:underlineColorAndroid :transparent
:placeholderTextColor st/text2-color
:placeholder "Type"}
props)
text])
{:underline-color-android :transparent
:placeholder-text-color st/text2-color
:placeholder "Type"
:value text}
props)])
(defn icon
([n] (icon n {}))

View File

@ -1,10 +1,5 @@
(ns status-im.components.styles)
(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")
@ -82,13 +77,11 @@
(def form-text-input
{:marginLeft -4
:fontSize 14
:fontFamily font
:color text1-color})
(def white-form-text-input
{:marginLeft -4
:fontSize 14
:fontFamily font
:color color-white})
(def toolbar-title-container

View File

@ -1,8 +1,11 @@
(ns status-im.components.tabs.bottom-gradient
(:require [status-im.components.tabs.styles :as st]
[status-im.components.react :refer [linear-gradient]]))
[status-im.components.react :refer [linear-gradient]]
[status-im.utils.platform :refer [platform-specific]]))
(defn bottom-gradient []
[linear-gradient {:locations [0 0.8 1]
:colors ["rgba(24, 52, 76, 0)" "rgba(24, 52, 76, 0.085)" "rgba(24, 52, 76, 0.165)"]
:style st/bottom-gradient}])
:style (merge
st/bottom-gradient
(get-in platform-specific [:component-styles :bottom-gradient]))}])

View File

@ -1,7 +1,5 @@
(ns status-im.components.tabs.styles
(:require [status-im.components.styles :refer [font
title-font
color-white
(:require [status-im.components.styles :refer [color-white
chat-background
online-color
selected-message-color
@ -28,8 +26,7 @@
{:position :absolute
:bottom 0
:left 0
:right 0
:height 4})
:right 0})
(def tabs-inner-container
{:flexDirection :row
@ -46,8 +43,7 @@
:alignItems :center})
(def tab-title
{:fontFamily "sans-serif"
:fontSize 14
{:fontSize 14
:color "#6e93d8"})
(def tab-icon

View File

@ -2,39 +2,40 @@
(def text-field-container
{:position :relative
:height 72
:paddingTop 30
:paddingBottom 7})
{:position :relative
:height 72
:padding-top 30
:padding-bottom 7})
(def text-input
{:fontSize 16
:height 34
:lineHeight 34
:paddingBottom 5
:textAlignVertical :top})
{:font-size 16
:height 34
:line-height 34
:padding-bottom 5
:text-align-vertical :top})
(defn label [top font-size color]
{:position :absolute
:top top
:left 0
:color color
:fontSize font-size
:backgroundColor :transparent})
{:position :absolute
:top top
:left 0
:color color
:font-size font-size
:background-color :transparent})
(def label-float
{})
(defn underline-container [backgroundColor]
{:backgroundColor backgroundColor
:height 1
:alignItems :center})
(defn underline-container [background-color]
{:background-color background-color
:height 1
:align-items :center})
(defn underline [backgroundColor width]
{:backgroundColor backgroundColor
:height 1
:width width})
(defn underline [background-color width]
{:background-color background-color
:height 1
:width width})
(defn error-text [color]
{:color color
:fontSize 12})
{:color color
:background-color :transparent
:font-size 12})

View File

@ -21,19 +21,19 @@
:label-font-small 13
:label-animation-duration 200})
(def default-props {:wrapperStyle {}
:inputStyle {}
:lineStyle {}
:editable true
:labelColor "#838c93"
:lineColor "#0000001f"
:focusLineColor "#0000001f"
:errorColor "#d50000"
:secureTextEntry false
:onFocus #()
:onBlur #()
:onChangeText #()
:onChange #()})
(def default-props {:wrapper-style {}
:input-style {}
:line-style {}
:editable true
:label-color "#838c93"
:line-color "#0000001f"
:focus-line-color "#0000001f"
:error-color "#d50000"
:secure-text-entry false
:on-focus #()
:on-blur #()
:on-change-text #()
:on-change #()})
(defn field-animation [{:keys [top to-top font-size to-font-size
line-width to-line-width]}]
@ -117,18 +117,18 @@
;(log/debug "component-did-update: " prev-props prev-state)
)
(defn on-focus [{:keys [component animation onFocus]}]
(defn on-input-focus [{:keys [component animation onFocus]}]
(do
(log/debug "input focused")
(r/set-state component {:has-focus true
(r/set-state component {:has-focus true
:float-label? true})
(field-animation animation)
(when onFocus (onFocus))))
(defn on-blur [{:keys [component value animation onBlur]}]
(defn on-input-blur [{:keys [component value animation onBlur]}]
(do
(log/debug "Input blurred")
(r/set-state component {:has-focus false
(r/set-state component {:has-focus false
:float-label? (if (s/blank? value) false true)})
(when (s/blank? value)
(field-animation animation))
@ -145,42 +145,42 @@
label-font-size
line-width
max-line-width] :as state} (r/state component)
{:keys [wrapperStyle inputStyle lineColor focusLineColor secureTextEntry
labelColor errorColor error label value onFocus onBlur
onChangeText onChange editable] :as props} (merge default-props (r/props component))
lineColor (if error errorColor lineColor)
focusLineColor (if error errorColor focusLineColor)
labelColor (if (and error (not float-label?)) errorColor labelColor)
{:keys [wrapper-style input-style line-color focus-line-color secure-text-entry
label-color error-color error label value on-focus on-blur
on-change-text on-change editable] :as props} (merge default-props (r/props component))
line-color (if error error-color line-color)
focus-line-color (if error error-color focus-line-color)
label-color (if (and error (not float-label?)) error-color label-color)
label (if error (str label " *") label)]
[view (merge st/text-field-container wrapperStyle)
[animated-text {:style (st/label label-top label-font-size labelColor)} label]
[text-input {:style (merge st/text-input inputStyle)
:placeholder ""
:editable editable
:secureTextEntry secureTextEntry
:onFocus #(on-focus {:component component
:animation {:top label-top
:to-top (:label-top config)
:font-size label-font-size
:to-font-size (:label-font-small config)
:line-width line-width
:to-line-width max-line-width}
:onFocus onFocus})
:onBlur #(on-blur {:component component
:value value
:animation {:top label-top
:to-top (:label-bottom config)
:font-size label-font-size
:to-font-size (:label-font-large config)
:line-width line-width
:to-line-width 0}
:onBlur onBlur})
:onChangeText #(onChangeText %)
:onChange #(onChange %)} value]
[view {:style (st/underline-container lineColor)
[view (merge st/text-field-container wrapper-style)
[animated-text {:style (st/label label-top label-font-size label-color)} label]
[text-input {:style (merge st/text-input input-style)
:placeholder ""
:editable editable
:secure-text-entry secure-text-entry
:on-focus #(on-input-focus {:component component
:animation {:top label-top
:to-top (:label-top config)
:font-size label-font-size
:to-font-size (:label-font-small config)
:line-width line-width
:to-line-width max-line-width}
:onFocus on-focus})
:on-blur #(on-input-blur {:component component
:value value
:animation {:top label-top
:to-top (:label-bottom config)
:font-size label-font-size
:to-font-size (:label-font-large config)
:line-width line-width
:to-line-width 0}
:onBlur on-blur})
:on-change-text #(on-change-text %)
:on-change #(on-change %)} value]
[view {:style (st/underline-container line-color)
:onLayout #(r/set-state component {:max-line-width (get-width %)})}
[animated-view {:style (st/underline focusLineColor line-width)}]]
[text {:style (st/error-text errorColor)} error]]))
[animated-view {:style (st/underline focus-line-color line-width)}]]
[text {:style (st/error-text error-color)} error]]))
(defn text-field [data children]
(let [component-data {:get-initial-state get-initial-state

View File

@ -28,17 +28,15 @@
[status-im.components.styles :as cst]))
(defn contact-list-toolbar []
[view
[status-bar]
[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 [])}}]])
[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)

View File

@ -1,8 +1,5 @@
(ns status-im.contacts.styles
(:require [status-im.components.styles :refer [font
font-medium
title-font
text1-color
(:require [status-im.components.styles :refer [text1-color
text2-color
text3-color
text5-color
@ -57,13 +54,11 @@
{:flex 1
:marginLeft 16
:fontSize 14
:fontFamily font-medium
:color text5-color})
(def contact-group-size-text
{:marginRight 14
:fontSize 12
:fontFamily font
:color text2-color})
(def contact-group-header-gradient-top
@ -97,7 +92,6 @@
(def show-all-text
{:marginLeft 72
:fontSize 14
:fontFamily font-medium
:color text3-color
;; ios only:
:letterSpacing 0.5})
@ -113,7 +107,6 @@
(def letter-text
{:fontSize 24
:fontFamily font
:color text3-color})
(def contact-photo-container
@ -134,13 +127,11 @@
(def name-text
{:fontSize 16
:fontFamily font
:color text1-color})
(def info-text
{:marginTop 1
:fontSize 12
:fontFamily font
:color text2-color})
(def more-btn

View File

@ -12,7 +12,7 @@
[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.utils.utils :refer [log http-post]]
[status-im.components.styles :refer [color-purple
color-white
icon-search
@ -72,14 +72,14 @@
(label :t/enter-valid-address))]
[view button-input-container
[text-field
{:error error
:errorColor "#7099e6"
:value whisper-identity
:wrapperStyle (merge button-input)
:label (label :t/address)
:onChangeText #(do
(dispatch [:set-in [:new-contact-identity] %])
(dispatch [:set :new-contact-address-error nil]))}]
{:error error
:error-color "#7099e6"
:value whisper-identity
:wrapper-style (merge button-input)
:label (label :t/address)
:on-change-text #(do
(dispatch [:set-in [:new-contact-identity] %])
(dispatch [:set :new-contact-address-error nil]))}]
[scan-button {:showLabel (zero? (count whisper-identity))
:handler #(dispatch [:scan-qr-code {:toolbar-title (label :t/new-contact)} :set-contact-identity-from-qr])}]]))

View File

@ -7,7 +7,6 @@
scroll-view
text
text-input]]
[status-im.components.status-bar :refer [status-bar]]
[status-im.components.toolbar :refer [toolbar]]
[status-im.components.drawer.view :refer [open-drawer]]
[status-im.discovery.views.popular :refer [discovery-popular]]
@ -40,17 +39,15 @@
(dispatch [:set ::show-search? (not current-value)]))
(defn discovery-toolbar [show-search?]
[view
[status-bar]
[toolbar
{:style st/discovery-toolbar
:nav-action {:image {:source {:uri :icon_hamburger}
:style st/hamburger-icon}
:handler open-drawer}
:custom-content [title-content show-search?]
:action {:image {:source {:uri :icon_search}
:style st/search-icon}
:handler #(toogle-search show-search?)}}]])
[toolbar
{:style st/discovery-toolbar
:nav-action {:image {:source {:uri :icon_hamburger}
:style st/hamburger-icon}
:handler open-drawer}
:custom-content [title-content show-search?]
:action {:image {:source {:uri :icon_search}
:style st/search-icon}
:handler #(toogle-search show-search?)}}])
(defview discovery []
[show-search? [:get ::show-search?]

View File

@ -1,16 +1,13 @@
(ns status-im.group-settings.styles.group-settings
(:require [status-im.components.styles :refer [font
font-medium
title-font
color-white
color-purple
chat-background
online-color
selected-message-color
separator-color
text1-color
text2-color
toolbar-background1]]))
(:require [status-im.components.styles :refer [color-white
color-purple
chat-background
online-color
selected-message-color
separator-color
text1-color
text2-color
toolbar-background1]]))
(def modal-container
{:flex 1
@ -25,14 +22,12 @@
(def modal-member-name
{:color text2-color
:fontFamily font
:fontSize 14
:lineHeight 20})
(def modal-remove-text
{:margin 10
:color text1-color
:fontFamily font
:fontSize 14
:lineHeight 20})
@ -45,7 +40,6 @@
{:margin 10
:alignSelf :center
:color text1-color
:fontFamily font
:fontSize 14
:lineHeight 20})
@ -72,7 +66,6 @@
:marginLeft 16
:marginBottom 16
:color text2-color
:fontFamily font-medium
:fontSize 14
:lineHeight 20})
@ -88,7 +81,6 @@
(def chat-name-value
{:flex 1
:fontSize 16
:fontFamily font
:color text1-color})
(def chat-name-validation-message
@ -103,7 +95,6 @@
(def chat-name-btn-edit-text
{:color text2-color
:fontFamily font
:fontSize 16
:lineHeight 20})
@ -112,7 +103,6 @@
:marginLeft 16
:marginBottom 16
:color text2-color
:fontFamily font-medium
:fontSize 14
:lineHeight 20})
@ -130,7 +120,6 @@
{:marginTop 18
:marginLeft 32
:color text2-color
:fontFamily font
:fontSize 16
:lineHeight 20})
@ -139,7 +128,6 @@
:marginLeft 16
:marginBottom 16
:color text2-color
:fontFamily font-medium
:fontSize 14
:lineHeight 20})
@ -165,14 +153,12 @@
(def setting-title
{:marginTop -2.5
:color text1-color
:fontSize 16
:fontFamily font})
:fontSize 16})
(def setting-subtitle
{:marginTop 1
:color text2-color
:fontSize 12
:fontFamily font})
:fontSize 12})
(defn chat-color-icon [color]
{:borderRadius 12

View File

@ -1,6 +1,6 @@
(ns status-im.handlers.server
(:require [re-frame.core :refer [subscribe dispatch dispatch-sync]]
[status-im.utils.utils :refer [on-error http-post]]
[status-im.utils.utils :refer [http-post]]
[taoensso.timbre :as log]))
(defn sign-up

View File

@ -22,7 +22,6 @@
[status-im.group-settings.screen :refer [group-settings]]
[status-im.profile.screen :refer [profile my-profile]]
[status-im.profile.photo-capture.screen :refer [profile-photo-capture]]
[status-im.utils.utils :refer [toast]]
status-im.persistence.realm.core
[taoensso.timbre :as log]))
@ -46,13 +45,13 @@
#(dispatch [:set :orientation (orientation->keyword %)]))
(.lockToPortrait orientation)
(.addListener keyboard
"keyboardDidShow"
"keyboardWillShow"
(fn [e]
(let [h (.. e -endCoordinates -height)]
(when-not (= h @keyboard-height)
(dispatch [:set :keyboard-height h])))))
(.addListener keyboard
"keyboardDidHide"
"keyboardWillHide"
(when-not (= 0 @keyboard-height)
#(dispatch [:set :keyboard-height 0]))))
:render

View File

@ -1,12 +1,14 @@
(ns status-im.ios.platform
(:require [status-im.components.styles :as styles]
[status-im.utils.utils :as u]
[reagent.core :as r]))
[status-im.utils.utils :as u]))
(def component-styles
{:status-bar {:default {:height 20
:bar-style "default"
:color styles/color-white}
:main {:height 20
:bar-style "default"
:color styles/toolbar-background2}
:transparent {:height 20
:bar-style "light-content"
:color styles/color-transparent}}
@ -15,7 +17,8 @@
: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}}})
:border-top-width 0.5}}
:bottom-gradient {:height 1}})
(def fonts
{:default {:font-family "SFUIDisplay-Regular"}
@ -27,7 +30,7 @@
(def react-native (u/require "react-native"))
(defn show-action-sheet [{:keys [options callback cancel-text]}]
(.showActionSheetWithOptions (r/adapt-react-class (.-ActionSheetIOS react-native))
(.showActionSheetWithOptions (.-ActionSheetIOS react-native)
(clj->js {:options (conj options cancel-text)
:cancelButtonIndex (count options)})
callback))

View File

@ -78,7 +78,7 @@
(register-handler :show-profile show-profile)
(defn show-profile-photo-capture
[db [_ image-captured-fn]]
[db _]
(push-view db :profile-photo-capture))
(register-handler :show-profile-photo-capture show-profile-photo-capture)

View File

@ -1,11 +1,9 @@
(ns status-im.new-group.styles
(:require [status-im.components.styles :refer [font
title-font
color-white
color-purple
text1-color
text2-color
toolbar-background1]]))
(:require [status-im.components.styles :refer [color-white
color-purple
text1-color
text2-color
toolbar-background1]]))
(defn toolbar-icon [enabled?]
{:width 20
@ -24,14 +22,12 @@
{:marginTop 24
:marginBottom 16
:color text2-color
:fontFamily font
:fontSize 14
:lineHeight 20})
(def group-name-input
{:marginLeft -4
:fontSize 14
:fontFamily font
:color text1-color})
(def group-name-validation-message
@ -41,7 +37,6 @@
{:marginTop 24
:marginBottom 16
:color text2-color
:fontFamily font
:fontSize 14
:lineHeight 20})
@ -59,7 +54,6 @@
{:marginTop 18
:marginLeft 32
:color text2-color
:fontFamily font
:fontSize 14
:lineHeight 20})

View File

@ -5,6 +5,7 @@
[status-im.utils.image-processing :refer [img->base64]]
[status-im.i18n :refer [label]]
[status-im.utils.handlers :as u :refer [get-hashtags]]
[status-im.utils.platform :refer [ios?]]
[clojure.string :as str]))
(defn message-user [identity]
@ -36,9 +37,8 @@
(fn [_ _]
(show-image-picker
(fn [image]
(let [path (-> (js->clj image)
(get "path")
(subs 7))
(let [path (get (js->clj image) "path")
path (if ios? path (subs path 12))
on-success (fn [base64]
(dispatch [:set-in [:profile-edit :photo-path] (str "data:image/jpeg;base64," base64)]))
on-error (fn [type error]

View File

@ -2,6 +2,7 @@
(:require [re-frame.core :refer [subscribe dispatch dispatch-sync]]
[clojure.walk :refer [keywordize-keys]]
[status-im.components.react :refer [view
text
image
touchable-highlight]]
[status-im.components.camera :refer [camera

View File

@ -1,6 +1,5 @@
(ns status-im.profile.styles
(: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
@ -66,7 +65,9 @@
(def status-block
{:flex-direction "column"
:align-items "center"
:justifyContent "center"})
:justifyContent "center"
:margin-left 100
:margin-right 100})
(def status-input
{:align-self "stretch"
@ -94,7 +95,6 @@
(def message-btn-text
{:margin-top -2.5
:font-size 14
:font-family font
:color color-white})
(def more-btn
@ -144,7 +144,6 @@
(def report-user-text
{:font-size 14
:font-family font
:line-height 21
:color text2-color
;; IOS:

View File

@ -48,15 +48,15 @@
[transaction-page transaction]))]]
[view st/form-container
[text-field
{:inputStyle st/password-style
:secureTextEntry true
:error (when wrong-password? (label :t/wrong-password))
:errorColor :#ffffff80 #_:#7099e6
:lineColor :white
:labelColor :#ffffff80
:value password
:label (label :t/password)
:onChangeText #(dispatch [:set-in [:confirm-transactions :password] %])}]]])
{:input-style st/password-style
:secure-text-entry true
:error (when wrong-password? (label :t/wrong-password))
:error-color :#ffffff80 #_:#7099e6
:line-color :white
:label-color :#ffffff80
:value password
:label (label :t/password)
:on-change-text #(dispatch [:set-in [:confirm-transactions :password] %])}]]])
;(re-frame.core/dispatch [:set :view-id :confirm])

View File

@ -37,8 +37,7 @@
:justifyContent :center})
(def title-bar-text
{:fontFamily "sans-serif-medium"
:color "#838c93"
{:color "#838c93"
:fontSize 13
:marginLeft 12})

View File

@ -19,7 +19,7 @@
(defn img->base64 [path on-success on-error]
(let [on-resized (fn [path]
(image-base64-encode (subs path 5) on-success on-error))
(image-base64-encode path on-success on-error))
on-error (fn [error]
(on-error :resize error))]
(resize path 150 150 on-resized on-error)))

View File

@ -1,8 +1,6 @@
(ns status-im.utils.utils
(:require-macros
[natal-shell.async-storage :refer [get-item set-item]]
[natal-shell.alert :refer [alert]]
[natal-shell.toast-android :as toast])
[natal-shell.async-storage :refer [get-item set-item]])
(:require [status-im.constants :as const]))
(defn require [module]
@ -13,11 +11,12 @@
(defn log [obj]
(.log js/console obj))
(defn toast [s]
(toast/show s (toast/long)))
(def react-native (require "react-native"))
(defn on-error [error]
(toast (str "error: " error)))
(defn show-popup [title content]
(.alert (.-Alert react-native)
title
content))
(defn http-post
([action data on-success]
@ -38,7 +37,7 @@
(on-success obj))))
(.catch (or on-error
(fn [error]
(toast (str error))))))))
(show-popup "Error" (str error))))))))
(defn http-get
([url on-success on-error]
@ -49,7 +48,7 @@
(.then on-success)
(.catch (or on-error
(fn [error]
(toast (str error))))))))
(show-popup "Error" (str error))))))))
(defn truncate-str [s max]
(if (and (< max (count s)) s)