chore: try to get everything building
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import dbus from "@homebridge/dbus-native";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
import { NativeImage, app, nativeImage } from "electron";
|
||||
|
||||
@@ -19,8 +18,10 @@ export async function setBadgeCount(count: number) {
|
||||
}
|
||||
|
||||
if (!nativeIcons[count])
|
||||
nativeIcons[count] = nativeImage.createFromPath(
|
||||
resolve(process.resourcesPath, `${Math.min(count, 10)}.ico`),
|
||||
nativeIcons[count] = nativeImage.createFromDataURL(
|
||||
await import(
|
||||
`../../assets/desktop/badges/${Math.min(count, 10)}.ico?asset`
|
||||
),
|
||||
);
|
||||
|
||||
mainWindow.setOverlayIcon(
|
||||
|
||||
+2
-5
@@ -1,7 +1,6 @@
|
||||
import { resolve } from "node:path";
|
||||
|
||||
import { Menu, Tray, nativeImage } from "electron";
|
||||
|
||||
import trayIconAsset from "../../assets/desktop/icon.png?asset";
|
||||
import { version } from "../../package.json";
|
||||
|
||||
import { mainWindow, quitApp } from "./window";
|
||||
@@ -10,9 +9,7 @@ import { mainWindow, quitApp } from "./window";
|
||||
let tray: Tray = null;
|
||||
|
||||
// load the tray icon
|
||||
const trayIcon = nativeImage.createFromPath(
|
||||
resolve(process.resourcesPath, "icon.png"),
|
||||
);
|
||||
const trayIcon = nativeImage.createFromDataURL(trayIconAsset);
|
||||
|
||||
// trayIcon.setTemplateImage(true);
|
||||
|
||||
|
||||
+7
-10
@@ -1,4 +1,4 @@
|
||||
import { join, resolve } from "node:path";
|
||||
import { join } from "node:path";
|
||||
|
||||
import {
|
||||
BrowserWindow,
|
||||
@@ -9,7 +9,8 @@ import {
|
||||
nativeImage,
|
||||
} from "electron";
|
||||
|
||||
import { setBadgeCount } from "./badges";
|
||||
import windowIconAsset from "../../assets/desktop/icon.png?asset";
|
||||
|
||||
import { config } from "./config";
|
||||
import { updateTrayMenu } from "./tray";
|
||||
|
||||
@@ -27,11 +28,7 @@ export const BUILD_URL = new URL(
|
||||
let shouldQuit = false;
|
||||
|
||||
// load the window icon
|
||||
const windowIcon = nativeImage.createFromPath(
|
||||
resolve(process.resourcesPath, "icon.png"),
|
||||
);
|
||||
|
||||
console.info(resolve(process.resourcesPath, "icon.png"));
|
||||
const windowIcon = nativeImage.createFromDataURL(windowIconAsset);
|
||||
|
||||
// windowIcon.setTemplateImage(true);
|
||||
|
||||
@@ -43,7 +40,7 @@ export function createMainWindow() {
|
||||
mainWindow = new BrowserWindow({
|
||||
minWidth: 300,
|
||||
minHeight: 300,
|
||||
width: 800,
|
||||
width: 1100,
|
||||
height: 600,
|
||||
backgroundColor: "#191919",
|
||||
frame: !config.customFrame,
|
||||
@@ -156,8 +153,8 @@ export function createMainWindow() {
|
||||
|
||||
// mainWindow.webContents.openDevTools();
|
||||
|
||||
let i = 0;
|
||||
setInterval(() => setBadgeCount((++i % 30) + 1), 1000);
|
||||
// let i = 0;
|
||||
// setInterval(() => setBadgeCount((++i % 30) + 1), 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user