improve db
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline failed

This commit is contained in:
Madison Grubb
2026-02-12 13:28:36 -05:00
parent 9d153c852d
commit fbb38c5dd7
17 changed files with 292 additions and 654 deletions

View File

@@ -214,10 +214,6 @@
import 'leaflet/dist/leaflet.css'
const props = defineProps({
feeds: {
type: Array,
default: () => [],
},
devices: {
type: Array,
default: () => [],
@@ -382,8 +378,7 @@ function updateMarkers() {
if (m) m.remove()
})
const feedSources = [...(props.feeds || []), ...(props.devices || [])]
const validSources = feedSources.filter(f => typeof f?.lat === 'number' && typeof f?.lng === 'number')
const validSources = (props.devices || []).filter(f => typeof f?.lat === 'number' && typeof f?.lng === 'number')
markersRef.value = validSources.map(item =>
L.marker([item.lat, item.lng]).addTo(ctx.map).on('click', () => emit('select', item)),
)
@@ -622,7 +617,7 @@ onBeforeUnmount(() => {
destroyMap()
})
watch(() => [props.feeds, props.devices], () => updateMarkers(), { deep: true })
watch(() => props.devices, () => updateMarkers(), { deep: true })
watch([() => props.pois, () => props.canEditPois], () => updatePoiMarkers(), { deep: true })
watch(() => props.liveSessions, () => updateLiveMarkers(), { deep: true })
</script>