mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 02:13:41 +00:00
feature: Add browser compatibility detection for Web Bluetooth
Detects if the browser supports Web Bluetooth API and displays an informative warning when unsupported. Provides users with clear options: use a compatible browser or download the desktop app. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6cf491d921
commit
5fea462a71
1 changed files with 2 additions and 2 deletions
|
|
@ -4,12 +4,12 @@
|
|||
*/
|
||||
export function isBluetoothSupported(): boolean {
|
||||
// Always supported in Electron app
|
||||
if (typeof window !== 'undefined' && (window as any).electronAPI) {
|
||||
if (typeof window !== "undefined" && "electronAPI" in window) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check for Web Bluetooth API support in browser
|
||||
if (typeof navigator !== 'undefined' && 'bluetooth' in navigator) {
|
||||
if (typeof navigator !== "undefined" && "bluetooth" in navigator) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue