From 9eb582a6e82f8cd11e381707205819e363dae61b Mon Sep 17 00:00:00 2001 From: PAN Lei Date: Tue, 1 Oct 2024 17:08:12 +0200 Subject: [PATCH] support mi 5s --- src/workers/CommandorPage.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index f2d5df5..d30adf4 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -728,7 +728,7 @@ class CommandorPage { async slidingCaptcha(onResult) { logWithDevice("slidingCaptcha", this.device); - if (this.device.model === "MI 5s" || this.device.model === "ASUS_X00QD" || this.device.model === "ASUS_Z012D" || this.device.model === "HUAWEI NXT-TL00") { + if (this.device.model === "MI_5s" || this.device.model === "ASUS_X00QD" || this.device.model === "ASUS_Z012D" || this.device.model === "HUAWEI NXT-TL00") { let cmd = `adb -s ${this.device.serial} shell input touchscreen swipe 900 495 900 195` await exec(cmd); await delay(5000); @@ -995,7 +995,7 @@ class CommandorPage { break; case OCRResult.BRAVE_PRIVACY: let model = this.device.model - if (model === "MI 5s" || this.device.model === "SM-G965U1" || this.device.model === "ASUS_Z012D") { + if (model === "MI_5s" || this.device.model === "SM-G965U1" || this.device.model === "ASUS_Z012D") { await this.tapForDevice(this.device, 530, 970) } else if (model === "HUAWEI NXT-TL00") { await this.tapForDevice(this.device, 530, 950) @@ -1023,7 +1023,7 @@ class CommandorPage { await this.checkResultWithOcr(); break; case OCRResult.BRAVE_PRIVACY_PUB: - if (this.device.model === "MI 5s" || this.device.model === "ASUS_Z012D") { + if (this.device.model === "MI_5s" || this.device.model === "ASUS_Z012D") { await this.tapForDevice(this.device, 60, 1400) } else if (this.device.model === "HUAWEI NXT-TL00") { await this.tapForDevice(this.device, 530, 950) @@ -1307,7 +1307,7 @@ class CommandorPage { let model = this.device.model if (model === "CPH2219") { await this.tapForDevice(this.device, 558, 1160) - } else if (model === "MI 5s" || model === "ASUS_Z012D") { + } else if (model === "MI_5s" || model === "ASUS_Z012D") { await this.tapForDevice(this.device, 530, 1000) } else if (model === "SM-G965U1") { await this.tapForDevice(this.device, 530, 1000) @@ -1350,7 +1350,7 @@ class CommandorPage { async clickOnConfirmBtn() { if (this.device.model === "CPH2219") { this.device.shell("input tap " + 900 + " " + 1532) - } else if (this.device.model === "MI 5s") { + } else if (this.device.model === "MI_5s") { this.device.shell("input tap " + 925 + " " + 1325) } else if (this.device.model === "22041219PG") { this.device.shell("input tap " + 925 + " " + 1430) @@ -1375,7 +1375,7 @@ class CommandorPage { await this.tapForDevice(this.device, 107, 2193) await delay(2000); await openUrlWithAdb(RDV_URL, this.device) - } else if (this.device.model === "MI 5s") { + } else if (this.device.model === "MI_5s") { await this.tapForDevice(this.device, 110, 1842) await delay(2000); await openUrlWithAdb(RDV_URL, this.device) @@ -1425,7 +1425,7 @@ class CommandorPage { this.device.shell("input tap " + 772 + " " + 2146) await delay(2000); this.device.shell("input tap " + 772 + " " + 2146) - } else if (model === "MI 5s") { + } else if (model === "MI_5s") { this.device.shell("input tap " + 786 + " " + 1780) await delay(2000); this.device.shell("input tap " + 790 + " " + 1807) @@ -1463,7 +1463,7 @@ class CommandorPage { this.device.shell("input tap " + 540 + " " + 1985) } else if (model === "21091116C") { this.device.shell("input tap " + 510 + " " + 1975) - } else if (model === "MI 5s") { + } else if (model === "MI_5s") { this.device.shell("input tap " + 510 + " " + 1615) } else this.device.shell("input tap " + 385 + " " + 2050) @@ -1488,7 +1488,7 @@ class CommandorPage { } async tapGoogleDisconnectBtn() { - if (this.device.model === "MI 5s") { + if (this.device.model === "MI_5s") { if (this.browserPackageName.includes("brave")) { await this.tapForDevice(this.device, 535, 1629) } else