feat: add iPhone 13/14/15 Pro device configurations

This commit is contained in:
张翔
2026-03-05 14:29:34 +08:00
parent 060566fd73
commit fa77f36b4d
2 changed files with 22 additions and 0 deletions
+1
View File
@@ -39,6 +39,7 @@ export interface DeviceConfig {
viewport: { width: number; height: number };
userAgent?: string;
isMobile: boolean;
deviceScaleFactor?: number;
}
export interface TestResult {
+21
View File
@@ -61,6 +61,27 @@ export const devices: Record<string, DeviceConfig> = {
viewport: { width: 412, height: 915 },
isMobile: true,
},
'iphone-13-pro': {
name: 'iPhone 13 Pro',
viewport: { width: 390, height: 844 },
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1',
isMobile: true,
deviceScaleFactor: 3,
},
'iphone-14-pro': {
name: 'iPhone 14 Pro',
viewport: { width: 393, height: 852 },
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1',
isMobile: true,
deviceScaleFactor: 3,
},
'iphone-15-pro': {
name: 'iPhone 15 Pro',
viewport: { width: 393, height: 852 },
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1',
isMobile: true,
deviceScaleFactor: 3,
},
};
export const desktopDevices = Object.entries(devices)