Allow Profile Imports to App, Map Sharing, iframe improvements (#102)

* update identiyf page

* support non-ALPRs on Idenfity page

* show pending devices, even w/o tags

* update lprBaseTags

* detect iframe instead of passing query string

* implement share dialog

* clean up identify

* finishing touches for identify page
This commit is contained in:
Will Freeman
2026-02-16 20:09:02 -07:00
committed by GitHub
parent c71898e1a0
commit 5cca87208d
14 changed files with 550 additions and 273 deletions
+10 -1
View File
@@ -1,4 +1,4 @@
import type { LprVendor } from "@/types";
import type { LprVendor, OtherSurveillanceDevice } from "@/types";
import axios from "axios";
export interface Chapter {
@@ -42,5 +42,14 @@ export const cmsService = {
console.error("Error fetching LPR vendors:", error);
throw new Error("Failed to fetch LPR vendors");
}
},
async getOtherSurveillanceDevices(): Promise<OtherSurveillanceDevice[]> {
try {
const response = await cmsApiService.get("/items/nonLprVendors");
return response.data.data as OtherSurveillanceDevice[];
} catch (error) {
console.error("Error fetching other surveillance devices:", error);
throw new Error("Failed to fetch other surveillance devices");
}
}
};
+14 -10
View File
@@ -1,21 +1,25 @@
import { lprBaseTags } from "@/constants";
interface DeflockProfileTags {
interface DeflockProfile {
name: string;
tags: Record<string, string>;
requiresDirection: boolean;
submittable: boolean;
fov: number;
fov: number | null;
}
export function createDeflockProfileUrl(name: string, obj: Record<string, string>): string {
const tags = { ...lprBaseTags, ...obj };
const profile: DeflockProfileTags = {
interface DeflockProfileOptions {
requiresDirection?: boolean;
fov?: number | null;
}
export function createDeflockProfileUrl(name: string, osmTags: Record<string, string>, options?: DeflockProfileOptions): string {
const { requiresDirection = true, fov = null } = options || {};
const profile: DeflockProfile = {
name,
tags,
requiresDirection: true,
tags: osmTags,
submittable: true,
fov: 90.0,
requiresDirection,
fov
};
const payload = btoa(JSON.stringify(profile));
return `deflockapp://profiles/add?p=${payload}`;