diff --git a/Dockerfile b/Dockerfile index 6dffd53..10d8442 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,9 @@ COPY --from=server-builder /build/server/dist ./dist COPY --from=server-builder /build/server/prisma ./prisma RUN npx prisma generate COPY --from=client-builder /build/client/dist ./public +COPY docker/runtime-entrypoint.sh /usr/local/bin/toolsshow-entrypoint +RUN chmod +x /usr/local/bin/toolsshow-entrypoint EXPOSE 3000 -CMD ["sh", "-c", "npx prisma migrate deploy && node dist/src/main.js"] +CMD ["toolsshow-entrypoint"] diff --git a/client/.env.development.example b/client/.env.development.example new file mode 100644 index 0000000..9291a1f --- /dev/null +++ b/client/.env.development.example @@ -0,0 +1,2 @@ +VITE_API_BASE=/api/v1 +VITE_API_PROXY_TARGET=http://localhost:3000 diff --git a/client/index.html b/client/index.html index f0ba583..e7aa875 100644 --- a/client/index.html +++ b/client/index.html @@ -3,16 +3,14 @@ - ToolsShow - Vue3 客户端 - - - + 资源导航站点 + + + +
- \ No newline at end of file + diff --git a/client/package-lock.json b/client/package-lock.json index fb95f55..b96aeca 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -9,7 +9,9 @@ "version": "1.0.0", "dependencies": { "axios": "^1.13.1", + "dompurify": "^3.3.3", "element-plus": "^2.11.7", + "marked": "^17.0.5", "pinia": "^2.3.1", "vue": "^3.5.22", "vue-router": "^4.6.3" @@ -1257,6 +1259,13 @@ "@types/lodash": "*" } }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmmirror.com/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true + }, "node_modules/@types/web-bluetooth": { "version": "0.0.20", "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", @@ -1518,6 +1527,15 @@ "node": ">=8" } }, + "node_modules/dompurify": { + "version": "3.3.3", + "resolved": "https://registry.npmmirror.com/dompurify/-/dompurify-3.3.3.tgz", + "integrity": "sha512-Oj6pzI2+RqBfFG+qOaOLbFXLQ90ARpcGG6UePL82bJLtdsa6CYJD7nmiU8MW9nQNOtCHV3lZ/Bzq1X0QYbBZCA==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -1893,6 +1911,18 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/marked": { + "version": "17.0.5", + "resolved": "https://registry.npmmirror.com/marked/-/marked-17.0.5.tgz", + "integrity": "sha512-6hLvc0/JEbRjRgzI6wnT2P1XuM1/RrrDEX0kPt0N7jGm1133g6X7DlxFasUIx+72aKAr904GTxhSLDrd5DIlZg==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", diff --git a/client/package.json b/client/package.json index 3c2ef60..4e2fbec 100644 --- a/client/package.json +++ b/client/package.json @@ -10,7 +10,9 @@ }, "dependencies": { "axios": "^1.13.1", + "dompurify": "^3.3.3", "element-plus": "^2.11.7", + "marked": "^17.0.5", "pinia": "^2.3.1", "vue": "^3.5.22", "vue-router": "^4.6.3" diff --git a/client/public/favicon.ico b/client/public/favicon.ico new file mode 100644 index 0000000..ba61941 Binary files /dev/null and b/client/public/favicon.ico differ diff --git a/client/public/favicon.png b/client/public/favicon.png new file mode 100644 index 0000000..44d7919 Binary files /dev/null and b/client/public/favicon.png differ diff --git a/client/public/favicon.svg b/client/public/favicon.svg new file mode 100644 index 0000000..df88ada --- /dev/null +++ b/client/public/favicon.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/public/local-fonts.css b/client/public/local-fonts.css new file mode 100644 index 0000000..e491b28 --- /dev/null +++ b/client/public/local-fonts.css @@ -0,0 +1,6 @@ +:root { + --font-sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; + --font-display: "Avenir Next", "Trebuchet MS", "Segoe UI", "PingFang SC", sans-serif; + --font-admin-sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; + --font-admin-mono: "Cascadia Code", "Consolas", "SFMono-Regular", monospace; +} diff --git a/client/src/App.vue b/client/src/App.vue index e7542a8..0ec970c 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -3,18 +3,14 @@
- - + 资源导航