{{ error }}
+{{ !hid ? t('hidGuide.unconfigured') : hid.backend === 'none' ? t('hidGuide.disabled') : t(`hidGuide.driver_${hid.backend}`) }}
++ {{ t(`hidGuide.${stage}`) }} + · {{ bluetooth.pairing_seconds }}s +
+{{ connectionError }}
+{{ t('hidGuide.disabledHelp') }}
+ + diff --git a/web/src/composables/useHidConnection.ts b/web/src/composables/useHidConnection.ts new file mode 100644 index 00000000..0acfeaab --- /dev/null +++ b/web/src/composables/useHidConnection.ts @@ -0,0 +1,49 @@ +import { ref, watch, onMounted, onUnmounted, onDeactivated, onActivated, type Ref } from 'vue' +import type { hidApi } from '@/api' +import { request } from '@/api/request' +import type { BluetoothStatus } from '@/types/bluetooth' +export function useHidConnection(active: Ref