Files
deflock/webapp/src/services/deflockAppUrls.ts
T
Will Freeman 5cca87208d 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
2026-02-16 20:09:02 -07:00

26 lines
667 B
TypeScript

interface DeflockProfile {
name: string;
tags: Record<string, string>;
requiresDirection: boolean;
submittable: boolean;
fov: number | null;
}
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: osmTags,
submittable: true,
requiresDirection,
fov
};
const payload = btoa(JSON.stringify(profile));
return `deflockapp://profiles/add?p=${payload}`;
}