Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

desktop: use ico icons on windows

Abdullah Attab362dca795c8
diff --git a/apps/web/desktop/asset-manager.ts b/apps/web/desktop/asset-manager.ts
index 733ae7d7e..cb7c68e64 100644
--- a/apps/web/desktop/asset-manager.ts
+++ b/apps/web/desktop/asset-manager.ts
@@ -21,6 +21,7 @@ import { nativeTheme } from "electron";
import path from "path";
import { isDevelopment } from "./utils";
+type Icons = "note-add" | "notebook-add" | "reminder-add" | "quit";
const APP_DIR = isDevelopment()
? process.cwd()
: path.dirname(process.execPath);
@@ -30,13 +31,15 @@ export class AssetManager {
format?: "ico" | "png" | "icns";
}) {
const { size = 32, format } = options;
+
if (format === "ico") return path.join("assets", "icons", "app.ico");
if (format === "icns") return path.join("assets", "icons", "app.icns");
+
return path.join("assets", "icons", `${size}x${size}.png`);
}
- static icon(name: "note-add" | "notebook-add" | "reminder-add" | "quit") {
+ static icon(name: Icons, format: "png" | "ico" = "png") {
const prefix = nativeTheme.shouldUseDarkColors ? ".dark" : "";
- return path.join(APP_DIR, "assets", "icons", `${name}${prefix}.png`);
+ return path.join(APP_DIR, "assets", "icons", `${name}${prefix}.${format}`);
}
}
diff --git a/apps/web/desktop/assets/icons/note-add.dark.ico b/apps/web/desktop/assets/icons/note-add.dark.ico
new file mode 100644
index 000000000..fd0af2ba8
Binary files /dev/null and b/apps/web/desktop/assets/icons/note-add.dark.ico differ
diff --git a/apps/web/desktop/assets/icons/note-add.ico b/apps/web/desktop/assets/icons/note-add.ico
new file mode 100644
index 000000000..835425644
Binary files /dev/null and b/apps/web/desktop/assets/icons/note-add.ico differ
diff --git a/apps/web/desktop/assets/icons/notebook-add.dark.ico b/apps/web/desktop/assets/icons/notebook-add.dark.ico
new file mode 100644
index 000000000..db04a2748
Binary files /dev/null and b/apps/web/desktop/assets/icons/notebook-add.dark.ico differ
diff --git a/apps/web/desktop/assets/icons/notebook-add.ico b/apps/web/desktop/assets/icons/notebook-add.ico
new file mode 100644
index 000000000..b8d7cb766
Binary files /dev/null and b/apps/web/desktop/assets/icons/notebook-add.ico differ
diff --git a/apps/web/desktop/assets/icons/quit.dark.ico b/apps/web/desktop/assets/icons/quit.dark.ico
new file mode 100644
index 000000000..296b36a3b
Binary files /dev/null and b/apps/web/desktop/assets/icons/quit.dark.ico differ
diff --git a/apps/web/desktop/assets/icons/quit.ico b/apps/web/desktop/assets/icons/quit.ico
new file mode 100644
index 000000000..296b36a3b
Binary files /dev/null and b/apps/web/desktop/assets/icons/quit.ico differ
diff --git a/apps/web/desktop/assets/icons/reminder-add.dark.ico b/apps/web/desktop/assets/icons/reminder-add.dark.ico
new file mode 100644
index 000000000..29567fb60
Binary files /dev/null and b/apps/web/desktop/assets/icons/reminder-add.dark.ico differ
diff --git a/apps/web/desktop/assets/icons/reminder-add.ico b/apps/web/desktop/assets/icons/reminder-add.ico
new file mode 100644
index 000000000..0688a9b53
Binary files /dev/null and b/apps/web/desktop/assets/icons/reminder-add.ico differ
diff --git a/apps/web/desktop/jumplist.ts b/apps/web/desktop/jumplist.ts
index da49d16a4..8c3364772 100644
--- a/apps/web/desktop/jumplist.ts
+++ b/apps/web/desktop/jumplist.ts
@@ -34,7 +34,7 @@ function windows() {
items: [
{
program: process.execPath,
- iconPath: AssetManager.icon("note-add"),
+ iconPath: AssetManager.icon("note-add", "ico"),
args: "new note",
description: "Create a new note",
title: "New note",
@@ -42,7 +42,7 @@ function windows() {
},
{
program: process.execPath,
- iconPath: AssetManager.icon("notebook-add"),
+ iconPath: AssetManager.icon("notebook-add", "ico"),
args: "new notebook",
description: "Create a new notebook",
title: "New notebook",
@@ -50,7 +50,7 @@ function windows() {
},
{
program: process.execPath,
- iconPath: AssetManager.icon("reminder-add"),
+ iconPath: AssetManager.icon("reminder-add", "ico"),
args: "new reminder",
description: "Add a new reminder",
title: "New reminder",