+
+
刷新设备
-
- {{ stopLoading ? '重置服务中' : '重置服务' }}
+
+ 重启服务
-
-
+
+
+
+
+
@@ -24,7 +27,7 @@
{{ row.name }}
-
+
{{ row.$loading ? '运行中' : '连接设备' }}
@@ -37,27 +40,34 @@
diff --git a/src/renderer/src/components/Wireless/index.vue b/src/renderer/src/components/Wireless/index.vue
index f7f9add..9d8dbad 100644
--- a/src/renderer/src/components/Wireless/index.vue
+++ b/src/renderer/src/components/Wireless/index.vue
@@ -1,9 +1,152 @@
-
+
+
+
+
+ 无线调试地址
+
+
+
+ :
+
+
+
+
+
+ 开始连接
+
+
+ 刷新设备
+
+
+ 重启服务
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设备未授权
+
+ {{ row.name }}
+
+
+
+
+
+ {{ row.$loading ? '运行中' : '连接设备' }}
+
+
+ {{ row.$stopLoading ? '断开中' : '断开连接' }}
+
+
+
+
+
+
diff --git a/src/renderer/src/main.js b/src/renderer/src/main.js
index c2f6649..d1d9a12 100644
--- a/src/renderer/src/main.js
+++ b/src/renderer/src/main.js
@@ -10,6 +10,7 @@ const app = createApp(App)
app.use(plugins)
+app.config.globalProperties.$electron = window.electron
app.config.globalProperties.$adb = window.adbkit()
app.config.globalProperties.$scrcpy = window.scrcpy()
diff --git a/src/renderer/src/utils/index.js b/src/renderer/src/utils/index.js
index 8047a97..39b95b7 100644
--- a/src/renderer/src/utils/index.js
+++ b/src/renderer/src/utils/index.js
@@ -7,3 +7,10 @@ export function sleep(time = 1000) {
setTimeout(() => resolve(true), time)
})
}
+
+export function isIPWithPort(ip) {
+ const regex
+ = /^((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d):([1-9]|[1-9]\d{1,3}|[1-6][0-5][0-5][0-3][0-5])$/
+
+ return regex.test(ip)
+}