Skip to content

Build your personal knowledge base with Trilium Notes

feat(import): use real app logos in the import-from-service picker

Elian Doran169397443537
diff --git a/apps/client/src/widgets/dialogs/import_provider.css b/apps/client/src/widgets/dialogs/import_provider.css
index 08432d5a03..9de94df76a 100644
--- a/apps/client/src/widgets/dialogs/import_provider.css
+++ b/apps/client/src/widgets/dialogs/import_provider.css
@@ -22,8 +22,13 @@
border-color: var(--main-text-color);
}
- .import-provider-card .tn-icon {
- font-size: 1.8em;
+ .import-provider-card-icon {
+ flex-shrink: 0;
+ width: 1.8em;
+ height: 1.8em;
+ background-color: currentColor;
+ -webkit-mask: var(--provider-icon) center / contain no-repeat;
+ mask: var(--provider-icon) center / contain no-repeat;
}
.import-provider-card-text {
diff --git a/apps/client/src/widgets/dialogs/import_provider.tsx b/apps/client/src/widgets/dialogs/import_provider.tsx
index 9147b6ae67..e94117f13f 100644
--- a/apps/client/src/widgets/dialogs/import_provider.tsx
+++ b/apps/client/src/widgets/dialogs/import_provider.tsx
@@ -6,7 +6,6 @@ import { useCallback, useState } from "preact/hooks";
import { t } from "../../services/i18n.js";
import Button from "../react/Button.js";
import { useTriliumEvent } from "../react/hooks.js";
-import Icon from "../react/Icon.js";
import Modal from "../react/Modal.js";
import { importProviders } from "./import_providers/index.js";
@@ -51,7 +50,7 @@ export default function ImportProviderDialog() {
<p>{t("import_provider.choose_provider")}</p>
{importProviders.map((p) => (
<button type="button" className="import-provider-card" key={p.id} onClick={() => setProviderId(p.id)}>
- <Icon icon={p.icon} />
+ <span className="import-provider-card-icon" style={{ "--provider-icon": `url("${p.iconUrl}")` }} />
<span className="import-provider-card-text">
<span className="import-provider-card-name">{p.name}</span>
<span className="import-provider-card-description">{p.description}</span>
diff --git a/apps/client/src/widgets/dialogs/import_providers/evernote.tsx b/apps/client/src/widgets/dialogs/import_providers/evernote.tsx
index 8f020dfbcb..c166aa35b6 100644
--- a/apps/client/src/widgets/dialogs/import_providers/evernote.tsx
+++ b/apps/client/src/widgets/dialogs/import_providers/evernote.tsx
@@ -5,6 +5,7 @@ import importService from "../../../services/import.js";
import Button from "../../react/Button.js";
import FormFileUpload from "../../react/FormFileUpload.js";
import FormGroup from "../../react/FormGroup.js";
+import iconUrl from "./icons/evernote.svg?url";
import type { ImportProvider, ImportProviderPanelProps } from "./types.js";
function EvernotePanel({ parentNoteId, closeDialog, setFooter }: ImportProviderPanelProps) {
@@ -59,7 +60,7 @@ function EvernotePanel({ parentNoteId, closeDialog, setFooter }: ImportProviderP
const provider: ImportProvider = {
id: "evernote",
name: t("evernote_import.name"),
- icon: "bx bx-import",
+ iconUrl,
description: t("evernote_import.description"),
Panel: EvernotePanel
};
diff --git a/apps/client/src/widgets/dialogs/import_providers/icons/evernote.svg b/apps/client/src/widgets/dialogs/import_providers/icons/evernote.svg
new file mode 100644
index 0000000000..d95923c98c
--- /dev/null
+++ b/apps/client/src/widgets/dialogs/import_providers/icons/evernote.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.09,11.63C15.09,11.63 15.28,10.35 16,10.35C16.76,10.35 17.78,12.06 17.78,12.06C17.78,12.06 15.46,11.63 15.09,11.63M19,4.69C18.64,4.09 16.83,3.41 15.89,3.41C14.96,3.41 13.5,3.41 13.5,3.41C13.5,3.41 12.7,2 10.88,2C9.05,2 9.17,2.81 9.17,3.5V6.32L8.34,7.19H4.5C4.5,7.19 3.44,7.91 3.44,9.44C3.44,11 3.92,16.35 7.13,16.85C10.93,17.43 11.58,15.67 11.58,15.46C11.58,14.56 11.6,13.21 11.6,13.21C11.6,13.21 12.71,15.33 14.39,15.33C16.07,15.33 17.04,16.3 17.04,17.29C17.04,18.28 17.04,19.13 17.04,19.13C17.04,19.13 17,20.28 16,20.28C15,20.28 13.89,20.28 13.89,20.28C13.89,20.28 13.2,19.74 13.2,19C13.2,18.25 13.53,18.05 13.93,18.05C14.32,18.05 14.65,18.09 14.65,18.09V16.53C14.65,16.53 11.47,16.5 11.47,18.94C11.47,21.37 13.13,22 14.46,22C15.8,22 16.63,22 16.63,22C16.63,22 20.56,21.5 20.56,13.75C20.56,6 19.33,5.28 19,4.69M7.5,6.31H4.26L8.32,2.22V5.5L7.5,6.31Z" /></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/dialogs/import_providers/icons/keep.svg b/apps/client/src/widgets/dialogs/import_providers/icons/keep.svg
new file mode 100644
index 0000000000..539280a618
--- /dev/null
+++ b/apps/client/src/widgets/dialogs/import_providers/icons/keep.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 2H20C21.11 2 22 2.9 22 4V17.33L17.33 22H4C2.9 22 2 21.11 2 20V4C2 2.9 2.9 2 4 2M17 17V20.25L20.25 17H17M10 19H14V18H15V13C16.21 12.09 17 10.64 17 9C17 6.24 14.76 4 12 4S7 6.24 7 9C7 10.64 7.79 12.09 9 13V18H10V19M14 17H10V15H14V17M12 5C14.21 5 16 6.79 16 9C16 10.5 15.2 11.77 14 12.46V14H10V12.46C8.8 11.77 8 10.5 8 9C8 6.79 9.79 5 12 5Z" /></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/dialogs/import_providers/icons/notion.svg b/apps/client/src/widgets/dialogs/import_providers/icons/notion.svg
new file mode 100644
index 0000000000..857d0875cf
--- /dev/null
+++ b/apps/client/src/widgets/dialogs/import_providers/icons/notion.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free 7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--><path d="M158.9 164.2C173.8 176.3 179.4 175.4 207.5 173.5L471.8 157.6C477.4 157.6 472.7 152 470.9 151.1L426.9 119.4C418.5 112.9 407.3 105.4 385.8 107.3L129.9 125.9C120.6 126.8 118.7 131.5 122.4 135.2L158.8 164.1zM174.8 225.8L174.8 503.9C174.8 518.8 182.3 524.4 199.1 523.5L489.6 506.7C506.4 505.8 508.3 495.5 508.3 483.4L508.3 207.2C508.3 195.1 503.6 188.5 493.3 189.5L189.7 207.1C178.5 208 174.8 213.6 174.8 225.8zM461.5 240.7C463.4 249.1 461.5 257.5 453.1 258.5L439.1 261.3L439.1 466.6C426.9 473.1 415.7 476.9 406.4 476.9C391.4 476.9 387.7 472.2 376.5 458.2L285 314.5L285 453.5L314 460C314 460 314 476.8 290.6 476.8L226.2 480.5C224.3 476.8 226.2 467.4 232.7 465.6L249.5 460.9L249.5 277.1L226.2 275.2C224.3 266.8 229 254.7 242.1 253.7L311.2 249L406.5 394.6L406.5 265.8L382.2 263C380.3 252.7 387.8 245.3 397.1 244.3L461.6 240.5zM108.4 100.7L374.6 81.1C407.3 78.3 415.7 80.2 436.2 95.1L521.2 154.8C535.2 165.1 539.9 167.9 539.9 179.1L539.9 506.7C539.9 527.2 532.4 539.4 506.3 541.2L197.2 559.8C177.6 560.7 168.2 557.9 158 544.9L95.4 463.7C84.2 448.8 79.5 437.6 79.5 424.5L79.5 133.3C79.5 116.5 87 102.5 108.4 100.6z"/></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/dialogs/import_providers/icons/onenote.svg b/apps/client/src/widgets/dialogs/import_providers/icons/onenote.svg
new file mode 100644
index 0000000000..8f010e884c
--- /dev/null
+++ b/apps/client/src/widgets/dialogs/import_providers/icons/onenote.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.17 3.25Q21.5 3.25 21.76 3.5 22 3.74 22 4.08V19.92Q22 20.26 21.76 20.5 21.5 20.75 21.17 20.75H7.83Q7.5 20.75 7.24 20.5 7 20.26 7 19.92V17H2.83Q2.5 17 2.24 16.76 2 16.5 2 16.17V7.83Q2 7.5 2.24 7.24 2.5 7 2.83 7H7V4.08Q7 3.74 7.24 3.5 7.5 3.25 7.83 3.25M5.8 11.17L8.16 15.27H9.65V8.73H8.2V12.92L5.93 8.73H4.35V15.27H5.8M20.75 19.5V17H18.25V19.5M20.75 15.75V13.25H18.25V15.75M20.75 12V9.5H18.25V12M20.75 8.25V4.5H8.25V7H11.17Q11.5 7 11.76 7.24 12 7.5 12 7.83V16.17Q12 16.5 11.76 16.76 11.5 17 11.17 17H8.25V19.5H17V8.25Z" /></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/dialogs/import_providers/keep.tsx b/apps/client/src/widgets/dialogs/import_providers/keep.tsx
index c223ffe6bc..65aebf4c56 100644
--- a/apps/client/src/widgets/dialogs/import_providers/keep.tsx
+++ b/apps/client/src/widgets/dialogs/import_providers/keep.tsx
@@ -5,6 +5,7 @@ import importService from "../../../services/import.js";
import Button from "../../react/Button.js";
import FormFileUpload from "../../react/FormFileUpload.js";
import FormGroup from "../../react/FormGroup.js";
+import iconUrl from "./icons/keep.svg?url";
import type { ImportProvider, ImportProviderPanelProps } from "./types.js";
function KeepPanel({ parentNoteId, closeDialog, setFooter }: ImportProviderPanelProps) {
@@ -58,7 +59,7 @@ function KeepPanel({ parentNoteId, closeDialog, setFooter }: ImportProviderPanel
const provider: ImportProvider = {
id: "keep",
name: t("keep_import.name"),
- icon: "bx bxs-file-archive",
+ iconUrl,
description: t("keep_import.description"),
Panel: KeepPanel
};
diff --git a/apps/client/src/widgets/dialogs/import_providers/notion.tsx b/apps/client/src/widgets/dialogs/import_providers/notion.tsx
index 7c17f15ed4..9b93515238 100644
--- a/apps/client/src/widgets/dialogs/import_providers/notion.tsx
+++ b/apps/client/src/widgets/dialogs/import_providers/notion.tsx
@@ -5,6 +5,7 @@ import importService from "../../../services/import.js";
import Button from "../../react/Button.js";
import FormFileUpload from "../../react/FormFileUpload.js";
import FormGroup from "../../react/FormGroup.js";
+import iconUrl from "./icons/notion.svg?url";
import type { ImportProvider, ImportProviderPanelProps } from "./types.js";
function NotionPanel({ parentNoteId, closeDialog, setFooter }: ImportProviderPanelProps) {
@@ -58,7 +59,7 @@ function NotionPanel({ parentNoteId, closeDialog, setFooter }: ImportProviderPan
const provider: ImportProvider = {
id: "notion",
name: t("notion_import.name"),
- icon: "bx bxs-file-archive",
+ iconUrl,
description: t("notion_import.description"),
Panel: NotionPanel
};
diff --git a/apps/client/src/widgets/dialogs/import_providers/onenote.tsx b/apps/client/src/widgets/dialogs/import_providers/onenote.tsx
index fd8c952dde..3b18e61a1d 100644
--- a/apps/client/src/widgets/dialogs/import_providers/onenote.tsx
+++ b/apps/client/src/widgets/dialogs/import_providers/onenote.tsx
@@ -8,6 +8,7 @@ import { ExtendedAdmonition } from "../../react/Admonition.js";
import Button from "../../react/Button.js";
import FormCheckbox from "../../react/FormCheckbox.js";
import LoadingSpinner from "../../react/LoadingSpinner.js";
+import iconUrl from "./icons/onenote.svg?url";
import type { ImportProvider, ImportProviderPanelProps } from "./types.js";
type Phase = "checking" | "disconnected" | "connecting" | "ready";
@@ -246,7 +247,7 @@ function SectionTree({ container, selectedIds, onToggle }: {
const provider: ImportProvider = {
id: "onenote",
name: t("onenote_import.name"),
- icon: "bx bxl-microsoft",
+ iconUrl,
description: t("onenote_import.description"),
Panel: OneNotePanel
};
diff --git a/apps/client/src/widgets/dialogs/import_providers/types.ts b/apps/client/src/widgets/dialogs/import_providers/types.ts
index f06241f0fb..5565d14763 100644
--- a/apps/client/src/widgets/dialogs/import_providers/types.ts
+++ b/apps/client/src/widgets/dialogs/import_providers/types.ts
@@ -18,8 +18,8 @@ export interface ImportProvider {
id: string;
/** Human-readable name shown in the provider picker. */
name: string;
- /** Boxicons class, e.g. `"bx bxl-microsoft"`. */
- icon: string;
+ /** URL of the provider's logo (an imported SVG, e.g. `import iconUrl from "./icons/notion.svg?url"`). Rendered monochrome via a CSS mask so it adapts to the theme. */
+ iconUrl: string;
/** One-line description shown under the name. */
description: string;
/** The component rendered once this provider is chosen; it drives its own multi-step flow. */