Skip to content

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

web: fix color renaming and add color remove support

Abdullah Atta63fd526db812
diff --git a/apps/web/src/components/navigation-menu/index.tsx b/apps/web/src/components/navigation-menu/index.tsx
index e2565ac56..8d99cf423 100644
--- a/apps/web/src/components/navigation-menu/index.tsx
+++ b/apps/web/src/components/navigation-menu/index.tsx
@@ -318,10 +318,17 @@ function NavigationMenu(props: NavigationMenuProps) {
menuItems={[
{
type: "button",
- key: "rename",
+ key: "rename-color",
title: "Rename color",
+ onClick: () => showRenameColorDialog(color)
+ },
+ {
+ type: "button",
+ key: "remove-color",
+ title: "Remove color",
onClick: async () => {
- await showRenameColorDialog(color.id);
+ await db.colors.remove(color.id);
+ await refreshNavItems();
}
},
{