@wopr-network/platform-ui-core 1.23.1 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@ import { Button } from "@/components/ui/button";
|
|
|
24
24
|
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
|
|
25
25
|
import { usePageContext } from "@/hooks/use-page-context";
|
|
26
26
|
import { useWebMCP } from "@/hooks/use-webmcp";
|
|
27
|
-
import { productName } from "@/lib/brand-config";
|
|
27
|
+
import { getBrandConfig, productName } from "@/lib/brand-config";
|
|
28
28
|
import { ChatProvider } from "@/lib/chat/chat-context";
|
|
29
29
|
|
|
30
30
|
export default function DashboardLayout({
|
|
@@ -107,7 +107,7 @@ export default function DashboardLayout({
|
|
|
107
107
|
</motion.main>
|
|
108
108
|
</AnimatePresence>
|
|
109
109
|
</div>
|
|
110
|
-
{!pathname.startsWith("/chat") && <ChatWidget />}
|
|
110
|
+
{getBrandConfig().chatEnabled && !pathname.startsWith("/chat") && <ChatWidget />}
|
|
111
111
|
</ChatProvider>
|
|
112
112
|
);
|
|
113
113
|
}
|
package/src/lib/brand-config.ts
CHANGED
|
@@ -90,6 +90,9 @@ export interface BrandConfig {
|
|
|
90
90
|
|
|
91
91
|
/** Sidebar navigation items. Each has a label and href. */
|
|
92
92
|
navItems: Array<{ label: string; href: string }>;
|
|
93
|
+
|
|
94
|
+
/** Whether the embedded chat widget is enabled (default true). */
|
|
95
|
+
chatEnabled: boolean;
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
/**
|
|
@@ -154,6 +157,7 @@ function envDefaults(): BrandConfig {
|
|
|
154
157
|
companyLegalName: process.env.NEXT_PUBLIC_BRAND_COMPANY_LEGAL || "Platform Inc.",
|
|
155
158
|
price: process.env.NEXT_PUBLIC_BRAND_PRICE || "",
|
|
156
159
|
homePath: process.env.NEXT_PUBLIC_BRAND_HOME_PATH || "/marketplace",
|
|
160
|
+
chatEnabled: process.env.NEXT_PUBLIC_BRAND_CHAT_ENABLED !== "false",
|
|
157
161
|
navItems: parseNavItems(process.env.NEXT_PUBLIC_BRAND_NAV_ITEMS) ?? [
|
|
158
162
|
{ label: "Dashboard", href: "/dashboard" },
|
|
159
163
|
{ label: "Chat", href: "/chat" },
|