add color menu

This commit is contained in:
Profile Profile
2026-01-25 01:00:24 +03:00
parent ec2daae26b
commit 72ea28179f
5 changed files with 185 additions and 16 deletions

View File

@@ -13,6 +13,7 @@ export interface MenuItem {
target: string;
cssClasses: string[];
description: string;
menuItemColor?: string | null;
childItems?: {
nodes: MenuItem[];
};
@@ -85,6 +86,7 @@ async function fetchMenuById(id: number): Promise<Menu | null> {
target
cssClasses
description
menuItemColor
childItems(first: 50) {
nodes {
id
@@ -93,6 +95,7 @@ async function fetchMenuById(id: number): Promise<Menu | null> {
uri
url
order
menuItemColor
}
}
}
@@ -139,6 +142,7 @@ async function fetchMenuByLocation(location: string): Promise<Menu | null> {
target
cssClasses
description
menuItemColor
childItems(first: 50) {
nodes {
id
@@ -147,6 +151,7 @@ async function fetchMenuByLocation(location: string): Promise<Menu | null> {
uri
url
order
menuItemColor
}
}
}
@@ -186,6 +191,7 @@ async function fetchMenuBySlug(slug: string): Promise<Menu | null> {
target
cssClasses
description
menuItemColor
}
}
}
@@ -223,6 +229,7 @@ async function fetchMenuByName(name: string): Promise<Menu | null> {
target
cssClasses
description
menuItemColor
}
}
}
@@ -305,4 +312,4 @@ export async function getFlatMenu(identifier: MenuIdentifier): Promise<MenuItem[
}
return menu.menuItems.nodes.sort((a, b) => a.order - b.order);
}
}