diff --git a/config/config.ts b/config/config.ts index 8be0f5f8..0538e839 100644 --- a/config/config.ts +++ b/config/config.ts @@ -19,9 +19,6 @@ export default defineConfig({ history: { type: 'hash' }, - // https: { - // http2: true - // }, base: process.env.npm_config_base || '/', ...(isProduction ? { diff --git a/config/plugins/delete-css-plugin.ts b/config/plugins/delete-css-plugin.ts deleted file mode 100644 index c5d65377..00000000 --- a/config/plugins/delete-css-plugin.ts +++ /dev/null @@ -1,38 +0,0 @@ -// @ts-nocheck -const fs = require('fs'); -const path = require('path'); - -class DeleteCssPlugin { - constructor(options) { - this.options = options || {}; - } - - apply(compiler) { - compiler.hooks.done.tap('DeleteCssPlugin', (stats) => { - const outputPath = - this.options.outputPath || path.resolve(__dirname, 'dist'); - - fs.readdir(outputPath, (err, files) => { - if (err) { - console.error(`Failed to read directory: ${outputPath}`, err); - return; - } - - files.forEach((file) => { - if (file.endsWith('.css')) { - const filePath = path.join(outputPath, file); - fs.unlink(filePath, (err) => { - if (err) { - console.error(`Failed to delete file: ${filePath}`, err); - } else { - console.log(`Deleted: ${filePath}`); - } - }); - } - }); - }); - }); - } -} - -module.exports = DeleteCssPlugin; diff --git a/plugin.ts b/plugin.ts index f8527d42..9b6ea911 100644 --- a/plugin.ts +++ b/plugin.ts @@ -10,6 +10,9 @@ export default (api: IApi) => { ? info.version || info.commitId : `dev-${info.commitId}` ); + if (env === 'production') { + $('script[src^="/js/umi"]').first?.().remove?.(); + } return $; }); api.onStart(() => { diff --git a/src/constants/external-links.ts b/src/constants/external-links.ts index 275151b4..67d5f873 100644 --- a/src/constants/external-links.ts +++ b/src/constants/external-links.ts @@ -2,5 +2,5 @@ export default { documentation: 'https://docs.gpustack.ai/', github: 'https://github.com/gpustack/gpustack', discord: 'https://discord.gg/VXYJzuaqwD', - site: 'https://seal.io/' + site: 'https://gpustack.ai/' }; diff --git a/src/locales/en-US/resources.ts b/src/locales/en-US/resources.ts index a8676471..0c37a529 100644 --- a/src/locales/en-US/resources.ts +++ b/src/locales/en-US/resources.ts @@ -19,6 +19,7 @@ export default { 'resources.table.total': 'Total', 'resources.table.used': 'Used', 'resources.table.wokers': 'workers', + 'resources.worker.linuxormaxos': 'Linux or MacOS', 'resources.table.unified': 'Unified Memory', 'resources.worker.add.step1': 'Get Token', 'resources.worker.add.step2': 'Register Worker', diff --git a/src/locales/zh-CN/resources.ts b/src/locales/zh-CN/resources.ts index 9aec824e..1739fd86 100644 --- a/src/locales/zh-CN/resources.ts +++ b/src/locales/zh-CN/resources.ts @@ -20,6 +20,7 @@ export default { 'resources.table.used': '已用', 'resources.table.wokers': 'workers', 'resources.table.unified': '统一内存', + 'resources.worker.linuxormaxos': 'Linux 或 MacOS', 'resources.worker.add.step1': '获取 Token', 'resources.worker.add.step2': '注册 Worker', 'resources.worker.add.step2.tips': diff --git a/src/pages/llmodels/index.tsx b/src/pages/llmodels/index.tsx index 7a86e27b..6bfe2008 100644 --- a/src/pages/llmodels/index.tsx +++ b/src/pages/llmodels/index.tsx @@ -15,7 +15,7 @@ const Models: React.FC = () => { const { setChunkRequest } = useSetChunkRequest(); const { setChunkRequest: setModelInstanceChunkRequest } = useSetChunkRequest(); - const [total, setTotal] = useState(100); + const [total, setTotal] = useState(0); const [modelInstances, setModelInstances] = useState([]); const [loading, setLoading] = useState(false); const [dataSource, setDataSource] = useState([]); diff --git a/src/pages/resources/components/add-worker.tsx b/src/pages/resources/components/add-worker.tsx index 110517d5..32cb6218 100644 --- a/src/pages/resources/components/add-worker.tsx +++ b/src/pages/resources/components/add-worker.tsx @@ -30,7 +30,7 @@ const AddWorker: React.FC = (props) => { >

1. {intl.formatMessage({ id: 'resources.worker.add.step1' })}

-

Linux Or MacOS

+

{intl.formatMessage({ id: 'resources.worker.linuxormaxos' })}

Windows

@@ -46,7 +46,7 @@ const AddWorker: React.FC = (props) => { }} > -

Linux Or MacOS

+

{intl.formatMessage({ id: 'resources.worker.linuxormaxos' })}