From 80c02fef9d52e9c60d6b4901087c5a80265f5bf9 Mon Sep 17 00:00:00 2001 From: MinhNN Date: Tue, 2 Dec 2025 16:57:25 +0700 Subject: [PATCH] update tab --- app/(tabs)/_layout.tsx | 30 +++---- app/(tabs)/diary.tsx | 28 ++---- app/(tabs)/manager.tsx | 35 ++++++++ app/(tabs)/sensor.tsx | 129 --------------------------- app/(tabs)/tripInfo.tsx | 162 +++++++++++++++++----------------- app/(tabs)/warning.tsx | 35 ++++++++ components/ui/icon-symbol.tsx | 2 + locales/en.json | 4 +- locales/vi.json | 4 +- 9 files changed, 180 insertions(+), 249 deletions(-) create mode 100644 app/(tabs)/manager.tsx delete mode 100644 app/(tabs)/sensor.tsx create mode 100644 app/(tabs)/warning.tsx diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx index c158cc0..bc60a1e 100644 --- a/app/(tabs)/_layout.tsx +++ b/app/(tabs)/_layout.tsx @@ -46,16 +46,6 @@ export default function TabLayout() { ), }} /> - - ( - - ), - }} - /> ( - + + ), + }} + /> + + ( + ), }} /> diff --git a/app/(tabs)/diary.tsx b/app/(tabs)/diary.tsx index 93d63d1..471d33e 100644 --- a/app/(tabs)/diary.tsx +++ b/app/(tabs)/diary.tsx @@ -1,13 +1,14 @@ -import CreateOrUpdateHaulModal from "@/components/tripInfo/modal/CreateOrUpdateHaulModal"; -import { useState } from "react"; -import { Button, Platform, StyleSheet, View } from "react-native"; +import { Platform, ScrollView, StyleSheet, Text, View } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; -export default function Warning() { - const [isShowModal, setIsShowModal] = useState(false); +export default function diary() { return ( - + + + Nhật ký chuyến đi + + ); } @@ -24,24 +25,11 @@ const styles = StyleSheet.create({ fontSize: 32, fontWeight: "700", lineHeight: 40, - marginBottom: 10, + marginBottom: 30, fontFamily: Platform.select({ ios: "System", android: "Roboto", default: "System", }), }, - button: { - backgroundColor: "#007AFF", - paddingVertical: 14, - paddingHorizontal: 24, - borderRadius: 8, - marginTop: 20, - }, - buttonText: { - color: "#fff", - fontSize: 16, - fontWeight: "600", - }, }); - diff --git a/app/(tabs)/manager.tsx b/app/(tabs)/manager.tsx new file mode 100644 index 0000000..76c2972 --- /dev/null +++ b/app/(tabs)/manager.tsx @@ -0,0 +1,35 @@ +import { Platform, ScrollView, StyleSheet, Text, View } from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; + +export default function manager() { + return ( + + + + Quản lý tàu + + + + ); +} + +const styles = StyleSheet.create({ + scrollContent: { + flexGrow: 1, + }, + container: { + alignItems: "center", + padding: 15, + }, + titleText: { + fontSize: 32, + fontWeight: "700", + lineHeight: 40, + marginBottom: 30, + fontFamily: Platform.select({ + ios: "System", + android: "Roboto", + default: "System", + }), + }, +}); diff --git a/app/(tabs)/sensor.tsx b/app/(tabs)/sensor.tsx deleted file mode 100644 index dcb363b..0000000 --- a/app/(tabs)/sensor.tsx +++ /dev/null @@ -1,129 +0,0 @@ -import ScanQRCode from "@/components/ScanQRCode"; -import Select from "@/components/Select"; -import { useState } from "react"; -import { - Platform, - Pressable, - ScrollView, - StyleSheet, - Text, - View, -} from "react-native"; -import { SafeAreaView } from "react-native-safe-area-context"; - -export default function Sensor() { - const [scanModalVisible, setScanModalVisible] = useState(false); - const [scannedData, setScannedData] = useState(null); - const handleQRCodeScanned = (data: string) => { - setScannedData(data); - // Alert.alert("QR Code Scanned", `Result: ${data}`); - }; - - const handleScanPress = () => { - setScanModalVisible(true); - }; - const [selectedValue, setSelectedValue] = useState< - string | number | undefined - >(undefined); - - const options = [ - { label: "Apple", value: "apple" }, - { label: "Banana", value: "banana" }, - { label: "Cherry", value: "cherry", disabled: true }, - ]; - - return ( - - - - Cảm biến trên tàu -