perf: 设备交互栏添加重启设备及打开通知栏功能

This commit is contained in:
viarotel 2023-10-19 13:56:25 +08:00
parent 43f15be265
commit 1341fb82eb
6 changed files with 23 additions and 10 deletions

View File

@ -1,9 +1,9 @@
# Escrcpy
📱 使用图形界面的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动
📱 使用图形界面的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动 [查看更多截图](https://github.com/viarotel-org/escrcpy/tree/main/public/screenshot)
<div style="display:flex;">
<img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/570065a5683b4cf7af9cfa9743c06ab4~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1360&h=693&s=140693&e=jpg&b=ffffff" alt="viarotel-escrcpy" style="width: 100%;">
<img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3c2b84b35f8e49d3b809e89272c59e16~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1359&h=693&s=144785&e=jpg&b=fefefe" alt="viarotel-escrcpy" style="width: 100%;">
</div>
## 特点
@ -48,13 +48,14 @@
请参阅 [scrcpy/doc/shortcuts](https://github.com/Genymobile/scrcpy/blob/master/doc/shortcuts.md)
## 设备交互操作
## 设备交互栏
- 切换键
- 主屏幕键
- 返回键
- 菜单键
- 通知栏
- 电源键
- 重启设备
- 截取屏幕
- 安装应用

BIN
public/screenshot/about.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

View File

@ -51,10 +51,10 @@ export default {
command: 'input keyevent KEYCODE_BACK',
},
{
label: '菜单键',
elIcon: 'Menu',
command: 'input keyevent KEYCODE_MENU',
tips: '不要和切换键搞错啦',
label: '通知栏',
elIcon: 'Notification',
command: 'cmd statusbar expand-notifications',
tips: '打开下拉菜单选项',
},
{
label: '电源键',
@ -62,6 +62,12 @@ export default {
command: 'input keyevent KEYCODE_POWER',
tips: '可以用来开启或关闭屏幕',
},
{
label: '重启设备',
elIcon: 'RefreshLeft',
command: 'reboot',
tips: '可以用来开启或关闭屏幕',
},
{
label: '截取屏幕',
elIcon: 'Crop',

View File

@ -241,7 +241,11 @@ export default {
const savePath = this.getRecordPath(row)
try {
const command = `--serial=${row.id} --window-title=${row.name}-${row.id}-🎥录制中... --record=${savePath} ${this.stringScrcpyConfig}`
const command = `--serial=${row.id} --window-title=${
row.$remark ? `${row.$remark}-` : ''
}${row.name}-${row.id}-🎥录制中... --record=${savePath} ${
this.stringScrcpyConfig
}`
console.log('handleRecord.command', command)
@ -273,7 +277,9 @@ export default {
try {
await this.$scrcpy.shell(
`--serial=${row.id} --window-title=${row.name}-${row.id} ${this.stringScrcpyConfig}`,
`--serial=${row.id} --window-title=${
row.$remark ? `${row.$remark}-` : ''
}${row.name}-${row.id} ${this.stringScrcpyConfig}`,
{ stdout: this.onStdout },
)
}