Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/collections/board: update an icon
Adorian Doran8198ede65550
diff --git a/apps/client/src/widgets/collections/board/context_menu.spec.ts b/apps/client/src/widgets/collections/board/context_menu.spec.tsindex 15901f28f3..7b92b3a4ba 100644--- a/apps/client/src/widgets/collections/board/context_menu.spec.ts+++ b/apps/client/src/widgets/collections/board/context_menu.spec.ts@@ -241,7 +241,7 @@ describe("Board column context menu", () => {const titled = openMenu({} as BoardApi).filter(item => item && "uiIcon" in item);expect(titled.map(item => "uiIcon" in item ? item.uiIcon : undefined)).toEqual([- "bx bx-edit-alt", "bx bx-directions",+ "bx bx-edit-alt", "bx bx-copy","bx bx-plus", "bx bx-link", "bx bx-columns","bx bx-collapse-horizontal", "bx bx-lock-alt", "bx bx-sort-alt-2","bx bx-tachometer",@@ -258,7 +258,7 @@ describe("Board column context menu", () => {const items = openMenu({} as BoardApi, { canRename: false, isCollapsed: true });expect(items[0]).not.toMatchObject({ kind: "separator" });- expect(items[0]).toMatchObject({ uiIcon: "bx bx-directions" });+ expect(items[0]).toMatchObject({ uiIcon: "bx bx-copy" });});/** The id is settled by the server, so the link is awaited before it is copied. */@@ -270,7 +270,7 @@ describe("Board column context menu", () => {} as unknown as BoardApi;const entry = openMenu(api, { value: "To Do" }).find(item =>- item && "uiIcon" in item && item.uiIcon === "bx bx-directions");+ item && "uiIcon" in item && item.uiIcon === "bx bx-copy");if (!entry || !("handler" in entry)) throw new Error("expected a copy-reference entry");await entry.handler?.(entry, {} as never);@@ -602,7 +602,7 @@ describe("Board item context menu", () => {} as unknown as BoardApi;const entry = openItemMenu(api, "To Do", vi.fn(), vi.fn(), 2, vi.fn(), [ note ])- .find(item => item && "uiIcon" in item && item.uiIcon === "bx bx-directions");+ .find(item => item && "uiIcon" in item && item.uiIcon === "bx bx-copy");if (!entry || !("handler" in entry)) throw new Error("expected a copy-reference entry");entry.handler?.(entry, {} as never);@@ -621,7 +621,7 @@ describe("Board item context menu", () => {const icons = openItemMenu(api, "To Do", vi.fn(), vi.fn(), 2, vi.fn(), notes).map(item => (item && "uiIcon" in item ? item.uiIcon : undefined));- expect(icons).not.toContain("bx bx-directions");+ expect(icons).not.toContain("bx bx-copy");});it("says nothing about moving up the card already at the head", () => {diff --git a/apps/client/src/widgets/collections/board/context_menu.ts b/apps/client/src/widgets/collections/board/context_menu.tsindex 8105bccdda..35f378c345 100644--- a/apps/client/src/widgets/collections/board/context_menu.ts+++ b/apps/client/src/widgets/collections/board/context_menu.ts@@ -76,7 +76,7 @@ export function openColumnContextMenu(api: Api, event: ContextMenuEvent, column:} ] : []),{title: t("board_view.copy-reference"),- uiIcon: "bx bx-directions",+ uiIcon: "bx bx-copy",handler: async () => copyReferenceWithToast(await api.getColumnReference(column.value))}];@@ -535,7 +535,7 @@ export function openNoteContextMenu(api: Api, event: ContextMenuEvent, target: Nlink_context_menu.getOpenNoteItem(event),{title: t("board_view.copy-reference"),- uiIcon: "bx bx-directions",+ uiIcon: "bx bx-copy",handler: () => copyReferenceWithToast(api.getCardReference(note.noteId))},{ kind: "separator" }