Skip to content

Commit

Permalink
Build (#4)
Browse files Browse the repository at this point in the history
* stable for build

* design bug fixed
  • Loading branch information
0ME9A authored Jul 10, 2023
1 parent 23aff48 commit 2bb20cc
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 51 deletions.
21 changes: 12 additions & 9 deletions App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { NavigationContainer } from "@react-navigation/native";
import { openDatabase } from "./src/functions/functions";
import { AppProvider } from "./src/Contexts/Contexts";
Expand Down Expand Up @@ -30,14 +31,16 @@ export default function App() {
if (!appReady) return <SplashScreen />;

return (
<AppProvider>
<NavigationContainer>
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Details" component={Details} />
<Stack.Screen name="History" component={History} />
</Stack.Navigator>
</NavigationContainer>
</AppProvider>
<SafeAreaProvider style={{backgroundColor: ""}}>
<AppProvider>
<NavigationContainer>
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Details" component={Details} />
<Stack.Screen name="History" component={History} />
</Stack.Navigator>
</NavigationContainer>
</AppProvider>
</SafeAreaProvider>
);
}
Binary file modified assets/favicon.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 modified assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/components/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { Feather, Ionicons } from "@expo/vector-icons";
import { Pressable, View, Text } from "react-native";
import { StyleSheet } from "react-native";

export default function Navbar({ brand, navigation }) {
const insets = useSafeAreaInsets();

return (
<View style={styles.navbar}>
<View style={[styles.navbar, {paddingTop: insets.top}]}>
{brand ? (
<Text style={styles.brand}>ForgeScan</Text>
) : (
Expand All @@ -23,7 +26,6 @@ const styles = StyleSheet.create({
navbar: {
display: "flex",
alignItems: "flex-end",
paddingTop: 50,
flexDirection: "row",
justifyContent: "space-between",
},
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Details.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const styles = StyleSheet.create({
},
responseContainer: {
flex: 1,
padding: 20,
paddingHorizontal: 20,
gap: 10,
},
responseSubContainer: {
Expand Down
75 changes: 38 additions & 37 deletions src/screens/History.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from "@expo/vector-icons";

import AlertBox from "../components/AlertBox";
import { useSafeAreaInsets } from "react-native-safe-area-context";

const db = SQLite.openDatabase("myDatabase.db");

Expand All @@ -26,6 +27,8 @@ export default function Home({ navigation }) {
color: null,
});

const insets = useSafeAreaInsets();

const handleCheckbox = () => {
if (isCheck) {
setCheck(false);
Expand Down Expand Up @@ -125,48 +128,48 @@ export default function Home({ navigation }) {

return (
<View style={styles.container}>
<View style={styles.responseContainer}>
<View style={styles.headerContainer}>
<Text
style={{
fontSize: 20,
}}
>
History
</Text>
<View style={[styles.headerContainer, { paddingTop: 50 }]}>
<Text
style={{
fontSize: 20,
}}
>
History
</Text>

<View style={{ flexDirection: "row", gap: 16, alignItems: "center" }}>
{isDelete ? (
<Pressable onPress={handleAllDelete}>
<MaterialIcons name="delete-forever" size={24} color="black" />
</Pressable>
<View style={{ flexDirection: "row", gap: 16, alignItems: "center" }}>
{isDelete ? (
<Pressable onPress={handleAllDelete}>
<MaterialIcons name="delete-forever" size={24} color="black" />
</Pressable>
) : (
<MaterialIcons
name="delete-forever"
size={24}
color="black"
style={{ opacity: 0.3 }}
/>
)}
<View style={{ borderWidth: 1, opacity: 0.1, height: "50%" }} />
<Pressable onPress={handleCheckbox}>
{isCheck ? (
<MaterialIcons name="check-box" size={24} color="black" />
) : (
<MaterialIcons
name="delete-forever"
name="check-box-outline-blank"
size={24}
color="black"
style={{ opacity: 0.3 }}
/>
)}
<View style={{ borderWidth: 1, opacity: 0.1, height: "50%" }} />
<Pressable onPress={handleCheckbox}>
{isCheck ? (
<MaterialIcons name="check-box" size={24} color="black" />
) : (
<MaterialIcons
name="check-box-outline-blank"
size={24}
color="black"
/>
)}
</Pressable>
</View>
</Pressable>
</View>
{alertBox.message && (
<View style={{ marginTop: -10 }}>
<AlertBox message={alertBox.message} color={alertBox.color} />
</View>
)}
</View>
{alertBox.message && (
<View style={{ marginTop: -10 }}>
<AlertBox message={alertBox.message} color={alertBox.color} />
</View>
)}
<View style={styles.responseContainer}>
<ScrollView>
<View style={styles.responseSubContainer}>
{historyDb &&
Expand Down Expand Up @@ -232,7 +235,6 @@ const styles = StyleSheet.create({
borderBottomWidth: 2,
borderColor: "#CED0FF",
padding: 20,
paddingTop: 60,
},
footer: {},
actionsContainer: {
Expand All @@ -249,15 +251,14 @@ const styles = StyleSheet.create({
iconContainer: {},
responseContainer: {
flex: 1,
// padding: 20,
gap: 10,
},
responseSubContainer: {
flex: 1,
paddingHorizontal: 20,
paddingBottom: 100,
gap: 5,
overflow: "scroll",
padding: 10
},
primeAction: {
padding: 10,
Expand Down
2 changes: 0 additions & 2 deletions src/screens/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ export default function Home({ navigation }) {

return (
<View style={styles.container}>
<Navbar brand={true} navigation={navigation} />

{alertBox && <AlertBox message={alertBox} />}

{isFocus && <Cam flash={flashlightOn ? 2 : 0} zoom={value} />}
Expand Down

0 comments on commit 2bb20cc

Please sign in to comment.