mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2025-02-21 04:27:06 +01:00
perf: ⬆️ Improved performance of automated mirroring
This commit is contained in:
parent
d054f8df6c
commit
33a03c3f63
@ -1,4 +1,9 @@
|
|||||||
export const deviceStatus = [
|
export const deviceStatus = [
|
||||||
|
{
|
||||||
|
label: 'device.status.connected',
|
||||||
|
value: 'emulator',
|
||||||
|
tagType: 'success',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'device.status.connected',
|
label: 'device.status.connected',
|
||||||
value: 'device',
|
value: 'device',
|
||||||
@ -14,4 +19,9 @@ export const deviceStatus = [
|
|||||||
value: 'offline',
|
value: 'offline',
|
||||||
tagType: 'info',
|
tagType: 'info',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'device.status.authorizing',
|
||||||
|
value: 'authorizing',
|
||||||
|
tagType: 'warning',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
"device.status.connected": "Connected",
|
"device.status.connected": "Connected",
|
||||||
"device.status.offline": "Offline",
|
"device.status.offline": "Offline",
|
||||||
"device.status.unauthorized": "Unauthorized",
|
"device.status.unauthorized": "Unauthorized",
|
||||||
|
"device.status.authorizing": "authorizing",
|
||||||
"device.battery": "Device Battery",
|
"device.battery": "Device Battery",
|
||||||
"device.isCharging": "Charging Status",
|
"device.isCharging": "Charging Status",
|
||||||
"device.temperature": "Device Temperature",
|
"device.temperature": "Device Temperature",
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
"device.terminal.name": "Терминал",
|
"device.terminal.name": "Терминал",
|
||||||
"device.status": "Статус",
|
"device.status": "Статус",
|
||||||
"device.status.connected": "Подключено",
|
"device.status.connected": "Подключено",
|
||||||
|
"device.status.authorizing": "Авторизация",
|
||||||
"device.status.offline": "Не в сети",
|
"device.status.offline": "Не в сети",
|
||||||
"device.status.unauthorized": "Не авторизован",
|
"device.status.unauthorized": "Не авторизован",
|
||||||
"device.battery": "Уровень заряда устройства",
|
"device.battery": "Уровень заряда устройства",
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
"device.status.offline": "已离线",
|
"device.status.offline": "已离线",
|
||||||
"device.status.unauthorized": "未授权",
|
"device.status.unauthorized": "未授权",
|
||||||
"device.status.connected": "已连接",
|
"device.status.connected": "已连接",
|
||||||
|
"device.status.authorizing": "授权中",
|
||||||
"device.battery": "设备电量",
|
"device.battery": "设备电量",
|
||||||
"device.isCharging": "充电状态",
|
"device.isCharging": "充电状态",
|
||||||
"device.temperature": "设备温度",
|
"device.temperature": "设备温度",
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
"device.status.connected": "已連接",
|
"device.status.connected": "已連接",
|
||||||
"device.status.offline": "已離線",
|
"device.status.offline": "已離線",
|
||||||
"device.status.unauthorized": "未授權",
|
"device.status.unauthorized": "未授權",
|
||||||
|
"device.status.authorizing": "授權中",
|
||||||
"device.battery": "設備電量",
|
"device.battery": "設備電量",
|
||||||
"device.isCharging": "充電狀態",
|
"device.isCharging": "充電狀態",
|
||||||
"device.temperature": "設備溫度",
|
"device.temperature": "設備溫度",
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-slot="{ row, $index }"
|
v-slot="{ row }"
|
||||||
:label="$t('device.control.name')"
|
:label="$t('device.control.name')"
|
||||||
align="left"
|
align="left"
|
||||||
width="150"
|
width="150"
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<div class="flex items-center !space-x-0">
|
<div class="flex items-center !space-x-0">
|
||||||
<MirrorAction
|
<MirrorAction
|
||||||
v-if="['device', 'unauthorized'].includes(row.status)"
|
v-if="['device', 'unauthorized'].includes(row.status)"
|
||||||
:ref="(value) => getMirrorActionRefs(value, $index)"
|
:ref="getMirrorActionRefs"
|
||||||
v-bind="{ row, toggleRowExpansion, handleReset }"
|
v-bind="{ row, toggleRowExpansion, handleReset }"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -240,6 +240,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async onAdbWatch(type, ret) {
|
async onAdbWatch(type, ret) {
|
||||||
if (ret && ret.id) {
|
if (ret && ret.id) {
|
||||||
|
await sleep(1000)
|
||||||
this.getDeviceData()
|
this.getDeviceData()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,7 +250,7 @@ export default {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getMirrorActionRefs(ref, index) {
|
async getMirrorActionRefs(ref) {
|
||||||
await this.$nextTick()
|
await this.$nextTick()
|
||||||
|
|
||||||
if (!ref?.row?.id) {
|
if (!ref?.row?.id) {
|
||||||
@ -264,11 +265,11 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const length = this.mirrorActionRefs.length
|
||||||
|
|
||||||
this.mirrorActionRefs.push(ref)
|
this.mirrorActionRefs.push(ref)
|
||||||
|
|
||||||
const secondNum = index
|
await sleep(length * 1000)
|
||||||
|
|
||||||
await sleep(secondNum * 2000)
|
|
||||||
|
|
||||||
const autoMirror = this.$store.preference.data.autoMirror
|
const autoMirror = this.$store.preference.data.autoMirror
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user