Skip to content

Commit

Permalink
Merge pull request #4 from JWWon/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
JiwoonWon authored Feb 1, 2019
2 parents 1a54df3 + 235293a commit d676284
Show file tree
Hide file tree
Showing 40 changed files with 425 additions and 196 deletions.
4 changes: 2 additions & 2 deletions android/app/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ android_library(

android_build_config(
name = "build_config",
package = "com.wddclient",
package = "com.woodongdang.client.android",
)

android_resource(
name = "res",
package = "com.wddclient",
package = "com.woodongdang.client.android",
res = "src/main/res",
)

Expand Down
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ android {
buildToolsVersion '28.0.3'

defaultConfig {
applicationId "com.wddclient"
applicationId "com.woodongdang.client.android"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
versionCode 2
versionName "0.0.2"
ndk {
abiFilters "armeabi-v7a", "x86"
}
Expand Down
11 changes: 9 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wddclient">
package="com.woodongdang.client.android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
Expand All @@ -15,12 +15,19 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustNothing">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="woodongdang" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wddclient;
package com.woodongdang.client.android;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wddclient;
package com.woodongdang.client.android;

import android.app.Application;

Expand Down
7 changes: 7 additions & 0 deletions ios/WddClient/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#import "AppDelegate.h"

#import <React/RCTLinkingManager.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

Expand Down Expand Up @@ -36,4 +37,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
return YES;
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
return [RCTLinkingManager application:application openURL:url
sourceApplication:sourceApplication annotation:annotation];
}
@end
17 changes: 15 additions & 2 deletions ios/WddClient/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,24 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
<string>0.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>woodongdang</string>
<key>CFBundleURLSchemes</key>
<array>
<string>woodongdang</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wdd-client",
"version": "0.0.1",
"version": "0.0.2",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const App: React.FC<{}> = () => {

return (
<Provider store={store}>
<Router />
<Router uriPrefix="woodongdang://" />
</Provider>
);
};
Expand Down
6 changes: 5 additions & 1 deletion src/components/base/Core.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ class Core extends PureComponent<Props> {
super(props);
configAxios();
Amplify.configure(awsconfig);
props.autoSignIn(this.props.navigation);
}

componentDidMount() {
const { autoSignIn, navigation } = this.props;
autoSignIn(navigation);
}

render() {
Expand Down
20 changes: 12 additions & 8 deletions src/components/module/PageContainer/PageContainer.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import { color, font } from 'src/theme';

export const views = StyleSheet.create({
container: { flex: 1 },
contentWrapper: { flex: 1 },
wrapperNormal: { marginHorizontal: '10.7%' },
wrapperNarrow: { marginHorizontal: '5.3%' },
contentWrapper: { flex: 1, marginHorizontal: '5.3%' },
topWrapper: {
marginTop: 20,
marginTop: 15,
marginHorizontal: '4%',
height: 26,
height: 21,
flexDirection: 'row',
alignItems: 'center',
},
Expand Down Expand Up @@ -42,23 +40,29 @@ export const views = StyleSheet.create({
titleWrapper: {
marginVertical: 40,
},
backIcon: {
width: 18,
height: 16,
resizeMode: 'contain',
},
});

export const texts = StyleSheet.create({
top: {
color: color.blackOpacity,
fontSize: font.size.large,
fontSize: 16,
},
center: {
color: color.black,
fontSize: font.size.large,
},
bottomText: {
color: color.gary55,
color: `${color.gary55}CC`,
fontSize: font.size.small,
textDecorationLine: 'underline',
},
bottomDiff: {
color: color.black33,
color: `${color.black33}7F`,
fontSize: font.size.small,
},
bottomBox: {
Expand Down
48 changes: 26 additions & 22 deletions src/components/module/PageContainer/PageContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React, { ReactNode } from 'react';
import { NavigationScreenProp } from 'react-navigation';
import {
SafeAreaView,
TouchableOpacity,
Text,
ScrollView,
View,
Image,
} from 'react-native';
import { views, texts } from './PageContainer.styles';

Expand All @@ -16,8 +18,7 @@ interface Props {
subtitle?: string;
// top
left?: {
text: string;
handlePress: () => void;
navigation: NavigationScreenProp<any>;
};
right?: {
text: string;
Expand All @@ -34,10 +35,23 @@ interface Props {
disable?: boolean;
};
// options
narrow?: boolean;
[x: string]: any;
}

const NavbarLeft: React.FC<Props['left']> = ({ navigation }) => {
function navBack() {
navigation.goBack(null);
}
return (
<TouchableOpacity onPress={navBack} activeOpacity={0.7}>
<Image
style={views.backIcon}
source={require('src/lib/icons/ic_back.png')}
/>
</TouchableOpacity>
);
};

const PageContainer: React.FC<Props> = ({
children,
title,
Expand All @@ -46,7 +60,6 @@ const PageContainer: React.FC<Props> = ({
right,
center,
bottom,
narrow,
...scrollOptions
}) => (
<SafeAreaView style={views.container}>
Expand All @@ -56,11 +69,7 @@ const PageContainer: React.FC<Props> = ({
<Text style={texts.center}>{center}</Text>
</View>
)}
{left && (
<TouchableOpacity onPress={left.handlePress} activeOpacity={0.7}>
<Text style={texts.top}>{left.text}</Text>
</TouchableOpacity>
)}
{left && <NavbarLeft navigation={left.navigation} />}
{right && (
<TouchableOpacity
style={views.rightButton}
Expand All @@ -70,12 +79,7 @@ const PageContainer: React.FC<Props> = ({
</TouchableOpacity>
)}
</View>
<ScrollView
style={[
views.contentWrapper,
views[narrow ? 'wrapperNarrow' : 'wrapperNormal'],
]}
{...scrollOptions}>
<ScrollView style={views.contentWrapper} {...scrollOptions}>
{title && (
<View style={views.titleWrapper}>
<Text style={texts.title}>{title}</Text>
Expand Down Expand Up @@ -104,19 +108,19 @@ const PageContainer: React.FC<Props> = ({
</TouchableOpacity>
) : (
<View style={views.bottomText}>
<TouchableOpacity
onPress={bottom.handlePress}
disabled={bottom.disable}
activeOpacity={0.7}>
<Text style={texts.bottomText}>{bottom.text}</Text>
</TouchableOpacity>
{bottom.diffText && bottom.handleDiffPress && (
<TouchableOpacity
onPress={bottom.handleDiffPress}
activeOpacity={0.7}>
<Text style={texts.bottomDiff}> {bottom.diffText}</Text>
<Text style={texts.bottomDiff}>{bottom.diffText} </Text>
</TouchableOpacity>
)}
<TouchableOpacity
onPress={bottom.handlePress}
disabled={bottom.disable}
activeOpacity={0.7}>
<Text style={texts.bottomText}>{bottom.text}</Text>
</TouchableOpacity>
</View>
))}
</SafeAreaView>
Expand Down
5 changes: 2 additions & 3 deletions src/components/module/TextAutocomplete/TextAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ class Search extends Component<Props, State> {
visible={this.state.showModal}
onRequestClose={this.toggleModal}>
<PageContainer
right={{ text: '취소', handlePress: this.toggleModal }}
scrollEnabled={false}
narrow>
right={{ text: '닫기', handlePress: this.toggleModal }}
scrollEnabled={false}>
<TextInput
value={this.state.value}
placeholder={`${label}을 입력해주세요`}
Expand Down
Loading

0 comments on commit d676284

Please sign in to comment.