From 8097022798ca3ea95ed6530a722f321a862f2e23 Mon Sep 17 00:00:00 2001 From: viarotel Date: Sat, 13 Jul 2024 17:05:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=89=20Support=20batch=20execut?= =?UTF-8?q?ion=20script=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc-auto-import.json | 3 +- README-CN.md | 17 +- README.md | 21 +- auto-imports.d.ts | 1 + .../BatchActions/Application/index.vue | 41 +++- .../BatchActions/FileManage/index.vue | 71 ++++++ .../BatchActions/Screenshot/index.vue | 21 +- .../components/BatchActions/Shell/index.vue | 83 +++++++ .../Device/components/BatchActions/index.vue | 56 ++--- .../ControlBar/Application/index.vue | 53 +++-- .../ControlBar/FileManage/index.vue | 161 ++++++------- .../components/ControlBar/Gnirehtet/index.vue | 6 +- .../components/ControlBar/Shell/index.vue | 59 ++--- .../components/TerminalDialog/index.vue | 211 ++++++++++-------- .../components/TerminalAction/index.vue | 2 +- src/locales/languages/en-US.json | 8 +- src/locales/languages/zh-CN.json | 8 +- src/locales/languages/zh-TW.json | 8 +- src/plugins/element-plus/index.js | 8 +- src/utils/device/index.js | 66 ++++++ src/utils/index.js | 37 +++ 21 files changed, 625 insertions(+), 316 deletions(-) create mode 100644 src/components/Device/components/BatchActions/FileManage/index.vue create mode 100644 src/components/Device/components/BatchActions/Shell/index.vue create mode 100644 src/utils/device/index.js diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index 74a9e1d9..385207c6 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -79,6 +79,7 @@ "watch": true, "watchEffect": true, "watchPostEffect": true, - "watchSyncEffect": true + "watchSyncEffect": true, + "ElMessage": true } } diff --git a/README-CN.md b/README-CN.md index c5e4adf5..07802d6b 100644 --- a/README-CN.md +++ b/README-CN.md @@ -76,7 +76,10 @@ Windows 及 Linux 端内部集成了 Gnirehtet, 用于提供 PC 到安卓设 ### 批量处理 +- 批量截取屏幕 - 批量安装应用 +- 批量文件管理 +- 批量执行脚本 ### 控制模式 @@ -99,6 +102,7 @@ Windows 及 Linux 端内部集成了 Gnirehtet, 用于提供 PC 到安卓设 - 重启设备 - 安装应用 - 文件管理 +- 执行脚本 - 反向供网(Gnirehtet) - 多屏协同 @@ -204,13 +208,12 @@ Windows 及 Linux 端内部集成了 Gnirehtet, 用于提供 PC 到安卓设 15. 支持批量连接历史设备功能 ✅ 16. 支持使用内置终端执行自定义命令 ✅ 17. 支持设备自动执行镜像 ✅ -18. 支持常用批量功能 ✅ -19. 支持灵活启动镜像 ✅ -20. 支持更多批量处理功能 🚧 -21. 支持对设备进行分组 🚧 -22. 添加文件传输助手功能 🚧 -23. 支持通过界面从设备下载选中的文件 🚧 -24. 添加对游戏的增强功能,如游戏键位映射 🚧 +18. 支持灵活启动镜像 ✅ +19. 支持常用批量功能 ✅ +20. 支持对设备进行分组 🚧 +21. 添加文件传输助手功能 🚧 +22. 支持通过界面从设备下载选中的文件 🚧 +23. 添加对游戏的增强功能,如游戏键位映射 🚧 ## 常见问题 diff --git a/README.md b/README.md index a5f83359..ff7a4d26 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,10 @@ Refer to [scrcpy/doc/shortcuts](https://github.com/Genymobile/scrcpy/blob/master ### Batch Processing -- Batch installation application +- Batch Interception Screen +- Batch Installation Application +- Batch File Management +- Batch Execution Script ### Control Model @@ -97,6 +100,7 @@ Refer to [scrcpy/doc/shortcuts](https://github.com/Genymobile/scrcpy/blob/master - Reboot - Install APP - File Manager +- Execution Script - Gnirehtet - Mirror Group @@ -201,14 +205,13 @@ Refer to [scrcpy/doc/shortcuts](https://github.com/Genymobile/scrcpy/blob/master 14. Add more features to device interaction bar: file push, screen rotation, audio control etc ✅ 15. Support bulk connecting to historical devices ✅ 16. Support to use built-in terminals to execute custom commands ✅ -17. Supports automatic execution of mirror on devices ✅ -18. Support common batch processing function ✅ -19. Support for custom startup mirroring ✅ -20. Support more batch processing functions 🚧 -21. Support the device to group 🚧 -22. Add file transmission assistant function 🚧 -23. Support GUI-based selective file downloads from devices 🚧 -24. Add game enhancement features such as game keyboard mapping 🚧 +17. Support automatic execution of mirror on devices ✅ +18. Support for custom startup mirroring ✅ +19. Support common batch processing function ✅ +20. Support the device to group 🚧 +21. Add file transmission assistant function 🚧 +22. Support GUI-based selective file downloads from devices 🚧 +23. Add game enhancement features such as game keyboard mapping 🚧 ## FAQ diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 0ce0ca81..9c51698c 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -6,6 +6,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElMessage: typeof import('element-plus/es')['ElMessage'] const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] diff --git a/src/components/Device/components/BatchActions/Application/index.vue b/src/components/Device/components/BatchActions/Application/index.vue index e785c4d6..6453d4fd 100644 --- a/src/components/Device/components/BatchActions/Application/index.vue +++ b/src/components/Device/components/BatchActions/Application/index.vue @@ -1,13 +1,13 @@ + + diff --git a/src/components/Device/components/BatchActions/Screenshot/index.vue b/src/components/Device/components/BatchActions/Screenshot/index.vue index 4adeb46f..353f2d58 100644 --- a/src/components/Device/components/BatchActions/Screenshot/index.vue +++ b/src/components/Device/components/BatchActions/Screenshot/index.vue @@ -1,13 +1,13 @@ + + diff --git a/src/components/Device/components/BatchActions/index.vue b/src/components/Device/components/BatchActions/index.vue index 33468c09..566b065f 100644 --- a/src/components/Device/components/BatchActions/index.vue +++ b/src/components/Device/components/BatchActions/index.vue @@ -38,41 +38,41 @@ - diff --git a/src/components/Device/components/ControlBar/Application/index.vue b/src/components/Device/components/ControlBar/Application/index.vue index c4559db7..d7cb061d 100644 --- a/src/components/Device/components/ControlBar/Application/index.vue +++ b/src/components/Device/components/ControlBar/Application/index.vue @@ -5,6 +5,8 @@ diff --git a/src/components/Device/components/ControlBar/Gnirehtet/index.vue b/src/components/Device/components/ControlBar/Gnirehtet/index.vue index a3e2623e..4881bd1a 100644 --- a/src/components/Device/components/ControlBar/Gnirehtet/index.vue +++ b/src/components/Device/components/ControlBar/Gnirehtet/index.vue @@ -7,7 +7,7 @@ @@ -48,9 +48,7 @@ export default { try { await this.$gnirehtet.run(this.device.id) await sleep() - this.$message.success( - this.$t('device.control.gnirehtet.start.success'), - ) + this.$message.success(this.$t('device.control.gnirehtet.start.success')) } catch (error) { this.$message.warning(error.message || 'Start service failure') diff --git a/src/components/Device/components/ControlBar/Shell/index.vue b/src/components/Device/components/ControlBar/Shell/index.vue index 7a32e42c..646ad016 100644 --- a/src/components/Device/components/ControlBar/Shell/index.vue +++ b/src/components/Device/components/ControlBar/Shell/index.vue @@ -6,74 +6,45 @@ diff --git a/src/components/Device/components/TerminalAction/components/TerminalDialog/index.vue b/src/components/Device/components/TerminalAction/components/TerminalDialog/index.vue index 24287fa6..52b84f2e 100644 --- a/src/components/Device/components/TerminalAction/components/TerminalDialog/index.vue +++ b/src/components/Device/components/TerminalAction/components/TerminalDialog/index.vue @@ -4,27 +4,26 @@ width="80%" :close-on-click-modal="false" :close-on-press-escape="true" - destroy-on-close + :destroy-on-close="true" class="overflow-hidden !rounded-md el-dialog-headless dark:border dark:border-gray-700" @closed="onClosed" > - @@ -37,125 +36,141 @@ -