Replace StatusManager

This commit is contained in:
hensm
2021-04-28 06:21:50 +01:00
parent c1172410f9
commit f44d142631
22 changed files with 295 additions and 286 deletions

View File

@@ -9,7 +9,7 @@ import { Message, Port } from "../messaging";
import nativeMessaging from "./nativeMessaging";
import options from "./options";
import { Receiver } from "../types";
import { ReceiverDevice } from "../types";
import { ReceiverSelectionCast
, ReceiverSelectionStop } from "../background/receiverSelector/ReceiverSelector";

View File

@@ -21,6 +21,14 @@ export class Logger {
console.info(formattedMessage);
}
}
public warn(message: string, data?: any) {
const formattedMessage = `${this.prefix} (Warning): ${message}`;
if (data) {
console.warn(formattedMessage, data);
} else {
console.warn(formattedMessage);
}
}
public error(message: string, data?: any) {
const formattedMessage = `${this.prefix} (Error): ${message}`;
if (data) {