From de37c102d4bd4a2f33ea1b541c0e422db91cf295 Mon Sep 17 00:00:00 2001 From: lvchenpeng <3194951363@qq.com> Date: Fri, 28 Feb 2025 09:39:09 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/(main)/_layout/Desktop.tsx | 4 +- .../app/(main)/robot/components/RobotList.tsx | 38 +++++++++---------- DigitalHumanWeb/tsconfig.json | 2 +- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/DigitalHumanWeb/src/app/(main)/_layout/Desktop.tsx b/DigitalHumanWeb/src/app/(main)/_layout/Desktop.tsx index e16e7da..06ef1ce 100644 --- a/DigitalHumanWeb/src/app/(main)/_layout/Desktop.tsx +++ b/DigitalHumanWeb/src/app/(main)/_layout/Desktop.tsx @@ -71,9 +71,9 @@ const Layout = memo(({ children, nav }) => { const { isPWA } = usePlatform(); const theme = useTheme(); const { styles, cx } = useStyles() - console.log(window?.location?.pathname,'3837373666router--------------------------------------------') + console.log(window, window.location, window?.location?.pathname,'3837373666router--------------------------------------------') const { showCloudPromotion } = useServerConfigStore(featureFlagsSelectors); - const pathName = window?.location?.pathname + const pathName = window?.location?.pathname ?? '/welcome' return ( <> {showCloudPromotion && } diff --git a/DigitalHumanWeb/src/app/(main)/robot/components/RobotList.tsx b/DigitalHumanWeb/src/app/(main)/robot/components/RobotList.tsx index aefe028..fe35923 100644 --- a/DigitalHumanWeb/src/app/(main)/robot/components/RobotList.tsx +++ b/DigitalHumanWeb/src/app/(main)/robot/components/RobotList.tsx @@ -76,7 +76,7 @@ const useStyles = createStyles(({ css }) => ({ box-shadow: 1px 0px 12px 0px rgba(42, 77, 255, 0.19); border: none; border-radius: 8px; - padding: 10px 0; + padding: 0px; width: 100%; height: 100%; overflow: auto; @@ -123,6 +123,10 @@ const useStyles = createStyles(({ css }) => ({ box-sizing: border-box; border: 1px solid #0044FF; `, + iconRobotImg: css` + width: 48px; + height: 195px !important; + `, iconImg: css` width: 48px; height: 48px; @@ -172,7 +176,7 @@ const useStyles = createStyles(({ css }) => ({ border-radius: 8px; `, robotImg: css` - margin: 30px 0; + margin: 20px 0; width: 100%; .ant-image { width: 100%; @@ -519,8 +523,8 @@ const RobotList = memo<{ mobile?: boolean }>(() => { renderItem={() => ( -
- +
+
@@ -540,7 +544,7 @@ const RobotList = memo<{ mobile?: boolean }>(() => { )} - style={{marginTop: '10px', padding: '0 50px'}} + style={{marginTop: '10px', padding: '0 50px', height: 'calc(100vh - 150px)', overflowY: 'scroll'}} />
@@ -552,9 +556,9 @@ const RobotList = memo<{ mobile?: boolean }>(() => { 返回形象列表 -
+
-
+
@@ -606,13 +610,13 @@ const RobotList = memo<{ mobile?: boolean }>(() => {
-
+
- +
@@ -664,7 +668,7 @@ const RobotList = memo<{ mobile?: boolean }>(() => {
- +
@@ -724,17 +728,14 @@ const RobotList = memo<{ mobile?: boolean }>(() => {
- +
- -
- -
+
@@ -756,10 +757,7 @@ const RobotList = memo<{ mobile?: boolean }>(() => {
- -
- -
+
@@ -789,7 +787,7 @@ const RobotList = memo<{ mobile?: boolean }>(() => {
-
+
声音设置 diff --git a/DigitalHumanWeb/tsconfig.json b/DigitalHumanWeb/tsconfig.json index 3ba5398..e140d47 100644 --- a/DigitalHumanWeb/tsconfig.json +++ b/DigitalHumanWeb/tsconfig.json @@ -5,7 +5,7 @@ "lib": ["dom", "dom.iterable", "esnext", "webworker"], "allowJs": true, "skipLibCheck": true, - "strict": true, + "strict": false, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, From dd4adbcdc2837d1e128fe1b96bb48b28b0948053 Mon Sep 17 00:00:00 2001 From: jiangxucong Date: Fri, 28 Feb 2025 11:56:07 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalHumanWeb/Dockerfile | 4 ++-- DigitalHumanWeb/package.json | 2 +- .../src/app/(main)/applicationset/applicationset.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DigitalHumanWeb/Dockerfile b/DigitalHumanWeb/Dockerfile index ae9603a..a8ee26a 100644 --- a/DigitalHumanWeb/Dockerfile +++ b/DigitalHumanWeb/Dockerfile @@ -1,5 +1,5 @@ ## Base image for all the stages -FROM node:20-slim AS base +FROM node:22-slim AS base ARG USE_CN_MIRROR @@ -67,7 +67,7 @@ RUN \ # Enable corepack && corepack enable \ # Use pnpm for corepack - && corepack use pnpm \ + && corepack use $(sed -n 's/.*"packageManager": "\(.*\)".*/\1/p' package.json) \ # Install the dependencies && pnpm i \ # Add sharp dependencies diff --git a/DigitalHumanWeb/package.json b/DigitalHumanWeb/package.json index 7be646f..ddf5ffe 100644 --- a/DigitalHumanWeb/package.json +++ b/DigitalHumanWeb/package.json @@ -123,7 +123,7 @@ "@lobehub/chat-plugins-gateway": "^1.9.0", "@lobehub/icons": "^1.33.7", "@lobehub/tts": "^1.24.3", - "@lobehub/ui": "^1.150.3", + "@lobehub/ui": "1.150.3", "@neondatabase/serverless": "^0.9.4", "@next/third-parties": "^14.2.6", "@react-spring/web": "^9.7.3", diff --git a/DigitalHumanWeb/src/app/(main)/applicationset/applicationset.tsx b/DigitalHumanWeb/src/app/(main)/applicationset/applicationset.tsx index c198df7..c589346 100644 --- a/DigitalHumanWeb/src/app/(main)/applicationset/applicationset.tsx +++ b/DigitalHumanWeb/src/app/(main)/applicationset/applicationset.tsx @@ -728,7 +728,7 @@ const ApplicationSet = memo(() => { url: "/flxai/api/robot/apptoolsset/getAllAiTools", }).then((response) => { if (response.code === 0) { - console.log(response,"2222") + // console.log(response,"2222") setStData(response.data); } }).catch(error => { From e88fead56957a72308ad780682d61eb39609c324 Mon Sep 17 00:00:00 2001 From: jiangxucong Date: Fri, 28 Feb 2025 13:53:42 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalHumanWeb/Dockerfile.database | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/DigitalHumanWeb/Dockerfile.database b/DigitalHumanWeb/Dockerfile.database index 3f11381..6088404 100644 --- a/DigitalHumanWeb/Dockerfile.database +++ b/DigitalHumanWeb/Dockerfile.database @@ -32,10 +32,10 @@ FROM base AS builder ARG USE_CN_MIRROR ENV NEXT_PUBLIC_SERVICE_MODE="server" \ - APP_URL="http://app.com" \ + APP_URL="http://192.168.15.199:3210" \ DATABASE_DRIVER="node" \ - DATABASE_URL="postgres://postgres:password@localhost:5432/postgres" \ - KEY_VAULTS_SECRET="use-for-build" + DATABASE_URL="postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat" \ + KEY_VAULTS_SECRET="Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=" # Sentry ENV NEXT_PUBLIC_SENTRY_DSN="" \ @@ -113,12 +113,12 @@ ENV NODE_ENV="production" \ NODE_TLS_REJECT_UNAUTHORIZED="" # set hostname to localhost -ENV HOSTNAME="0.0.0.0" \ +ENV HOSTNAME="192.168.15.199" \ PORT="3210" # General Variables ENV ACCESS_CODE="" \ - APP_URL="" \ + APP_URL="http://192.168.15.199:3210" \ API_KEY_SELECT_MODE="" \ DEFAULT_AGENT_CONFIG="" \ SYSTEM_AGENT="" \ @@ -126,22 +126,22 @@ ENV ACCESS_CODE="" \ PROXY_URL="" # Database -ENV KEY_VAULTS_SECRET="" \ +ENV KEY_VAULTS_SECRET="Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=" \ DATABASE_DRIVER="node" \ - DATABASE_URL="" + DATABASE_URL="postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat" # Next Auth -ENV NEXT_AUTH_SECRET="" \ - NEXT_AUTH_SSO_PROVIDERS="" \ - NEXTAUTH_URL="" +ENV NEXT_AUTH_SECRET="NX2kaPE923dt6BL2U8e9oSre5RfoT7hg" \ + NEXT_AUTH_SSO_PROVIDERS="casdoor" \ + NEXTAUTH_URL="http://192.168.15.199:3210/api/auth" # S3 ENV NEXT_PUBLIC_S3_DOMAIN="" \ - S3_PUBLIC_DOMAIN="" \ - S3_ACCESS_KEY_ID="" \ - S3_BUCKET="" \ - S3_ENDPOINT="" \ - S3_SECRET_ACCESS_KEY="" + S3_PUBLIC_DOMAIN="http://192.168.15.199:9000" \ + S3_ACCESS_KEY_ID="soaucnP8Bip0TDdUjxng" \ + S3_BUCKET="casdoor" \ + S3_ENDPOINT="http://192.168.15.199:9000" \ + S3_SECRET_ACCESS_KEY="ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO" # Model Variables ENV \ From a5f59d4554f0cae07276136eaed4b48a61ff1c9f Mon Sep 17 00:00:00 2001 From: jiangxucong Date: Fri, 28 Feb 2025 14:00:33 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalHumanWeb/Dockerfile | 52 ++++++++++++++++++++++++----- DigitalHumanWeb/Dockerfile.database | 2 +- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/DigitalHumanWeb/Dockerfile b/DigitalHumanWeb/Dockerfile index a8ee26a..d0fac4b 100644 --- a/DigitalHumanWeb/Dockerfile +++ b/DigitalHumanWeb/Dockerfile @@ -31,7 +31,11 @@ FROM base AS builder ARG USE_CN_MIRROR -ENV NEXT_PUBLIC_BASE_PATH="" +ENV NEXT_PUBLIC_SERVICE_MODE="server" \ + APP_URL="http://192.168.15.199:3210" \ + DATABASE_DRIVER="node" \ + DATABASE_URL="postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat" \ + KEY_VAULTS_SECRET="Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=" # Sentry ENV NEXT_PUBLIC_SENTRY_DSN="" \ @@ -67,12 +71,12 @@ RUN \ # Enable corepack && corepack enable \ # Use pnpm for corepack - && corepack use $(sed -n 's/.*"packageManager": "\(.*\)".*/\1/p' package.json) \ + && corepack use pnpm \ # Install the dependencies && pnpm i \ - # Add sharp dependencies + # Add sharp and db migration dependencies && mkdir -p /deps \ - && pnpm add sharp --prefix /deps + && pnpm add sharp pg drizzle-orm --prefix /deps COPY . . @@ -88,7 +92,16 @@ COPY --from=builder /app/public /app/public # https://nextjs.org/docs/advanced-features/output-file-tracing COPY --from=builder /app/.next/standalone /app/ COPY --from=builder /app/.next/static /app/.next/static + +# copy dependencies COPY --from=builder /deps/node_modules/.pnpm /app/node_modules/.pnpm +COPY --from=builder /deps/node_modules/pg /app/node_modules/pg +COPY --from=builder /deps/node_modules/drizzle-orm /app/node_modules/drizzle-orm + +# Copy database migrations +COPY --from=builder /app/src/database/server/migrations /app/migrations +COPY --from=builder /app/scripts/migrateServerDB/docker.cjs /app/docker.cjs +COPY --from=builder /app/scripts/migrateServerDB/errorHint.js /app/errorHint.js ## Production image, copy all the files and run next FROM base @@ -100,17 +113,36 @@ ENV NODE_ENV="production" \ NODE_TLS_REJECT_UNAUTHORIZED="" # set hostname to localhost -ENV HOSTNAME="0.0.0.0" \ +ENV HOSTNAME="192.168.15.199" \ PORT="3210" # General Variables ENV ACCESS_CODE="" \ + APP_URL="http://192.168.15.199:3210" \ API_KEY_SELECT_MODE="" \ DEFAULT_AGENT_CONFIG="" \ SYSTEM_AGENT="" \ FEATURE_FLAGS="" \ PROXY_URL="" +# Database +ENV KEY_VAULTS_SECRET="Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=" \ + DATABASE_DRIVER="node" \ + DATABASE_URL="postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat" + +# Next Auth +ENV NEXT_AUTH_SECRET="NX2kaPE923dt6BL2U8e9oSre5RfoT7hg" \ + NEXT_AUTH_SSO_PROVIDERS="casdoor" \ + NEXTAUTH_URL="http://192.168.15.199:3210/api/auth" + +# S3 +ENV NEXT_PUBLIC_S3_DOMAIN="" \ + S3_PUBLIC_DOMAIN="http://192.168.15.199:9000" \ + S3_ACCESS_KEY_ID="soaucnP8Bip0TDdUjxng" \ + S3_BUCKET="casdoor" \ + S3_ENDPOINT="http://192.168.15.199:9000" \ + S3_SECRET_ACCESS_KEY="ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO" + # Model Variables ENV \ # AI21 @@ -168,7 +200,7 @@ ENV \ # 01.AI ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \ # Zhipu - ZHIPU_API_KEY="" ZHIPU_MODEL_LIST="" + ZHIPU_API_KEY="" USER nextjs @@ -205,5 +237,9 @@ CMD \ "$protocol $host $port" \ > "/etc/proxychains4.conf"; \ fi; \ - # Run the server - ${PROXYCHAINS} node "/app/server.js"; + # Run migration + node "/app/docker.cjs"; \ + if [ "$?" -eq "0" ]; then \ + # Run the server + ${PROXYCHAINS} node "/app/server.js"; \ + fi; diff --git a/DigitalHumanWeb/Dockerfile.database b/DigitalHumanWeb/Dockerfile.database index 6088404..d0fac4b 100644 --- a/DigitalHumanWeb/Dockerfile.database +++ b/DigitalHumanWeb/Dockerfile.database @@ -1,5 +1,5 @@ ## Base image for all the stages -FROM node:20-slim AS base +FROM node:22-slim AS base ARG USE_CN_MIRROR From 0a72f09981ee4c838d9a604b74de36b6e4370fbb Mon Sep 17 00:00:00 2001 From: jiangxucong Date: Fri, 28 Feb 2025 14:08:10 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalHumanWeb/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalHumanWeb/Dockerfile b/DigitalHumanWeb/Dockerfile index d0fac4b..9dd557e 100644 --- a/DigitalHumanWeb/Dockerfile +++ b/DigitalHumanWeb/Dockerfile @@ -71,7 +71,7 @@ RUN \ # Enable corepack && corepack enable \ # Use pnpm for corepack - && corepack use pnpm \ + && corepack use $(sed -n 's/.*"packageManager": "\(.*\)".*/\1/p' package.json) \ # Install the dependencies && pnpm i \ # Add sharp and db migration dependencies From 53bf4d0647f537f3f0055c980123945d160e64ea Mon Sep 17 00:00:00 2001 From: jiangxucong Date: Fri, 28 Feb 2025 14:48:13 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalHumanWeb/Dockerfile | 50 +++---------------- .../@nav/_layout/Desktop/TopActions.tsx | 4 +- 2 files changed, 9 insertions(+), 45 deletions(-) diff --git a/DigitalHumanWeb/Dockerfile b/DigitalHumanWeb/Dockerfile index 9dd557e..a8ee26a 100644 --- a/DigitalHumanWeb/Dockerfile +++ b/DigitalHumanWeb/Dockerfile @@ -31,11 +31,7 @@ FROM base AS builder ARG USE_CN_MIRROR -ENV NEXT_PUBLIC_SERVICE_MODE="server" \ - APP_URL="http://192.168.15.199:3210" \ - DATABASE_DRIVER="node" \ - DATABASE_URL="postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat" \ - KEY_VAULTS_SECRET="Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=" +ENV NEXT_PUBLIC_BASE_PATH="" # Sentry ENV NEXT_PUBLIC_SENTRY_DSN="" \ @@ -74,9 +70,9 @@ RUN \ && corepack use $(sed -n 's/.*"packageManager": "\(.*\)".*/\1/p' package.json) \ # Install the dependencies && pnpm i \ - # Add sharp and db migration dependencies + # Add sharp dependencies && mkdir -p /deps \ - && pnpm add sharp pg drizzle-orm --prefix /deps + && pnpm add sharp --prefix /deps COPY . . @@ -92,16 +88,7 @@ COPY --from=builder /app/public /app/public # https://nextjs.org/docs/advanced-features/output-file-tracing COPY --from=builder /app/.next/standalone /app/ COPY --from=builder /app/.next/static /app/.next/static - -# copy dependencies COPY --from=builder /deps/node_modules/.pnpm /app/node_modules/.pnpm -COPY --from=builder /deps/node_modules/pg /app/node_modules/pg -COPY --from=builder /deps/node_modules/drizzle-orm /app/node_modules/drizzle-orm - -# Copy database migrations -COPY --from=builder /app/src/database/server/migrations /app/migrations -COPY --from=builder /app/scripts/migrateServerDB/docker.cjs /app/docker.cjs -COPY --from=builder /app/scripts/migrateServerDB/errorHint.js /app/errorHint.js ## Production image, copy all the files and run next FROM base @@ -113,36 +100,17 @@ ENV NODE_ENV="production" \ NODE_TLS_REJECT_UNAUTHORIZED="" # set hostname to localhost -ENV HOSTNAME="192.168.15.199" \ +ENV HOSTNAME="0.0.0.0" \ PORT="3210" # General Variables ENV ACCESS_CODE="" \ - APP_URL="http://192.168.15.199:3210" \ API_KEY_SELECT_MODE="" \ DEFAULT_AGENT_CONFIG="" \ SYSTEM_AGENT="" \ FEATURE_FLAGS="" \ PROXY_URL="" -# Database -ENV KEY_VAULTS_SECRET="Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=" \ - DATABASE_DRIVER="node" \ - DATABASE_URL="postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat" - -# Next Auth -ENV NEXT_AUTH_SECRET="NX2kaPE923dt6BL2U8e9oSre5RfoT7hg" \ - NEXT_AUTH_SSO_PROVIDERS="casdoor" \ - NEXTAUTH_URL="http://192.168.15.199:3210/api/auth" - -# S3 -ENV NEXT_PUBLIC_S3_DOMAIN="" \ - S3_PUBLIC_DOMAIN="http://192.168.15.199:9000" \ - S3_ACCESS_KEY_ID="soaucnP8Bip0TDdUjxng" \ - S3_BUCKET="casdoor" \ - S3_ENDPOINT="http://192.168.15.199:9000" \ - S3_SECRET_ACCESS_KEY="ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO" - # Model Variables ENV \ # AI21 @@ -200,7 +168,7 @@ ENV \ # 01.AI ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \ # Zhipu - ZHIPU_API_KEY="" + ZHIPU_API_KEY="" ZHIPU_MODEL_LIST="" USER nextjs @@ -237,9 +205,5 @@ CMD \ "$protocol $host $port" \ > "/etc/proxychains4.conf"; \ fi; \ - # Run migration - node "/app/docker.cjs"; \ - if [ "$?" -eq "0" ]; then \ - # Run the server - ${PROXYCHAINS} node "/app/server.js"; \ - fi; + # Run the server + ${PROXYCHAINS} node "/app/server.js"; diff --git a/DigitalHumanWeb/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx b/DigitalHumanWeb/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx index 59fc8e5..3f084f1 100644 --- a/DigitalHumanWeb/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx +++ b/DigitalHumanWeb/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx @@ -93,12 +93,12 @@ const TopActions = memo(() => {
插件
)} - {showMarket && ( + {/*{showMarket && ( {setValue("/power"); window.localStorage.setItem("nowChat", "")}}> {"power"}
算力
- )} + )}*/} {showMarket && ( {setValue("/knowledge")}}> From 96a8419abdd01199d22240af468713fe37c3ecb3 Mon Sep 17 00:00:00 2001 From: jiangxucong Date: Fri, 28 Feb 2025 17:06:49 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalHumanWeb/.changelogrc.js | 1 - DigitalHumanWeb/.commitlintrc.js | 1 - DigitalHumanWeb/.eslintignore | 31 -------------------------- DigitalHumanWeb/.eslintrc.js | 37 -------------------------------- DigitalHumanWeb/.prettierrc.js | 1 - DigitalHumanWeb/.releaserc.js | 1 - DigitalHumanWeb/.remarkrc.js | 1 - DigitalHumanWeb/.stylelintrc.js | 9 -------- 8 files changed, 82 deletions(-) delete mode 100644 DigitalHumanWeb/.changelogrc.js delete mode 100644 DigitalHumanWeb/.commitlintrc.js delete mode 100644 DigitalHumanWeb/.eslintignore delete mode 100644 DigitalHumanWeb/.eslintrc.js delete mode 100644 DigitalHumanWeb/.prettierrc.js delete mode 100644 DigitalHumanWeb/.releaserc.js delete mode 100644 DigitalHumanWeb/.remarkrc.js delete mode 100644 DigitalHumanWeb/.stylelintrc.js diff --git a/DigitalHumanWeb/.changelogrc.js b/DigitalHumanWeb/.changelogrc.js deleted file mode 100644 index 9a2f5f9..0000000 --- a/DigitalHumanWeb/.changelogrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('@lobehub/lint').changelog; diff --git a/DigitalHumanWeb/.commitlintrc.js b/DigitalHumanWeb/.commitlintrc.js deleted file mode 100644 index 9b8c6ac..0000000 --- a/DigitalHumanWeb/.commitlintrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('@lobehub/lint').commitlint; diff --git a/DigitalHumanWeb/.eslintignore b/DigitalHumanWeb/.eslintignore deleted file mode 100644 index a0afbcb..0000000 --- a/DigitalHumanWeb/.eslintignore +++ /dev/null @@ -1,31 +0,0 @@ -# Eslintignore for LobeHub -################################################################ - -# dependencies -node_modules - -# ci -coverage -.coverage - -# test -jest* -*.test.ts -*.test.tsx - -# umi -.umi -.umi-production -.umi-test -.dumi/tmp* -!.dumirc.ts - -# production -dist -es -lib -logs - -# misc -# add other ignore file below -.next \ No newline at end of file diff --git a/DigitalHumanWeb/.eslintrc.js b/DigitalHumanWeb/.eslintrc.js deleted file mode 100644 index 827b016..0000000 --- a/DigitalHumanWeb/.eslintrc.js +++ /dev/null @@ -1,37 +0,0 @@ -const config = require('@lobehub/lint').eslint; - -config.extends.push('plugin:@next/next/recommended'); - -config.rules['unicorn/no-negated-condition'] = 0; -config.rules['unicorn/prefer-type-error'] = 0; -config.rules['unicorn/prefer-logical-operator-over-ternary'] = 0; -config.rules['unicorn/no-null'] = 0; -config.rules['unicorn/no-typeof-undefined'] = 0; -config.rules['unicorn/explicit-length-check'] = 0; -config.rules['unicorn/prefer-code-point'] = 0; -config.rules['no-extra-boolean-cast'] = 0; -config.rules['unicorn/no-useless-undefined'] = 0; -config.rules['react/no-unknown-property'] = 0; -config.rules['unicorn/prefer-ternary'] = 0; -config.rules['unicorn/prefer-spread'] = 0; -config.rules['unicorn/catch-error-name'] = 0; -config.rules['unicorn/no-array-for-each'] = 0; -config.rules['unicorn/prefer-number-properties'] = 0; - -config.overrides = [ - { - extends: ['plugin:mdx/recommended'], - files: ['*.mdx'], - rules: { - '@typescript-eslint/no-unused-vars': 1, - 'no-undef': 0, - 'react/jsx-no-undef': 0, - 'react/no-unescaped-entities': 0, - }, - settings: { - 'mdx/code-blocks': false, - }, - }, -]; - -module.exports = config; diff --git a/DigitalHumanWeb/.prettierrc.js b/DigitalHumanWeb/.prettierrc.js deleted file mode 100644 index f0355a9..0000000 --- a/DigitalHumanWeb/.prettierrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('@lobehub/lint').prettier; diff --git a/DigitalHumanWeb/.releaserc.js b/DigitalHumanWeb/.releaserc.js deleted file mode 100644 index 3793001..0000000 --- a/DigitalHumanWeb/.releaserc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('@lobehub/lint').semanticRelease; diff --git a/DigitalHumanWeb/.remarkrc.js b/DigitalHumanWeb/.remarkrc.js deleted file mode 100644 index b673c10..0000000 --- a/DigitalHumanWeb/.remarkrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('@lobehub/lint').remarklint; diff --git a/DigitalHumanWeb/.stylelintrc.js b/DigitalHumanWeb/.stylelintrc.js deleted file mode 100644 index d1ac674..0000000 --- a/DigitalHumanWeb/.stylelintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -const config = require('@lobehub/lint').stylelint; - -module.exports = { - ...config, - rules: { - 'selector-id-pattern': null, - ...config.rules, - }, -}; From c6b516d6b5ce4019aada9b3ec5d45f16f0a640c7 Mon Sep 17 00:00:00 2001 From: lvchenpeng <3194951363@qq.com> Date: Fri, 28 Feb 2025 18:08:31 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../discover/(list)/_layout/Desktop/index.tsx | 2 +- .../discover/(list)/models/_layout/Desktop.tsx | 16 +++++++++------- .../discover/(list)/models/features/List.tsx | 6 +++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/DigitalHumanWeb/src/app/(main)/discover/(list)/_layout/Desktop/index.tsx b/DigitalHumanWeb/src/app/(main)/discover/(list)/_layout/Desktop/index.tsx index 162174c..0085062 100644 --- a/DigitalHumanWeb/src/app/(main)/discover/(list)/_layout/Desktop/index.tsx +++ b/DigitalHumanWeb/src/app/(main)/discover/(list)/_layout/Desktop/index.tsx @@ -20,7 +20,7 @@ const Layout = ({ children }: PropsWithChildren) => { > {children} diff --git a/DigitalHumanWeb/src/app/(main)/discover/(list)/models/_layout/Desktop.tsx b/DigitalHumanWeb/src/app/(main)/discover/(list)/models/_layout/Desktop.tsx index aa4c3d6..a773e9a 100644 --- a/DigitalHumanWeb/src/app/(main)/discover/(list)/models/_layout/Desktop.tsx +++ b/DigitalHumanWeb/src/app/(main)/discover/(list)/models/_layout/Desktop.tsx @@ -12,14 +12,16 @@ const Layout = async ({ children }: PropsWithChildren) => { const categoryList = await discoverService.getProviderList(DEFAULT_LANG); return ( - - - - - - {children} +
+ + + + + + {children} + - +
); }; diff --git a/DigitalHumanWeb/src/app/(main)/discover/(list)/models/features/List.tsx b/DigitalHumanWeb/src/app/(main)/discover/(list)/models/features/List.tsx index 84555ed..767a589 100644 --- a/DigitalHumanWeb/src/app/(main)/discover/(list)/models/features/List.tsx +++ b/DigitalHumanWeb/src/app/(main)/discover/(list)/models/features/List.tsx @@ -74,7 +74,7 @@ const List = memo(async ({ category, searchKeywords, items = [] }) => }; fetchData(); }, []); // 空数组[]意味着仅在组件挂载时调用一次 - + const handleClickCard = (item) => { console.log(item) router.push(urlJoin('/discover/model/', item.identifier)) @@ -108,7 +108,7 @@ const List = memo(async ({ category, searchKeywords, items = [] }) => {stData.map((item) => ( // - handleClickCard(item)} showCategory={!category} {...item} /> + handleClickCard(item)} showCategory={!category} {...item} /> // ))} @@ -121,7 +121,7 @@ const List = memo(async ({ category, searchKeywords, items = [] }) => initialItemCount={24} itemContent={(_, item) => ( // - handleClickCard(item)} showCategory={!category} {...item} /> + handleClickCard(item)} showCategory={!category} {...item} /> // )} style={{