feat: add newsletter broadcast system with admin login and dynamic QR code redirect service with scan tracking.
This commit is contained in:
@@ -24,11 +24,11 @@ export function parseUserAgent(userAgent: string | null): { device: string | nul
|
||||
let device: string | null = null;
|
||||
let os: string | null = null;
|
||||
|
||||
// Detect device
|
||||
if (/Mobile|Android|iPhone|iPad/.test(userAgent)) {
|
||||
device = 'mobile';
|
||||
} else if (/Tablet|iPad/.test(userAgent)) {
|
||||
// Detect device - check tablet FIRST since iPad can match mobile patterns
|
||||
if (/Tablet|iPad/i.test(userAgent)) {
|
||||
device = 'tablet';
|
||||
} else if (/Mobile|Android|iPhone/i.test(userAgent)) {
|
||||
device = 'mobile';
|
||||
} else {
|
||||
device = 'desktop';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user