update tag schema

This commit is contained in:
Will Freeman
2026-01-21 20:13:47 -07:00
parent 7717e81d00
commit c665f79165
2 changed files with 20 additions and 4 deletions
+17 -2
View File
@@ -1,7 +1,22 @@
import { lprBaseTags } from "@/constants";
export function createDeflockProfileUrl(obj: Record<string, string>): string {
interface DeflockProfileTags {
name: string;
tags: Record<string, string>;
requiresDirection: boolean;
submittable: boolean;
fov: number;
}
export function createDeflockProfileUrl(name: string, obj: Record<string, string>): string {
const tags = { ...lprBaseTags, ...obj };
const payload = btoa(JSON.stringify(tags));
const profile: DeflockProfileTags = {
name,
tags,
requiresDirection: true,
submittable: true,
fov: 90.0,
};
const payload = btoa(JSON.stringify(profile));
return `deflockapp://profiles/add?p=${payload}`;
}