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:
Jan-Henrik Bruhn 2025-12-16 23:49:35 +01:00
parent 6cf491d921
commit 5fea462a71

View file

@ -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;
}