mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 07:59:48 +01:00
desktop: use app icon path from asset manager
This commit is contained in:
committed by
Abdullah Atta
parent
41197cb52c
commit
80decaae8a
@@ -25,10 +25,10 @@ import { config, DesktopIntegration } from "../utils/config";
|
||||
import { bringToFront } from "../utils/bring-to-front";
|
||||
import { getTheme, setTheme, Theme } from "../utils/theme";
|
||||
import { mkdirSync, writeFileSync } from "fs";
|
||||
import { dirname, join } from "path";
|
||||
import { platform } from "os";
|
||||
import { dirname } from "path";
|
||||
import { resolvePath } from "../utils/resolve-path";
|
||||
import { observable } from "@trpc/server/observable";
|
||||
import { AssetManager } from "../utils/asset-manager";
|
||||
|
||||
const t = initTRPC.create();
|
||||
|
||||
@@ -122,10 +122,10 @@ export const osIntegrationRouter = t.router({
|
||||
.query(({ input }) => {
|
||||
const notification = new Notification({
|
||||
...input,
|
||||
icon: join(
|
||||
__dirname,
|
||||
platform() === "win32" ? "app.ico" : "favicon-72x72.png"
|
||||
)
|
||||
icon: AssetManager.appIcon({
|
||||
size: 64,
|
||||
format: process.platform === "win32" ? "ico" : "png"
|
||||
})
|
||||
});
|
||||
notification.show();
|
||||
if (input.urgency === "critical") {
|
||||
|
||||
@@ -18,14 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { app } from "electron";
|
||||
import { join } from "path";
|
||||
import { existsSync } from "fs";
|
||||
|
||||
export const APP_ICON_PATH = join(
|
||||
__dirname,
|
||||
process.platform === "win32" ? "app.ico" : "favicon-72x72.png"
|
||||
);
|
||||
|
||||
export function isDevelopment() {
|
||||
return process.env.ELECTRON_IS_DEV
|
||||
? Number.parseInt(process.env.ELECTRON_IS_DEV, 10) === 1
|
||||
|
||||
Reference in New Issue
Block a user