-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
14,681 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { AntDesign, Feather } from "@expo/vector-icons"; | ||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createStackNavigator } from "@react-navigation/stack"; | ||
import { Image, Pressable, View } from "react-native"; | ||
|
||
import Colors from "./colors"; | ||
import { ConfigureScreen } from "./views/ConfigureScreen"; | ||
import { LoginScreen } from "./views/LoginScreen"; | ||
import { ScanScreen } from "./views/ScanScreen"; | ||
|
||
const Stack = createStackNavigator(); | ||
|
||
const LogoTitle = (props: any) => { | ||
return ( | ||
<View> | ||
<Image | ||
style={{ width: 120, height: 20 }} | ||
source={require("./assets/kento-text.jpg")} | ||
resizeMode="cover" | ||
/> | ||
</View> | ||
); | ||
}; | ||
|
||
const MyCustomHeaderBackImage = () => ( | ||
<Feather name="arrow-left" size={30} color={Colors.PINK} /> | ||
); | ||
|
||
const App = () => { | ||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator | ||
screenOptions={({ route, navigation }) => ({ | ||
headerBackImage: MyCustomHeaderBackImage, | ||
headerBackTitleVisible: false, | ||
// header: <MyHeader></MyHeader>, | ||
// headerStyle: {marginRight: "2%", marginLeft: "2%"}, | ||
headerTitle: (props) => <LogoTitle {...props} />, | ||
headerRight: () => ( | ||
<Pressable | ||
onPress={() => navigation.navigate("Login")} | ||
style={({ pressed }) => [ | ||
{ | ||
opacity: pressed ? 0.6 : 1.0, | ||
}, | ||
]} | ||
> | ||
<AntDesign name="logout" size={24} color={Colors.PINK} /> | ||
</Pressable> | ||
), | ||
})} | ||
> | ||
<Stack.Screen | ||
name="Login" | ||
component={LoginScreen} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen name="Configure" component={ConfigureScreen} /> | ||
<Stack.Screen name="Scan" component={ScanScreen} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,60 @@ | ||
{ | ||
"expo": { | ||
"name": "badge-scan", | ||
"name": "Kento Scan", | ||
"slug": "badge-scan", | ||
"description": "This is Kento native scan app.", | ||
"version": "1.0.0", | ||
"orientation": "portrait", | ||
"icon": "./assets/icon.png", | ||
"icon": "./assets/kento-logo.png", | ||
"userInterfaceStyle": "light", | ||
"splash": { | ||
"image": "./assets/splash.png", | ||
"image": "./assets/kento-logo.png", | ||
"resizeMode": "contain", | ||
"backgroundColor": "#ffffff" | ||
}, | ||
"updates": { | ||
"fallbackToCacheTimeout": 0 | ||
"fallbackToCacheTimeout": 0, | ||
"url": "https://u.expo.dev/954c2e4b-110d-4c20-9def-c81533dddadd" | ||
}, | ||
"assetBundlePatterns": [ | ||
"**/*" | ||
], | ||
"ios": { | ||
"supportsTablet": true | ||
"supportsTablet": true, | ||
"infoPlist": { | ||
"NSCameraUsageDescription": "Allow BadgeScan to access camera.", | ||
"NSMicrophoneUsageDescription": "This app uses the microphone to scan barcodes on event tickets." | ||
}, | ||
"bundleIdentifier": "com.pierrecournut.badgescan" | ||
}, | ||
"android": { | ||
"adaptiveIcon": { | ||
"foregroundImage": "./assets/adaptive-icon.png", | ||
"backgroundColor": "#FFFFFF" | ||
} | ||
}, | ||
"permissions": [ | ||
"android.permission.CAMERA" | ||
], | ||
"package": "com.pierrecournut.badgescan" | ||
}, | ||
"web": { | ||
"favicon": "./assets/favicon.png" | ||
}, | ||
"plugins": [ | ||
[ | ||
"expo-barcode-scanner", | ||
{ | ||
"cameraPermission": "Allow BadgeScan to access camera." | ||
} | ||
] | ||
], | ||
"extra": { | ||
"eas": { | ||
"projectId": "954c2e4b-110d-4c20-9def-c81533dddadd" | ||
} | ||
}, | ||
"runtimeVersion": { | ||
"policy": "sdkVersion" | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
module.exports = function(api) { | ||
module.exports = function (api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
presets: ["babel-preset-expo"], | ||
plugins: ["react-native-reanimated/plugin"], | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const Colors = { | ||
PINK: "#F85F6A", | ||
GREEN: "#7FE1AD", | ||
RED: "#625B6C", | ||
LUNE: "#999999", | ||
ARGENT: "#CCCCCC", | ||
NEIGE: "#F4F4F4", | ||
NOIR: "#000000", | ||
CHARBON: "#333333", | ||
NICKEL: "#666666", | ||
ERROR: "#E74C3C", | ||
WARNING: "#F1C40F", | ||
SUCCESS: "#2ECC71", | ||
}; | ||
export default Colors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { createContext } from "react"; | ||
import { Badge, EnrichedUser } from "../types"; | ||
|
||
export const ScanScreenContext = createContext({ | ||
enrichedUsers: [] as EnrichedUser[], | ||
setEnrichedUsers: (value: EnrichedUser[]) => {}, | ||
selectedUserIndex: 0, | ||
setSelectedUserIndex: (value: number) => {}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"cli": { | ||
"version": ">= 3.8.0" | ||
}, | ||
"build": { | ||
"development": { | ||
"developmentClient": true, | ||
"distribution": "internal", | ||
"ios": { | ||
"resourceClass": "m-medium" | ||
} | ||
}, | ||
"preview": { | ||
"distribution": "internal", | ||
"ios": { | ||
"resourceClass": "m-medium" | ||
} | ||
}, | ||
"production": { | ||
"ios": { | ||
"resourceClass": "m-medium" | ||
} | ||
} | ||
}, | ||
"submit": { | ||
"production": {} | ||
} | ||
} |
Oops, something went wrong.