mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[bugfix] show bsm icon properly
This commit is contained in:
@@ -8,7 +8,12 @@ import log from "electron-log";
|
||||
export class UtilsService {
|
||||
private static instance: UtilsService;
|
||||
|
||||
private assetsPath: string = app.isPackaged ? path.join(process.resourcesPath, "assets") : path.join(__dirname, "../../assets");
|
||||
private assetsPath: string = app.isPackaged
|
||||
? path.join(process.resourcesPath, "assets")
|
||||
: path.join(path.dirname(path.dirname(__dirname)), "assets");
|
||||
private readonly buildPath: string = app.isPackaged
|
||||
? path.join(process.resourcesPath, "build")
|
||||
: path.join(path.dirname(path.dirname(__dirname)), "build");
|
||||
|
||||
private constructor() {}
|
||||
|
||||
@@ -36,6 +41,10 @@ export class UtilsService {
|
||||
return path.join(app.getPath("temp"), app.getName());
|
||||
}
|
||||
|
||||
public getBuildPath(filepath: string): string {
|
||||
return path.join(this.buildPath, filepath);
|
||||
}
|
||||
|
||||
public ipcSend<T = unknown>(channel: string, response: IpcResponse<T>): void {
|
||||
try {
|
||||
BrowserWindow.getAllWindows().forEach(window => window?.webContents?.send(channel, response));
|
||||
|
||||
@@ -25,7 +25,9 @@ export class WindowManagerService {
|
||||
|
||||
private readonly baseWindowOption: BrowserWindowConstructorOptions = {
|
||||
title: APP_NAME,
|
||||
icon: this.utilsService.getAssetsPath("favicon.ico"),
|
||||
icon: process.platform === "linux"
|
||||
? this.utilsService.getBuildPath(path.join("icons", "png", "256x256.png"))
|
||||
: this.utilsService.getBuildPath(path.join("icons", "win", "favicon.ico")),
|
||||
show: false,
|
||||
frame: false,
|
||||
titleBarOverlay: false,
|
||||
|
||||
Reference in New Issue
Block a user