add support for surveillance prefix, update node deps

This commit is contained in:
Will Freeman
2025-12-04 16:31:23 -07:00
parent 4331762cfa
commit e0095d1096
5 changed files with 449 additions and 263 deletions

View File

@@ -36,6 +36,9 @@ WHITELISTED_TAGS = [
"direction",
"brand",
"camera:direction",
"surveillance:brand",
"surveillance:operator",
"surveillance:manufacturer"
]
def get_all_nodes():

676
webapp/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -26,12 +26,12 @@
"@tsconfig/node20": "^20.1.4",
"@types/leaflet": "^1.9.15",
"@types/node": "^20.14.5",
"@vitejs/plugin-vue": "^5.0.5",
"@vitejs/plugin-vue": "^6.0.2",
"@vue/tsconfig": "^0.5.1",
"leaflet": "^1.9.4",
"npm-run-all2": "^6.2.0",
"typescript": "~5.4.0",
"vite": "^5.4.21",
"vite": "^7.2.6",
"vue-tsc": "^2.0.21"
}
}

View File

@@ -22,13 +22,6 @@
{{ abbreviatedOperator }}
</span>
</b>
<!-- TODO: add transparency portal link if exists -->
<!-- <template v-slot:append>
<v-btn icon size="small" variant="text" :href="transparencyLink" target="_blank" color="primary">
<v-icon icon="mdi-open-in-new"></v-icon>
</v-btn>
</template> -->
</v-list-item>
<v-divider class="my-2" />
@@ -70,14 +63,13 @@ const props = defineProps({
});
const manufacturer = computed(() => (
props.alpr.tags.manufacturer || props.alpr.tags.brand || 'Unknown'
props.alpr.tags.manufacturer ||
props.alpr.tags['surveillance:manufacturer'] ||
props.alpr.tags.brand ||
props.alpr.tags['surveillance:brand'] ||
'Unknown'
));
const transparencyLink = computed(() => {
// XXX: eventually get this from /api/operator-info?wikidata=Q1234
return `https://transparency.flocksafety.com/boulder-co-pd`;
});
const imageUrl: ComputedRef<string|undefined> = computed(() => {
const mft2Url: Record<string, string> = {
'Flock Safety': '/alprs/flock-1.jpg',
@@ -91,7 +83,12 @@ const imageUrl: ComputedRef<string|undefined> = computed(() => {
});
const abbreviatedOperator = computed(() => {
if (props.alpr.tags.operator === undefined) {
const operatorTagKeys = [
"operator",
"surveillance:operator"
]
const operatorTagKey = operatorTagKeys.find(key => props.alpr.tags[key] !== undefined);
if (!operatorTagKey) {
return 'Unknown';
}
@@ -99,7 +96,6 @@ const abbreviatedOperator = computed(() => {
"Police Department": "PD",
"Sheriff's Office": "SO",
"Sheriffs Office": "SO",
// TODO: maybe include HOAs
};
const operator = props.alpr.tags.operator;

View File

@@ -5,7 +5,8 @@
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "es2020",
"lib": ["es2020", "dom"],
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]