fix(keyboard): support OPPO Facebook fallback

This commit is contained in:
2026-07-01 17:30:29 +08:00
parent fa5b380577
commit 94bb6adbb5
5 changed files with 42 additions and 52 deletions
+6
View File
@@ -91,6 +91,12 @@ export class PlatformDetector {
return /\b(Xiaomi|Redmi|POCO|Mi\s|MIX|MIUI)\b/i.test(target);
}
static isOppoFamilyDevice(ua: string | null = null): boolean {
const info = PlatformDetector.getPlatformInfo(ua);
const target = `${info.deviceVendor} ${info.deviceModel} ${info.userAgent}`;
return /\b(OPPO|OPlus|ColorOS|CPH\d{3,})\b/i.test(target);
}
private static getUserAgent(ua: string | null = null): string {
if (ua) return ua;
if (typeof navigator === "undefined") return "";