update now can connect adb but scrcpy still bug

This commit is contained in:
Kenta420 2024-01-22 12:50:07 +07:00
parent 45851422f7
commit a95c350844
10 changed files with 116 additions and 132 deletions

View file

@ -1,3 +1,4 @@
import { type Adb } from '@yume-chan/adb'
import {
type AdbDaemonWebUsbDevice,
AdbDaemonWebUsbDeviceManager
@ -5,14 +6,18 @@ import {
import { create } from 'zustand'
interface ADB {
adb: Adb | undefined
manager: AdbDaemonWebUsbDeviceManager | undefined
device: AdbDaemonWebUsbDevice | undefined
setAdb: (adb: Adb | undefined) => void
setDevice: (device: AdbDaemonWebUsbDevice | undefined) => void
}
const useAdb = create<ADB>(set => ({
adb: undefined,
manager: AdbDaemonWebUsbDeviceManager.BROWSER,
device: undefined,
setAdb: adb => set({ adb }),
setDevice: device => set({ device })
}))