Add new screens for game management, team management, and cache handling; implement caching logic and session management

This commit is contained in:
bobbert committed 2026-04-02 22:08:07 +01:00
1 parent 8686f0e1ff
commit 17ed120ce8
70 files changed
+2172 -3892

No files matched your search

@@ -0,0 +1,46 @@
import React from 'react';
import MapView, {Circle, Marker} from 'react-native-maps';
const AdminCacheEditorView = ({ userLocation, caches, onAddCache, onMoveCache }) => {
if (!userLocation) {
return null;
}
return (
<MapView
style={{ flex: 1 }}
initialRegion={{
...userLocation,
latitudeDelta: 0.01,
longitudeDelta: 0.01,
}}
region={{
...userLocation,
latitudeDelta: 0.01,
longitudeDelta: 0.01,
}}
onLongPress={(event) => onAddCache(event.nativeEvent.coordinate)}
showsUserLocation
>
{(caches || []).map((cache) => (
<React.Fragment key={cache.id}>
<Marker
coordinate={cache.coordinates}
draggable
onDragEnd={(event) => onMoveCache(cache.id, event.nativeEvent.coordinate)}
title={`Cache ${cache.id}`}
/>
<Circle
center={cache.coordinates}
radius={cache.radius}
fillColor="rgba(59, 130, 246, 0.15)"
strokeColor="rgba(59, 130, 246, 0.85)"
/>
</React.Fragment>
))}
</MapView>
);
};
export default AdminCacheEditorView;