diff --git a/package.json b/package.json index 8aa4128..a7df156 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "dependencies": { "@highlightjs/vue-plugin": "^2.1.0", "@mdi/font": "7.4.47", + "@mdit/plugin-katex": "^0.13.1", + "@mdit/plugin-sub": "^0.13.1", + "@mdit/plugin-sup": "^0.13.1", "@primevue/themes": "^4.0.0", "@vercel/analytics": "^1.3.1", "@vercel/speed-insights": "^1.0.12", @@ -20,10 +23,14 @@ "axios": "^1.7.2", "core-js": "^3.37.1", "crypto-js": "^4.2.0", + "dompurify": "^3.1.7", "highlight.js": "^11.10.0", "instantsearch.css": "^8.5.1", "jszip": "^3.10.1", "jwt-decode": "^4.0.0", + "markdown-it": "^14.1.0", + "markdown-it-emoji": "^3.0.0", + "markdown-it-mathjax": "^2.0.0", "prettydiff": "^101.2.6", "primevue": "^4.0.0", "roboto-fontface": "*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dda455a..4bc326a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,15 @@ importers: '@mdi/font': specifier: 7.4.47 version: 7.4.47 + '@mdit/plugin-katex': + specifier: ^0.13.1 + version: 0.13.1(markdown-it@14.1.0) + '@mdit/plugin-sub': + specifier: ^0.13.1 + version: 0.13.1(markdown-it@14.1.0) + '@mdit/plugin-sup': + specifier: ^0.13.1 + version: 0.13.1(markdown-it@14.1.0) '@primevue/themes': specifier: ^4.0.0 version: 4.0.0(@primeuix/styled@0.0.5) @@ -38,6 +47,9 @@ importers: crypto-js: specifier: ^4.2.0 version: 4.2.0 + dompurify: + specifier: ^3.1.7 + version: 3.1.7 highlight.js: specifier: ^11.10.0 version: 11.10.0 @@ -50,6 +62,15 @@ importers: jwt-decode: specifier: ^4.0.0 version: 4.0.0 + markdown-it: + specifier: ^14.1.0 + version: 14.1.0 + markdown-it-emoji: + specifier: ^3.0.0 + version: 3.0.0 + markdown-it-mathjax: + specifier: ^2.0.0 + version: 2.0.0 prettydiff: specifier: ^101.2.6 version: 101.2.6 @@ -436,6 +457,42 @@ packages: '@mdi/font@7.4.47': resolution: {integrity: sha512-43MtGpd585SNzHZPcYowu/84Vz2a2g31TvPMTm9uTiCSWzaheQySUcSyUH/46fPnuPQWof2yd0pGBtzee/IQWw==} + '@mdit/plugin-katex@0.13.1': + resolution: {integrity: sha512-ODWJ0vw8r+uqpUEXlSJYyLHr16NfixPDrkhIGroy2osg9NAcpQ86MF/itDympw4WU1UmFhy2E2w2R2kAXcm6mA==} + engines: {node: '>= 18'} + peerDependencies: + markdown-it: ^14.1.0 + peerDependenciesMeta: + markdown-it: + optional: true + + '@mdit/plugin-sub@0.13.1': + resolution: {integrity: sha512-2rIvEl6pXUoXIm3JMO5ZOQ+vWIeFXmLkqxcmTZB2yOIfhYdLwIcSyquRwtI2AX8zCuvaTdiQ/aypvIE4tDoURw==} + engines: {node: '>= 18'} + peerDependencies: + markdown-it: ^14.1.0 + peerDependenciesMeta: + markdown-it: + optional: true + + '@mdit/plugin-sup@0.13.1': + resolution: {integrity: sha512-vkNif2Rbj7/gtk4/HJt5hnb+Dcbnek/V4HtLdtqUUnq9bIbzFBpYw5jZ1ZKKZeetDtRvOUPH5oy5d7iXAHorUg==} + engines: {node: '>= 18'} + peerDependencies: + markdown-it: ^14.1.0 + peerDependenciesMeta: + markdown-it: + optional: true + + '@mdit/plugin-tex@0.13.1': + resolution: {integrity: sha512-lkRf6XrfVfS11FzT3hiooWdOUPJfAd/cnAv4NN/4WU7qOEz0e0HBVQO8PQb5CPwrE94Ld4+E6rQwJfVH1grkwQ==} + engines: {node: '>= 18'} + peerDependencies: + markdown-it: ^14.1.0 + peerDependenciesMeta: + markdown-it: + optional: true + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -600,6 +657,18 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + '@types/katex@0.16.7': + resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==} + + '@types/linkify-it@5.0.0': + resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} + + '@types/markdown-it@14.1.2': + resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} + + '@types/mdurl@2.0.0': + resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} + '@types/minimatch@5.1.2': resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} @@ -890,6 +959,10 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} + commander@8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -973,6 +1046,9 @@ packages: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} + dompurify@3.1.7: + resolution: {integrity: sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==} + entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -1513,6 +1589,10 @@ packages: resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} engines: {node: '>=18'} + katex@0.16.11: + resolution: {integrity: sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==} + hasBin: true + keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} @@ -1523,6 +1603,9 @@ packages: lie@3.3.0: resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + local-pkg@0.5.0: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} @@ -1544,6 +1627,16 @@ packages: magic-string@0.30.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + markdown-it-emoji@3.0.0: + resolution: {integrity: sha512-+rUD93bXHubA4arpEZO3q80so0qgoFJEKRkRbjKX8RTdca89v2kfyF+xR3i2sQTwql9tpPZPOQN5B+PunspXRg==} + + markdown-it-mathjax@2.0.0: + resolution: {integrity: sha512-Fafv7TnMENccWYTNjMZzV4BzONPxpK9Mknr1iMEK6m7PI5a5UTCOFctPzx7Nhv81fFzYEY8WHDkSu9n43fTV9g==} + + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + marked-highlight@2.1.3: resolution: {integrity: sha512-t35JWm2u8HanOJ+gSJBAYQ0Jgr3vy+gl7ORAXN8bSEQFHl5FYXH0A7YXVMrfhmKaSuBSy6LidXECn3U9Qv/dHA==} peerDependencies: @@ -1554,6 +1647,9 @@ packages: engines: {node: '>= 18'} hasBin: true + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -1738,6 +1834,10 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -1960,6 +2060,9 @@ packages: resolution: {integrity: sha512-k24RCVWlEcjkdOxYmVJgeD/0a1TiSpqLg+ZalVGV9lsnr4yqu0w7tX/x2xX6G4zpkgQnRf89lxuZ1wsbjXM8lw==} hasBin: true + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} @@ -2440,6 +2543,33 @@ snapshots: '@mdi/font@7.4.47': {} + '@mdit/plugin-katex@0.13.1(markdown-it@14.1.0)': + dependencies: + '@mdit/plugin-tex': 0.13.1(markdown-it@14.1.0) + '@types/katex': 0.16.7 + '@types/markdown-it': 14.1.2 + katex: 0.16.11 + optionalDependencies: + markdown-it: 14.1.0 + + '@mdit/plugin-sub@0.13.1(markdown-it@14.1.0)': + dependencies: + '@types/markdown-it': 14.1.2 + optionalDependencies: + markdown-it: 14.1.0 + + '@mdit/plugin-sup@0.13.1(markdown-it@14.1.0)': + dependencies: + '@types/markdown-it': 14.1.2 + optionalDependencies: + markdown-it: 14.1.0 + + '@mdit/plugin-tex@0.13.1(markdown-it@14.1.0)': + dependencies: + '@types/markdown-it': 14.1.2 + optionalDependencies: + markdown-it: 14.1.0 + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2556,6 +2686,17 @@ snapshots: '@types/json5@0.0.29': {} + '@types/katex@0.16.7': {} + + '@types/linkify-it@5.0.0': {} + + '@types/markdown-it@14.1.2': + dependencies: + '@types/linkify-it': 5.0.0 + '@types/mdurl': 2.0.0 + + '@types/mdurl@2.0.0': {} + '@types/minimatch@5.1.2': {} '@types/node@12.20.55': {} @@ -2906,6 +3047,8 @@ snapshots: dependencies: delayed-stream: 1.0.0 + commander@8.3.0: {} + concat-map@0.0.1: {} confbox@0.1.7: {} @@ -2980,6 +3123,8 @@ snapshots: dependencies: esutils: 2.0.3 + dompurify@3.1.7: {} + entities@4.5.0: {} es-abstract@1.23.3: @@ -3655,6 +3800,10 @@ snapshots: jwt-decode@4.0.0: {} + katex@0.16.11: + dependencies: + commander: 8.3.0 + keyv@4.5.4: dependencies: json-buffer: 3.0.1 @@ -3668,6 +3817,10 @@ snapshots: dependencies: immediate: 3.0.6 + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + local-pkg@0.5.0: dependencies: mlly: 1.7.1 @@ -3689,12 +3842,27 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + markdown-it-emoji@3.0.0: {} + + markdown-it-mathjax@2.0.0: {} + + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + marked-highlight@2.1.3(marked@12.0.2): dependencies: marked: 12.0.2 marked@12.0.2: {} + mdurl@2.0.0: {} + merge2@1.4.1: {} micromatch@4.0.7: @@ -3867,6 +4035,8 @@ snapshots: proxy-from-env@1.1.0: {} + punycode.js@2.3.1: {} + punycode@2.3.1: {} qs@6.9.7: {} @@ -4124,6 +4294,8 @@ snapshots: ua-parser-js@1.0.39: {} + uc.micro@2.1.0: {} + ufo@1.5.3: {} unbox-primitive@1.0.2: diff --git a/src/App.vue b/src/App.vue index a3f574b..1bf220c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,7 +3,11 @@ - + + + + + @@ -12,3 +16,22 @@ + + diff --git a/src/assets/ZeroCatLogo.svg b/src/assets/ZeroCatLogo.svg new file mode 100644 index 0000000..c547bd5 --- /dev/null +++ b/src/assets/ZeroCatLogo.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/AppHeader.vue b/src/components/AppHeader.vue index d05eb5d..171bf93 100644 --- a/src/components/AppHeader.vue +++ b/src/components/AppHeader.vue @@ -1,9 +1,9 @@ - + - ZeroCatNext + ZeroCatNext @@ -24,7 +24,8 @@ - + - {{ comment.text }} + {{ comment.text }} - {{ morecommnets.text }} + {{ morecommnets.text }} - {{ comment.text }} + {{ comment.text }} @@ -262,6 +262,7 @@ + + diff --git a/src/pages/account/callback.vue b/src/pages/account/callback.vue index c5fa2b4..eec3bc8 100644 --- a/src/pages/account/callback.vue +++ b/src/pages/account/callback.vue @@ -1,6 +1,6 @@ - + 您正在登录一个账户 diff --git a/src/pages/account/login.vue b/src/pages/account/login.vue index b755767..8abdd4d 100644 --- a/src/pages/account/login.vue +++ b/src/pages/account/login.vue @@ -1,30 +1,30 @@ - + - + 欢迎来到ZeroCatNext! 👋🏻 登录你的账户 - + - - - + + + - - + - + - - + > + + - - + + 刷新 - + - + - - + + - + - - - - + + + + @@ -194,6 +194,7 @@ export default { this.$router.push("/"); } }, + addtoast(text) { this.$toast.add({ severity: "info", diff --git a/src/pages/account/logout.vue b/src/pages/account/logout.vue index 3c5d6de..1179d9e 100644 --- a/src/pages/account/logout.vue +++ b/src/pages/account/logout.vue @@ -1,6 +1,6 @@ - + {{ titlemessage }} diff --git a/src/pages/account/register.vue b/src/pages/account/register.vue index fd40eaf..8b6b606 100644 --- a/src/pages/account/register.vue +++ b/src/pages/account/register.vue @@ -1,23 +1,23 @@ - + - + 欢迎来到ZeroCatNext! 👋🏻 创建你的账户 - + - - - + + + - - + - - + - - - + + + - - + + 刷新 - + - + - - - - - + + + + + diff --git a/src/pages/account/retrieve.vue b/src/pages/account/retrieve.vue index 04a1135..671f819 100644 --- a/src/pages/account/retrieve.vue +++ b/src/pages/account/retrieve.vue @@ -1,38 +1,38 @@ - + - + 欢迎来到ZeroCatNext! 👋🏻 找回密码 - + - - - + + + - - + - - + > + + - - + + 刷新 - + - + - - + + - + - - - - + + + + diff --git a/src/pages/account/retrievecallback.vue b/src/pages/account/retrievecallback.vue index 998d9ec..475b10a 100644 --- a/src/pages/account/retrievecallback.vue +++ b/src/pages/account/retrievecallback.vue @@ -1,23 +1,23 @@ - + - + 欢迎来到ZeroCatNext! 👋🏻 重设密码 - + - - - + + + - - + - - + - - - + + + - - + + 刷新 - + - + - - + + - + - - - - + + + + diff --git a/src/pages/index.vue b/src/pages/index.vue index e693c5b..8f2e756 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -2,7 +2,7 @@ - + @@ -225,10 +225,11 @@ import { ref } from "vue"; import request from "../axios/axios"; import $vuetify from "@/plugins/vuetify"; - +import {localuser} from "../stores/user" export default { data() { return { + localuser, teams: [ { title: "孙悟元",
登录你的账户
创建你的账户
找回密码
重设密码