mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-06-30 17:55:42 +02:00
5cca87208d
* 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
26 lines
667 B
TypeScript
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}`;
|
|
} |