vor ble umbau

This commit is contained in:
2026-03-12 07:07:00 +01:00
parent 96aed70fc6
commit 5bb0d345da
45 changed files with 3681 additions and 48 deletions

24
webpage/src/lib/init.ts Normal file
View File

@@ -0,0 +1,24 @@
// src/lib/init.ts
import { isBluetoothSupported, isSerialSupported, isInitializing } from './store';
export function getBrowserName(): string {
const ua = navigator.userAgent;
if (ua.includes("Firefox")) return "Feuerfuchs";
if (ua.includes("Safari") && !ua.includes("Chrome")) return "Apfel-Rundreise";
if (ua.includes("Edg")) return "Winzigweich Kante";
if (ua.includes("Chrome")) return "Google Glanzeisen";
return "dein Browser";
}
export function performHardwareCheck() {
if (typeof navigator === 'undefined') return;
// Web Bluetooth Check
const hasBT = 'bluetooth' in navigator;
// Web Serial Check
const hasSerial = 'serial' in navigator;
isBluetoothSupported.set(hasBT);
isSerialSupported.set(hasSerial);
isInitializing.set(false);
}