feat(kol): sidebar nav groups for marketplace + KOL workspace
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user