Browse Source

biome

pull/185/head
Hunter Thornsberry 2 years ago
parent
commit
112ecfae1e
  1. 4
      src/components/DeviceSelector.tsx
  2. 6
      src/core/subscriptions.ts
  3. 2
      src/core/utils/notify.ts

4
src/components/DeviceSelector.tsx

@ -5,6 +5,8 @@ import { useAppStore } from "@core/stores/appStore.js";
import { useDeviceStore } from "@core/stores/deviceStore.js";
import { Hashicon } from "@emeraldpay/hashicon-react";
import {
BellIcon,
BellOffIcon,
HomeIcon,
LanguagesIcon,
MoonIcon,
@ -12,8 +14,6 @@ import {
SearchIcon,
SunIcon,
TerminalIcon,
BellIcon,
BellOffIcon,
} from "lucide-react";
export const DeviceSelector = (): JSX.Element => {

6
src/core/subscriptions.ts

@ -1,5 +1,5 @@
import type { Device } from "@core/stores/deviceStore.js";
import { Protobuf, Types } from "@meshtastic/js";
import { Protobuf, type Types } from "@meshtastic/js";
import { playNotificationSound } from "./utils/notify";
export const subscribeAll = (
@ -85,9 +85,9 @@ export const subscribeAll = (
...messagePacket,
state: messagePacket.from !== myNodeNum ? "ack" : "waiting",
});
if(messagePacket.from !== myNodeNum){
if (messagePacket.from !== myNodeNum) {
playNotificationSound();
}
}
});
connection.events.onTraceRoutePacket.subscribe((traceRoutePacket) => {

2
src/core/utils/notify.ts

@ -1,4 +1,4 @@
import { useAppStore } from '@core/stores/appStore.js';
import { useAppStore } from "@core/stores/appStore.js";
const notificationSound = new Audio("/notification.wav"); //change sound if needed

Loading…
Cancel
Save