feat: resource-group-management
This commit is contained in:
1 parent
d725e9d896
commit
5c90b8e1ca
30 files changed
+2427
-8
No files matched your search
@@ -36,6 +36,7 @@ const BasicProductDetailThemeSelector: React.FC<
|
||||
platformConfig.mcp_server_prefix || process.env.NEXT_PUBLIC_MCP_URL || "";
|
||||
const [url, setUrl] = useState<string>("");
|
||||
const [mcpName, setMcpName] = useState<string>("");
|
||||
const [can_invoke, setCanInvoke] = useState<boolean>(false);
|
||||
const { t } = useTranslation();
|
||||
const configNavigation = useNavigationItems() || NavigationItems;
|
||||
|
||||
@@ -56,6 +57,9 @@ const BasicProductDetailThemeSelector: React.FC<
|
||||
useEffect(() => {
|
||||
setMcpName(sanitizeMCPServerName(product.name));
|
||||
}, [product.name]);
|
||||
useEffect(() => {
|
||||
setCanInvoke(product.can_invoke || false);
|
||||
}, [product.can_invoke]);
|
||||
const getCodeContent = () => {
|
||||
return `{
|
||||
"mcpServers": {
|
||||
@@ -82,6 +86,7 @@ const BasicProductDetailThemeSelector: React.FC<
|
||||
case Theme.MODERN:
|
||||
return (
|
||||
<ModernDetail
|
||||
can_invoke={can_invoke}
|
||||
product={product}
|
||||
breadcrumbs={breadcrumbs}
|
||||
url={url}
|
||||
@@ -93,6 +98,7 @@ const BasicProductDetailThemeSelector: React.FC<
|
||||
case Theme.CLASSIC:
|
||||
return (
|
||||
<ClassicDetail
|
||||
can_invoke={can_invoke}
|
||||
product={product}
|
||||
breadcrumbs={breadcrumbs}
|
||||
url={url}
|
||||
@@ -104,6 +110,7 @@ const BasicProductDetailThemeSelector: React.FC<
|
||||
case Theme.CREATIVE:
|
||||
return (
|
||||
<CreativeDetail
|
||||
can_invoke={can_invoke}
|
||||
product={product}
|
||||
breadcrumbs={breadcrumbs}
|
||||
url={url}
|
||||
@@ -115,6 +122,7 @@ const BasicProductDetailThemeSelector: React.FC<
|
||||
case Theme.TEMU:
|
||||
return (
|
||||
<TemuDetail
|
||||
can_invoke={can_invoke}
|
||||
product={product}
|
||||
breadcrumbs={breadcrumbs}
|
||||
url={url}
|
||||
@@ -131,6 +139,7 @@ const BasicProductDetailThemeSelector: React.FC<
|
||||
<main className="flex-1">
|
||||
<ProductDetailClient
|
||||
product={product}
|
||||
can_invoke={can_invoke}
|
||||
mcpName={mcpName}
|
||||
url={url}
|
||||
/>
|
||||
|
||||
@@ -16,6 +16,7 @@ import { NavigationItem } from "@/shared/components/Navigation";
|
||||
import { ServerConfig } from "@/shared/components/marketplace/ServerConfig";
|
||||
|
||||
interface DetailProps {
|
||||
can_invoke?: boolean;
|
||||
product: ServiceData;
|
||||
breadcrumbs?: {
|
||||
link: string;
|
||||
@@ -30,6 +31,7 @@ interface DetailProps {
|
||||
}
|
||||
|
||||
export const Detail: React.FC<DetailProps> = ({
|
||||
can_invoke,
|
||||
product,
|
||||
url,
|
||||
mcpName,
|
||||
@@ -216,6 +218,7 @@ export const Detail: React.FC<DetailProps> = ({
|
||||
</div>
|
||||
{/* Code Snippet */}
|
||||
<ServerConfig
|
||||
can_invoke={can_invoke}
|
||||
mcpName={mcpName}
|
||||
url={url}
|
||||
className="w-full max-w-2xl"
|
||||
|
||||
@@ -15,6 +15,7 @@ import { NavigationItem } from "@/shared/components/Navigation";
|
||||
import { ServerConfig } from "@/shared/components/marketplace/ServerConfig";
|
||||
|
||||
interface DetailProps {
|
||||
can_invoke?: boolean;
|
||||
product: ServiceData;
|
||||
breadcrumbs?: {
|
||||
link: string;
|
||||
@@ -29,6 +30,7 @@ interface DetailProps {
|
||||
}
|
||||
|
||||
export const Detail: React.FC<DetailProps> = ({
|
||||
can_invoke,
|
||||
product,
|
||||
breadcrumbs,
|
||||
url,
|
||||
@@ -176,6 +178,7 @@ export const Detail: React.FC<DetailProps> = ({
|
||||
</div>
|
||||
{/* Code Snippet */}
|
||||
<ServerConfig
|
||||
can_invoke={can_invoke}
|
||||
mcpName={mcpName}
|
||||
url={url}
|
||||
className="w-full max-w-2xl"
|
||||
|
||||
@@ -16,6 +16,7 @@ import { NavigationItem } from "@/shared/components/Navigation";
|
||||
import { ServerConfig } from "@/shared/components/marketplace/ServerConfig";
|
||||
|
||||
interface DetailProps {
|
||||
can_invoke?: boolean;
|
||||
product: ServiceData;
|
||||
breadcrumbs?: {
|
||||
link: string;
|
||||
@@ -30,6 +31,7 @@ interface DetailProps {
|
||||
}
|
||||
|
||||
export const Detail: React.FC<DetailProps> = ({
|
||||
can_invoke,
|
||||
product,
|
||||
breadcrumbs,
|
||||
url,
|
||||
@@ -144,6 +146,7 @@ export const Detail: React.FC<DetailProps> = ({
|
||||
{/* Code Snippet */}
|
||||
<ServerConfig
|
||||
mcpName={mcpName}
|
||||
can_invoke={can_invoke}
|
||||
url={url}
|
||||
className="w-full max-w-2xl"
|
||||
/>
|
||||
|
||||
@@ -15,6 +15,7 @@ import { NavigationItem } from "@/shared/components/Navigation";
|
||||
import { ServerConfig } from "@/shared/components/marketplace/ServerConfig";
|
||||
|
||||
interface DetailProps {
|
||||
can_invoke?: boolean;
|
||||
product: ServiceData;
|
||||
breadcrumbs?: {
|
||||
link: string;
|
||||
@@ -29,6 +30,7 @@ interface DetailProps {
|
||||
}
|
||||
|
||||
export const Detail: React.FC<DetailProps> = ({
|
||||
can_invoke,
|
||||
product,
|
||||
breadcrumbs,
|
||||
url,
|
||||
@@ -163,6 +165,7 @@ export const Detail: React.FC<DetailProps> = ({
|
||||
<div className="p-6">
|
||||
{/* Code Snippet */}
|
||||
<ServerConfig
|
||||
can_invoke={can_invoke}
|
||||
mcpName={mcpName}
|
||||
url={url}
|
||||
className="w-full max-w-2xl"
|
||||
|
||||
Reference in new issue
Block a user