From d72202b3117fd5b98b5a96dd95fad37579fc7abe Mon Sep 17 00:00:00 2001 From: viarotel Date: Wed, 24 Jul 2024 19:06:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20Add=20a=20scheduled=20ta?= =?UTF-8?q?sk=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc-auto-import.json | 3 +- README-CN.md | 58 ++--- README.md | 58 ++--- auto-imports.d.ts | 1 - components.d.ts | 3 +- package.json | 1 + .../Tasks/components/TaskDialog/index.vue | 54 +++-- .../Device/components/BatchActions/index.vue | 3 +- .../Device/components/ControlBar/index.vue | 2 +- .../Device/components/MirrorAction/index.vue | 2 +- .../Device/components/MoreDropdown/index.vue | 2 +- src/components/Preference/index.vue | 6 +- .../Task/components/TaskListDialog/index.vue | 201 ++++++++++++++++ .../Quick/components/Task/index.vue | 19 ++ src/components/Quick/index.vue | 34 ++- src/dicts/helper.js | 21 ++ src/dicts/tasks/index.js | 18 +- src/locales/languages/en-US.json | 33 ++- src/locales/languages/zh-CN.json | 33 ++- src/locales/languages/zh-TW.json | 33 ++- .../EleFormItemCol/index.vue | 0 .../EleFormRow/index.vue | 0 .../EleIconLoading/index.vue | 0 .../expands/EleTagCollapse/index.vue | 92 ++++++++ .../element-plus/expands/EleTagDict/index.vue | 43 ++++ .../expands/EleTooltipButton/index.vue | 21 ++ src/plugins/element-plus/index.js | 12 +- src/store/index.js | 3 + src/store/task/index.js | 221 +++++++++++------- src/utils/index.js | 2 +- unocss.config.js | 4 +- 31 files changed, 780 insertions(+), 203 deletions(-) create mode 100644 src/components/Quick/components/Task/components/TaskListDialog/index.vue create mode 100644 src/components/Quick/components/Task/index.vue create mode 100644 src/dicts/helper.js rename src/plugins/element-plus/{components => expands}/EleFormItemCol/index.vue (100%) rename src/plugins/element-plus/{components => expands}/EleFormRow/index.vue (100%) rename src/plugins/element-plus/{components => expands}/EleIconLoading/index.vue (100%) create mode 100644 src/plugins/element-plus/expands/EleTagCollapse/index.vue create mode 100644 src/plugins/element-plus/expands/EleTagDict/index.vue create mode 100644 src/plugins/element-plus/expands/EleTooltipButton/index.vue diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index 385207c..7773ff8 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -80,6 +80,7 @@ "watchEffect": true, "watchPostEffect": true, "watchSyncEffect": true, - "ElMessage": true + "ElMessage": true, + "ElButtonProps": true } } diff --git a/README-CN.md b/README-CN.md index 3ca2efb..2f91a93 100644 --- a/README-CN.md +++ b/README-CN.md @@ -13,10 +13,10 @@ ## 特点 - 🏃 同步:得益于 Web 技术,将更快速的与 Scrcpy 保持同步 -- 🤖 自动化:允许自动连接到历史设备并自动执行镜像。 -- 💡 定制化:支持对多个设备偏好进行独立配置,并且能够添加备注以及导入导出所有配置的功能 -- 🔗 反向供网:集成了 Gnirehtet 反向供网功能 -- 🎨 主题:支持浅色模式和深色模式,跟随系统切换 +- 🤖 自动化:自动连接设备、自动执行镜像、自定义脚本、定时任务 +- 💡 定制化:多设备管理、独立配置、自定义备注、配置导入导出 +- 🔗 反向供网:Gnirehtet 反向供网 +- 🎨 主题:浅色模式、深色模式、跟随系统切换 - 😎 轻巧度:本机支持,仅显示设备屏幕 - ⚡️ 性能:30~120 帧每秒,取决于设备 - 🌟 质量:1920×1080 或更高 @@ -78,6 +78,7 @@ Windows 及 Linux 端内部集成了 Gnirehtet, 用于提供 PC 到安卓设 - 批量安装应用 - 批量文件管理 - 批量执行脚本 +- 批量定时任务 ### 控制模式 @@ -101,6 +102,7 @@ Windows 及 Linux 端内部集成了 Gnirehtet, 用于提供 PC 到安卓设 - 安装应用 - 文件管理 - 执行脚本 +- 定时任务 - 反向供网(Gnirehtet) - 多屏协同 @@ -174,12 +176,12 @@ Windows 及 Linux 端内部集成了 Gnirehtet, 用于提供 PC 到安卓设 ### 输入控制 - 鼠标模式 +- 鼠标绑定 - 键盘模式 - 键盘注入方式 ### 摄像控制 -- 启用摄像 - 摄像源 - 摄像尺寸 - 摄像比例 @@ -189,29 +191,31 @@ Windows 及 Linux 端内部集成了 Gnirehtet, 用于提供 PC 到安卓设 > 优先级从高到低 -1. 用户界面进行优化,制作合适的 Logo ✅ -2. 内置的软件更新功能 ✅ +1. 更好的标志 ✅ +2. 软件更新功能 ✅ 3. 录制和保存音视频 ✅ -4. 添加设备快捷交互控制栏 ✅ -5. 支持自定义 Adb 及 Scrcpy 依赖 ✅ -6. 支持自定义设备名称,以及偏好设置的导出及导入 ✅ -7. 定制化,支持对单个设备进行独立配置 ✅ -8. 添加 macOS 及 linux 操作系统的支持 ✅ -9. 支持国际化 ✅ -10. 对深色模式的支持 ✅ -11. 添加 Gnirehtet 反向供网功能 ✅ -12. 添加新的相机镜像相关功能 ✅ -13. 更好的多屏协同 ✅ -14. 设备交互栏添加更多功能:文件推送、旋转屏幕、音频控制等功能 ✅ -15. 支持批量连接历史设备功能 ✅ -16. 支持使用内置终端执行自定义命令 ✅ -17. 支持设备自动执行镜像 ✅ -18. 支持灵活启动镜像 ✅ -19. 支持常用批量功能 ✅ -20. 支持对设备进行分组 🚧 -21. 添加文件传输助手功能 🚧 -22. 支持通过界面从设备下载选中的文件 🚧 -23. 添加对游戏的增强功能,如游戏键位映射 🚧 +4. 设备快捷交互控制栏 ✅ +5. 自定义 Adb 及 Scrcpy 依赖 ✅ +6. 自定义设备名称 ✅ +7. 偏好设置的导出及导入 ✅ +8. 对单个设备进行独立配置 ✅ +9. 添加 macOS 及 linux 操作系统的支持 ✅ +10. 国际化 ✅ +11. 深色模式 ✅ +12. 反向供网(Gnirehtet) ✅ +13. 相机镜像 ✅ +14. 多屏协同 ✅ +15. 文件推送、旋转屏幕、音频控制 ✅ +16. 批量连接历史设备 ✅ +17. 内置终端 ✅ +18. 自动执行镜像 ✅ +19. 灵活启动镜像 ✅ +20. 批量处理 ✅ +21. 定时任务 ✅ +22. 对设备进行分组 🚧 +23. 文件传输助手 🚧 +24. 通过界面管理设备文件 🚧 +25. 游戏键位映射 🚧 ## 常见问题 diff --git a/README.md b/README.md index 853bf7c..c8f69e3 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,10 @@ ## Features - 🏃 Synchronous: Benefit from web technologies to synchronize with Scrcpy faster -- 🤖 Automation: Enables automatic connection to historical devices and automatic execution of mirror. -- 💡 Customizable: Support independent configuration for multiple devices and ability to add notes and import/export all configurations -- 🎨 Theme: Supports light mode and dark mode, system-wide switching -- 🔗 Gnirehtet: Integrated Gnirehtet's reverse tethering functionality +- 🤖 Automation: Auto-connect devices, auto-execute images, custom scripts, scheduled tasks +- 💡 Customization: Multi-device management, independent configurations, custom notes, config import/export +- 🔗 Reverse tethering: Gnirehtet reverse tethering +- 🎨 Themes: Light mode, dark mode, system-based switching - 😎 Lightweight: Native support, only display device screen - ⚡️ Performance: 30-120 fps depending on device - 🌟 Quality: 1920×1080 or higher @@ -76,6 +76,7 @@ Refer to [scrcpy/doc/shortcuts](https://github.com/Genymobile/scrcpy/blob/master - Batch Installation Application - Batch File Management - Batch Execution Script +- Batch Scheduled Task ### Control Model @@ -99,6 +100,7 @@ Refer to [scrcpy/doc/shortcuts](https://github.com/Genymobile/scrcpy/blob/master - Install APP - File Manager - Execution Script +- Scheduled Task - Gnirehtet - Mirror Group @@ -172,12 +174,12 @@ Refer to [scrcpy/doc/shortcuts](https://github.com/Genymobile/scrcpy/blob/master ### Input Control - Mouse mode +- Mouse binding - Keyboard mode - Keyboard injection method ### Camera Control -- Enable camera - Camera source - Camera resolution - Camera aspect ratio @@ -187,29 +189,31 @@ Refer to [scrcpy/doc/shortcuts](https://github.com/Genymobile/scrcpy/blob/master > Priority from high to low: -1. Optimize user interface, design a suitable logo ✅ -2. Built-in software update function ✅ +1. Improved logo ✅ +2. Software update feature ✅ 3. Record and save audio/video ✅ -4. Add device quick interaction control bar ✅ -5. Support customization of Adb and Scrcpy dependencies ✅ -6. Support custom device name, and import/export of preference settings ✅ -7. Customization, support independent configuration for individual devices ✅ -8. Add support for macOS and linux operating systems ✅ -9. Support internationalization ✅ -10. Support for dark mode ✅ -11. Add Gnirehtet reverse network function ✅ -12. Add new camera mirror related features ✅ -13. Better multi -screen collaboration ✅ -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. 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 🚧 +4. Device quick interaction control bar ✅ +5. Custom Adb and Scrcpy dependencies ✅ +6. Custom device names ✅ +7. Export and import preferences ✅ +8. Individual device configuration ✅ +9. macOS and Linux support ✅ +10. Internationalization ✅ +11. Dark mode ✅ +12. Reverse tethering (Gnirehtet) ✅ +13. Camera mirroring ✅ +14. Multi-screen collaboration ✅ +15. File push, screen rotation, audio control ✅ +16. Batch connect historical devices ✅ +17. Built-in terminal ✅ +18. Auto-execute mirroring ✅ +19. Flexible mirroring launch ✅ +20. Batch processing ✅ +21. Scheduled tasks ✅ +22. Device grouping 🚧 +23. File transfer assistant 🚧 +24. Manage device files via interface 🚧 +25. Game key mapping 🚧 ## FAQ diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 9c51698..0ce0ca8 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -6,7 +6,6 @@ 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/components.d.ts b/components.d.ts index 467ebfe..f71d233 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,7 +9,6 @@ declare module 'vue' { export interface GlobalComponents { ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] ElButton: typeof import('element-plus/es')['ElButton'] - ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] ElCol: typeof import('element-plus/es')['ElCol'] ElCollapse: typeof import('element-plus/es')['ElCollapse'] ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] @@ -23,12 +22,12 @@ declare module 'vue' { ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] - ElIconSearch: typeof import('@element-plus/icons-vue')['Search'] ElInput: typeof import('element-plus/es')['ElInput'] ElLink: typeof import('element-plus/es')['ElLink'] ElOption: typeof import('element-plus/es')['ElOption'] ElPopover: typeof import('element-plus/es')['ElPopover'] ElRadio: typeof import('element-plus/es')['ElRadio'] + ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] diff --git a/package.json b/package.json index 2b6e6d0..9fe14b0 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "dependencies": { "electron-in-page-search": "^1.3.2", "nanoid": "^5.0.7", + "pinia-plugin-persistedstate": "^3.2.1", "vue": "^3.4.26" }, "devDependencies": { diff --git a/src/components/Device/components/BatchActions/Tasks/components/TaskDialog/index.vue b/src/components/Device/components/BatchActions/Tasks/components/TaskDialog/index.vue index 29dadb3..e952551 100644 --- a/src/components/Device/components/BatchActions/Tasks/components/TaskDialog/index.vue +++ b/src/components/Device/components/BatchActions/Tasks/components/TaskDialog/index.vue @@ -1,8 +1,8 @@