A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
desktop: use app icon path from asset manager
Abdullah Atta80decaae8a69
diff --git a/apps/desktop/src/api/os-integration.ts b/apps/desktop/src/api/os-integration.tsindex 0b9b35ff5..84245dddf 100644--- a/apps/desktop/src/api/os-integration.ts+++ b/apps/desktop/src/api/os-integration.ts@@ -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") {diff --git a/apps/desktop/src/utils/index.ts b/apps/desktop/src/utils/index.tsindex 5728552f1..15cdd5d8e 100644--- a/apps/desktop/src/utils/index.ts+++ b/apps/desktop/src/utils/index.ts@@ -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