songs2vid/lib/client-id.ts
Atakan Doğan Özban 18c32fb569 fix: mobile dashboard dropzone and dead-click UX for ad traffic
- Split mobile file picker into separate cover/audio native inputs (iOS-safe)
- Overlay file input on desktop instead of programmatic click()
- Safe createClientId() fallback when crypto.randomUUID is missing
- Pro-locked layout controls show feedback instead of silent disabled taps
- Render button explains what is missing when tapped before ready
2026-08-20 04:27:03 +02:00

8 lines
331 B
TypeScript

/** UUID for client-side ids (upload sessions, list keys). Safe in older WebViews. */
export function createClientId(): string {
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
return crypto.randomUUID();
}
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;
}