This commit is contained in:
hailin 2025-06-18 21:06:32 +08:00
parent 9bedaac5d6
commit e3d6edbb84
5 changed files with 19 additions and 3 deletions

View File

@ -101,6 +101,7 @@ const BlogArticleWrapper = async ({ params }: { params: { slug: string, locale:
category: frontmatter.tags,
updated_at: frontmatter.date,
company: frontmatter.title,
extra_data: frontmatter.extra_data,
progress: progress,
statusText: statusText
}}

View File

@ -93,7 +93,7 @@ export default async function RootLayout({
resources={resources}>
<Toaster />
<Providers attribute="class" defaultTheme="system" enableSystem>
<ConsoleSilencer />
{/* <ConsoleSilencer /> */}
<div className="flex min-h-screen flex-col">
<main className="flex flex-1 flex-col bg-muted/0.3">
{/* <Header /> */}

View File

@ -486,6 +486,19 @@ export function DetailPageHeader({ data }: { data: any }) {
</div>
<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") && (
<button
onClick={handleSwitchStatus}

View File

@ -116,6 +116,7 @@ type AIFrontmatter = {
image_url: string;
logo_url: string;
model_parameter: number;
extra_data: Record<string, any>;
visible: boolean | undefined;
salary: 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.logo_url = data.logo_url
frontmatter.model_parameter = data.model_parameter
frontmatter.extra_data = data.extra_data
// const headings = data.main_title;

View File

@ -17,8 +17,8 @@ const nextConfig = {
esmExternals: "loose",
},
compiler: {
removeConsole: true, // 保留所有模式中的 console.log
removeConsole: process.env.NODE_ENV === 'production' ? { exclude: ['error'] } : false, // ✅ 用 NODE_ENV
removeConsole: false, // 保留所有模式中的 console.log
//removeConsole: process.env.NODE_ENV === 'production' ? { exclude: ['error'] } : false, // ✅ 用 NODE_ENV
emotion: true,
},
webpack: (config, { isServer }) => {