This commit is contained in:
parent
9bedaac5d6
commit
e3d6edbb84
|
|
@ -101,6 +101,7 @@ const BlogArticleWrapper = async ({ params }: { params: { slug: string, locale:
|
||||||
category: frontmatter.tags,
|
category: frontmatter.tags,
|
||||||
updated_at: frontmatter.date,
|
updated_at: frontmatter.date,
|
||||||
company: frontmatter.title,
|
company: frontmatter.title,
|
||||||
|
extra_data: frontmatter.extra_data,
|
||||||
progress: progress,
|
progress: progress,
|
||||||
statusText: statusText
|
statusText: statusText
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ export default async function RootLayout({
|
||||||
resources={resources}>
|
resources={resources}>
|
||||||
<Toaster />
|
<Toaster />
|
||||||
<Providers attribute="class" defaultTheme="system" enableSystem>
|
<Providers attribute="class" defaultTheme="system" enableSystem>
|
||||||
<ConsoleSilencer />
|
{/* <ConsoleSilencer /> */}
|
||||||
<div className="flex min-h-screen flex-col">
|
<div className="flex min-h-screen flex-col">
|
||||||
<main className="flex flex-1 flex-col bg-muted/0.3">
|
<main className="flex flex-1 flex-col bg-muted/0.3">
|
||||||
{/* <Header /> */}
|
{/* <Header /> */}
|
||||||
|
|
|
||||||
|
|
@ -486,6 +486,19 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-[5px] self-end">
|
<div className="flex items-center gap-[5px] self-end">
|
||||||
|
{data?.extra_data && typeof data.extra_data === 'object' && Object.keys(data.extra_data).length > 0 && (
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
console.log("🟢 点击了更新按钮,extra_data = ", data.extra_data);
|
||||||
|
// TODO: future update logic here
|
||||||
|
}}
|
||||||
|
className="hover:text-gray-700 transition self-end text-sm border border-gray-300 rounded px-2 py-1 bg-white"
|
||||||
|
title="更新"
|
||||||
|
>
|
||||||
|
🔄 更新
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
|
||||||
{statusLoaded && (currentStatus === "running" || currentStatus === "stopped") && (
|
{statusLoaded && (currentStatus === "running" || currentStatus === "stopped") && (
|
||||||
<button
|
<button
|
||||||
onClick={handleSwitchStatus}
|
onClick={handleSwitchStatus}
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@ type AIFrontmatter = {
|
||||||
image_url: string;
|
image_url: string;
|
||||||
logo_url: string;
|
logo_url: string;
|
||||||
model_parameter: number;
|
model_parameter: number;
|
||||||
|
extra_data: Record<string, any>;
|
||||||
visible: boolean | undefined;
|
visible: boolean | undefined;
|
||||||
salary: string | undefined;
|
salary: string | undefined;
|
||||||
level: string | undefined;
|
level: string | undefined;
|
||||||
|
|
@ -293,6 +294,7 @@ export const getPostContent = async (language: string, slug: string): Promise<AI
|
||||||
frontmatter.image_url = data.image_url
|
frontmatter.image_url = data.image_url
|
||||||
frontmatter.logo_url = data.logo_url
|
frontmatter.logo_url = data.logo_url
|
||||||
frontmatter.model_parameter = data.model_parameter
|
frontmatter.model_parameter = data.model_parameter
|
||||||
|
frontmatter.extra_data = data.extra_data
|
||||||
// const headings = data.main_title;
|
// const headings = data.main_title;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ const nextConfig = {
|
||||||
esmExternals: "loose",
|
esmExternals: "loose",
|
||||||
},
|
},
|
||||||
compiler: {
|
compiler: {
|
||||||
removeConsole: true, // 保留所有模式中的 console.log
|
removeConsole: false, // 保留所有模式中的 console.log
|
||||||
removeConsole: process.env.NODE_ENV === 'production' ? { exclude: ['error'] } : false, // ✅ 用 NODE_ENV
|
//removeConsole: process.env.NODE_ENV === 'production' ? { exclude: ['error'] } : false, // ✅ 用 NODE_ENV
|
||||||
emotion: true,
|
emotion: true,
|
||||||
},
|
},
|
||||||
webpack: (config, { isServer }) => {
|
webpack: (config, { isServer }) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue