This commit is contained in:
Davide Scaini
2026-04-25 15:33:51 +02:00
parent 1ac35c84e0
commit 5330b7b489
7 changed files with 53 additions and 18 deletions
+11
View File
@@ -8,9 +8,19 @@
"userInterfaceStyle": "dark", "userInterfaceStyle": "dark",
"newArchEnabled": true, "newArchEnabled": true,
"platforms": ["ios", "android"], "platforms": ["ios", "android"],
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#09090b"
},
"android": { "android": {
"package": "org.bincio.app", "package": "org.bincio.app",
"usesCleartextTraffic": true, "usesCleartextTraffic": true,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#09090b"
},
"permissions": [ "permissions": [
"android.permission.READ_EXTERNAL_STORAGE", "android.permission.READ_EXTERNAL_STORAGE",
"android.permission.READ_MEDIA_VIDEO", "android.permission.READ_MEDIA_VIDEO",
@@ -24,6 +34,7 @@
"supportsTablet": true "supportsTablet": true
}, },
"plugins": [ "plugins": [
"expo-system-ui",
"expo-router", "expo-router",
"expo-sqlite", "expo-sqlite",
[ [
+12 -10
View File
@@ -19,6 +19,8 @@ export default function SettingsScreen() {
const [instanceUrl, setInstanceUrl] = useState(storedUrl); const [instanceUrl, setInstanceUrl] = useState(storedUrl);
const [handle, setHandle] = useState(storedHandle); const [handle, setHandle] = useState(storedHandle);
const [autoPath, setAutoPath] = useState(storedPath); const [autoPath, setAutoPath] = useState(storedPath);
const [syncMode, setSyncMode] = useState(storedSyncMode);
const [syncUpload, setSyncUpload] = useState(storedSyncUpload);
const [saved, setSaved] = useState(false); const [saved, setSaved] = useState(false);
const [password, setPassword] = useState(''); const [password, setPassword] = useState('');
@@ -181,17 +183,17 @@ export default function SettingsScreen() {
<View style={styles.modeRow}> <View style={styles.modeRow}>
<ModeButton <ModeButton
label="Summaries only" label="Summaries only"
active={storedSyncMode === 'summaries'} active={syncMode === 'summaries'}
onPress={() => setSetting(db, 'sync_mode', 'summaries')} onPress={() => { setSyncMode('summaries'); setSetting(db, 'sync_mode', 'summaries'); }}
/> />
<ModeButton <ModeButton
label="Full data" label="Full data"
active={storedSyncMode === 'full'} active={syncMode === 'full'}
onPress={() => setSetting(db, 'sync_mode', 'full')} onPress={() => { setSyncMode('full'); setSetting(db, 'sync_mode', 'full'); }}
/> />
</View> </View>
<Text style={styles.hint}> <Text style={styles.hint}>
{storedSyncMode === 'full' {syncMode === 'full'
? 'Downloads map route and elevation chart for every activity during sync. Uses more storage and takes longer.' ? 'Downloads map route and elevation chart for every activity during sync. Uses more storage and takes longer.'
: 'Syncs activity summaries only. Map and chart are fetched on demand when you open an activity.'} : 'Syncs activity summaries only. Map and chart are fetched on demand when you open an activity.'}
</Text> </Text>
@@ -199,17 +201,17 @@ export default function SettingsScreen() {
<View style={styles.modeRow}> <View style={styles.modeRow}>
<ModeButton <ModeButton
label="Off" label="Off"
active={!storedSyncUpload} active={!syncUpload}
onPress={() => setSetting(db, 'sync_upload', 'false')} onPress={() => { setSyncUpload(false); setSetting(db, 'sync_upload', 'false'); }}
/> />
<ModeButton <ModeButton
label="Upload local activities" label="Upload local activities"
active={storedSyncUpload} active={syncUpload}
onPress={() => setSetting(db, 'sync_upload', 'true')} onPress={() => { setSyncUpload(true); setSetting(db, 'sync_upload', 'true'); }}
/> />
</View> </View>
<Text style={styles.hint}> <Text style={styles.hint}>
{storedSyncUpload {syncUpload
? 'Local activities are uploaded to the instance during sync.' ? 'Local activities are uploaded to the instance during sync.'
: 'Local activities stay on device only.'} : 'Local activities stay on device only.'}
</Text> </Text>
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+21
View File
@@ -20,6 +20,7 @@
"expo-splash-screen": "~31.0.13", "expo-splash-screen": "~31.0.13",
"expo-sqlite": "~16.0.10", "expo-sqlite": "~16.0.10",
"expo-status-bar": "~3.0.9", "expo-status-bar": "~3.0.9",
"expo-system-ui": "~6.0.9",
"expo-task-manager": "~14.0.9", "expo-task-manager": "~14.0.9",
"react": "19.1.0", "react": "19.1.0",
"react-dom": "19.1.0", "react-dom": "19.1.0",
@@ -4993,6 +4994,26 @@
"react-native": "*" "react-native": "*"
} }
}, },
"node_modules/expo-system-ui": {
"version": "6.0.9",
"resolved": "https://registry.npmjs.org/expo-system-ui/-/expo-system-ui-6.0.9.tgz",
"integrity": "sha512-eQTYGzw1V4RYiYHL9xDLYID3Wsec2aZS+ypEssmF64D38aDrqbDgz1a2MSlHLQp2jHXSs3FvojhZ9FVela1Zcg==",
"license": "MIT",
"dependencies": {
"@react-native/normalize-colors": "0.81.5",
"debug": "^4.3.2"
},
"peerDependencies": {
"expo": "*",
"react-native": "*",
"react-native-web": "*"
},
"peerDependenciesMeta": {
"react-native-web": {
"optional": true
}
}
},
"node_modules/expo-task-manager": { "node_modules/expo-task-manager": {
"version": "14.0.9", "version": "14.0.9",
"resolved": "https://registry.npmjs.org/expo-task-manager/-/expo-task-manager-14.0.9.tgz", "resolved": "https://registry.npmjs.org/expo-task-manager/-/expo-task-manager-14.0.9.tgz",
+9 -8
View File
@@ -10,26 +10,27 @@
"lint": "expo lint" "lint": "expo lint"
}, },
"dependencies": { "dependencies": {
"@maplibre/maplibre-react-native": "~11.0.0",
"expo": "~54.0.33", "expo": "~54.0.33",
"expo-router": "~6.0.23", "expo-background-fetch": "~14.0.9",
"expo-sqlite": "~16.0.10", "expo-constants": "~18.0.13",
"expo-document-picker": "~14.0.8", "expo-document-picker": "~14.0.8",
"expo-file-system": "~19.0.21", "expo-file-system": "~19.0.21",
"expo-background-fetch": "~14.0.9",
"expo-task-manager": "~14.0.9",
"expo-notifications": "~0.32.16",
"expo-constants": "~18.0.13",
"expo-linking": "~8.0.11", "expo-linking": "~8.0.11",
"expo-notifications": "~0.32.16",
"expo-router": "~6.0.23",
"expo-splash-screen": "~31.0.13", "expo-splash-screen": "~31.0.13",
"expo-sqlite": "~16.0.10",
"expo-status-bar": "~3.0.9", "expo-status-bar": "~3.0.9",
"expo-system-ui": "~6.0.9",
"expo-task-manager": "~14.0.9",
"react": "19.1.0", "react": "19.1.0",
"react-dom": "19.1.0", "react-dom": "19.1.0",
"react-native": "0.81.5", "react-native": "0.81.5",
"react-native-safe-area-context": "~5.6.0", "react-native-safe-area-context": "~5.6.0",
"react-native-screens": "~4.16.0", "react-native-screens": "~4.16.0",
"react-native-svg": "~15.15.0", "react-native-svg": "~15.15.0",
"react-native-webview": "13.15.0", "react-native-webview": "13.15.0"
"@maplibre/maplibre-react-native": "~11.0.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.25.0", "@babel/core": "^7.25.0",