Skip to content

Commit

Permalink
Merge pull request #24 from noahschutte/noah/UX
Browse files Browse the repository at this point in the history
Noah/ux
  • Loading branch information
noahschutte authored Aug 11, 2016
2 parents b71c90e + e3b6470 commit f36f0eb
Show file tree
Hide file tree
Showing 12 changed files with 222 additions and 123 deletions.
50 changes: 50 additions & 0 deletions ios/Launch Screen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright © 2016 Facebook. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="obG-Y5-kRd">
<rect key="frame" x="20" y="559" width="560" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Raop" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
<rect key="frame" x="20" y="180" width="560" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="centerX" secondItem="obG-Y5-kRd" secondAttribute="centerX" id="5cz-MP-9tL"/>
<constraint firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
<constraint firstItem="obG-Y5-kRd" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="SfN-ll-jLj"/>
<constraint firstAttribute="bottom" secondItem="obG-Y5-kRd" secondAttribute="bottom" constant="20" id="Y44-ml-fuU"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="x7j-FC-K8j"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
17 changes: 13 additions & 4 deletions ios/Raop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
6AB685821D5A8FD500531CAD /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AB685811D5A8FD500531CAD /* Launch Screen.storyboard */; };
755DE787B69B4A36AB0EEAB0 /* libRCTFBSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C3257CAB959543ED9003405F /* libRCTFBSDK.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
E41B29751D4BDB8100F48095 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41B29721D4BDB8100F48095 /* FBSDKCoreKit.framework */; };
Expand Down Expand Up @@ -134,10 +134,10 @@
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Raop/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Raop/AppDelegate.m; sourceTree = "<group>"; };
13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Raop/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Raop/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Raop/main.m; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
6AB685811D5A8FD500531CAD /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
C3257CAB959543ED9003405F /* libRCTFBSDK.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTFBSDK.a; sourceTree = "<group>"; };
Expand Down Expand Up @@ -260,7 +260,6 @@
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.m */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
13B07FB61A68108700A75B9A /* Info.plist */,
13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
13B07FB71A68108700A75B9A /* main.m */,
Expand Down Expand Up @@ -313,6 +312,7 @@
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
6AB685811D5A8FD500531CAD /* Launch Screen.storyboard */,
E41B29711D4BD7DC00F48095 /* Frameworks */,
13B07FAE1A68108700A75B9A /* Raop */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
Expand Down Expand Up @@ -405,6 +405,11 @@
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = Q9JC339X7H;
SystemCapabilities = {
com.apple.Push = {
enabled = 1;
};
};
};
};
};
Expand Down Expand Up @@ -565,8 +570,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
6AB685821D5A8FD500531CAD /* Launch Screen.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -673,6 +678,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEAD_CODE_STRIPPING = NO;
Expand All @@ -696,13 +702,15 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Raop;
PROVISIONING_PROFILE = "";
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -725,6 +733,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Raop;
PROVISIONING_PROFILE = "";
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
};
Expand Down
Binary file not shown.
38 changes: 0 additions & 38 deletions ios/Raop/Images.xcassets/AppIcon.appiconset/Contents.json

This file was deleted.

6 changes: 0 additions & 6 deletions ios/Raop/Images.xcassets/Contents.json

This file was deleted.

8 changes: 5 additions & 3 deletions ios/Raop/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIcons</key>
<dict/>
<key>CFBundleIcons~ipad</key>
<dict/>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand Down Expand Up @@ -56,16 +60,14 @@
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<string>Launch Screen</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/>
Expand Down
16 changes: 11 additions & 5 deletions src/components/FBLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import FBSDK, { AccessToken, LoginButton, GraphRequest, GraphRequestManager } fr

export default class Login extends Component {
createSession(userInfo) {
fetch('http://localhost:3000/users', {
fetch('http://random-acts-of-pizza.herokuapp.com/users', {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
Expand All @@ -26,6 +26,16 @@ export default class Login extends Component {
<View>
<LoginButton
readPermissions={["email", "public_profile"]}
onLogoutFinished={
(error, result) => {
if (error) {
alert("Logout failed with error: " + result.error);
} else {
this.props.onUserChange(null)
this.props.navigator.pop();
}
}
}
onLoginFinished={
(error, result) => {
if (error) {
Expand Down Expand Up @@ -65,10 +75,6 @@ export default class Login extends Component {
}
}
}
// onLogoutFinished={
// console.log("logged out");
// this.props.onUserChange(null)
// }
/>
</View>
);
Expand Down
7 changes: 4 additions & 3 deletions src/components/new_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export default class NewRequest extends Component {
if (this.state.title.length < 15) {
this.setState({errorMessage: 'Your title must be at least 15 characters.'})
} else if (this.state.pizzas.length < 1) {
this.setState({errorMessage: 'How many pizzas are you requesting?'})
this.setState({errorMessage: 'Please select the number of pizzas you are requesting.'})
} else if (this.state.vendor.length < 5) {
this.setState({errorMessage: 'Please choose pizza vendor.'})
this.setState({errorMessage: 'Please choose your preferred pizza place.'})
} else {
this.setState({errorMessage: ' '})
// Submit new request form
Expand All @@ -45,7 +45,7 @@ export default class NewRequest extends Component {
pizzas,
vendor
} = this.state;
fetch('http://localhost:3000/requests', {
fetch('http://random-acts-of-pizza.herokuapp.com/requests', {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
Expand All @@ -66,6 +66,7 @@ export default class NewRequest extends Component {
this.setState({errorMessage: responseJson.errorMessage})
if (this.state.errorMessage === 'Request has been created.') {
this.props.navigator.pop();
this.props.collectRequests(responseJson.requests)
}
})
.catch((error) => {
Expand Down
Loading

0 comments on commit f36f0eb

Please sign in to comment.