feat(kol): sidebar nav groups for marketplace + KOL workspace

This commit is contained in:
2026-04-17 09:02:39 +08:00
parent 40519545c6
commit 76f5c73773
4 changed files with 211 additions and 46 deletions
+67 -45
View File
@@ -55,51 +55,73 @@ const currentLocaleLabel = computed(() => {
return localeOptions.value.find((opt) => opt.value === currentLocale.value)?.label ?? "Language";
});
const navSections = computed(() => [
{
key: "workspace",
title: "",
items: [
{
key: "/workspace",
label: t("nav.workspace"),
icon: AppstoreOutlined,
},
],
},
{
key: "articleCreation",
title: t("nav.articleCreation"),
items: [
{ key: "/articles/templates", label: t("nav.templates") },
{ key: "/articles/custom", label: t("nav.custom") },
{ key: "/articles/free-create", label: t("nav.freeCreate") },
{ key: "/media", label: t("nav.media"), icon: GlobalOutlined },
],
},
{
key: "brandManagement",
title: t("nav.brandManagement"),
items: [
{ key: "/brands", label: t("nav.brands"), icon: SearchOutlined },
],
},
{
key: "tracking",
title: t("nav.tracking"),
items: [
{ key: "/tracking", label: t("nav.trackingDetail"), icon: RadarChartOutlined },
],
},
{
key: "contentManagement",
title: t("nav.contentManagement"),
items: [
{ key: "/knowledge", label: t("nav.knowledge"), icon: BookOutlined },
{ key: "/images", label: t("nav.images"), icon: PictureOutlined },
],
},
]);
const navSections = computed(() => {
const base = [
{
key: "workspace",
title: "",
items: [
{
key: "/workspace",
label: t("nav.workspace"),
icon: AppstoreOutlined,
},
],
},
{
key: "articleCreation",
title: t("nav.articleCreation"),
items: [
{ key: "/articles/templates", label: t("nav.templates") },
{ key: "/articles/custom", label: t("nav.custom") },
{ key: "/articles/free-create", label: t("nav.freeCreate") },
{ key: "/media", label: t("nav.media"), icon: GlobalOutlined },
],
},
{
key: "brandManagement",
title: t("nav.brandManagement"),
items: [
{ key: "/brands", label: t("nav.brands"), icon: SearchOutlined },
],
},
{
key: "tracking",
title: t("nav.tracking"),
items: [
{ key: "/tracking", label: t("nav.trackingDetail"), icon: RadarChartOutlined },
],
},
{
key: "contentManagement",
title: t("nav.contentManagement"),
items: [
{ key: "/knowledge", label: t("nav.knowledge"), icon: BookOutlined },
{ key: "/images", label: t("nav.images"), icon: PictureOutlined },
],
},
{
key: "kolMarket",
title: t("nav.kolMarket"),
items: [
{ key: "/kol/marketplace", label: t("nav.kolMarketplace") },
],
},
];
if (authStore.isActiveKol) {
base.push({
key: "kolWorkspace",
title: t("nav.kolWorkspace"),
items: [
{ key: "/kol/manage", label: t("nav.kolManage") },
{ key: "/kol/dashboard", label: t("nav.kolDashboard") },
],
});
}
return base;
});
function go(path: string): void {
void router.push(path);