Skip to content

Colota - Android GPS Location tracker

Overhaul UI with teal palette, Inter font, Lucide icons, and component variants

Max Dietrich32f74b21e47c
diff --git a/App.tsx b/App.tsx
index 3ce8166e..3cc7cf47 100644
--- a/App.tsx
+++ b/App.tsx
@@ -8,8 +8,9 @@ import { createNativeStackNavigator } from "@react-navigation/native-stack"
import { SafeAreaProvider } from "react-native-safe-area-context"
import { StatusBar, Platform } from "react-native"
import { ThemeProvider, useTheme } from "./src/hooks/useTheme"
+import { fonts } from "./src/styles/typography"
import { TrackingProvider } from "./src/contexts/TrackingProvider"
-import ThemedErrorBoundary from "./src/components/ui/ThemedErrorBoundary"
+import { ErrorBoundary } from "./src/components/ui/ErrorBoundary"
import {
DashboardScreen,
SettingsScreen,
@@ -83,7 +84,7 @@ function AppNavigator() {
},
headerTintColor: colors.text,
headerTitleStyle: {
- fontWeight: "bold" as const,
+ ...fonts.bold,
fontSize: 18,
color: colors.text
},
@@ -126,11 +127,11 @@ function AppNavigator() {
export default function App() {
return (
<ThemeProvider>
- <ThemedErrorBoundary>
+ <ErrorBoundary>
<TrackingProvider>
<AppNavigator />
</TrackingProvider>
- </ThemedErrorBoundary>
+ </ErrorBoundary>
</ThemeProvider>
)
}
diff --git a/android/app/src/main/assets/fonts/Inter-Bold.ttf b/android/app/src/main/assets/fonts/Inter-Bold.ttf
new file mode 100644
index 00000000..9fb9b751
Binary files /dev/null and b/android/app/src/main/assets/fonts/Inter-Bold.ttf differ
diff --git a/android/app/src/main/assets/fonts/Inter-Medium.ttf b/android/app/src/main/assets/fonts/Inter-Medium.ttf
new file mode 100644
index 00000000..458cd060
Binary files /dev/null and b/android/app/src/main/assets/fonts/Inter-Medium.ttf differ
diff --git a/android/app/src/main/assets/fonts/Inter-Regular.ttf b/android/app/src/main/assets/fonts/Inter-Regular.ttf
new file mode 100644
index 00000000..b7aaca8d
Binary files /dev/null and b/android/app/src/main/assets/fonts/Inter-Regular.ttf differ
diff --git a/android/app/src/main/assets/fonts/Inter-SemiBold.ttf b/android/app/src/main/assets/fonts/Inter-SemiBold.ttf
new file mode 100644
index 00000000..47f8ab1d
Binary files /dev/null and b/android/app/src/main/assets/fonts/Inter-SemiBold.ttf differ
diff --git a/jest.setup.js b/jest.setup.js
index 980dcbd1..8eb8415c 100644
--- a/jest.setup.js
+++ b/jest.setup.js
@@ -1,9 +1,43 @@
-/* eslint-env node */
+/* eslint-env node, jest */
/**
* Jest setup file
* Provides mocks for React Native native modules and browser APIs
*/
+// SVG and Lucide icon mocks
+jest.mock("react-native-svg", () => {
+ const React = require("react")
+ const c = (tag) => {
+ const Component = (props) => React.createElement(tag, props)
+ Component.displayName = tag
+ return Component
+ }
+ return {
+ __esModule: true,
+ default: c("svg"),
+ Svg: c("svg"),
+ Path: c("path"),
+ Circle: c("circle"),
+ Rect: c("rect"),
+ Line: c("line"),
+ G: c("g")
+ }
+})
+
+jest.mock("lucide-react-native", () => {
+ const React = require("react")
+ return new Proxy(
+ {},
+ {
+ get: (_, name) => {
+ const Icon = (props) => React.createElement("View", { ...props, testID: `icon-${String(name)}` })
+ Icon.displayName = String(name)
+ return Icon
+ }
+ }
+ )
+})
+
// Blob polyfill for getByteSize tests (RN test env doesn't have Blob)
if (typeof global.Blob === "undefined") {
global.Blob = class Blob {
diff --git a/package-lock.json b/package-lock.json
index 62dea5d0..27641670 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,10 +10,12 @@
"dependencies": {
"@react-navigation/native": "^7.1.28",
"@react-navigation/native-stack": "^7.12.0",
+ "lucide-react-native": "^0.564.0",
"react": "19.2.0",
"react-native": "0.83.1",
"react-native-safe-area-context": "^5.6.2",
"react-native-screens": "^4.23.0",
+ "react-native-svg": "^15.15.3",
"react-native-webview": "^13.16.0"
},
"devDependencies": {
@@ -4576,6 +4578,12 @@
"devOptional": true,
"license": "MIT"
},
+ "node_modules/boolbase": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
+ "license": "ISC"
+ },
"node_modules/brace-expansion": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
@@ -5186,6 +5194,47 @@
"node": ">= 8"
}
},
+ "node_modules/css-select": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz",
+ "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "boolbase": "^1.0.0",
+ "css-what": "^6.1.0",
+ "domhandler": "^5.0.2",
+ "domutils": "^3.0.1",
+ "nth-check": "^2.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ }
+ },
+ "node_modules/css-tree": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
+ "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
+ "license": "MIT",
+ "dependencies": {
+ "mdn-data": "2.0.14",
+ "source-map": "^0.6.1"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/css-what": {
+ "version": "6.2.2",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz",
+ "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">= 6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ }
+ },
"node_modules/csstype": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
@@ -5423,6 +5472,61 @@
"node": ">=6.0.0"
}
},
+ "node_modules/dom-serializer": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
+ "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
+ "license": "MIT",
+ "dependencies": {
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.2",
+ "entities": "^4.2.0"
+ },
+ "funding": {
+ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
+ }
+ },
+ "node_modules/domelementtype": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
+ "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fb55"
+ }
+ ],
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/domhandler": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
+ "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "domelementtype": "^2.3.0"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
+ "node_modules/domutils": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz",
+ "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "dom-serializer": "^2.0.0",
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domutils?sponsor=1"
+ }
+ },
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
@@ -5478,6 +5582,18 @@
"node": ">= 0.8"
}
},
+ "node_modules/entities": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
"node_modules/env-paths": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
@@ -9004,6 +9120,17 @@
"yallist": "^3.0.2"
}
},
+ "node_modules/lucide-react-native": {
+ "version": "0.564.0",
+ "resolved": "https://registry.npmjs.org/lucide-react-native/-/lucide-react-native-0.564.0.tgz",
+ "integrity": "sha512-ntpd82JDEusaCkfikkIX2m8KskNSd7mnaVr3ADhAdyncu+Zlo1my2JDWm1E7S3bezgehEl2mz5LYs1eplVUd1g==",
+ "license": "ISC",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+ "react-native": "*",
+ "react-native-svg": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0"
+ }
+ },
"node_modules/make-dir": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz",
@@ -9058,6 +9185,12 @@
"node": ">= 0.4"
}
},
+ "node_modules/mdn-data": {
+ "version": "2.0.14",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
+ "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
+ "license": "CC0-1.0"
+ },
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
@@ -9617,6 +9750,18 @@
"node": ">=8"
}
},
+ "node_modules/nth-check": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
+ "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "boolbase": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/nth-check?sponsor=1"
+ }
+ },
"node_modules/nullthrows": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz",
@@ -10446,6 +10591,22 @@
"react-native": "*"
}
},
+ "node_modules/react-native-svg": {
+ "version": "15.15.3",
+ "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-15.15.3.tgz",
+ "integrity": "sha512-/k4KYwPBLGcx2f5d4FjE+vCScK7QOX14cl2lIASJ28u4slHHtIhL0SZKU7u9qmRBHxTCKPoPBtN6haT1NENJNA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "css-select": "^5.1.0",
+ "css-tree": "^1.1.3",
+ "warn-once": "0.1.1"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
"node_modules/react-native-webview": {
"version": "13.16.0",
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-13.16.0.tgz",
diff --git a/package.json b/package.json
index 9c74c1ee..c2274598 100644
--- a/package.json
+++ b/package.json
@@ -23,10 +23,12 @@
"dependencies": {
"@react-navigation/native": "^7.1.28",
"@react-navigation/native-stack": "^7.12.0",
+ "lucide-react-native": "^0.564.0",
"react": "19.2.0",
"react-native": "0.83.1",
"react-native-safe-area-context": "^5.6.2",
"react-native-screens": "^4.23.0",
+ "react-native-svg": "^15.15.3",
"react-native-webview": "^13.16.0"
},
"devDependencies": {
diff --git a/src/components/features/dashboard/ComingSoonRibbon.tsx b/src/components/features/dashboard/ComingSoonRibbon.tsx
deleted file mode 100644
index 971bf748..00000000
--- a/src/components/features/dashboard/ComingSoonRibbon.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (C) 2026 Max Dietrich
- * Licensed under the GNU AGPLv3. See LICENSE in the project root for details.
- */
-
-import React from "react"
-import { View, StyleSheet, ViewStyle, StyleProp, Text } from "react-native"
-import { useTheme } from "../../../hooks/useTheme"
-
-type ComingSoonRibbonProps = {
- style?: StyleProp<ViewStyle>
-}
-
-export function ComingSoonRibbon({}: ComingSoonRibbonProps) {
- const { colors } = useTheme()
-
- return (
- <View style={[styles.comingSoonRibbon, { backgroundColor: colors.warning, shadowColor: colors.shadow }]}>
- <Text style={styles.comingSoonRibbonText}>Coming Soon</Text>
- </View>
- )
-}
-
-const styles = StyleSheet.create({
- comingSoonRibbon: {
- position: "absolute",
- top: 8,
- right: -10,
- paddingVertical: 2,
- paddingHorizontal: 14,
- transform: [{ rotate: "45deg" }],
- zIndex: 10,
- elevation: 10,
- shadowOffset: { width: 0, height: 1 },
- shadowOpacity: 0.3,
- shadowRadius: 2
- },
- comingSoonRibbonText: {
- fontSize: 9,
- fontWeight: "700",
- textAlign: "center",
- letterSpacing: 0.5
- }
-})
diff --git a/src/components/features/dashboard/CoordinateDisplay.tsx b/src/components/features/dashboard/CoordinateDisplay.tsx
index 2019d172..27767178 100644
--- a/src/components/features/dashboard/CoordinateDisplay.tsx
+++ b/src/components/features/dashboard/CoordinateDisplay.tsx
@@ -7,6 +7,7 @@ import React from "react"
import { View, Text, StyleSheet } from "react-native"
import { LocationCoords } from "../../../types/global"
import { useTheme } from "../../../hooks/useTheme"
+import { fonts } from "../../../styles/typography"
import { SectionTitle } from "../../ui/SectionTitle"
import { Card } from "../../ui/Card"
@@ -53,7 +54,7 @@ export function CoordinateDisplay({ coords }: Props) {
* Renders a single coordinate metric card
*/
const renderCard = (label: string, value: string, unit: string) => (
- <Card style={[{ backgroundColor: colors.backgroundElevated }]}>
+ <Card variant="elevated">
<Text style={[styles.coordLabel, { color: colors.textSecondary }]}>{label}</Text>
<Text style={[styles.coordValue, { color: colors.text }]}>
{value}
@@ -98,19 +99,19 @@ const styles = StyleSheet.create({
},
coordLabel: {
fontSize: 10,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 4,
letterSpacing: 0.5,
textTransform: "uppercase"
},
coordValue: {
fontSize: 15,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: -0.3
},
coordUnit: {
fontSize: 12,
- fontWeight: "500",
+ ...fonts.medium,
opacity: 0.6
}
})
diff --git a/src/components/features/dashboard/DashboardMap.tsx b/src/components/features/dashboard/DashboardMap.tsx
index 05faea4b..715f654a 100644
--- a/src/components/features/dashboard/DashboardMap.tsx
+++ b/src/components/features/dashboard/DashboardMap.tsx
@@ -8,6 +8,7 @@ import { View, StyleSheet, Text, ActivityIndicator, DeviceEventEmitter, Image }
import { WebView } from "react-native-webview"
import { LocationCoords } from "../../../types/global"
import { useTheme } from "../../../hooks/useTheme"
+import { fonts } from "../../../styles/typography"
import NativeLocationService from "../../../services/NativeLocationService"
import { MapCenterButton } from "../map/MapCenterButton"
import icon from "../../../assets/icons/icon.png"
@@ -423,9 +424,7 @@ export function DashboardMap({ coords, tracking, activeZoneName }: Props) {
<Image source={icon} style={styles.icon} />
</View>
<Text style={[styles.stateTitle, { color: colors.text }]}>Tracking Disabled</Text>
- <Text style={[styles.stateSubtext, { color: colors.textSecondary }]}>
- Start tracking to see your position and zones.
- </Text>
+ <Text style={[styles.stateSubtext, { color: colors.textSecondary }]}>Start tracking to see the map.</Text>
</View>
)
}
@@ -435,7 +434,7 @@ export function DashboardMap({ coords, tracking, activeZoneName }: Props) {
<View style={[styles.stateContainer, { backgroundColor: colors.card, borderRadius: colors.borderRadius }]}>
<ActivityIndicator size="large" color={colors.primary} />
<Text style={[styles.stateTitle, styles.stateTitleSpaced, { color: colors.text }]}>Searching GPS...</Text>
- <Text style={[styles.stateSubtext, { color: colors.textSecondary }]}>Waiting for valid location signal.</Text>
+ <Text style={[styles.stateSubtext, { color: colors.textSecondary }]}>Waiting for GPS signal.</Text>
</View>
)
}
@@ -536,7 +535,7 @@ const styles = StyleSheet.create({
alignItems: "center",
marginBottom: 16
},
- stateTitle: { fontSize: 18, fontWeight: "bold", textAlign: "center" },
+ stateTitle: { fontSize: 18, ...fonts.bold, textAlign: "center" },
stateTitleSpaced: { marginTop: 20 },
stateSubtext: {
fontSize: 14,
@@ -556,6 +555,6 @@ const styles = StyleSheet.create({
borderLeftWidth: 5,
zIndex: 5
},
- infoTitle: { fontSize: 16, fontWeight: "bold", marginBottom: 2 },
+ infoTitle: { fontSize: 16, ...fonts.bold, marginBottom: 2 },
infoSub: { fontSize: 13 }
})
diff --git a/src/components/features/databases/DatabaseStatistics.tsx b/src/components/features/dashboard/DatabaseStatistics.tsx
similarity index 74%
rename from src/components/features/databases/DatabaseStatistics.tsx
rename to src/components/features/dashboard/DatabaseStatistics.tsx
index 22193975..11bc400e 100644
--- a/src/components/features/databases/DatabaseStatistics.tsx
+++ b/src/components/features/dashboard/DatabaseStatistics.tsx
@@ -6,6 +6,7 @@ import React from "react"
import { Text, StyleSheet, View } from "react-native"
import { SectionTitle, Card } from "../.."
import { useTheme } from "../../../hooks/useTheme"
+import { fonts } from "../../../styles/typography"
import { getQueueColor } from "../../../utils/queueStatus"
type DatabaseStatisticsProps = {
@@ -22,54 +23,26 @@ export function DatabaseStatistics({ stats }: DatabaseStatisticsProps) {
<View style={styles.metricsSection}>
<SectionTitle>DATABASE STATISTICS</SectionTitle>
<View style={styles.statsGrid}>
- <Card
- style={[
- styles.statCard,
- {
- backgroundColor: colors.backgroundElevated
- }
- ]}
- >
+ <Card variant="elevated" style={styles.statCard}>
<Text style={[styles.statLabel, { color: colors.textSecondary }]}>Queued</Text>
<Text style={[styles.statValue, { color: queuedColor }]}>{stats.queued.toLocaleString()}</Text>
<Text style={[styles.statUnit, { color: colors.textLight }]}>pending</Text>
</Card>
- <Card
- style={[
- styles.statCard,
- {
- backgroundColor: colors.backgroundElevated
- }
- ]}
- >
+ <Card variant="elevated" style={styles.statCard}>
<Text style={[styles.statLabel, { color: colors.textSecondary }]}>Sent</Text>
<Text style={[styles.statValue, { color: colors.success }]}>{stats.sent.toLocaleString()}</Text>
<Text style={[styles.statUnit, { color: colors.textLight }]}>synced</Text>
</Card>
</View>
<View style={[styles.statsGrid, styles.statsGridSpaced]}>
- <Card
- style={[
- styles.statCard,
- {
- backgroundColor: colors.backgroundElevated
- }
- ]}
- >
+ <Card variant="elevated" style={styles.statCard}>
<Text style={[styles.statLabel, { color: colors.textSecondary }]}>Today</Text>
<Text style={[styles.statValue, { color: colors.info }]}>{stats.today.toLocaleString()}</Text>
<Text style={[styles.statUnit, { color: colors.textLight }]}>tracked</Text>
</Card>
- <Card
- style={[
- styles.statCard,
- {
- backgroundColor: colors.backgroundElevated
- }
- ]}
- >
+ <Card variant="elevated" style={styles.statCard}>
<Text style={[styles.statLabel, { color: colors.textSecondary }]}>Storage</Text>
- <Text style={[styles.statValue, { color: colors.primary }]}>{stats.databaseSizeMB.toFixed(1)}</Text>
+ <Text style={[styles.statValue, { color: colors.primaryDark }]}>{stats.databaseSizeMB.toFixed(1)}</Text>
<Text style={[styles.statUnit, { color: colors.textLight }]}>MB</Text>
</Card>
</View>
@@ -94,18 +67,18 @@ const styles = StyleSheet.create({
},
statUnit: {
fontSize: 11,
- fontWeight: "500"
+ ...fonts.medium
},
statLabel: {
fontSize: 10,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 6,
letterSpacing: 0.5,
textTransform: "uppercase"
},
statValue: {
fontSize: 24,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: -0.5,
marginBottom: 2
}
diff --git a/src/components/features/dashboard/QuickAccess.tsx b/src/components/features/dashboard/QuickAccess.tsx
index b32dbf7d..8a1dc884 100644
--- a/src/components/features/dashboard/QuickAccess.tsx
+++ b/src/components/features/dashboard/QuickAccess.tsx
@@ -4,17 +4,16 @@
*/
import React from "react"
import { View, StyleSheet, Text, TouchableOpacity, Linking } from "react-native"
+import { Settings, Fence, Search, Download, Info, Heart, LucideIcon } from "lucide-react-native"
import { useTheme } from "../../../hooks/useTheme"
+import { fonts } from "../../../styles/typography"
import { SectionTitle } from "../../ui/SectionTitle"
-import { ComingSoonRibbon } from "./ComingSoonRibbon"
interface NavItem {
name: string
- icon: string
+ icon: LucideIcon
color: string
onPress?: () => void
- comingSoon?: boolean
- subtitle?: string
}
interface QuickAccessProps {
@@ -27,44 +26,38 @@ export function QuickAccess({ navigation }: QuickAccessProps) {
const navItems: NavItem[] = [
{
name: "Settings",
- icon: "βš™οΈ",
+ icon: Settings,
color: colors.primary,
- subtitle: "Configure tracking",
onPress: () => navigation.navigate("Settings")
},
{
name: "Geofences",
- icon: "🏑",
+ icon: Fence,
color: colors.success,
- subtitle: "Manage zones",
onPress: () => navigation.navigate("Geofences")
},
{
name: "Inspector",
- icon: "πŸ”",
+ icon: Search,
color: colors.info,
- subtitle: "View locations",
onPress: () => navigation.navigate("Locations Inspector")
},
{
name: "Export",
- icon: "πŸ“€",
+ icon: Download,
color: colors.warning,
- subtitle: "Download data",
onPress: () => navigation.navigate("Export Data")
},
{
name: "About",
- icon: "ℹ️",
+ icon: Info,
color: colors.info,
- subtitle: "App info",
onPress: () => navigation.navigate("About Colota")
},
{
name: "Support",
- icon: "πŸ’–",
+ icon: Heart,
color: colors.error,
- subtitle: "Help us grow",
onPress: () => Linking.openURL("https://mxd.codes/colota/support")
}
]
@@ -86,7 +79,6 @@ export function QuickAccess({ navigation }: QuickAccessProps) {
]}
onPress={item.onPress}
>
- {/* Icon with gradient background */}
<View
style={[
styles.navIconBox,
@@ -96,22 +88,12 @@ export function QuickAccess({ navigation }: QuickAccessProps) {
}
]}
>
- <Text style={styles.navIcon}>{item.icon}</Text>
+ <item.icon size={24} color={item.color} />
</View>
- {/* Title */}
<Text style={[styles.navLabel, { color: colors.text }]} numberOfLines={1}>
{item.name}
</Text>
-
- {/* Subtitle */}
- {item.subtitle && (
- <Text style={[styles.navSubtitle, { color: colors.textSecondary }]} numberOfLines={1}>
- {item.subtitle}
- </Text>
- )}
-
- {item.comingSoon && <ComingSoonRibbon />}
</TouchableOpacity>
))}
</View>
@@ -151,19 +133,10 @@ const styles = StyleSheet.create({
marginBottom: 8,
borderWidth: 1
},
- navIcon: {
- fontSize: 24
- },
navLabel: {
fontSize: 12,
- fontWeight: "700",
- textAlign: "center",
- letterSpacing: 0.3,
- marginBottom: 2
- },
- navSubtitle: {
- fontSize: 10,
+ ...fonts.bold,
textAlign: "center",
- opacity: 0.7
+ letterSpacing: 0.3
}
})
diff --git a/src/components/features/settings/ServerConnection.tsx b/src/components/features/dashboard/ServerConnection.tsx
similarity index 52%
rename from src/components/features/settings/ServerConnection.tsx
rename to src/components/features/dashboard/ServerConnection.tsx
index 0ee32052..53a659e4 100644
--- a/src/components/features/settings/ServerConnection.tsx
+++ b/src/components/features/dashboard/ServerConnection.tsx
@@ -5,10 +5,12 @@
import React, { useState, useCallback, useMemo, useRef } from "react"
import { StyleSheet, View, Text, TouchableOpacity } from "react-native"
+import { ChevronRight } from "lucide-react-native"
import { useFocusEffect } from "@react-navigation/native"
import { useTheme } from "../../../hooks/useTheme"
import { useTracking } from "../../../contexts/TrackingProvider"
import { ServerStatus, ServerConnectionProps } from "../../../types/global"
+import { fonts } from "../../../styles/typography"
import NativeLocationService from "../../../services/NativeLocationService"
import { SERVER_TIMEOUT, SERVER_CHECK_INTERVAL } from "../../../constants"
@@ -19,10 +21,8 @@ export function ServerConnection({ endpoint, navigation }: ServerConnectionProps
const [serverStatus, setServerStatus] = useState<ServerStatus | "offline" | null>(null)
- // Track if we've done the initial check
const hasChecked = useRef(false)
- /** Checks server connection status */
const checkServer = useCallback(async () => {
if (isOffline) {
setServerStatus("offline")
@@ -47,7 +47,6 @@ export function ServerConnection({ endpoint, navigation }: ServerConnectionProps
// proceed without auth headers
}
- // Strategy 1: Try dedicated health endpoint
const healthUrl = endpoint.replace(/\/api\/locations$/, "/health")
let response = await fetch(healthUrl, {
@@ -56,7 +55,6 @@ export function ServerConnection({ endpoint, navigation }: ServerConnectionProps
headers: authHeaders
})
- // Strategy 2: If health endpoint doesn't exist, try HEAD on main endpoint
if (response.status === 404 || response.status === 405) {
response = await fetch(endpoint, {
method: "HEAD",
@@ -65,12 +63,10 @@ export function ServerConnection({ endpoint, navigation }: ServerConnectionProps
})
}
- // Strategy 3: If endpoint still fails, try root domain
if (!response.ok) {
const match = endpoint.match(/^(https?:\/\/[^/]+)/)
if (match) {
- const rootUrl = match[1]
- response = await fetch(rootUrl, {
+ response = await fetch(match[1], {
method: "GET",
signal: controller.signal,
headers: authHeaders
@@ -88,17 +84,9 @@ export function ServerConnection({ endpoint, navigation }: ServerConnectionProps
}
}, [endpoint, isOffline])
- // Re-run check when focus returns or offline mode toggles
useFocusEffect(
useCallback(() => {
- // Only reset if settings changed
- if (!hasChecked.current) {
- checkServer()
- } else {
- // Silently recheck in background without resetting state
- checkServer()
- }
-
+ checkServer()
const timer = setInterval(checkServer, SERVER_CHECK_INTERVAL)
return () => clearInterval(timer)
}, [checkServer])
@@ -106,97 +94,58 @@ export function ServerConnection({ endpoint, navigation }: ServerConnectionProps
const displayUrl = endpoint ? endpoint.replace(/^https?:\/\//, "").split("/")[0] : ""
- /** Dynamic UI configuration based on status */
const config = useMemo(() => {
const statusMap = {
- connected: {
- color: colors.success,
- label: "Connected",
- description: `Location data is being sent to ${displayUrl}.`
- },
- error: {
- color: colors.error,
- label: "Error",
- description: "Cannot reach the server. Check your endpoint or network."
- },
- notConfigured: {
- color: colors.warning,
- label: "Not configured",
- description: "Configure an endpoint in settings to start syncing data."
- },
- offline: {
- color: colors.textSecondary,
- label: "Offline Mode",
- description: "Syncing is paused. Data is only collected locally."
- },
- loading: {
- color: colors.textLight,
- label: "Checking...",
- description: "Verifying connection to the server..."
- }
- }
-
- // Show loading state until first check completes
- if (serverStatus === null) {
- return statusMap.loading
+ connected: { color: colors.success, label: "Connected" },
+ error: { color: colors.error, label: "Unreachable" },
+ notConfigured: { color: colors.warning, label: "No endpoint" },
+ offline: { color: colors.textSecondary, label: "Offline" },
+ loading: { color: colors.textLight, label: "Checking" }
}
+ if (serverStatus === null) return statusMap.loading
return isOffline ? statusMap.offline : statusMap[serverStatus as ServerStatus] || statusMap.error
- }, [serverStatus, colors, isOffline, displayUrl])
+ }, [serverStatus, colors, isOffline])
return (
<TouchableOpacity
activeOpacity={0.7}
onPress={() => navigation.navigate("Settings")}
- style={[
- styles.serverCard,
- {
- backgroundColor: colors.card,
- borderLeftColor: config.color,
- borderColor: colors.border
- }
- ]}
+ style={[styles.container, { backgroundColor: colors.card, borderColor: colors.border }]}
>
- <View style={styles.serverHeader}>
- <Text style={[styles.serverLabel, { color: colors.text }]}>SERVER CONNECTION</Text>
- <View
- style={[
- styles.serverIndicator,
- {
- backgroundColor: config.color + "20",
- borderColor: config.color
- }
- ]}
- >
- <Text style={[styles.serverIndicatorText, { color: config.color }]}>{config.label}</Text>
- </View>
- </View>
- <Text style={[styles.serverDescription, { color: colors.textLight }]}>{config.description}</Text>
+ <View style={[styles.dot, { backgroundColor: config.color }]} />
+ <Text style={[styles.host, { color: colors.text }]} numberOfLines={1}>
+ {displayUrl || "Server"}
+ </Text>
+ <Text style={[styles.status, { color: config.color }]}>{config.label}</Text>
+ <ChevronRight size={16} color={colors.textLight} />
</TouchableOpacity>
)
}
const styles = StyleSheet.create({
- serverCard: {
- borderLeftWidth: 3,
- borderRadius: 10,
- padding: 16,
- marginBottom: 24,
- borderWidth: 1
- },
- serverHeader: {
+ container: {
flexDirection: "row",
- justifyContent: "space-between",
alignItems: "center",
- marginBottom: 8
- },
- serverLabel: { fontSize: 11, fontWeight: "700", letterSpacing: 1.2 },
- serverIndicator: {
- paddingHorizontal: 10,
- paddingVertical: 4,
+ padding: 14,
borderRadius: 12,
- borderWidth: 1
+ borderWidth: 1,
+ marginBottom: 16
+ },
+ dot: {
+ width: 8,
+ height: 8,
+ borderRadius: 4,
+ marginRight: 12
+ },
+ host: {
+ flex: 1,
+ fontSize: 14,
+ ...fonts.medium
},
- serverIndicatorText: { fontSize: 11, fontWeight: "600", letterSpacing: 0.3 },
- serverDescription: { fontSize: 13, lineHeight: 18 }
+ status: {
+ fontSize: 12,
+ ...fonts.medium,
+ marginRight: 8
+ }
})
diff --git a/src/components/features/settings/WelcomeCard.tsx b/src/components/features/dashboard/WelcomeCard.tsx
similarity index 84%
rename from src/components/features/settings/WelcomeCard.tsx
rename to src/components/features/dashboard/WelcomeCard.tsx
index 452cfc2f..14a69400 100644
--- a/src/components/features/settings/WelcomeCard.tsx
+++ b/src/components/features/dashboard/WelcomeCard.tsx
@@ -5,7 +5,9 @@
import React from "react"
import { Text, StyleSheet, View, TouchableOpacity } from "react-native"
+import { Check, ChevronRight } from "lucide-react-native"
import { Settings, ThemeColors } from "../../../types/global"
+import { fonts } from "../../../styles/typography"
import { Card } from "../../ui/Card"
interface WelcomeCardProps {
@@ -31,13 +33,14 @@ function ChecklistItem({ label, completed, colors, onPress }: ChecklistItemProps
<View
style={[
styles.checkCircle,
+ // eslint-disable-next-line react-native/no-inline-styles
{
borderColor: completed ? colors.success : colors.border,
backgroundColor: completed ? colors.success + "20" : "transparent"
}
]}
>
- {completed && <Text style={[styles.checkMark, { color: colors.success }]}>βœ“</Text>}
+ {completed && <Check size={13} color={colors.success} />}
</View>
<Text
style={[
@@ -48,7 +51,7 @@ function ChecklistItem({ label, completed, colors, onPress }: ChecklistItemProps
>
{label}
</Text>
- {onPress && !completed && <Text style={[styles.checklistArrow, { color: colors.textLight }]}>β€Ί</Text>}
+ {onPress && !completed && <ChevronRight size={18} color={colors.textLight} />}
</View>
)
@@ -76,7 +79,7 @@ export function WelcomeCard({
return (
<View style={styles.container}>
- <Card style={{ borderColor: colors.primary, borderWidth: 2 }}>
+ <Card variant="outlined" style={{ borderColor: colors.primary }}>
<Text style={[styles.title, { color: colors.text }]}>Welcome to Colota</Text>
<Text style={[styles.subtitle, { color: colors.textSecondary }]}>Get started by completing these steps:</Text>
@@ -92,10 +95,10 @@ export function WelcomeCard({
<View style={styles.linkRow}>
<TouchableOpacity onPress={onNavigateToApiConfig} activeOpacity={0.6}>
- <Text style={[styles.link, { color: colors.primary }]}>API field mapping β€Ί</Text>
+ <Text style={[styles.link, { color: colors.primaryDark }]}>API field mapping</Text>
</TouchableOpacity>
<TouchableOpacity onPress={onNavigateToSettings} activeOpacity={0.6}>
- <Text style={[styles.link, { color: colors.primary }]}>Tracking presets β€Ί</Text>
+ <Text style={[styles.link, { color: colors.primaryDark }]}>Tracking presets</Text>
</TouchableOpacity>
</View>
@@ -117,16 +120,17 @@ const styles = StyleSheet.create({
},
title: {
fontSize: 20,
- fontWeight: "700",
+ ...fonts.bold,
marginBottom: 4
},
subtitle: {
fontSize: 14,
+ ...fonts.regular,
marginBottom: 16
},
checklist: {
gap: 12,
- marginBottom: 12
+ marginBottom: 16
},
checklistItem: {
flexDirection: "row",
@@ -141,23 +145,14 @@ const styles = StyleSheet.create({
alignItems: "center",
marginRight: 12
},
- checkMark: {
- fontSize: 13,
- fontWeight: "700"
- },
checklistLabel: {
fontSize: 15,
- fontWeight: "500",
+ ...fonts.medium,
flex: 1
},
checklistLabelCompleted: {
textDecorationLine: "line-through"
},
- checklistArrow: {
- fontSize: 22,
- fontWeight: "300",
- marginLeft: 8
- },
linkRow: {
flexDirection: "row",
gap: 16,
@@ -165,7 +160,7 @@ const styles = StyleSheet.create({
},
link: {
fontSize: 14,
- fontWeight: "600"
+ ...fonts.semiBold
},
dismissButton: {
paddingVertical: 10,
@@ -175,6 +170,6 @@ const styles = StyleSheet.create({
},
dismissText: {
fontSize: 14,
- fontWeight: "600"
+ ...fonts.semiBold
}
})
diff --git a/src/components/features/settings/ConnectionSettings.tsx b/src/components/features/settings/ConnectionSettings.tsx
index 1a34ff04..50213b96 100644
--- a/src/components/features/settings/ConnectionSettings.tsx
+++ b/src/components/features/settings/ConnectionSettings.tsx
@@ -5,9 +5,11 @@
import React, { useState, useCallback } from "react"
import { Text, StyleSheet, TextInput, Switch, View, TouchableOpacity } from "react-native"
+import { CheckCircle, ChevronRight } from "lucide-react-native"
import { Settings, ThemeColors } from "../../../types/global"
import NativeLocationService from "../../../services/NativeLocationService"
import { isPrivateHost, isEndpointAllowed } from "../../../utils/settingsValidation"
+import { fonts } from "../../../styles/typography"
import { Button, Card, SectionTitle, Divider } from "../../index"
interface ConnectionSettingsProps {
@@ -87,14 +89,16 @@ export function ConnectionSettings({
})
if (response.ok) {
- setTestResponse("βœ“ Connection successful")
+ setTestResponse("Connection successful")
onSettingsChange({ ...settings, endpoint: endpointInput })
} else {
setTestResponse(`Failed: ${response.status}`)
setTestError(true)
}
} catch (err: any) {
- setTestResponse(err.message || "Connection failed")
+ const msg = err.message?.toLowerCase() || ""
+ const userMessage = msg.includes("network request failed") ? "No internet connection" : "Connection failed"
+ setTestResponse(userMessage)
setTestError(true)
} finally {
setTesting(false)
@@ -118,7 +122,7 @@ export function ConnectionSettings({
false: colors.border,
true: colors.primary + "80"
}}
- thumbColor={settings.isOfflineMode ? colors.primary : "#f4f3f4"}
+ thumbColor={settings.isOfflineMode ? colors.primary : colors.border}
/>
</View>
@@ -188,7 +192,6 @@ export function ConnectionSettings({
<Button
style={[
styles.testButton,
- { backgroundColor: colors.primary },
(!endpointInput || !isEndpointAllowed(endpointInput)) && styles.disabledButton
]}
onPress={() => {
@@ -196,7 +199,6 @@ export function ConnectionSettings({
handleTestEndpoint()
}}
title={testing ? "Testing..." : "Test Connection"}
- color="#f8f7f7"
/>
{testResponse && (
@@ -209,6 +211,7 @@ export function ConnectionSettings({
}
]}
>
+ {!testError && <CheckCircle size={16} color={colors.success} />}
<Text style={[styles.responseText, { color: testError ? colors.error : colors.success }]}>
{testResponse}
</Text>
@@ -228,7 +231,7 @@ export function ConnectionSettings({
Basic auth, bearer tokens, custom headers
</Text>
</View>
- <Text style={[styles.linkArrow, { color: colors.textLight }]}>β€Ί</Text>
+ <ChevronRight size={20} color={colors.textLight} />
</TouchableOpacity>
</>
)}
@@ -253,11 +256,12 @@ const styles = StyleSheet.create({
},
settingLabel: {
fontSize: 16,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 2
},
settingHint: {
fontSize: 13,
+ ...fonts.regular,
lineHeight: 18
},
inputGroup: {
@@ -271,7 +275,7 @@ const styles = StyleSheet.create({
},
inputLabel: {
fontSize: 15,
- fontWeight: "600"
+ ...fonts.semiBold
},
protocolBadge: {
paddingHorizontal: 10,
@@ -280,18 +284,16 @@ const styles = StyleSheet.create({
},
protocolText: {
fontSize: 11,
- fontWeight: "700"
+ ...fonts.bold
},
input: {
borderWidth: 1.5,
padding: 16,
borderRadius: 12,
- fontSize: 15
+ fontSize: 15,
+ ...fonts.regular
},
testButton: {
- padding: 16,
- borderRadius: 12,
- alignItems: "center",
marginTop: 12
},
disabledButton: {
@@ -302,11 +304,14 @@ const styles = StyleSheet.create({
padding: 14,
borderWidth: 1.5,
borderRadius: 12,
- alignItems: "center"
+ flexDirection: "row",
+ alignItems: "center",
+ justifyContent: "center",
+ gap: 8
},
responseText: {
fontSize: 14,
- fontWeight: "600"
+ ...fonts.semiBold
},
linkRow: {
flexDirection: "row",
@@ -319,25 +324,21 @@ const styles = StyleSheet.create({
},
linkLabel: {
fontSize: 16,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 2
},
linkSub: {
- fontSize: 13
- },
- linkArrow: {
- fontSize: 28,
- fontWeight: "300",
- marginLeft: 12
+ fontSize: 13,
+ ...fonts.regular
},
endpointHint: {
marginTop: 6,
fontSize: 12,
- fontWeight: "500"
+ ...fonts.medium
},
httpWarning: {
marginTop: 6,
fontSize: 12,
- fontWeight: "500"
+ ...fonts.medium
}
})
diff --git a/src/components/features/settings/PresetOption.tsx b/src/components/features/settings/PresetOption.tsx
index 564088c4..791d1f44 100644
--- a/src/components/features/settings/PresetOption.tsx
+++ b/src/components/features/settings/PresetOption.tsx
@@ -4,7 +4,9 @@
*/
import React from "react"
import { View, Text, StyleSheet, TouchableOpacity } from "react-native"
+import { Zap, Check } from "lucide-react-native"
import { ThemeColors, SelectablePreset, TRACKING_PRESETS } from "../../../types/global"
+import { fonts } from "../../../styles/typography"
interface PresetOptionProps {
preset: SelectablePreset
@@ -46,7 +48,6 @@ export function PresetOption({ preset, isSelected, onSelect, colors }: PresetOpt
<View style={styles.content}>
{/* Left side - Icon and text */}
<View style={styles.leftContent}>
- <Text style={styles.emoji}>{config.emoji}</Text>
<View style={styles.textContent}>
<View style={styles.titleRow}>
<Text style={[styles.label, { color: colors.text }]}>{config.label}</Text>
@@ -60,7 +61,10 @@ export function PresetOption({ preset, isSelected, onSelect, colors }: PresetOpt
}
]}
>
- <Text style={[styles.badgeText, { color: colors.success }]}>βœ“ Recommended</Text>
+ <View style={styles.badgeContent}>
+ <Check size={10} color={colors.success} />
+ <Text style={[styles.badgeText, { color: colors.success }]}>Recommended</Text>
+ </View>
</View>
)}
{showWarningBadge && (
@@ -73,7 +77,10 @@ export function PresetOption({ preset, isSelected, onSelect, colors }: PresetOpt
}
]}
>
- <Text style={[styles.badgeText, { color: colors.warning }]}>⚑ High Battery</Text>
+ <View style={styles.badgeContent}>
+ <Zap size={10} color={colors.warning} />
+ <Text style={[styles.badgeText, { color: colors.warning }]}>High Battery Usage</Text>
+ </View>
</View>
)}
</View>
@@ -124,8 +131,11 @@ const styles = StyleSheet.create({
alignItems: "center",
gap: 14
},
- emoji: {
- fontSize: 28
+ iconContainer: {
+ width: 28,
+ height: 28,
+ justifyContent: "center",
+ alignItems: "center"
},
textContent: {
flex: 1
@@ -139,7 +149,7 @@ const styles = StyleSheet.create({
},
label: {
fontSize: 16,
- fontWeight: "600",
+ ...fonts.semiBold,
letterSpacing: -0.2
},
badge: {
@@ -148,13 +158,19 @@ const styles = StyleSheet.create({
borderRadius: 6,
borderWidth: 1
},
+ badgeContent: {
+ flexDirection: "row",
+ alignItems: "center",
+ gap: 4
+ },
badgeText: {
fontSize: 10,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: 0.3
},
description: {
fontSize: 13,
+ ...fonts.regular,
lineHeight: 18
},
radio: {
diff --git a/src/components/features/settings/StatsCard.tsx b/src/components/features/settings/StatsCard.tsx
index 8af345d2..8907c781 100644
--- a/src/components/features/settings/StatsCard.tsx
+++ b/src/components/features/settings/StatsCard.tsx
@@ -4,8 +4,10 @@
*/
import React from "react"
import { View, Text, StyleSheet, TouchableOpacity } from "react-native"
+import { AlertTriangle, ChevronRight } from "lucide-react-native"
import { ThemeColors } from "../../../types/global"
import { getQueueColor } from "../../../utils/queueStatus"
+import { fonts } from "../../../styles/typography"
import { HIGH_QUEUE_THRESHOLD, CRITICAL_QUEUE_THRESHOLD } from "../../../constants"
interface StatsCardProps {
@@ -128,16 +130,7 @@ export function StatsCard({ queueCount, sentCount, interval, isOfflineMode, onMa
activeOpacity={0.7}
>
<View style={styles.warningContent}>
- <Text
- style={[
- styles.warningIcon,
- {
- color: warningLevel === "critical" ? colors.error : colors.warning
- }
- ]}
- >
- {warningLevel === "critical" ? "⚠️" : "⚠️"}
- </Text>
+ <AlertTriangle size={20} color={warningLevel === "critical" ? colors.error : colors.warning} />
<View style={styles.warningText}>
<Text
style={[
@@ -152,16 +145,7 @@ export function StatsCard({ queueCount, sentCount, interval, isOfflineMode, onMa
<Text style={[styles.warningHint, { color: colors.textSecondary }]}>Tap to manage data</Text>
</View>
</View>
- <Text
- style={[
- styles.arrow,
- {
- color: warningLevel === "critical" ? colors.error : colors.warning
- }
- ]}
- >
- β€Ί
- </Text>
+ <ChevronRight size={20} color={warningLevel === "critical" ? colors.error : colors.warning} />
</TouchableOpacity>
)}
</View>
@@ -192,19 +176,19 @@ const styles = StyleSheet.create({
},
statLabel: {
fontSize: 12,
- fontWeight: "600",
+ ...fonts.semiBold,
textTransform: "uppercase",
letterSpacing: 0.8,
marginBottom: 8
},
statValue: {
- fontSize: 26,
- fontWeight: "700",
+ fontSize: 24,
+ ...fonts.bold,
letterSpacing: -0.5
},
unit: {
fontSize: 16,
- fontWeight: "500"
+ ...fonts.medium
},
disabledHint: {
fontSize: 11,
@@ -230,7 +214,6 @@ const styles = StyleSheet.create({
flex: 1
},
warningIcon: {
- fontSize: 20,
marginRight: 12
},
warningText: {
@@ -238,15 +221,11 @@ const styles = StyleSheet.create({
},
warningTitle: {
fontSize: 14,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 2
},
warningHint: {
- fontSize: 12
- },
- arrow: {
- fontSize: 24,
- fontWeight: "300",
- marginLeft: 8
+ fontSize: 12,
+ ...fonts.regular
}
})
diff --git a/src/components/features/settings/SyncStrategySettings.tsx b/src/components/features/settings/SyncStrategySettings.tsx
index eb8ed31d..0418af60 100644
--- a/src/components/features/settings/SyncStrategySettings.tsx
+++ b/src/components/features/settings/SyncStrategySettings.tsx
@@ -5,7 +5,9 @@
import React, { useState, useCallback, useEffect } from "react"
import { Text, StyleSheet, Switch, View, TouchableOpacity } from "react-native"
+import { Lightbulb } from "lucide-react-native"
import { Settings, TRACKING_PRESETS, SyncPreset, SelectablePreset, ThemeColors } from "../../../types/global"
+import { fonts, fontSizes } from "../../../styles/typography"
import { SectionTitle, Card, Divider, NumericInput } from "../../index"
import { PresetOption } from "./PresetOption"
@@ -109,7 +111,7 @@ export function SyncStrategySettings({
return (
<View style={styles.section}>
- <SectionTitle>Sync Strategy</SectionTitle>
+ <SectionTitle>Tracking Configuration</SectionTitle>
<Card>
<View style={styles.presetsContainer}>
{(Object.keys(TRACKING_PRESETS) as SelectablePreset[]).map((preset, index) => (
@@ -134,7 +136,7 @@ export function SyncStrategySettings({
onPress={() => setShowAdvanced(!showAdvanced)}
activeOpacity={0.7}
>
- <Text style={[styles.advancedText, { color: colors.primary }]}>
+ <Text style={[styles.advancedText, { color: colors.primaryDark }]}>
{showAdvanced ? "βˆ’ Hide" : "+ Show"} Advanced Settings
</Text>
</TouchableOpacity>
@@ -153,7 +155,10 @@ export function SyncStrategySettings({
}
]}
>
- <Text style={[styles.customBannerText, { color: colors.info }]}>πŸ’‘ Using custom configuration</Text>
+ <View style={styles.bannerRow}>
+ <Lightbulb size={14} color={colors.info} />
+ <Text style={[styles.customBannerText, { color: colors.info }]}>Using custom configuration</Text>
+ </View>
</View>
)}
@@ -309,7 +314,7 @@ export function SyncStrategySettings({
</View>
<Text style={[styles.blockHint, styles.retryHint, { color: colors.textSecondary }]}>
{settings.maxRetries === 0
- ? "⚠️ Unlimited retries may cause queue buildup"
+ ? "Unlimited retries may cause queue buildup"
: `Give up after ${settings.maxRetries} failed attempts`}
</Text>
</View>
@@ -340,12 +345,12 @@ export function SyncStrategySettings({
false: colors.border,
true: colors.primary + "80"
}}
- thumbColor={settings.filterInaccurateLocations ? colors.primary : "#f4f3f4"}
+ thumbColor={settings.filterInaccurateLocations ? colors.primary : colors.border}
/>
</View>
{settings.filterInaccurateLocations && (
- <View style={styles.nestedSetting}>
+ <View style={[styles.nestedSetting, { borderLeftColor: colors.border }]}>
<NumericInput
label="Accuracy Threshold"
value={accuracyTresholdInput}
@@ -392,7 +397,7 @@ const styles = StyleSheet.create({
},
advancedText: {
fontSize: 15,
- fontWeight: "600"
+ ...fonts.semiBold
},
advancedPanel: {
marginTop: 16
@@ -403,16 +408,21 @@ const styles = StyleSheet.create({
marginBottom: 20,
borderLeftWidth: 4
},
+ bannerRow: {
+ flexDirection: "row",
+ alignItems: "center",
+ gap: 8
+ },
customBannerText: {
fontSize: 13,
- fontWeight: "500"
+ ...fonts.medium
},
paramGroup: {
marginBottom: 4
},
paramGroupTitle: {
fontSize: 13,
- fontWeight: "700",
+ ...fonts.bold,
textTransform: "uppercase",
letterSpacing: 1,
marginBottom: 16,
@@ -422,12 +432,13 @@ const styles = StyleSheet.create({
marginBottom: 20
},
blockLabel: {
- fontSize: 15,
- fontWeight: "600",
+ fontSize: fontSizes.label,
+ ...fonts.semiBold,
marginBottom: 4
},
blockHint: {
fontSize: 13,
+ ...fonts.regular,
marginBottom: 12,
lineHeight: 18
},
@@ -445,7 +456,7 @@ const styles = StyleSheet.create({
},
gridLabel: {
fontSize: 14,
- fontWeight: "600"
+ ...fonts.semiBold
},
retryGrid: {
flexDirection: "row",
@@ -460,7 +471,7 @@ const styles = StyleSheet.create({
},
retryChipText: {
fontSize: 16,
- fontWeight: "700"
+ ...fonts.bold
},
retryHint: {
marginTop: 8
@@ -477,17 +488,17 @@ const styles = StyleSheet.create({
},
settingLabel: {
fontSize: 16,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 2
},
settingHint: {
fontSize: 13,
+ ...fonts.regular,
lineHeight: 18
},
nestedSetting: {
marginTop: 12,
paddingLeft: 16,
- borderLeftWidth: 3,
- borderLeftColor: "rgba(0,0,0,0.1)"
+ borderLeftWidth: 3
}
})
diff --git a/src/components/index.ts b/src/components/index.ts
index 05cde870..eac32ac9 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -21,31 +21,27 @@ export { Divider } from "./ui/Divider"
export { NumericInput } from "./ui/NumericInput"
export { FloatingSaveIndicator } from "./ui/FloatingSaveIndicator"
export { Footer } from "./ui/Footer"
+export { SpinningLoader } from "./ui/SpinningLoader"
// ============================================================================
// Feature Components - Dashboard
// ============================================================================
export { DashboardMap } from "./features/dashboard/DashboardMap"
export { CoordinateDisplay } from "./features/dashboard/CoordinateDisplay"
-export { ComingSoonRibbon } from "./features/dashboard/ComingSoonRibbon"
export { QuickAccess } from "./features/dashboard/QuickAccess"
+export { ServerConnection } from "./features/dashboard/ServerConnection"
+export { WelcomeCard } from "./features/dashboard/WelcomeCard"
+export { DatabaseStatistics } from "./features/dashboard/DatabaseStatistics"
// ============================================================================
// Feature Components - Map
// ============================================================================
export { MapCenterButton } from "./features/map/MapCenterButton"
-// ============================================================================
-// Feature Components - Database
-// ============================================================================
-export { DatabaseStatistics } from "./features/databases/DatabaseStatistics"
-
// ============================================================================
// Feature Components - Settings
// ============================================================================
-export { ServerConnection } from "./features/settings/ServerConnection"
export { StatsCard } from "./features/settings/StatsCard"
export { PresetOption } from "./features/settings/PresetOption"
export { ConnectionSettings } from "./features/settings/ConnectionSettings"
export { SyncStrategySettings } from "./features/settings/SyncStrategySettings"
-export { WelcomeCard } from "./features/settings/WelcomeCard"
diff --git a/src/components/ui/Button.tsx b/src/components/ui/Button.tsx
index 22ba8cbf..f1b399b8 100644
--- a/src/components/ui/Button.tsx
+++ b/src/components/ui/Button.tsx
@@ -3,9 +3,23 @@
* Licensed under the GNU AGPLv3. See LICENSE in the project root for details.
*/
-import React from "react"
-import { TouchableOpacity, Text, StyleSheet, GestureResponderEvent, StyleProp, ViewStyle } from "react-native"
+import React, { useRef, useCallback } from "react"
+import {
+ TouchableOpacity,
+ Text,
+ View,
+ Animated,
+ ActivityIndicator,
+ StyleSheet,
+ GestureResponderEvent,
+ StyleProp,
+ ViewStyle
+} from "react-native"
import { useTheme } from "../../hooks/useTheme"
+import { fonts } from "../../styles/typography"
+import { type LucideIcon } from "lucide-react-native"
+
+type ButtonVariant = "primary" | "secondary" | "ghost" | "danger"
type Props = {
title: string
@@ -14,45 +28,106 @@ type Props = {
style?: StyleProp<ViewStyle>
activeOpacity?: number
color?: string
+ variant?: ButtonVariant
+ icon?: LucideIcon
+ loading?: boolean
}
-/**
- * Custom button component with theme support and disabled state.
- *
- * Features:
- * - Automatic theme color application
- * - Disabled state with visual feedback
- * - Customizable styling
- * - Touch feedback with opacity
- *
- * @example
- * ```tsx
- * <Button
- * title="Submit"
- * onPress={handleSubmit}
- * disabled={isLoading}
- * />
- * ```
- */
-export function Button({ title, onPress, disabled = false, style, activeOpacity, color }: Props) {
+export function Button({
+ title,
+ onPress,
+ disabled = false,
+ style,
+ activeOpacity,
+ color,
+ variant = "primary",
+ icon: Icon,
+ loading = false
+}: Props) {
const { colors } = useTheme()
+ const scale = useRef(new Animated.Value(1)).current
+
+ const handlePressIn = useCallback(() => {
+ Animated.spring(scale, {
+ toValue: 0.97,
+ useNativeDriver: true,
+ speed: 50,
+ bounciness: 4
+ }).start()
+ }, [scale])
+
+ const handlePressOut = useCallback(() => {
+ Animated.spring(scale, {
+ toValue: 1,
+ useNativeDriver: true,
+ speed: 50,
+ bounciness: 4
+ }).start()
+ }, [scale])
+
+ const getVariantStyles = () => {
+ switch (variant) {
+ case "primary":
+ return {
+ bg: disabled ? colors.textDisabled : colors.primary,
+ text: color ?? colors.textOnPrimary,
+ borderColor: "transparent",
+ borderWidth: 0
+ }
+ case "secondary":
+ return {
+ bg: "transparent",
+ text: color ?? colors.primaryDark,
+ borderColor: colors.primary,
+ borderWidth: 1.5
+ }
+ case "ghost":
+ return {
+ bg: "transparent",
+ text: color ?? colors.primaryDark,
+ borderColor: "transparent",
+ borderWidth: 0
+ }
+ case "danger":
+ return {
+ bg: disabled ? colors.textDisabled : colors.error,
+ text: color ?? colors.textOnPrimary,
+ borderColor: "transparent",
+ borderWidth: 0
+ }
+ }
+ }
+
+ const v = getVariantStyles()
return (
- <TouchableOpacity
- style={[
- styles.button,
- {
- backgroundColor: disabled ? colors.textDisabled : colors.primary,
- borderRadius: colors.borderRadius
- },
- style
- ]}
- onPress={onPress}
- disabled={disabled}
- activeOpacity={activeOpacity ? activeOpacity : 0.7}
- >
- <Text style={[styles.text, { color: color }]}>{title}</Text>
- </TouchableOpacity>
+ <Animated.View style={[{ transform: [{ scale }] }, style]}>
+ <TouchableOpacity
+ style={[
+ styles.button,
+ {
+ backgroundColor: v.bg,
+ borderColor: v.borderColor,
+ borderWidth: v.borderWidth,
+ borderRadius: colors.borderRadius
+ }
+ ]}
+ onPress={onPress}
+ onPressIn={handlePressIn}
+ onPressOut={handlePressOut}
+ disabled={disabled || loading}
+ activeOpacity={activeOpacity ?? 0.7}
+ >
+ <View style={styles.content}>
+ {loading ? (
+ <ActivityIndicator size="small" color={v.text} style={styles.icon} />
+ ) : Icon ? (
+ <Icon size={18} color={v.text} style={styles.icon} />
+ ) : null}
+ <Text style={[styles.text, { color: v.text }]}>{title}</Text>
+ </View>
+ </TouchableOpacity>
+ </Animated.View>
)
}
@@ -63,8 +138,16 @@ const styles = StyleSheet.create({
alignItems: "center",
marginVertical: 8
},
+ content: {
+ flexDirection: "row",
+ alignItems: "center",
+ gap: 8
+ },
text: {
fontSize: 16,
- fontWeight: "600"
+ ...fonts.semiBold
+ },
+ icon: {
+ marginRight: 0
}
})
diff --git a/src/components/ui/Card.tsx b/src/components/ui/Card.tsx
index 296a1da8..0ad40902 100644
--- a/src/components/ui/Card.tsx
+++ b/src/components/ui/Card.tsx
@@ -4,35 +4,75 @@
*/
import React from "react"
-import { View, StyleSheet, ViewStyle, StyleProp } from "react-native"
+import { View, TouchableOpacity, StyleSheet, ViewStyle, StyleProp } from "react-native"
import { useTheme } from "../../hooks/useTheme"
+type CardVariant = "default" | "elevated" | "outlined" | "interactive"
+
type CardProps = {
children: React.ReactNode
style?: StyleProp<ViewStyle>
danger?: boolean
+ variant?: CardVariant
+ onPress?: () => void
}
-export function Card({ children, style, danger = false }: CardProps) {
+export function Card({ children, style, danger = false, variant = "default", onPress }: CardProps) {
const { colors } = useTheme()
- const borderWidth = danger ? 2 : 1
-
- return (
- <View
- style={[
- styles.card,
- {
- backgroundColor: danger ? colors.error + "10" : colors.card,
- borderColor: danger ? colors.error : colors.border,
- borderWidth
- },
- style
- ]}
- >
- {children}
- </View>
- )
+ const getVariantStyles = (): ViewStyle => {
+ if (danger) {
+ return {
+ backgroundColor: colors.error + "10",
+ borderColor: colors.error,
+ borderWidth: 2
+ }
+ }
+
+ switch (variant) {
+ case "default":
+ return {
+ backgroundColor: colors.card,
+ borderColor: colors.border,
+ borderWidth: 1
+ }
+ case "elevated":
+ return {
+ backgroundColor: colors.cardElevated,
+ borderColor: "transparent",
+ borderWidth: 0,
+ elevation: 4,
+ shadowColor: "#000",
+ shadowOffset: { width: 0, height: 2 },
+ shadowOpacity: 0.15,
+ shadowRadius: 6
+ }
+ case "outlined":
+ return {
+ backgroundColor: "transparent",
+ borderColor: colors.border,
+ borderWidth: 1.5
+ }
+ case "interactive":
+ return {
+ backgroundColor: colors.card,
+ borderColor: colors.border,
+ borderWidth: 1
+ }
+ }
+ }
+
+ const cardView = <View style={[styles.card, getVariantStyles(), style]}>{children}</View>
+
+ if (variant === "interactive" && onPress) {
+ return (
+ <TouchableOpacity onPress={onPress} activeOpacity={0.7}>
+ {cardView}
+ </TouchableOpacity>
+ )
+ }
+
+ return cardView
}
const styles = StyleSheet.create({
diff --git a/src/components/ui/ErrorBoundary.tsx b/src/components/ui/ErrorBoundary.tsx
index 8be127e3..4a2eeb78 100644
--- a/src/components/ui/ErrorBoundary.tsx
+++ b/src/components/ui/ErrorBoundary.tsx
@@ -5,8 +5,10 @@
import React, { Component } from "react"
import { View, Text, StyleSheet, TouchableOpacity } from "react-native"
import { ThemeColors } from "../../types/global"
+import { useTheme } from "../../hooks/useTheme"
+import { fonts, fontSizes } from "../../styles/typography"
-interface ErrorBoundaryProps {
+interface ErrorBoundaryInternalProps {
children: React.ReactNode
colors: ThemeColors
}
@@ -16,8 +18,8 @@ interface ErrorBoundaryState {
error: Error | null
}
-class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
- constructor(props: ErrorBoundaryProps) {
+class ErrorBoundaryInternal extends Component<ErrorBoundaryInternalProps, ErrorBoundaryState> {
+ constructor(props: ErrorBoundaryInternalProps) {
super(props)
this.state = { hasError: false, error: null }
}
@@ -27,11 +29,7 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
}
componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
- // Log to error reporting service (e.g., Sentry, Crashlytics)
console.error("ErrorBoundary caught an error:", error, errorInfo)
-
- // You can add error tracking here:
- // Sentry.captureException(error);
}
handleReset = () => {
@@ -52,7 +50,7 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
style={[styles.errorButton, { backgroundColor: colors.primary }]}
onPress={this.handleReset}
>
- <Text style={styles.errorButtonText}>Try Again</Text>
+ <Text style={[styles.errorButtonText, { color: colors.textOnPrimary }]}>Try Again</Text>
</TouchableOpacity>
</View>
)
@@ -62,6 +60,15 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
}
}
+interface ErrorBoundaryProps {
+ children: React.ReactNode
+}
+
+export function ErrorBoundary({ children }: ErrorBoundaryProps) {
+ const { colors } = useTheme()
+ return <ErrorBoundaryInternal colors={colors}>{children}</ErrorBoundaryInternal>
+}
+
const styles = StyleSheet.create({
errorContainer: {
flex: 1,
@@ -70,12 +77,12 @@ const styles = StyleSheet.create({
padding: 20
},
errorTitle: {
- fontSize: 24,
- fontWeight: "bold",
+ fontSize: fontSizes.screenTitle,
+ ...fonts.bold,
marginBottom: 10
},
errorMessage: {
- fontSize: 16,
+ fontSize: fontSizes.label,
textAlign: "center",
marginBottom: 20,
paddingHorizontal: 20
@@ -86,10 +93,7 @@ const styles = StyleSheet.create({
borderRadius: 8
},
errorButtonText: {
- fontSize: 16,
- color: "#fff",
- fontWeight: "600"
+ fontSize: fontSizes.label,
+ ...fonts.semiBold
}
})
-
-export default ErrorBoundary
diff --git a/src/components/ui/FloatingSaveIndicator.tsx b/src/components/ui/FloatingSaveIndicator.tsx
index 06af089e..1c753099 100644
--- a/src/components/ui/FloatingSaveIndicator.tsx
+++ b/src/components/ui/FloatingSaveIndicator.tsx
@@ -3,8 +3,11 @@
* Licensed under the GNU AGPLv3. See LICENSE in the project root for details.
*/
-import React from "react"
-import { View, Text, StyleSheet } from "react-native"
+import React, { useEffect, useRef } from "react"
+import { View, Text, StyleSheet, Animated } from "react-native"
+import { Check } from "lucide-react-native"
+import { SpinningLoader } from "./SpinningLoader"
+import { fonts } from "../../styles/typography"
interface Props {
saving: boolean
@@ -22,12 +25,27 @@ export const FloatingSaveIndicator: React.FC<Props> = ({ saving, success, messag
const hasMessage = message != null
const visible = hasMessage || saving || success
- if (!visible) return null
+ const translateY = useRef(new Animated.Value(60)).current
+ const opacity = useRef(new Animated.Value(0)).current
- const displayText = hasMessage ? message : saving ? "⏳ Saving & restarting..." : "βœ“ Saved"
+ useEffect(() => {
+ if (visible) {
+ Animated.parallel([
+ Animated.spring(translateY, { toValue: 0, useNativeDriver: true, friction: 8 }),
+ Animated.timing(opacity, { toValue: 1, duration: 200, useNativeDriver: true })
+ ]).start()
+ } else {
+ Animated.parallel([
+ Animated.timing(translateY, { toValue: 60, duration: 200, useNativeDriver: true }),
+ Animated.timing(opacity, { toValue: 0, duration: 200, useNativeDriver: true })
+ ]).start()
+ }
+ }, [visible, translateY, opacity])
+
+ const displayText = hasMessage ? message : saving ? "Saving & restarting..." : "Saved"
return (
- <View style={styles.container}>
+ <Animated.View style={[styles.container, { opacity, transform: [{ translateY }] }]} pointerEvents="none">
<View
style={[
styles.badge,
@@ -37,9 +55,14 @@ export const FloatingSaveIndicator: React.FC<Props> = ({ saving, success, messag
}
]}
>
+ {saving ? (
+ <SpinningLoader size={16} color={colors.text} />
+ ) : !hasMessage ? (
+ <Check size={16} color={colors.text} />
+ ) : null}
<Text style={[styles.text, { color: colors.text }]}>{displayText}</Text>
</View>
- </View>
+ </Animated.View>
)
}
@@ -54,6 +77,9 @@ const styles = StyleSheet.create({
pointerEvents: "none"
},
badge: {
+ flexDirection: "row",
+ alignItems: "center",
+ gap: 8,
paddingHorizontal: 20,
paddingVertical: 12,
borderRadius: 24,
@@ -62,5 +88,5 @@ const styles = StyleSheet.create({
shadowRadius: 8,
elevation: 8
},
- text: { fontSize: 14, fontWeight: "600" }
+ text: { fontSize: 14, ...fonts.semiBold }
})
diff --git a/src/components/ui/Footer.tsx b/src/components/ui/Footer.tsx
index 86911782..5c223f85 100644
--- a/src/components/ui/Footer.tsx
+++ b/src/components/ui/Footer.tsx
@@ -6,17 +6,13 @@
import React from "react"
import { View, Text, StyleSheet } from "react-native"
import { useTheme } from "../../hooks/useTheme"
+import { fonts } from "../../styles/typography"
export function Footer() {
const { colors } = useTheme()
return (
<View style={styles.footer}>
- <Text style={[styles.privacyText, { color: colors.textSecondary }]}>
- πŸ”’ All data stays on your device and server
- </Text>
- <Text style={[styles.taglineText, { color: colors.textLight }]}>Open source Β· Self-hosted Β· Privacy-first</Text>
- <View style={styles.divider} />
<Text style={[styles.copyright, { color: colors.textLight }]}>Β© 2026 Max Dietrich</Text>
</View>
)
@@ -26,28 +22,10 @@ const styles = StyleSheet.create({
footer: {
marginTop: 32,
marginBottom: 16,
- alignItems: "center",
- gap: 8
- },
- privacyText: {
- fontSize: 14,
- textAlign: "center",
- fontWeight: "500"
- },
- taglineText: {
- fontSize: 12,
- textAlign: "center",
- letterSpacing: 0.5
- },
- divider: {
- width: 40,
- height: 1,
- backgroundColor: "#666",
- opacity: 0.3,
- marginVertical: 4
+ alignItems: "center"
},
copyright: {
- fontSize: 11,
- opacity: 0.7
+ fontSize: 12,
+ ...fonts.regular
}
})
diff --git a/src/components/ui/NumericInput.tsx b/src/components/ui/NumericInput.tsx
index 36b661bb..56902009 100644
--- a/src/components/ui/NumericInput.tsx
+++ b/src/components/ui/NumericInput.tsx
@@ -6,6 +6,7 @@
import React from "react"
import { View, Text, StyleSheet, TextInput } from "react-native"
import { ThemeColors } from "../../types/global"
+import { fonts } from "../../styles/typography"
interface NumericInputProps {
label: string
@@ -79,7 +80,7 @@ const styles = StyleSheet.create({
},
label: {
fontSize: 14,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 8
},
hint: {
@@ -102,6 +103,7 @@ const styles = StyleSheet.create({
},
unit: {
fontSize: 15,
- fontWeight: "500"
+ ...fonts.medium,
+ minWidth: 64
}
})
diff --git a/src/components/ui/SectionTitle.tsx b/src/components/ui/SectionTitle.tsx
index 4a7d6000..763a964c 100644
--- a/src/components/ui/SectionTitle.tsx
+++ b/src/components/ui/SectionTitle.tsx
@@ -6,6 +6,7 @@
import React from "react"
import { View, StyleSheet, ViewStyle, StyleProp, Text } from "react-native"
import { useTheme } from "../../hooks/useTheme"
+import { fonts } from "../../styles/typography"
type SectionTitleProps = {
children: React.ReactNode
@@ -27,7 +28,7 @@ const styles = StyleSheet.create({
sectionTitle: {
fontSize: 11,
textTransform: "uppercase",
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: 1.2,
marginBottom: 12,
paddingHorizontal: 4
diff --git a/src/components/ui/SpinningLoader.tsx b/src/components/ui/SpinningLoader.tsx
new file mode 100644
index 00000000..f8975724
--- /dev/null
+++ b/src/components/ui/SpinningLoader.tsx
@@ -0,0 +1,41 @@
+/**
+ * Copyright (C) 2026 Max Dietrich
+ * Licensed under the GNU AGPLv3. See LICENSE in the project root for details.
+ */
+
+import React, { useEffect, useRef } from "react"
+import { Animated, Easing } from "react-native"
+import { Loader } from "lucide-react-native"
+
+type Props = {
+ size?: number
+ color?: string
+}
+
+export function SpinningLoader({ size = 16, color = "#fff" }: Props) {
+ const rotation = useRef(new Animated.Value(0)).current
+
+ useEffect(() => {
+ const animation = Animated.loop(
+ Animated.timing(rotation, {
+ toValue: 1,
+ duration: 1000,
+ easing: Easing.linear,
+ useNativeDriver: true
+ })
+ )
+ animation.start()
+ return () => animation.stop()
+ }, [rotation])
+
+ const spin = rotation.interpolate({
+ inputRange: [0, 1],
+ outputRange: ["0deg", "360deg"]
+ })
+
+ return (
+ <Animated.View style={{ transform: [{ rotate: spin }] }}>
+ <Loader size={size} color={color} />
+ </Animated.View>
+ )
+}
diff --git a/src/components/ui/ThemedErrorBoundary.tsx b/src/components/ui/ThemedErrorBoundary.tsx
deleted file mode 100644
index 601f850d..00000000
--- a/src/components/ui/ThemedErrorBoundary.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (C) 2026 Max Dietrich
- * Licensed under the GNU AGPLv3. See LICENSE in the project root for details.
- */
-import React from "react"
-import { useTheme } from "../../hooks/useTheme"
-import ErrorBoundary from "./ErrorBoundary"
-
-interface ThemedErrorBoundaryProps {
- children: React.ReactNode
-}
-
-const ThemedErrorBoundary: React.FC<ThemedErrorBoundaryProps> = ({ children }) => {
- const { colors } = useTheme()
-
- return <ErrorBoundary colors={colors}>{children}</ErrorBoundary>
-}
-
-export default ThemedErrorBoundary
diff --git a/src/screens/AboutScreen.tsx b/src/screens/AboutScreen.tsx
index 041a8e1c..7358a6b4 100644
--- a/src/screens/AboutScreen.tsx
+++ b/src/screens/AboutScreen.tsx
@@ -7,7 +7,9 @@ import React, { useState, useEffect } from "react"
import { Text, StyleSheet, View, ScrollView, Linking, TouchableOpacity, Image } from "react-native"
import { ScreenProps, ThemeColors } from "../types/global"
import { useTheme } from "../hooks/useTheme"
-import { SectionTitle, Card, Container, Divider, Footer } from "../components"
+import { ChevronRight, Bug, FileText, Code, ScrollText } from "lucide-react-native"
+import { fonts } from "../styles/typography"
+import { Card, Container, Divider, Footer } from "../components"
import NativeLocationService from "../services/NativeLocationService"
import icon from "../assets/icons/icon.png"
import { REPO_URL, PRIVACY_POLICY_URL } from "../constants"
@@ -33,35 +35,28 @@ function getAndroidVersion(sdkVersion: number): string {
return versions[sdkVersion] || "Unknown"
}
-// Moved outside of AboutScreen component
-const LinkButton = ({
- iconLabel,
+const LinkRow = ({
+ icon: Icon,
title,
subtitle,
url,
colors,
onOpenURL
}: {
- iconLabel: string
+ icon: React.ComponentType<{ size: number; color: string }>
title: string
subtitle: string
url: string
colors: ThemeColors
onOpenURL: (url: string) => void
}) => (
- <TouchableOpacity
- style={[styles.linkButton, { backgroundColor: colors.background }]}
- onPress={() => onOpenURL(url)}
- activeOpacity={0.7}
- >
- <View style={styles.linkContent}>
- <Text style={styles.linkIcon}>{iconLabel}</Text>
- <View style={styles.linkTextContainer}>
- <Text style={[styles.linkTitle, { color: colors.text }]}>{title}</Text>
- <Text style={[styles.linkSubtitle, { color: colors.textSecondary }]}>{subtitle}</Text>
- </View>
- <Text style={[styles.chevron, { color: colors.textLight }]}>β€Ί</Text>
+ <TouchableOpacity style={styles.linkRow} onPress={() => onOpenURL(url)} activeOpacity={0.7}>
+ <Icon size={20} color={colors.primaryDark} />
+ <View style={styles.linkTextContainer}>
+ <Text style={[styles.linkTitle, { color: colors.text }]}>{title}</Text>
+ <Text style={[styles.linkSubtitle, { color: colors.textLight }]}>{subtitle}</Text>
</View>
+ <ChevronRight size={18} color={colors.textLight} />
</TouchableOpacity>
)
@@ -138,7 +133,6 @@ export function AboutScreen({}: ScreenProps) {
<ScrollView contentContainerStyle={styles.scrollContent}>
<View style={styles.header}>
<Text style={[styles.title, { color: colors.text }]}>Colota</Text>
- <Text style={[styles.subtitle, { color: colors.textSecondary }]}>Build configuration unavailable</Text>
</View>
</ScrollView>
</Container>
@@ -148,20 +142,14 @@ export function AboutScreen({}: ScreenProps) {
return (
<Container>
<ScrollView contentContainerStyle={styles.scrollContent}>
- {/* App Icon & Header */}
+ {/* Header */}
<View style={styles.header}>
<TouchableOpacity style={styles.appIconContainer} onPress={handleVersionTap} activeOpacity={0.8}>
<Image source={icon} style={styles.appIcon} resizeMode="contain" />
</TouchableOpacity>
<Text style={[styles.title, { color: colors.text }]}>Colota</Text>
- <TouchableOpacity
- style={[styles.versionBadge, { backgroundColor: colors.success }]}
- onPress={handleVersionTap}
- activeOpacity={0.8}
- >
- <Text style={styles.versionText}>
- v{buildConfig.VERSION_NAME} ({buildConfig.VERSION_CODE})
- </Text>
+ <TouchableOpacity onPress={handleVersionTap} activeOpacity={0.8}>
+ <Text style={[styles.version, { color: colors.textSecondary }]}>Version {buildConfig.VERSION_NAME}</Text>
</TouchableOpacity>
{/* Tap counter hint */}
@@ -172,82 +160,51 @@ export function AboutScreen({}: ScreenProps) {
)}
{showDebugInfo && (
- <TouchableOpacity onPress={() => setShowDebugInfo(false)} style={styles.debugBadge}>
- <Text style={styles.debugText}>πŸ› Debug Mode (tap to hide)</Text>
+ <TouchableOpacity
+ onPress={() => setShowDebugInfo(false)}
+ style={[styles.debugBadge, { backgroundColor: colors.warning + "20" }]}
+ >
+ <Bug size={14} color={colors.warning} />
+ <Text style={[styles.debugText, { color: colors.warning }]}>Debug Mode (tap to hide)</Text>
</TouchableOpacity>
)}
</View>
- {/* Description Card */}
- <Card style={styles.descriptionCard}>
- <Text style={[styles.tagline, { color: colors.primary }]}>Privacy-First Location Tracking</Text>
- <Text style={[styles.description, { color: colors.text }]}>
- A GPS location tracking client built for selfhosted backends. Modern Android{" "}
- {getAndroidVersion(buildConfig.TARGET_SDK_VERSION)} standards with battery efficiency and data sovereignty
- at its core.
- </Text>
- </Card>
-
- {/* Quick Links */}
- <View style={styles.section}>
- <SectionTitle>QUICK LINKS</SectionTitle>
- <LinkButton
- iconLabel="πŸ“„"
+ {/* Links */}
+ <Card>
+ <LinkRow
+ icon={FileText}
title="Privacy Policy"
- subtitle="How your data is handled"
+ subtitle={PRIVACY_POLICY_URL}
url={PRIVACY_POLICY_URL}
colors={colors}
onOpenURL={handleOpenURL}
/>
- <LinkButton
- iconLabel="πŸ’»"
- title="View Source Code"
- subtitle="GitHub Repository"
+ <Divider />
+ <LinkRow
+ icon={Code}
+ title="Source Code"
+ subtitle="github.com/dietrichmax/colota"
url={REPO_URL}
colors={colors}
onOpenURL={handleOpenURL}
/>
- </View>
-
- {/* License Section */}
-
- <TouchableOpacity
- style={[styles.linkButton, { backgroundColor: colors.background }]}
- onPress={() => handleOpenURL("https://github.com/dietrichmax/colota/blob/main/LICENSE")}
- activeOpacity={0.7}
- >
- <View style={styles.section}>
- <SectionTitle>LICENSE</SectionTitle>
- <Card>
- <View style={styles.licenseHeader}>
- <Text style={[styles.licenseBadge, { color: colors.primary }]}>πŸ“œ GNU AGPLv3</Text>
- </View>
- <Text style={[styles.licenseText, { color: colors.textSecondary }]}>
- Free and open-source software. You're free to inspect, modify, and redistribute the code. Network-based
- modifications must be shared with the community.
- </Text>
- </Card>
- </View>
- </TouchableOpacity>
-
- {/* Tech Info - App Version */}
- <View style={styles.section}>
- <SectionTitle>APP VERSION</SectionTitle>
- <Card>
- <TechRow label="Version" value={`${buildConfig.VERSION_NAME}`} colors={colors} />
- <TechRow label="Build" value={`${buildConfig.VERSION_CODE}`} colors={colors} />
- <View style={styles.techRow}>
- <Text style={[styles.techLabel, { color: colors.textSecondary }]}>Framework</Text>
- <Text style={[styles.techValue, { color: colors.text }]}>React Native</Text>
- </View>
- </Card>
- </View>
+ <Divider />
+ <LinkRow
+ icon={ScrollText}
+ title="License"
+ subtitle="GNU AGPLv3"
+ url={`${REPO_URL}/blob/main/LICENSE`}
+ colors={colors}
+ onOpenURL={handleOpenURL}
+ />
+ </Card>
{/* Debug Info - Only shown when enabled */}
{showDebugInfo && (
<>
- <View style={styles.section}>
- <SectionTitle>πŸ› DEBUG: BUILD CONFIGURATION</SectionTitle>
+ <View style={styles.debugSection}>
+ <Text style={[styles.debugSectionTitle, { color: colors.textLight }]}>Build</Text>
<Card>
<TechRow
label="Target SDK"
@@ -263,21 +220,21 @@ export function AboutScreen({}: ScreenProps) {
/>
<TechRow label="Compile SDK" value={buildConfig.COMPILE_SDK_VERSION.toString()} colors={colors} />
<TechRow label="Build Tools" value={buildConfig.BUILD_TOOLS_VERSION} colors={colors} />
- <TechRow label="Kotlin Version" value={buildConfig.KOTLIN_VERSION} colors={colors} />
+ <TechRow label="Kotlin" value={buildConfig.KOTLIN_VERSION} colors={colors} />
<View style={styles.techRow}>
- <Text style={[styles.techLabel, { color: colors.textSecondary }]}>NDK Version</Text>
+ <Text style={[styles.techLabel, { color: colors.textSecondary }]}>NDK</Text>
<Text style={[styles.techValue, { color: colors.text }]}>{buildConfig.NDK_VERSION}</Text>
</View>
</Card>
</View>
- <View style={styles.section}>
- <SectionTitle>πŸ› DEBUG: DEVICE INFORMATION</SectionTitle>
+ <View style={styles.debugSection}>
+ <Text style={[styles.debugSectionTitle, { color: colors.textLight }]}>Device</Text>
<Card>
- <TechRow label="OS Version" value={`Android ${deviceInfo.systemVersion}`} colors={colors} />
+ <TechRow label="OS" value={`Android ${deviceInfo.systemVersion}`} colors={colors} />
<TechRow label="API Level" value={deviceInfo.apiLevel} colors={colors} />
- <TechRow label="Device Model" value={deviceInfo.model} colors={colors} />
- <TechRow label="Device Brand" value={deviceInfo.brand} colors={colors} />
+ <TechRow label="Model" value={deviceInfo.model} colors={colors} />
+ <TechRow label="Brand" value={deviceInfo.brand} colors={colors} />
<View style={styles.techRow}>
<Text style={[styles.techLabel, { color: colors.textSecondary }]}>Device ID</Text>
<Text style={[styles.techValue, { color: colors.text }]}>{deviceInfo.deviceId}</Text>
@@ -287,7 +244,6 @@ export function AboutScreen({}: ScreenProps) {
</>
)}
- {/* Footer */}
<Footer />
</ScrollView>
</Container>
@@ -302,7 +258,7 @@ const styles = StyleSheet.create({
},
header: {
marginTop: 20,
- marginBottom: 28,
+ marginBottom: 24,
alignItems: "center"
},
appIconContainer: {
@@ -319,79 +275,30 @@ const styles = StyleSheet.create({
height: 80
},
title: {
- fontSize: 32,
- fontWeight: "700",
- marginBottom: 8
- },
- subtitle: {
- fontSize: 14,
- fontWeight: "500"
- },
- versionBadge: {
- paddingHorizontal: 12,
- paddingVertical: 4,
- borderRadius: 12
- },
- versionText: {
- color: "#FFFFFF",
- fontSize: 12,
- fontWeight: "600"
- },
- descriptionCard: {
- marginBottom: 24
- },
- tagline: {
- fontSize: 17,
- fontWeight: "700",
- marginBottom: 8
- },
- description: {
- fontSize: 15,
- lineHeight: 22
+ fontSize: 28,
+ ...fonts.bold,
+ marginBottom: 4
},
- section: {
- marginBottom: 24
+ version: {
+ fontSize: 13,
+ ...fonts.regular
},
- linkButton: {
- borderRadius: 12,
- marginBottom: 8,
- overflow: "hidden"
- },
- linkContent: {
+ linkRow: {
flexDirection: "row",
alignItems: "center",
- padding: 16
- },
- linkIcon: {
- fontSize: 28,
- marginRight: 16
+ paddingVertical: 14,
+ gap: 12
},
linkTextContainer: {
flex: 1
},
linkTitle: {
- fontSize: 16,
- fontWeight: "600",
- marginBottom: 2
+ fontSize: 15,
+ ...fonts.semiBold
},
linkSubtitle: {
- fontSize: 13
- },
- chevron: {
- fontSize: 28,
- fontWeight: "300",
- marginLeft: 8
- },
- licenseHeader: {
- marginBottom: 12
- },
- licenseBadge: {
- fontSize: 16,
- fontWeight: "700"
- },
- licenseText: {
- fontSize: 14,
- lineHeight: 20
+ fontSize: 12,
+ marginTop: 1
},
techRow: {
flexDirection: "row",
@@ -401,11 +308,21 @@ const styles = StyleSheet.create({
},
techLabel: {
fontSize: 14,
- fontWeight: "500"
+ ...fonts.medium
},
techValue: {
fontSize: 14,
- fontWeight: "600"
+ ...fonts.semiBold
+ },
+ debugSection: {
+ marginTop: 24
+ },
+ debugSectionTitle: {
+ fontSize: 12,
+ ...fonts.semiBold,
+ textTransform: "uppercase",
+ letterSpacing: 0.5,
+ marginBottom: 8
},
debugHint: {
fontSize: 11,
@@ -416,12 +333,13 @@ const styles = StyleSheet.create({
marginTop: 12,
paddingHorizontal: 12,
paddingVertical: 6,
- backgroundColor: "rgba(255, 152, 0, 0.2)",
- borderRadius: 8
+ borderRadius: 8,
+ flexDirection: "row" as const,
+ alignItems: "center" as const,
+ gap: 6
},
debugText: {
fontSize: 12,
- color: "#FF9800",
- fontWeight: "600"
+ ...fonts.semiBold
}
})
diff --git a/src/screens/ApiSettingsScreen.tsx b/src/screens/ApiSettingsScreen.tsx
index c0843992..9c6a6fa9 100644
--- a/src/screens/ApiSettingsScreen.tsx
+++ b/src/screens/ApiSettingsScreen.tsx
@@ -9,6 +9,7 @@ import { FieldMap, DEFAULT_FIELD_MAP, ScreenProps, CustomField, ApiTemplateName,
import { useTheme } from "../hooks/useTheme"
import { useAutoSave } from "../hooks/useAutoSave"
import { useTracking } from "../contexts/TrackingProvider"
+import { fonts } from "../styles/typography"
import { SectionTitle, FloatingSaveIndicator, Container, Divider } from "../components"
/** Field descriptions for UI display */
@@ -308,7 +309,7 @@ export function ApiSettingsScreen({}: ScreenProps) {
<SectionTitle>FIELD MAPPINGS</SectionTitle>
{hasModifications && (
<TouchableOpacity onPress={handleResetAll} style={styles.resetAllButton}>
- <Text style={[styles.resetAllText, { color: colors.primary }]}>RESET ALL</Text>
+ <Text style={[styles.resetAllText, { color: colors.primaryDark }]}>RESET ALL</Text>
</TouchableOpacity>
)}
</View>
@@ -324,7 +325,7 @@ export function ApiSettingsScreen({}: ScreenProps) {
<Text style={[styles.fieldLabel, { color: colors.text }]}>{key.toUpperCase()}</Text>
{isModified(key) && (
<View style={[styles.modifiedBadge, { backgroundColor: colors.primary }]}>
- <Text style={styles.modifiedText}>Modified</Text>
+ <Text style={[styles.modifiedText, { color: colors.textOnPrimary }]}>Modified</Text>
</View>
)}
</View>
@@ -430,7 +431,7 @@ export function ApiSettingsScreen({}: ScreenProps) {
)}
<TouchableOpacity onPress={handleAddCustomField} style={[styles.addButton, { borderColor: colors.border }]}>
- <Text style={[styles.addButtonText, { color: colors.primary }]}>+ Add Field</Text>
+ <Text style={[styles.addButtonText, { color: colors.primaryDark }]}>+ Add Field</Text>
</TouchableOpacity>
</View>
</View>
@@ -476,7 +477,7 @@ const styles = StyleSheet.create({
},
title: {
fontSize: 28,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: -0.5,
marginBottom: 4
},
@@ -500,7 +501,7 @@ const styles = StyleSheet.create({
},
chipText: {
fontSize: 12,
- fontWeight: "700"
+ ...fonts.bold
},
templateHint: {
fontSize: 12,
@@ -520,7 +521,7 @@ const styles = StyleSheet.create({
},
resetAllText: {
fontSize: 11,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: 0.5
},
fieldsCard: {
@@ -545,7 +546,7 @@ const styles = StyleSheet.create({
},
fieldLabel: {
fontSize: 13,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: 0.5
},
modifiedBadge: {
@@ -555,8 +556,7 @@ const styles = StyleSheet.create({
},
modifiedText: {
fontSize: 9,
- fontWeight: "700",
- color: "#FFFFFF",
+ ...fonts.bold,
letterSpacing: 0.3
},
fieldDescription: {
@@ -590,7 +590,7 @@ const styles = StyleSheet.create({
},
resetIcon: {
fontSize: 18,
- fontWeight: "600"
+ ...fonts.semiBold
},
customFieldRow: {
flexDirection: "row",
@@ -616,7 +616,7 @@ const styles = StyleSheet.create({
},
removeButtonText: {
fontSize: 13,
- fontWeight: "700"
+ ...fonts.bold
},
addButton: {
paddingVertical: 12,
@@ -628,7 +628,7 @@ const styles = StyleSheet.create({
},
addButtonText: {
fontSize: 14,
- fontWeight: "600"
+ ...fonts.semiBold
},
emptyHint: {
fontSize: 13,
diff --git a/src/screens/AuthSettingsScreen.tsx b/src/screens/AuthSettingsScreen.tsx
index 9fa90fb2..97640bd3 100644
--- a/src/screens/AuthSettingsScreen.tsx
+++ b/src/screens/AuthSettingsScreen.tsx
@@ -9,6 +9,7 @@ import { AuthConfig, AuthType, DEFAULT_AUTH_CONFIG, ScreenProps } from "../types
import { useTheme } from "../hooks/useTheme"
import { useAutoSave } from "../hooks/useAutoSave"
import { useTracking } from "../contexts/TrackingProvider"
+import { fonts, fontSizes } from "../styles/typography"
import { SectionTitle, FloatingSaveIndicator, Container, Card, Divider } from "../components"
import NativeLocationService from "../services/NativeLocationService"
@@ -175,7 +176,7 @@ export function AuthSettingsScreen({}: ScreenProps) {
style={[
styles.chipText,
{
- color: isSelected ? colors.primary : colors.text
+ color: isSelected ? colors.primaryDark : colors.text
}
]}
>
@@ -324,7 +325,7 @@ export function AuthSettingsScreen({}: ScreenProps) {
onPress={addHeader}
activeOpacity={0.7}
>
- <Text style={[styles.addButtonText, { color: colors.primary }]}>+ Add Header</Text>
+ <Text style={[styles.addButtonText, { color: colors.primaryDark }]}>+ Add Header</Text>
</TouchableOpacity>
<Text style={[styles.hint, { color: colors.textSecondary }]}>
@@ -348,7 +349,7 @@ export function AuthSettingsScreen({}: ScreenProps) {
const styles = StyleSheet.create({
scrollContent: {
- paddingHorizontal: 20,
+ paddingHorizontal: 16,
paddingTop: 16,
paddingBottom: 40
},
@@ -358,19 +359,21 @@ const styles = StyleSheet.create({
alignItems: "center"
},
loadingText: {
- fontSize: 15
+ fontSize: 15,
+ ...fonts.regular
},
header: {
marginBottom: 20
},
title: {
fontSize: 28,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: -0.5,
marginBottom: 4
},
subtitle: {
fontSize: 14,
+ ...fonts.regular,
lineHeight: 20
},
section: {
@@ -389,14 +392,14 @@ const styles = StyleSheet.create({
},
chipText: {
fontSize: 13,
- fontWeight: "700"
+ ...fonts.bold
},
fieldGroup: {
marginTop: 4
},
fieldLabel: {
- fontSize: 15,
- fontWeight: "600",
+ fontSize: fontSizes.label,
+ ...fonts.semiBold,
marginBottom: 8
},
fieldLabelSpaced: {
@@ -438,7 +441,7 @@ const styles = StyleSheet.create({
},
removeButtonText: {
fontSize: 14,
- fontWeight: "700"
+ ...fonts.bold
},
addButton: {
paddingVertical: 14,
@@ -450,7 +453,7 @@ const styles = StyleSheet.create({
},
addButtonText: {
fontSize: 15,
- fontWeight: "600"
+ ...fonts.semiBold
},
hint: {
fontSize: 12,
diff --git a/src/screens/DashboardScreen.tsx b/src/screens/DashboardScreen.tsx
index 2ea3b7f5..a25ee892 100644
--- a/src/screens/DashboardScreen.tsx
+++ b/src/screens/DashboardScreen.tsx
@@ -21,6 +21,7 @@ import {
WelcomeCard
} from "../components"
import { STATS_REFRESH_IDLE } from "../constants"
+import { Square, Play } from "lucide-react-native"
export function DashboardScreen({ navigation }: ScreenProps) {
const { coords, settings, tracking, startTracking, stopTracking, setSettings } = useTracking()
@@ -170,17 +171,12 @@ export function DashboardScreen({ navigation }: ScreenProps) {
pointerEvents="box-none"
>
<Button
- style={[
- styles.controlButton,
- {
- backgroundColor: tracking ? colors.error : colors.primary,
- shadowColor: tracking ? colors.error : colors.primary
- }
- ]}
- color="#f8f7f7"
+ style={styles.controlButton}
+ variant={tracking ? "danger" : "primary"}
+ icon={tracking ? Square : Play}
onPress={tracking ? handleStop : handleStart}
activeOpacity={0.9}
- title={tracking ? "β–  Stop Tracking" : "β–Ά Start Tracking"}
+ title={tracking ? "Stop Tracking" : "Start Tracking"}
/>
</Animated.View>
</View>
@@ -244,17 +240,10 @@ const styles = StyleSheet.create({
alignItems: "center"
},
controlButton: {
- flexDirection: "row",
- alignItems: "center",
- justifyContent: "center",
- paddingHorizontal: 36,
- paddingVertical: 16,
borderRadius: 28,
- shadowOffset: { width: 0, height: 6 },
- shadowOpacity: 0.4,
- shadowRadius: 12,
- elevation: 12,
- minWidth: 200
+ elevation: 4,
+ minWidth: 200,
+ shadowColor: "#000"
},
content: {
flex: 1,
diff --git a/src/screens/DataManagementScreen.tsx b/src/screens/DataManagementScreen.tsx
index 901c467e..7bbb76d7 100644
--- a/src/screens/DataManagementScreen.tsx
+++ b/src/screens/DataManagementScreen.tsx
@@ -14,9 +14,11 @@ import {
KeyboardAvoidingView,
Platform
} from "react-native"
+import { Lightbulb } from "lucide-react-native"
import { useFocusEffect } from "@react-navigation/native"
import { ScreenProps, DatabaseStats } from "../types/global"
import { useTheme } from "../hooks/useTheme"
+import { fonts, fontSizes } from "../styles/typography"
import NativeLocationService from "../services/NativeLocationService"
import { Button, SectionTitle, Card, Container, Divider, FloatingSaveIndicator } from "../components"
import { STATS_REFRESH_FAST } from "../constants"
@@ -72,7 +74,7 @@ export function DataManagementScreen({}: ScreenProps) {
try {
setIsProcessing(true)
- showFeedback("⏳ Syncing locations...", 30000) // Long timeout
+ showFeedback("Syncing locations...", 30000) // Long timeout
await NativeLocationService.manualFlush()
@@ -80,12 +82,12 @@ export function DataManagementScreen({}: ScreenProps) {
setTimeout(async () => {
await updateStats()
setIsProcessing(false)
- showFeedback("βœ… Sync initiated successfully!")
+ showFeedback("Sync initiated successfully!")
}, 2000)
} catch (err) {
console.error("[DataManagementScreen] Manual flush error:", err)
setIsProcessing(false)
- showFeedback("❌ Failed to sync queue")
+ showFeedback("Failed to sync queue")
}
}, [stats.queued, isProcessing, updateStats, showFeedback])
@@ -101,7 +103,7 @@ export function DataManagementScreen({}: ScreenProps) {
}
} catch (err) {
console.error("[DataManagementScreen] Delete action failed:", err)
- showFeedback("❌ Action failed")
+ showFeedback("Action failed")
} finally {
setIsProcessing(false)
}
@@ -112,27 +114,27 @@ export function DataManagementScreen({}: ScreenProps) {
const handleClearSentHistory = useCallback(() => {
handleDeleteAction(
() => NativeLocationService.clearSentHistory().then(() => stats.sent),
- (count) => `βœ… Cleared ${count} sent location${count !== 1 ? "s" : ""}`
+ (count) => `Cleared ${count} sent location${count !== 1 ? "s" : ""}`
)
}, [handleDeleteAction, stats.sent])
const handleClearQueue = useCallback(() => {
handleDeleteAction(
() => NativeLocationService.clearQueue(),
- (count) => `βœ… Cleared ${count} queued location${count !== 1 ? "s" : ""}`
+ (count) => `Cleared ${count} queued location${count !== 1 ? "s" : ""}`
)
}, [handleDeleteAction])
const handleDeleteOlderThan = useCallback(() => {
const days = parseInt(daysInput, 10)
if (isNaN(days) || days <= 0) {
- showFeedback("⚠️ Please enter a valid number of days")
+ showFeedback("Please enter a valid number of days")
return
}
handleDeleteAction(
() => NativeLocationService.deleteOlderThan(days),
- (count) => `βœ… Deleted ${count} old location${count !== 1 ? "s" : ""}`
+ (count) => `Deleted ${count} old location${count !== 1 ? "s" : ""}`
)
}, [daysInput, handleDeleteAction, showFeedback])
@@ -141,10 +143,10 @@ export function DataManagementScreen({}: ScreenProps) {
try {
await NativeLocationService.vacuumDatabase()
await updateStats()
- showFeedback("βœ… Database optimized")
+ showFeedback("Database optimized")
} catch (err) {
console.error("[DataManagementScreen] Vacuum failed:", err)
- showFeedback("❌ Optimization failed")
+ showFeedback("Optimization failed")
} finally {
setIsProcessing(false)
}
@@ -157,7 +159,6 @@ export function DataManagementScreen({}: ScreenProps) {
{/* Header */}
<View style={styles.header}>
<Text style={[styles.title, { color: colors.text }]}>Data Management</Text>
- <Text style={[styles.subtitle, { color: colors.textSecondary }]}>Manage your local location database</Text>
</View>
{/* Stats */}
@@ -186,12 +187,7 @@ export function DataManagementScreen({}: ScreenProps) {
<View style={styles.section}>
<SectionTitle>QUEUE ACTIONS</SectionTitle>
<Card>
- <Button
- onPress={handleManualFlush}
- disabled={isProcessing || stats.queued === 0}
- title="Sync Now"
- color="#f8f7f7"
- />
+ <Button onPress={handleManualFlush} disabled={isProcessing || stats.queued === 0} title="Sync Now" />
<Text style={[styles.hint, { color: colors.textLight }]}>
{stats.queued === 0
? "Queue is empty"
@@ -272,9 +268,12 @@ export function DataManagementScreen({}: ScreenProps) {
<Text style={[styles.actionHint, { color: colors.textLight }]}>
Reclaim unused space and improve performance
</Text>
- <Text style={[styles.actionHint, { color: colors.textLight }]}>
- πŸ’‘ Run after large deletions to reclaim space
- </Text>
+ <View style={styles.hintRow}>
+ <Lightbulb size={12} color={colors.textLight} />
+ <Text style={[styles.actionHint, { color: colors.textLight }]}>
+ Run after large deletions to reclaim space
+ </Text>
+ </View>
</TouchableOpacity>
</Card>
</View>
@@ -330,13 +329,9 @@ const styles = StyleSheet.create({
},
title: {
fontSize: 28,
- fontWeight: "700",
+ ...fonts.bold,
marginBottom: 4
},
- subtitle: {
- fontSize: 14,
- lineHeight: 20
- },
section: {
marginBottom: 24
},
@@ -348,14 +343,15 @@ const styles = StyleSheet.create({
},
statLabel: {
fontSize: 14,
- fontWeight: "500"
+ ...fonts.medium
},
statValue: {
fontSize: 16,
- fontWeight: "700"
+ ...fonts.bold
},
hint: {
fontSize: 12,
+ ...fonts.regular,
textAlign: "center",
fontStyle: "italic",
lineHeight: 16,
@@ -374,12 +370,13 @@ const styles = StyleSheet.create({
flex: 1
},
actionLabel: {
- fontSize: 15,
- fontWeight: "600",
+ fontSize: fontSizes.label,
+ ...fonts.semiBold,
marginBottom: 4
},
actionHint: {
fontSize: 12,
+ ...fonts.regular,
lineHeight: 16,
marginTop: 2
},
@@ -391,7 +388,7 @@ const styles = StyleSheet.create({
},
actionBadgeText: {
fontSize: 13,
- fontWeight: "700"
+ ...fonts.bold
},
daysInputRow: {
flexDirection: "row",
@@ -407,9 +404,15 @@ const styles = StyleSheet.create({
fontSize: 15,
textAlign: "center"
},
+ hintRow: {
+ flexDirection: "row",
+ alignItems: "center",
+ gap: 6,
+ marginTop: 2
+ },
daysLabel: {
fontSize: 15,
- fontWeight: "500"
+ ...fonts.medium
},
buttonDisabled: {
opacity: 0.5
diff --git a/src/screens/ExportDataScreen.tsx b/src/screens/ExportDataScreen.tsx
index 1608b251..ec54c92b 100644
--- a/src/screens/ExportDataScreen.tsx
+++ b/src/screens/ExportDataScreen.tsx
@@ -5,6 +5,8 @@
import React, { useState, useEffect, useCallback, useRef } from "react"
import { Text, StyleSheet, View, Alert, ActivityIndicator, ScrollView, TouchableOpacity } from "react-native"
+import { fonts } from "../styles/typography"
+import { Download, type LucideIcon } from "lucide-react-native"
import { Container, Card, SectionTitle, Divider } from "../components"
import { useTheme } from "../hooks/useTheme"
import { ThemeColors, LocationCoords } from "../types/global"
@@ -161,7 +163,9 @@ export function ExportDataScreen() {
<View style={styles.statsGrid}>
<View style={styles.statItem}>
<Text style={[styles.statLabel, { color: colors.textSecondary }]}>Total</Text>
- <Text style={[styles.statValue, { color: colors.primary }]}>{stats.totalLocations.toLocaleString()}</Text>
+ <Text style={[styles.statValue, { color: colors.primaryDark }]}>
+ {stats.totalLocations.toLocaleString()}
+ </Text>
</View>
<View style={[styles.statsDivider, { backgroundColor: colors.border }]} />
@@ -214,12 +218,12 @@ export function ExportDataScreen() {
activeOpacity={0.7}
>
<View style={styles.exportContent}>
- <Text style={styles.exportIcon}>πŸ“€</Text>
+ <Download size={28} color={colors.textOnPrimary} style={styles.exportIcon} />
<View style={styles.exportText}>
- <Text style={[styles.exportTitle, styles.exportButtonText]}>
+ <Text style={[styles.exportTitle, { color: colors.textOnPrimary }]}>
Export {EXPORT_FORMATS[selectedFormat].label}
</Text>
- <Text style={[styles.exportSubtitle, styles.exportButtonText]}>
+ <Text style={[styles.exportSubtitle, { color: colors.textOnPrimary }]}>
{stats.totalLocations.toLocaleString()} locations
{fileSize ? ` β€’ ${fileSize}` : ""}
</Text>
@@ -247,7 +251,7 @@ export function ExportDataScreen() {
// --- Format Option Component ---
const FormatOption = ({
- icon,
+ icon: Icon,
title,
subtitle,
description,
@@ -256,7 +260,7 @@ const FormatOption = ({
onPress,
colors
}: {
- icon: string
+ icon: LucideIcon
title: string
subtitle: string
description: string
@@ -274,7 +278,7 @@ const FormatOption = ({
<View style={styles.formatContent}>
<View style={styles.leftContent}>
- <Text style={styles.formatIcon}>{icon}</Text>
+ <Icon size={28} color={colors.primaryDark} />
<View style={styles.textContent}>
<View style={styles.titleRow}>
<Text style={[styles.formatTitle, { color: colors.text }]}>{title}</Text>
@@ -287,7 +291,7 @@ const FormatOption = ({
}
]}
>
- <Text style={[styles.extensionText, { color: colors.primary }]}>{extension}</Text>
+ <Text style={[styles.extensionText, { color: colors.primaryDark }]}>{extension}</Text>
</View>
</View>
<Text style={[styles.formatSubtitle, { color: colors.textSecondary }]}>{subtitle}</Text>
@@ -313,22 +317,22 @@ const FormatOption = ({
const styles = StyleSheet.create({
scrollContent: {
+ paddingHorizontal: 16,
paddingBottom: 40
},
header: {
marginTop: 20,
- marginBottom: 20,
- paddingHorizontal: 20
+ marginBottom: 20
},
title: {
fontSize: 28,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: -0.5
},
statsContainer: {
borderRadius: 16,
borderWidth: 2,
- marginHorizontal: 20,
+ marginHorizontal: 0,
marginBottom: 24,
overflow: "hidden"
},
@@ -342,14 +346,14 @@ const styles = StyleSheet.create({
},
statLabel: {
fontSize: 12,
- fontWeight: "600",
+ ...fonts.semiBold,
textTransform: "uppercase",
letterSpacing: 0.8,
marginBottom: 8
},
statValue: {
fontSize: 20,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: -0.5,
textAlign: "center"
},
@@ -359,17 +363,17 @@ const styles = StyleSheet.create({
opacity: 0.3
},
section: {
- paddingHorizontal: 20,
marginBottom: 24
},
formatOption: {
paddingVertical: 8,
- paddingHorizontal: 0,
+ paddingHorizontal: 16,
+ marginHorizontal: -16,
position: "relative"
},
selectionBar: {
position: "absolute",
- left: -20,
+ left: 0,
top: 0,
bottom: 0,
width: 4
@@ -384,9 +388,6 @@ const styles = StyleSheet.create({
alignItems: "center",
gap: 14
},
- formatIcon: {
- fontSize: 28
- },
textContent: {
flex: 1
},
@@ -398,7 +399,7 @@ const styles = StyleSheet.create({
},
formatTitle: {
fontSize: 16,
- fontWeight: "600",
+ ...fonts.semiBold,
letterSpacing: -0.2
},
extensionBadge: {
@@ -409,7 +410,7 @@ const styles = StyleSheet.create({
},
extensionText: {
fontSize: 10,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: 0.3
},
formatSubtitle: {
@@ -434,9 +435,7 @@ const styles = StyleSheet.create({
height: 12,
borderRadius: 6
},
- exportSection: {
- paddingHorizontal: 20
- },
+ exportSection: {},
exportButton: {
borderRadius: 14,
padding: 18,
@@ -450,18 +449,14 @@ const styles = StyleSheet.create({
alignItems: "center"
},
exportIcon: {
- fontSize: 28,
marginRight: 14
},
exportText: {
flex: 1
},
- exportButtonText: {
- color: "#fff"
- },
exportTitle: {
fontSize: 17,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 2
},
exportSubtitle: {
@@ -489,7 +484,7 @@ const styles = StyleSheet.create({
},
loaderTitle: {
fontSize: 16,
- fontWeight: "600",
+ ...fonts.semiBold,
marginTop: 16,
marginBottom: 8
},
diff --git a/src/screens/GeofenceScreen.tsx b/src/screens/GeofenceScreen.tsx
index dcec6f66..2797a6dc 100644
--- a/src/screens/GeofenceScreen.tsx
+++ b/src/screens/GeofenceScreen.tsx
@@ -20,6 +20,8 @@ import { useTheme } from "../hooks/useTheme"
import NativeLocationService from "../services/NativeLocationService"
import { Geofence, ScreenProps } from "../types/global"
import { useTracking } from "../contexts/TrackingProvider"
+import { fonts } from "../styles/typography"
+import { X } from "lucide-react-native"
import { Container, SectionTitle, Card } from "../components"
import { MapCenterButton } from "../components/features/map/MapCenterButton"
@@ -417,7 +419,7 @@ export function GeofenceScreen({}: ScreenProps) {
lineDash: zone.pauseTracking ? null : [5, 5]
}),
fill: new ol.style.Fill({
- color: zone.pauseTracking ? "rgba(255, 165, 0, 0.3)" : "rgba(0, 122, 255, 0.1)"
+ color: zone.pauseTracking ? "${colors.warning}4D" : "${colors.info}1A"
}),
})
);
@@ -568,7 +570,7 @@ export function GeofenceScreen({}: ScreenProps) {
<View style={styles.row}>
<TouchableOpacity style={styles.info} onPress={() => handleZoomToGeofence(item)} activeOpacity={0.7}>
<Text style={[styles.name, { color: colors.text }]}>{item.name}</Text>
- <Text style={[styles.radius, { color: colors.textSecondary }]}>{item.radius}m β€’ Tap to view</Text>
+ <Text style={[styles.radius, { color: colors.textSecondary }]}>{item.radius}m radius</Text>
</TouchableOpacity>
<View style={styles.actions}>
@@ -581,7 +583,7 @@ export function GeofenceScreen({}: ScreenProps) {
false: colors.border,
true: colors.warning + "80"
}}
- thumbColor={item.pauseTracking ? colors.warning : "#f4f3f4"}
+ thumbColor={item.pauseTracking ? colors.warning : colors.border}
/>
</View>
@@ -590,7 +592,7 @@ export function GeofenceScreen({}: ScreenProps) {
style={[styles.deleteBtn, { backgroundColor: colors.error + "15" }]}
activeOpacity={0.7}
>
- <Text style={[styles.deleteText, { color: colors.error }]}>βœ•</Text>
+ <X size={16} color={colors.error} />
</TouchableOpacity>
</View>
</View>
@@ -628,7 +630,7 @@ export function GeofenceScreen({}: ScreenProps) {
<SectionTitle>Create Geofence</SectionTitle>
<Card>
<Text style={[styles.hint, { color: colors.textSecondary }]}>
- Enter details, then tap Place and click the map
+ Enter a name and radius, then tap the map to place
</Text>
<View style={styles.inputRow}>
@@ -677,16 +679,14 @@ export function GeofenceScreen({}: ScreenProps) {
disabled={placingGeofence}
activeOpacity={0.7}
>
- <Text style={styles.placeBtnText}>{placingGeofence ? "Tap Map to Place..." : "Place Geofence"}</Text>
+ <Text style={[styles.placeBtnText, { color: colors.textOnPrimary }]}>
+ {placingGeofence ? "Tap Map to Place..." : "Place Geofence"}
+ </Text>
</TouchableOpacity>
</Card>
</View>
- {geofences.length > 0 && (
- <View style={styles.section}>
- <SectionTitle>Active Geofences ({geofences.length})</SectionTitle>
- </View>
- )}
+ {geofences.length > 0 && <SectionTitle>Active Geofences ({geofences.length})</SectionTitle>}
</>
}
ListEmptyComponent={
@@ -710,7 +710,7 @@ const styles = StyleSheet.create({
webview: { flex: 1 },
list: { padding: 20, paddingBottom: 40 },
section: { marginBottom: 16 },
- hint: { fontSize: 13, lineHeight: 18, marginBottom: 16 },
+ hint: { fontSize: 13, ...fonts.regular, lineHeight: 18, marginBottom: 16 },
inputRow: { flexDirection: "row", gap: 12, marginBottom: 16 },
inputGroup: { flex: 1 },
inputGroupName: {
@@ -722,7 +722,7 @@ const styles = StyleSheet.create({
},
label: {
fontSize: 12,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 6,
textTransform: "uppercase",
letterSpacing: 0.5
@@ -732,7 +732,7 @@ const styles = StyleSheet.create({
textAlign: "center"
},
placeBtn: { padding: 16, borderRadius: 12, alignItems: "center" },
- placeBtnText: { color: "#f8f7f7", fontSize: 15, fontWeight: "600" },
+ placeBtnText: { fontSize: 15, ...fonts.semiBold },
card: { marginBottom: 12, padding: 14 },
row: {
flexDirection: "row",
@@ -740,13 +740,13 @@ const styles = StyleSheet.create({
justifyContent: "space-between"
},
info: { flex: 1, marginRight: 12 },
- name: { fontSize: 15, fontWeight: "600", marginBottom: 2 },
+ name: { fontSize: 15, ...fonts.semiBold, marginBottom: 2 },
radius: { fontSize: 12 },
actions: { flexDirection: "row", alignItems: "center", gap: 12 },
pauseSwitch: { flexDirection: "row", alignItems: "center", gap: 6 },
pauseLabel: {
fontSize: 11,
- fontWeight: "600",
+ ...fonts.semiBold,
textTransform: "uppercase",
letterSpacing: 0.3
},
@@ -757,9 +757,8 @@ const styles = StyleSheet.create({
alignItems: "center",
justifyContent: "center"
},
- deleteText: { fontSize: 18, fontWeight: "600" },
empty: { alignItems: "center", paddingVertical: 40 },
- emptyText: { fontSize: 15, fontWeight: "600", marginBottom: 6 },
+ emptyText: { fontSize: 15, ...fonts.semiBold, marginBottom: 6 },
emptyHint: {
fontSize: 13,
textAlign: "center",
diff --git a/src/screens/LocationInspectorScreen.tsx b/src/screens/LocationInspectorScreen.tsx
index 628b29a7..a641bf77 100644
--- a/src/screens/LocationInspectorScreen.tsx
+++ b/src/screens/LocationInspectorScreen.tsx
@@ -5,6 +5,8 @@
import React, { useState, useEffect, useRef, useCallback, memo } from "react"
import { View, Text, FlatList, StyleSheet, TouchableOpacity, Switch } from "react-native"
+import { fonts } from "../styles/typography"
+import { AlertTriangle, ChevronLeft, ChevronRight } from "lucide-react-native"
import { Container, Card } from "../components"
import { useTheme } from "../hooks/useTheme"
import { ThemeColors } from "../types/global"
@@ -73,7 +75,7 @@ const LocationItem = memo(({ item, colors, isQueue }: LocationItemProps) => {
return (
<Card style={styles.itemCard}>
<View style={styles.row}>
- <Text style={[styles.id, { color: colors.primary }]}>#{item.id || item.location_id}</Text>
+ <Text style={[styles.id, { color: colors.primaryDark }]}>#{item.id || item.location_id}</Text>
<Text style={[styles.time, { color: colors.textSecondary }]}>
{new Date(timestamp * 1000).toLocaleTimeString()}
</Text>
@@ -98,7 +100,10 @@ const LocationItem = memo(({ item, colors, isQueue }: LocationItemProps) => {
</View>
{isQueue && item.last_error && (
- <Text style={[styles.errorText, { color: colors.error }]}>⚠ {item.last_error}</Text>
+ <View style={styles.errorRow}>
+ <AlertTriangle size={12} color={colors.error} />
+ <Text style={[styles.errorText, { color: colors.error }]}>{item.last_error}</Text>
+ </View>
)}
</Card>
)
@@ -173,7 +178,7 @@ export function LocationInspectorScreen() {
<Switch
value={autoRefresh}
onValueChange={setAutoRefresh}
- thumbColor={autoRefresh ? colors.primary : "#f4f3f4"}
+ thumbColor={autoRefresh ? colors.primary : colors.border}
/>
</View>
@@ -189,7 +194,7 @@ export function LocationInspectorScreen() {
autoRefresh && styles.refreshBtnDisabled
]}
>
- <Text style={[styles.btnText, { color: colors.primary }]}>Refresh</Text>
+ <Text style={[styles.btnText, { color: colors.primaryDark }]}>Refresh</Text>
</TouchableOpacity>
</View>
</View>
@@ -209,7 +214,7 @@ export function LocationInspectorScreen() {
}
]}
>
- <Text style={[styles.limitBtnText, limit === v ? styles.limitBtnTextActive : { color: colors.text }]}>
+ <Text style={[styles.limitBtnText, { color: limit === v ? colors.textOnPrimary : colors.text }]}>
{v}
</Text>
</TouchableOpacity>
@@ -223,16 +228,7 @@ export function LocationInspectorScreen() {
disabled={page === 0}
style={styles.pageBtn}
>
- <Text
- style={[
- styles.pageBtnText,
- {
- color: page === 0 ? colors.textDisabled : colors.primary
- }
- ]}
- >
- β—€
- </Text>
+ <ChevronLeft size={20} color={page === 0 ? colors.textDisabled : colors.primary} />
</TouchableOpacity>
<Text style={[styles.pageIndicator, { color: colors.text }]}>{page + 1}</Text>
<TouchableOpacity
@@ -240,16 +236,7 @@ export function LocationInspectorScreen() {
disabled={data.length < limit}
style={styles.pageBtn}
>
- <Text
- style={[
- styles.pageBtnText,
- {
- color: data.length < limit ? colors.textDisabled : colors.primary
- }
- ]}
- >
- β–Ά
- </Text>
+ <ChevronRight size={20} color={data.length < limit ? colors.textDisabled : colors.primary} />
</TouchableOpacity>
</View>
)}
@@ -317,7 +304,7 @@ const styles = StyleSheet.create({
},
statusText: {
fontSize: 11,
- fontWeight: "600"
+ ...fonts.semiBold
},
controls: {
flexDirection: "row",
@@ -330,7 +317,7 @@ const styles = StyleSheet.create({
},
controlLabel: {
fontSize: 10,
- fontWeight: "700",
+ ...fonts.bold,
marginRight: 6
},
refreshBtn: {
@@ -344,7 +331,7 @@ const styles = StyleSheet.create({
},
btnText: {
fontSize: 12,
- fontWeight: "bold"
+ ...fonts.bold
},
limitBar: {
flexDirection: "row",
@@ -366,10 +353,7 @@ const styles = StyleSheet.create({
},
limitBtnText: {
fontSize: 12,
- fontWeight: "600"
- },
- limitBtnTextActive: {
- color: "#fff"
+ ...fonts.semiBold
},
paginationRow: {
flexDirection: "row",
@@ -378,13 +362,9 @@ const styles = StyleSheet.create({
pageBtn: {
padding: 8
},
- pageBtnText: {
- fontWeight: "bold",
- fontSize: 16
- },
pageIndicator: {
fontSize: 14,
- fontWeight: "bold",
+ ...fonts.bold,
marginHorizontal: 8
},
tabBar: {
@@ -401,10 +381,10 @@ const styles = StyleSheet.create({
fontSize: 14
},
tabTextActive: {
- fontWeight: "700"
+ ...fonts.bold
},
tabTextInactive: {
- fontWeight: "400"
+ ...fonts.regular
},
listContent: {
paddingHorizontal: 12,
@@ -420,16 +400,17 @@ const styles = StyleSheet.create({
marginBottom: 6
},
id: {
- fontWeight: "bold",
+ ...fonts.bold,
fontSize: 12
},
time: {
- fontSize: 11
+ fontSize: 11,
+ ...fonts.regular
},
coords: {
fontFamily: "monospace",
fontSize: 15,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 8
},
metricsGrid: {
@@ -449,7 +430,7 @@ const styles = StyleSheet.create({
},
metricLabel: {
fontSize: 9,
- fontWeight: "bold",
+ ...fonts.bold,
textTransform: "uppercase"
},
metricValue: {
@@ -463,11 +444,17 @@ const styles = StyleSheet.create({
textAlign: "center",
marginTop: 40,
fontSize: 14,
+ ...fonts.regular,
fontStyle: "italic"
},
+ errorRow: {
+ flexDirection: "row" as const,
+ alignItems: "center" as const,
+ gap: 6,
+ marginTop: 8
+ },
errorText: {
fontSize: 11,
- marginTop: 8,
fontStyle: "italic"
}
})
diff --git a/src/screens/SettingsScreen.tsx b/src/screens/SettingsScreen.tsx
index 7e09495e..b2709d69 100644
--- a/src/screens/SettingsScreen.tsx
+++ b/src/screens/SettingsScreen.tsx
@@ -12,7 +12,9 @@ import { STATS_REFRESH_FAST } from "../constants"
import NativeLocationService from "../services/NativeLocationService"
import { useTracking } from "../contexts/TrackingProvider"
import { FloatingSaveIndicator } from "../components/ui/FloatingSaveIndicator"
-import { SectionTitle, Card, Container, Divider, Footer } from "../components"
+import { fonts } from "../styles/typography"
+import { SectionTitle, Card, Container, Divider } from "../components"
+import { ChevronRight } from "lucide-react-native"
import { StatsCard } from "../components"
import { ConnectionSettings } from "../components/features/settings/ConnectionSettings"
import { SyncStrategySettings } from "../components/features/settings/SyncStrategySettings"
@@ -112,7 +114,7 @@ export function SettingsScreen({ navigation }: ScreenProps) {
navigation={navigation}
/>
- {/* Sync Strategy */}
+ {/* Tracking Configuration */}
<SyncStrategySettings
settings={settings}
onSettingsChange={setSettings}
@@ -136,7 +138,7 @@ export function SettingsScreen({ navigation }: ScreenProps) {
false: colors.border,
true: colors.primary + "80"
}}
- thumbColor={mode === "dark" ? colors.primary : "#f4f3f4"}
+ thumbColor={mode === "dark" ? colors.primary : colors.border}
/>
</View>
</Card>
@@ -155,7 +157,7 @@ export function SettingsScreen({ navigation }: ScreenProps) {
<Text style={[styles.linkLabel, { color: colors.text }]}>Data Management</Text>
<Text style={[styles.linkSub, { color: colors.textSecondary }]}>View queue and clear data</Text>
</View>
- <Text style={[styles.linkArrow, { color: colors.textLight }]}>β€Ί</Text>
+ <ChevronRight size={20} color={colors.textLight} />
</TouchableOpacity>
<Divider />
@@ -169,13 +171,10 @@ export function SettingsScreen({ navigation }: ScreenProps) {
<Text style={[styles.linkLabel, { color: colors.text }]}>API Field Mapping</Text>
<Text style={[styles.linkSub, { color: colors.textSecondary }]}>Customize JSON payload structure</Text>
</View>
- <Text style={[styles.linkArrow, { color: colors.textLight }]}>β€Ί</Text>
+ <ChevronRight size={20} color={colors.textLight} />
</TouchableOpacity>
</Card>
</View>
-
- {/* Footer */}
- <Footer />
</ScrollView>
<FloatingSaveIndicator saving={saving} success={saveSuccess} colors={colors} />
@@ -185,7 +184,7 @@ export function SettingsScreen({ navigation }: ScreenProps) {
const styles = StyleSheet.create({
scrollContent: {
- paddingHorizontal: 20,
+ paddingHorizontal: 16,
paddingTop: 16,
paddingBottom: 40
},
@@ -194,7 +193,7 @@ const styles = StyleSheet.create({
},
title: {
fontSize: 28,
- fontWeight: "700",
+ ...fonts.bold,
letterSpacing: -0.5
},
section: {
@@ -212,7 +211,7 @@ const styles = StyleSheet.create({
},
settingLabel: {
fontSize: 16,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 2
},
linkRow: {
@@ -226,15 +225,16 @@ const styles = StyleSheet.create({
},
linkLabel: {
fontSize: 16,
- fontWeight: "600",
+ ...fonts.semiBold,
marginBottom: 2
},
linkSub: {
- fontSize: 13
+ fontSize: 13,
+ ...fonts.regular
},
linkArrow: {
fontSize: 28,
- fontWeight: "300",
+ ...fonts.regular,
marginLeft: 12
}
})
diff --git a/src/styles/colors.ts b/src/styles/colors.ts
index d30e4955..52ded3c3 100644
--- a/src/styles/colors.ts
+++ b/src/styles/colors.ts
@@ -6,21 +6,21 @@
import { ThemeColors } from "../types/global"
export const lightColors: ThemeColors = {
- // Brand (Deep Indigo for trust and uniqueness)
- primary: "#7986CB",
- primaryDark: "#1A237E",
- primaryLight: "#C5CAE9",
- secondary: "#FF7043",
- secondaryDark: "#E64A19",
- secondaryLight: "#FFCCBC",
+ // Brand (Teal)
+ primary: "#0d9488",
+ primaryDark: "#115E59",
+ primaryLight: "#99F6E4",
+ secondary: "#F59E0B",
+ secondaryDark: "#92400E",
+ secondaryLight: "#FDE68A",
- // Status (WCAG compliant)
+ // Status
success: "#2E7D32",
successDark: "#1B5E20",
successLight: "#A5D6A7",
- warning: "#FF9800",
- warningDark: "#F57C00",
- warningLight: "#FFE0B2",
+ warning: "#C2410C",
+ warningDark: "#9A3412",
+ warningLight: "#FED7AA",
error: "#D32F2F",
errorDark: "#B71C1C",
errorLight: "#FFCDD2",
@@ -28,14 +28,14 @@ export const lightColors: ThemeColors = {
infoDark: "#0D47A1",
infoLight: "#BBDEFB",
- // UI (optimized for maps)
+ // UI
background: "#FAFAFA",
backgroundElevated: "#FFFFFF",
card: "#FFFFFF",
cardElevated: "#FFFFFF",
surface: "#FFFFFF",
- // Text (WCAG AAA)
+ // Text
text: "#202124",
textSecondary: "#5F6368",
textLight: "#9AA0A6",
@@ -48,32 +48,33 @@ export const lightColors: ThemeColors = {
// Interactive
placeholder: "#9AA0A6",
- link: "#5C6BC0",
- linkVisited: "#7986CB",
+ link: "#115E59",
+ linkVisited: "#134E4A",
overlay: "rgba(0, 0, 0, 0.5)",
shadow: "rgba(0, 0, 0, 0.1)",
// Special
transparent: "transparent",
- borderRadius: 8
+ borderRadius: 8,
+ textOnPrimary: "#FFFFFF"
}
export const darkColors: ThemeColors = {
- // Brand
- primary: "#7986CB",
- primaryDark: "#303F9F",
- primaryLight: "#C5CAE9",
- secondary: "#FF9800",
- secondaryDark: "#F57C00",
- secondaryLight: "#FFE0B2",
+ // Brand (Teal)
+ primary: "#2DD4BF",
+ primaryDark: "#0d9488",
+ primaryLight: "#99F6E4",
+ secondary: "#FBBF24",
+ secondaryDark: "#F59E0B",
+ secondaryLight: "#FDE68A",
// Status
success: "#4CAF50",
successDark: "#388E3C",
successLight: "#C8E6C9",
- warning: "#FF9800",
- warningDark: "#F57C00",
- warningLight: "#FFE0B2",
+ warning: "#FB923C",
+ warningDark: "#F97316",
+ warningLight: "#FED7AA",
error: "#EF5350",
errorDark: "#D32F2F",
errorLight: "#FFCDD2",
@@ -101,12 +102,13 @@ export const darkColors: ThemeColors = {
// Interactive
placeholder: "#AAAAAA",
- link: "#9FA8DA",
- linkVisited: "#7986CB",
+ link: "#2DD4BF",
+ linkVisited: "#14B8A6",
overlay: "rgba(0, 0, 0, 0.7)",
shadow: "rgba(0, 0, 0, 0.3)",
// Special
transparent: "transparent",
- borderRadius: 8
+ borderRadius: 8,
+ textOnPrimary: "#121212"
}
diff --git a/src/styles/typography.ts b/src/styles/typography.ts
new file mode 100644
index 00000000..1c337309
--- /dev/null
+++ b/src/styles/typography.ts
@@ -0,0 +1,42 @@
+/**
+ * Copyright (C) 2026 Max Dietrich
+ * Licensed under the GNU AGPLv3. See LICENSE in the project root for details.
+ */
+
+import { TextStyle } from "react-native"
+
+export const fonts: Record<string, Pick<TextStyle, "fontFamily">> = {
+ regular: { fontFamily: "Inter-Regular" },
+ medium: { fontFamily: "Inter-Medium" },
+ semiBold: { fontFamily: "Inter-SemiBold" },
+ bold: { fontFamily: "Inter-Bold" }
+}
+
+/**
+ * Centralized type scale β€” single source of truth for font sizes.
+ *
+ * screenTitle 28 Screen headers (bold)
+ * statValue 24 Large numeric displays (bold)
+ * cardTitle 20 Card/section headers (bold)
+ * heading 18 Sub-headings (semiBold)
+ * label 16 Settings labels, button text, primary UI text (semiBold/medium)
+ * input 15 Text inputs, field labels (medium/regular)
+ * body 14 Body text, subtitles, descriptions (regular)
+ * description 13 Secondary descriptions, hints (regular/medium)
+ * caption 12 Captions, small hints, chip text (medium/regular)
+ * small 11 Section titles, footnotes (semiBold/regular)
+ * micro 10 Uppercase badges, coordinate labels (semiBold/bold)
+ */
+export const fontSizes = {
+ screenTitle: 28,
+ statValue: 24,
+ cardTitle: 20,
+ heading: 18,
+ label: 16,
+ input: 15,
+ body: 14,
+ description: 13,
+ caption: 12,
+ small: 11,
+ micro: 10
+} as const
diff --git a/src/types/__tests__/defaults.test.ts b/src/types/__tests__/defaults.test.ts
index 40dcbb11..19ffbcb5 100644
--- a/src/types/__tests__/defaults.test.ts
+++ b/src/types/__tests__/defaults.test.ts
@@ -103,9 +103,8 @@ describe("TRACKING_PRESETS", () => {
expect(TRACKING_PRESETS[name].retryInterval).toBeGreaterThan(0)
})
- it.each(presetNames)("%s has a label and emoji", (name) => {
+ it.each(presetNames)("%s has a label", (name) => {
expect(TRACKING_PRESETS[name].label).toBeTruthy()
- expect(TRACKING_PRESETS[name].emoji).toBeTruthy()
})
it.each(presetNames)("%s has valid batteryImpact", (name) => {
diff --git a/src/types/global.ts b/src/types/global.ts
index 14590e06..e098f596 100644
--- a/src/types/global.ts
+++ b/src/types/global.ts
@@ -66,6 +66,7 @@ export interface ThemeColors {
shadow: string
transparent: string
borderRadius: number
+ textOnPrimary: string
}
// ============================================================================
@@ -227,7 +228,6 @@ export interface TrackingPresetConfig {
syncInterval: number
retryInterval: number
label: string
- emoji: string
description: string
batteryImpact: BatteryImpact
}
@@ -239,7 +239,6 @@ export const TRACKING_PRESETS = {
syncInterval: 0,
retryInterval: 30,
label: "Instant",
- emoji: "⚑",
description: "Track every 5s β€’ Send instantly",
batteryImpact: "High"
},
@@ -249,7 +248,6 @@ export const TRACKING_PRESETS = {
syncInterval: 300,
retryInterval: 300,
label: "Balanced",
- emoji: "βš–οΈ",
description: "Track every 30s β€’ Batch 5 min",
batteryImpact: "Medium"
},
@@ -259,7 +257,6 @@ export const TRACKING_PRESETS = {
syncInterval: 900,
retryInterval: 900,
label: "Power Saver",
- emoji: "πŸ”‹",
description: "Track every 60s β€’ Batch 15 min",
batteryImpact: "Low"
}
diff --git a/src/utils/exportConverters.ts b/src/utils/exportConverters.ts
index 1267223d..5c6721ca 100644
--- a/src/utils/exportConverters.ts
+++ b/src/utils/exportConverters.ts
@@ -3,6 +3,8 @@
* Licensed under the GNU AGPLv3. See LICENSE in the project root for details.
*/
+import { type LucideIcon } from "lucide-react-native"
+import { Table2, Globe, MapPin, Earth } from "lucide-react-native"
import { LocationCoords } from "../types/global"
export const LARGE_FILE_THRESHOLD = 10 * 1024 * 1024 // 10 MB
@@ -152,7 +154,7 @@ export interface ExportFormatConfig {
label: string
subtitle: string
description: string
- icon: string
+ icon: LucideIcon
extension: string
mimeType: string
convert: (data: LocationCoords[]) => string
@@ -163,7 +165,7 @@ export const EXPORT_FORMATS: Record<ExportFormat, ExportFormatConfig> = {
label: "CSV",
subtitle: "Spreadsheet Format",
description: "Excel, Google Sheets, data analysis",
- icon: "πŸ“Š",
+ icon: Table2,
extension: ".csv",
mimeType: "text/csv",
convert: convertToCSV
@@ -172,7 +174,7 @@ export const EXPORT_FORMATS: Record<ExportFormat, ExportFormatConfig> = {
label: "GeoJSON",
subtitle: "Geographic Data",
description: "Mapbox, Leaflet, QGIS, ArcGIS",
- icon: "πŸ—ΊοΈ",
+ icon: Globe,
extension: ".geojson",
mimeType: "application/json",
convert: convertToGeoJSON
@@ -181,7 +183,7 @@ export const EXPORT_FORMATS: Record<ExportFormat, ExportFormatConfig> = {
label: "GPX",
subtitle: "GPS Exchange",
description: "Garmin, Strava, Google Earth",
- icon: "πŸ“",
+ icon: MapPin,
extension: ".gpx",
mimeType: "application/gpx+xml",
convert: convertToGPX
@@ -190,7 +192,7 @@ export const EXPORT_FORMATS: Record<ExportFormat, ExportFormatConfig> = {
label: "KML",
subtitle: "Keyhole Markup Language",
description: "Google Earth, Google Maps, ArcGIS",
- icon: "🌍",
+ icon: Earth,
extension: ".kml",
mimeType: "application/vnd.google-earth.kml+xml",
convert: convertToKML