Skip to content

Commit

Permalink
Update with the actual app.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcournut committed Apr 7, 2023
1 parent ff8ebad commit f8136a4
Show file tree
Hide file tree
Showing 24 changed files with 14,681 additions and 87 deletions.
20 changes: 0 additions & 20 deletions App.js

This file was deleted.

65 changes: 65 additions & 0 deletions App.tsx
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;
39 changes: 33 additions & 6 deletions app.json
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"
}
}
}
Binary file added assets/kento-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/kento-text.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions babel.config.js
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"],
};
};
15 changes: 15 additions & 0 deletions colors.js
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;
9 changes: 9 additions & 0 deletions contexts/ScanScreenContext.tsx
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) => {},
});
28 changes: 28 additions & 0 deletions eas.json
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": {}
}
}
Loading

0 comments on commit f8136a4

Please sign in to comment.