Archived
fix: Fix linting issues
This commit is contained in:
+4
-3
@@ -4,6 +4,7 @@ import started from 'electron-squirrel-startup';
|
||||
import { APP_NAME, DEFAULT_STATUS, GATEWAY_HOST, MANAGEMENT_URL, POLL_INTERVAL_MS, WINDOW_HEIGHT, WINDOW_WIDTH } from './config';
|
||||
import { NetBirdClient } from './netbird';
|
||||
import { baseStatus, normalizeStatus } from './status';
|
||||
import { NetworkStatus, UIStatus } from './types';
|
||||
|
||||
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
|
||||
if (started) {
|
||||
@@ -57,7 +58,7 @@ let tray: Tray;
|
||||
let window: BrowserWindow;
|
||||
let pollTimer: NodeJS.Timeout;
|
||||
let autoConnect = false;
|
||||
let cachedStatus = { ...DEFAULT_STATUS };
|
||||
let cachedStatus = DEFAULT_STATUS;
|
||||
|
||||
function resourcePath(name: string) {
|
||||
if (app.isPackaged) {
|
||||
@@ -70,7 +71,7 @@ function netbirdClient() {
|
||||
return new NetBirdClient(resourcePath(process.platform === "win32" ? 'netbird.exe' : 'netbird'));
|
||||
}
|
||||
|
||||
function withAutoConnect(status: Record<string, any>) {
|
||||
function withAutoConnect(status: NetworkStatus): UIStatus {
|
||||
return { ...status, autoConnect };
|
||||
}
|
||||
|
||||
@@ -105,7 +106,7 @@ function updateTray() {
|
||||
tray.setContextMenu(Menu.buildFromTemplate(template));
|
||||
}
|
||||
|
||||
function setStatus(status: Record<string, any>) {
|
||||
function setStatus(status: NetworkStatus) {
|
||||
cachedStatus = {
|
||||
...cachedStatus,
|
||||
...status,
|
||||
|
||||
Reference in New Issue
Block a user