Skip to content

Commit

Permalink
fix: 🔧 修复点击无线模式没有反应的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Oct 13, 2023
1 parent 598e7f2 commit 9d55ef9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 8 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
📱 Use Scrcpy with a graphical interface to display and control your Android device, driven by Electron

<div style="display:flex;">
<img src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/2ec54d3187af4921b3187cbd63338d04~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1359&h=693&s=132373&e=jpg&b=fefefe" alt="viarotel-escrcpy" style="width: 100%;">
<img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d75ea2c87c734591b2b5c337d8c8b365~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1359&h=693&s=135919&e=jpg&b=ffffff" alt="viarotel-escrcpy" style="width: 100%;">
</div>

## 特点
Expand Down Expand Up @@ -114,6 +114,10 @@

第一次无线连接可能需要配对 或 插入USB 以保证与电脑建立连接即授权成功后方可使用

### 通过数据线连接后点击无线模式没有反应

请再点一次,或点击刷新设备,一般不会超过两次,如果还不行,请提供机型和安卓版本信息到 [Issues](https://github.com/viarotel-org/escrcpy/issues)

## 获得帮助

> 因为是开源项目 全靠爱发电 所以支持有限 更新节奏不固定
Expand Down
Binary file removed resources/screenshot/devices-full.jpg
Binary file not shown.
43 changes: 36 additions & 7 deletions src/renderer/src/components/Devices/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,23 @@
>
</el-input>

<el-button type="primary" :loading="connectLoading" @click="handleConnect">
<el-button
type="primary"
:icon="connectLoading ? '' : 'Connection'"
:loading="connectLoading"
@click="handleConnect"
>
连接设备
</el-button>
<el-button type="primary" :loading="loading" @click="getDeviceData">
<el-button
type="primary"
:icon="loading ? '' : 'Refresh'"
:loading="loading"
@click="getDeviceData"
>
刷新设备
</el-button>
<el-button type="warning" @click="handleReset">
<el-button type="warning" icon="RefreshRight" @click="handleReset">
重启服务
</el-button>
</div>
Expand Down Expand Up @@ -63,40 +73,58 @@
</div>
</template>
</el-table-column>
<el-table-column label="操作" width="450" align="left">
<el-table-column label="操作" width="500" align="left">
<template #default="{ row }">
<el-button
type="primary"
text
:loading="row.$loading"
:disabled="row.$unauthorized"
:icon="row.$loading ? '' : 'Monitor'"
@click="handleMirror(row)"
>
{{ row.$loading ? '镜像中' : '开始镜像' }}
</el-button>

<el-button
type="primary"
text
:loading="row.$recordLoading"
:disabled="row.$unauthorized"
:icon="row.$recordLoading ? '' : 'VideoCamera'"
@click="handleRecord(row)"
>
{{ row.$recordLoading ? '录制中' : '开始录制' }}
</el-button>

<el-button
type="primary"
text
icon="SwitchButton"
:disabled="row.$unauthorized"
@click="handleScreenUp(row)"
>
点亮屏幕
</el-button>

<el-button
v-if="!row.$wireless"
type="primary"
text
:disabled="row.$unauthorized || row.$loading || row.$recordLoading"
:icon="row.$recordLoading ? '' : 'Switch'"
@click="handleWifi(row)"
>
无线模式
</el-button>
<el-button type="default" :disabled="row.$unauthorized" @click="handleScreenUp(row)">
点亮屏幕
</el-button>

<el-button
v-if="row.$wireless"
type="danger"
text
:loading="row.$stopLoading"
:disabled="row.$unauthorized"
:icon="row.$stopLoading ? '' : 'CircleClose'"
@click="handleStop(row)"
>
{{ row.$stopLoading ? '断开中' : '断开连接' }}
Expand Down Expand Up @@ -216,6 +244,7 @@ export default {
this.formData.host = host
this.formData.port = port
console.log('host:port', `${host}:${port}`)
await sleep()
this.handleConnect()
}
Expand Down

0 comments on commit 9d55ef9

Please sign in to comment.