-
-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement Bluetooth Onboarding UI feat: different 'Not the Trezor you are looking for' UI feat: implement Bluetooth Onboarding UI 2 feat: implement Bluetooth Onboarding UI feat: different 'Not the Trezor you are looking for' UI feat: implement Bluetooth Onboarding UI 2 feat: use CollapsibleBox component in Bluetooth UI fix: after rebase enable BT onboarding WIP: transport name breaking change aftr rebase
- Loading branch information
1 parent
db27284
commit 68a87e5
Showing
28 changed files
with
1,065 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { createAction } from '@reduxjs/toolkit'; | ||
|
||
import { BluetoothDevice } from '@trezor/transport-bluetooth'; | ||
|
||
import { | ||
BluetoothScanStatus, | ||
DeviceBluetoothStatus, | ||
} from '../../reducers/bluetooth/bluetoothReducer'; | ||
|
||
export const BLUETOOTH_PREFIX = '@suite/bluetooth'; | ||
|
||
export const bluetoothAdapterEventAction = createAction( | ||
`${BLUETOOTH_PREFIX}/adapter-event`, | ||
({ isPowered }: { isPowered: boolean }) => ({ payload: { isPowered } }), | ||
); | ||
|
||
export const bluetoothDeviceListUpdate = createAction( | ||
`${BLUETOOTH_PREFIX}/device-list-update`, | ||
({ devices }: { devices: BluetoothDevice[] }) => ({ payload: { devices } }), | ||
); | ||
|
||
export const bluetoothConnectDeviceEventAction = createAction( | ||
`${BLUETOOTH_PREFIX}/device-connection-status`, | ||
({ connectionStatus }: { connectionStatus: DeviceBluetoothStatus }) => ({ | ||
payload: { connectionStatus }, | ||
}), | ||
); | ||
|
||
export const bluetoothSelectDeviceAction = createAction( | ||
`${BLUETOOTH_PREFIX}/select-device`, | ||
({ uuid }: { uuid: string | undefined }) => ({ payload: { uuid } }), | ||
); | ||
|
||
export const bluetoothScanStatusAction = createAction( | ||
`${BLUETOOTH_PREFIX}/scan-status`, | ||
({ status }: { status: BluetoothScanStatus }) => ({ payload: { status } }), | ||
); | ||
|
||
export const allBluetoothActions = { | ||
bluetoothAdapterEventAction, | ||
bluetoothDeviceListUpdate, | ||
bluetoothConnectDeviceEventAction, | ||
bluetoothSelectDeviceAction, | ||
bluetoothScanStatusAction, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.