diff --git a/jsconfig.json b/jsconfig.json index 7c140e1..e0aad8a 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,6 +1,4 @@ { - - "include": ["src/**/*"], "compilerOptions": { "paths": { diff --git a/package-lock.json b/package-lock.json index 7c5bdfb..af08d65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "antd": "^5.27.3", "axios": "^1.12.2", "element-plus": "^2.11.5", + "md-editor-v3": "^6.1.0", "naive-ui": "^2.43.1", "pinia": "^3.0.3", "sass": "^1.93.2", @@ -672,6 +673,404 @@ "node": ">=6.9.0" } }, + "node_modules/@codemirror/autocomplete": { + "version": "6.19.1", + "resolved": "https://registry.npmmirror.com/@codemirror/autocomplete/-/autocomplete-6.19.1.tgz", + "integrity": "sha512-q6NenYkEy2fn9+JyjIxMWcNjzTL/IhwqfzOut1/G3PrIFkrbl4AL7Wkse5tLrQUUyqGoAKU5+Pi5jnnXxH5HGw==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.10.0", + "resolved": "https://registry.npmmirror.com/@codemirror/commands/-/commands-6.10.0.tgz", + "integrity": "sha512-2xUIc5mHXQzT16JnyOFkh8PvfeXuIut3pslWGfsGOhxP/lpgRm9HOl/mpzLErgt5mXDovqA0d11P21gofRLb9w==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.4.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/lang-angular": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-angular/-/lang-angular-0.1.4.tgz", + "integrity": "sha512-oap+gsltb/fzdlTQWD6BFF4bSLKcDnlxDsLdePiJpCVNKWXSTAbiiQeYI3UmES+BLAdkmIC1WjyztC1pi/bX4g==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/lang-javascript": "^6.1.2", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.3" + } + }, + "node_modules/@codemirror/lang-cpp": { + "version": "6.0.3", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-cpp/-/lang-cpp-6.0.3.tgz", + "integrity": "sha512-URM26M3vunFFn9/sm6rzqrBzDgfWuDixp85uTY49wKudToc2jTHUrKIGGKs+QWND+YLofNNZpxcNGRynFJfvgA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/cpp": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-css": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-css/-/lang-css-6.3.1.tgz", + "integrity": "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.2", + "@lezer/css": "^1.1.7" + } + }, + "node_modules/@codemirror/lang-go": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-go/-/lang-go-6.0.1.tgz", + "integrity": "sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.6.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/go": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-html": { + "version": "6.4.11", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-html/-/lang-html-6.4.11.tgz", + "integrity": "sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/lang-css": "^6.0.0", + "@codemirror/lang-javascript": "^6.0.0", + "@codemirror/language": "^6.4.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/css": "^1.1.0", + "@lezer/html": "^1.3.12" + } + }, + "node_modules/@codemirror/lang-java": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-java/-/lang-java-6.0.2.tgz", + "integrity": "sha512-m5Nt1mQ/cznJY7tMfQTJchmrjdjQ71IDs+55d1GAa8DGaB8JXWsVCkVT284C3RTASaY43YknrK2X3hPO/J3MOQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/java": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-javascript": { + "version": "6.2.4", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-javascript/-/lang-javascript-6.2.4.tgz", + "integrity": "sha512-0WVmhp1QOqZ4Rt6GlVGwKJN3KW7Xh4H2q8ZZNGZaP6lRdxXJzmjm4FqvmOojVj6khWJHIb9sp7U/72W7xQgqAA==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.6.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/javascript": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-jinja": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-jinja/-/lang-jinja-6.0.0.tgz", + "integrity": "sha512-47MFmRcR8UAxd8DReVgj7WJN1WSAMT7OJnewwugZM4XiHWkOjgJQqvEM1NpMj9ALMPyxmlziEI1opH9IaEvmaw==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.2.0", + "@lezer/lr": "^1.4.0" + } + }, + "node_modules/@codemirror/lang-json": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-json/-/lang-json-6.0.2.tgz", + "integrity": "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/json": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-less": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-less/-/lang-less-6.0.2.tgz", + "integrity": "sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-css": "^6.2.0", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-liquid": { + "version": "6.3.0", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-liquid/-/lang-liquid-6.3.0.tgz", + "integrity": "sha512-fY1YsUExcieXRTsCiwX/bQ9+PbCTA/Fumv7C7mTUZHoFkibfESnaXwpr2aKH6zZVwysEunsHHkaIpM/pl3xETQ==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.1" + } + }, + "node_modules/@codemirror/lang-markdown": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-markdown/-/lang-markdown-6.5.0.tgz", + "integrity": "sha512-0K40bZ35jpHya6FriukbgaleaqzBLZfOh7HuzqbMxBXkbYMJDxfF39c23xOgxFezR+3G+tR2/Mup+Xk865OMvw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.7.1", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.3.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.2.1", + "@lezer/markdown": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-php": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-php/-/lang-php-6.0.2.tgz", + "integrity": "sha512-ZKy2v1n8Fc8oEXj0Th0PUMXzQJ0AIR6TaZU+PbDHExFwdu+guzOA4jmCHS1Nz4vbFezwD7LyBdDnddSJeScMCA==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/php": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-python": { + "version": "6.2.1", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-python/-/lang-python-6.2.1.tgz", + "integrity": "sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.3.2", + "@codemirror/language": "^6.8.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.1", + "@lezer/python": "^1.1.4" + } + }, + "node_modules/@codemirror/lang-rust": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-rust/-/lang-rust-6.0.2.tgz", + "integrity": "sha512-EZaGjCUegtiU7kSMvOfEZpaCReowEf3yNidYu7+vfuGTm9ow4mthAparY5hisJqOHmJowVH3Upu+eJlUji6qqA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/rust": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-sass": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-sass/-/lang-sass-6.0.2.tgz", + "integrity": "sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-css": "^6.2.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.2", + "@lezer/sass": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-sql": { + "version": "6.10.0", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-sql/-/lang-sql-6.10.0.tgz", + "integrity": "sha512-6ayPkEd/yRw0XKBx5uAiToSgGECo/GY2NoJIHXIIQh1EVwLuKoU8BP/qK0qH5NLXAbtJRLuT73hx7P9X34iO4w==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-vue": { + "version": "0.1.3", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-vue/-/lang-vue-0.1.3.tgz", + "integrity": "sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/lang-javascript": "^6.1.2", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.1" + } + }, + "node_modules/@codemirror/lang-wast": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-wast/-/lang-wast-6.0.2.tgz", + "integrity": "sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-xml": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz", + "integrity": "sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.4.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/xml": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-yaml": { + "version": "6.1.2", + "resolved": "https://registry.npmmirror.com/@codemirror/lang-yaml/-/lang-yaml-6.1.2.tgz", + "integrity": "sha512-dxrfG8w5Ce/QbT7YID7mWZFKhdhsaTNOYjOkSIMt1qmC4VQnXSDSYVHHHn8k6kJUfIhtLo8t1JJgltlxWdsITw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.2.0", + "@lezer/lr": "^1.0.0", + "@lezer/yaml": "^1.0.0" + } + }, + "node_modules/@codemirror/language": { + "version": "6.11.3", + "resolved": "https://registry.npmmirror.com/@codemirror/language/-/language-6.11.3.tgz", + "integrity": "sha512-9HBM2XnwDj7fnu0551HkGdrUrrqmYq/WC5iv6nbY2WdicXdGbhR/gfbZOH73Aqj4351alY1+aoG9rCNfiwS1RA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.1.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/language-data": { + "version": "6.5.2", + "resolved": "https://registry.npmmirror.com/@codemirror/language-data/-/language-data-6.5.2.tgz", + "integrity": "sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-angular": "^0.1.0", + "@codemirror/lang-cpp": "^6.0.0", + "@codemirror/lang-css": "^6.0.0", + "@codemirror/lang-go": "^6.0.0", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/lang-java": "^6.0.0", + "@codemirror/lang-javascript": "^6.0.0", + "@codemirror/lang-jinja": "^6.0.0", + "@codemirror/lang-json": "^6.0.0", + "@codemirror/lang-less": "^6.0.0", + "@codemirror/lang-liquid": "^6.0.0", + "@codemirror/lang-markdown": "^6.0.0", + "@codemirror/lang-php": "^6.0.0", + "@codemirror/lang-python": "^6.0.0", + "@codemirror/lang-rust": "^6.0.0", + "@codemirror/lang-sass": "^6.0.0", + "@codemirror/lang-sql": "^6.0.0", + "@codemirror/lang-vue": "^0.1.1", + "@codemirror/lang-wast": "^6.0.0", + "@codemirror/lang-xml": "^6.0.0", + "@codemirror/lang-yaml": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/legacy-modes": "^6.4.0" + } + }, + "node_modules/@codemirror/legacy-modes": { + "version": "6.5.2", + "resolved": "https://registry.npmmirror.com/@codemirror/legacy-modes/-/legacy-modes-6.5.2.tgz", + "integrity": "sha512-/jJbwSTazlQEDOQw2FJ8LEEKVS72pU0lx6oM54kGpL8t/NJ2Jda3CZ4pcltiKTdqYSRk3ug1B3pil1gsjA6+8Q==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0" + } + }, + "node_modules/@codemirror/lint": { + "version": "6.9.1", + "resolved": "https://registry.npmmirror.com/@codemirror/lint/-/lint-6.9.1.tgz", + "integrity": "sha512-te7To1EQHePBQQzasDKWmK2xKINIXpk+xAiSYr9ZN+VB4KaT+/Hi2PEkeErTk5BV3PTz1TLyQL4MtJfPkKZ9sw==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.35.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/search": { + "version": "6.5.11", + "resolved": "https://registry.npmmirror.com/@codemirror/search/-/search-6.5.11.tgz", + "integrity": "sha512-KmWepDE6jUdL6n8cAAqIpRmLPBZ5ZKnicE8oGU/s3QrAVID+0VhLFrzUucVKHG5035/BSykhExDL/Xm7dHthiA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.5.2", + "resolved": "https://registry.npmmirror.com/@codemirror/state/-/state-6.5.2.tgz", + "integrity": "sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==", + "license": "MIT", + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/view": { + "version": "6.38.6", + "resolved": "https://registry.npmmirror.com/@codemirror/view/-/view-6.38.6.tgz", + "integrity": "sha512-qiS0z1bKs5WOvHIAC0Cybmv4AJSkAXgX5aD6Mqd2epSLlVJsQl8NG23jCVouIgkh4All/mrbdsf2UOLFnJw0tw==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.5.0", + "crelt": "^1.0.6", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, "node_modules/@css-render/plugin-bem": { "version": "0.15.14", "resolved": "https://registry.npmmirror.com/@css-render/plugin-bem/-/plugin-bem-0.15.14.tgz", @@ -1375,6 +1774,189 @@ "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==", "license": "Apache-2.0" }, + "node_modules/@lezer/common": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/@lezer/common/-/common-1.3.0.tgz", + "integrity": "sha512-L9X8uHCYU310o99L3/MpJKYxPzXPOS7S0NmBaM7UO/x2Kb2WbmMLSkfvdr1KxRIFYOpbY0Jhn7CfLSUDzL8arQ==", + "license": "MIT" + }, + "node_modules/@lezer/cpp": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/@lezer/cpp/-/cpp-1.1.3.tgz", + "integrity": "sha512-ykYvuFQKGsRi6IcE+/hCSGUhb/I4WPjd3ELhEblm2wS2cOznDFzO+ubK2c+ioysOnlZ3EduV+MVQFCPzAIoY3w==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/css": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/@lezer/css/-/css-1.3.0.tgz", + "integrity": "sha512-pBL7hup88KbI7hXnZV3PQsn43DHy6TWyzuyk2AO9UyoXcDltvIdqWKE1dLL/45JVZ+YZkHe1WVHqO6wugZZWcw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/go": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/@lezer/go/-/go-1.0.1.tgz", + "integrity": "sha512-xToRsYxwsgJNHTgNdStpcvmbVuKxTapV0dM0wey1geMMRc9aggoVyKgzYp41D2/vVOx+Ii4hmE206kvxIXBVXQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/highlight": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/@lezer/highlight/-/highlight-1.2.3.tgz", + "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.3.0" + } + }, + "node_modules/@lezer/html": { + "version": "1.3.12", + "resolved": "https://registry.npmmirror.com/@lezer/html/-/html-1.3.12.tgz", + "integrity": "sha512-RJ7eRWdaJe3bsiiLLHjCFT1JMk8m1YP9kaUbvu2rMLEoOnke9mcTVDyfOslsln0LtujdWespjJ39w6zo+RsQYw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/java": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/@lezer/java/-/java-1.1.3.tgz", + "integrity": "sha512-yHquUfujwg6Yu4Fd1GNHCvidIvJwi/1Xu2DaKl/pfWIA2c1oXkVvawH3NyXhCaFx4OdlYBVX5wvz2f7Aoa/4Xw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/javascript": { + "version": "1.5.4", + "resolved": "https://registry.npmmirror.com/@lezer/javascript/-/javascript-1.5.4.tgz", + "integrity": "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.1.3", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/json": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/@lezer/json/-/json-1.0.3.tgz", + "integrity": "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.2", + "resolved": "https://registry.npmmirror.com/@lezer/lr/-/lr-1.4.2.tgz", + "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/markdown": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/@lezer/markdown/-/markdown-1.5.1.tgz", + "integrity": "sha512-F3ZFnIfNAOy/jPSk6Q0e3bs7e9grfK/n5zerkKoc5COH6Guy3Zb0vrJwXzdck79K16goBhYBRAvhf+ksqe0cMg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0", + "@lezer/highlight": "^1.0.0" + } + }, + "node_modules/@lezer/php": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/@lezer/php/-/php-1.0.5.tgz", + "integrity": "sha512-W7asp9DhM6q0W6DYNwIkLSKOvxlXRrif+UXBMxzsJUuqmhE7oVU+gS3THO4S/Puh7Xzgm858UNaFi6dxTP8dJA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.1.0" + } + }, + "node_modules/@lezer/python": { + "version": "1.1.18", + "resolved": "https://registry.npmmirror.com/@lezer/python/-/python-1.1.18.tgz", + "integrity": "sha512-31FiUrU7z9+d/ElGQLJFXl+dKOdx0jALlP3KEOsGTex8mvj+SoE1FgItcHWK/axkxCHGUSpqIHt6JAWfWu9Rhg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/rust": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/@lezer/rust/-/rust-1.0.2.tgz", + "integrity": "sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/sass": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/@lezer/sass/-/sass-1.1.0.tgz", + "integrity": "sha512-3mMGdCTUZ/84ArHOuXWQr37pnf7f+Nw9ycPUeKX+wu19b7pSMcZGLbaXwvD2APMBDOGxPmpK/O6S1v1EvLoqgQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/xml": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/@lezer/xml/-/xml-1.0.6.tgz", + "integrity": "sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/yaml": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/@lezer/yaml/-/yaml-1.0.3.tgz", + "integrity": "sha512-GuBLekbw9jDBDhGur82nuwkxKQ+a3W5H0GfaAthDXcAu+XdpS43VlnxA9E9hllkpSP5ellRDKjLLj7Lu9Wr6xA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.4.0" + } + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz", + "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==", + "license": "MIT" + }, "node_modules/@one-ini/wasm": { "version": "0.1.1", "resolved": "https://registry.npmmirror.com/@one-ini/wasm/-/wasm-0.1.1.tgz", @@ -2217,6 +2799,12 @@ "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==", "license": "MIT" }, + "node_modules/@types/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", + "license": "MIT" + }, "node_modules/@types/lodash": { "version": "4.17.20", "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.20.tgz", @@ -2232,6 +2820,22 @@ "@types/lodash": "*" } }, + "node_modules/@types/markdown-it": { + "version": "14.1.2", + "resolved": "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-14.1.2.tgz", + "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", + "license": "MIT", + "dependencies": { + "@types/linkify-it": "^5", + "@types/mdurl": "^2" + } + }, + "node_modules/@types/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", + "license": "MIT" + }, "node_modules/@types/trusted-types": { "version": "2.0.7", "resolved": "https://registry.npmmirror.com/@types/trusted-types/-/trusted-types-2.0.7.tgz", @@ -2245,6 +2849,18 @@ "integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==", "license": "MIT" }, + "node_modules/@vavt/copy2clipboard": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/@vavt/copy2clipboard/-/copy2clipboard-1.0.3.tgz", + "integrity": "sha512-HtG48r2FBYp9eRvGB3QGmtRBH1zzRRAVvFbGgFstOwz4/DDaNiX0uZc3YVKPydqgOav26pibr9MtoCaWxn7aeA==", + "license": "MIT" + }, + "node_modules/@vavt/util": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/@vavt/util/-/util-2.1.0.tgz", + "integrity": "sha512-YIfAvArSFVXmWvoF+DEGD0FhkhVNcCtVWWkfYtj76eSrwHh/wuEEFhiEubg1XLNM3tChO8FH8xJCT/hnizjgFQ==", + "license": "MIT" + }, "node_modules/@vicons/ionicons5": { "version": "0.13.0", "resolved": "https://registry.npmmirror.com/@vicons/ionicons5/-/ionicons5-0.13.0.tgz", @@ -2994,6 +3610,12 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, "node_modules/array-tree-filter": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/array-tree-filter/-/array-tree-filter-2.1.0.tgz", @@ -3236,6 +3858,21 @@ "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", "license": "MIT" }, + "node_modules/codemirror": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/codemirror/-/codemirror-6.0.2.tgz", + "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", @@ -3344,6 +3981,12 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/crelt": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/crelt/-/crelt-1.0.6.tgz", + "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -3375,6 +4018,12 @@ "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", "license": "MIT" }, + "node_modules/cssfilter": { + "version": "0.0.10", + "resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz", + "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==", + "license": "MIT" + }, "node_modules/cssstyle": { "version": "4.6.0", "resolved": "https://registry.npmmirror.com/cssstyle/-/cssstyle-4.6.0.tgz", @@ -4534,6 +5183,15 @@ "dev": true, "license": "MIT" }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, "node_modules/local-pkg": { "version": "1.1.2", "resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-1.1.2.tgz", @@ -4601,6 +5259,15 @@ "dev": true, "license": "ISC" }, + "node_modules/lucide-vue-next": { + "version": "0.543.0", + "resolved": "https://registry.npmmirror.com/lucide-vue-next/-/lucide-vue-next-0.543.0.tgz", + "integrity": "sha512-Az5kpNm/koKAwSNIKjsZ4uHV2tVfmlQlcHwFBygQ8gc5/jFg7An9OrxgDy/aE5m+HLx7VfLYqDxLr8gWecZbQA==", + "license": "ISC", + "peerDependencies": { + "vue": ">=3.0.1" + } + }, "node_modules/magic-string": { "version": "0.30.19", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.19.tgz", @@ -4610,6 +5277,59 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/markdown-it-image-figures": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/markdown-it-image-figures/-/markdown-it-image-figures-2.1.1.tgz", + "integrity": "sha512-mwXSQ2nPeVUzCMIE3HlLvjRioopiqyJLNph0pyx38yf9mpqFDhNGnMpAXF9/A2Xv0oiF2cVyg9xwfF0HNAz05g==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "markdown-it": "*" + } + }, + "node_modules/markdown-it-sub": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/markdown-it-sub/-/markdown-it-sub-2.0.0.tgz", + "integrity": "sha512-iCBKgwCkfQBRg2vApy9vx1C1Tu6D8XYo8NvevI3OlwzBRmiMtsJ2sXupBgEA7PPxiDwNni3qIUkhZ6j5wofDUA==", + "license": "MIT" + }, + "node_modules/markdown-it-sup": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/markdown-it-sup/-/markdown-it-sup-2.0.0.tgz", + "integrity": "sha512-5VgmdKlkBd8sgXuoDoxMpiU+BiEt3I49GItBzzw7Mxq9CxvnhE/k09HFli09zgfFDRixDQDfDxi0mgBCXtaTvA==", + "license": "MIT" + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -4619,6 +5339,59 @@ "node": ">= 0.4" } }, + "node_modules/md-editor-v3": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/md-editor-v3/-/md-editor-v3-6.1.0.tgz", + "integrity": "sha512-8/3cNyAt2CfMhu3PiQZqpOmCKmBXa7uJzWHnATVwkv61TOgUBuho4IFQPougmM4J7qZhZ0sldXQHDVf1BjABxg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.18.7", + "@codemirror/commands": "^6.8.1", + "@codemirror/lang-markdown": "^6.3.4", + "@codemirror/language": "^6.11.3", + "@codemirror/language-data": "^6.5.1", + "@codemirror/search": "^6.5.11", + "@codemirror/state": "^6.5.2", + "@codemirror/view": "^6.38.2", + "@lezer/highlight": "^1.2.1", + "@types/markdown-it": "^14.0.1", + "@vavt/copy2clipboard": "^1.0.1", + "@vavt/util": "^2.1.0", + "codemirror": "^6.0.2", + "lru-cache": "^11.2.1", + "lucide-vue-next": "^0.543.0", + "markdown-it": "^14.0.0", + "markdown-it-image-figures": "^2.1.1", + "markdown-it-sub": "^2.0.0", + "markdown-it-sup": "^2.0.0", + "medium-zoom": "^1.1.0", + "xss": "^1.0.15" + }, + "peerDependencies": { + "vue": "^3.5.3" + } + }, + "node_modules/md-editor-v3/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "license": "MIT" + }, + "node_modules/medium-zoom": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/medium-zoom/-/medium-zoom-1.1.0.tgz", + "integrity": "sha512-ewyDsp7k4InCUp3jRmwHBRFGyjBimKps/AJLjRSox+2q/2H4p/PNpQf+pwONWlJiOudkBXtbdmVbFjqyybfTmQ==", + "license": "MIT" + }, "node_modules/memoize-one": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz", @@ -5152,6 +5925,15 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/quansync": { "version": "0.2.11", "resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.11.tgz", @@ -6252,6 +7034,12 @@ "dev": true, "license": "MIT" }, + "node_modules/style-mod": { + "version": "4.1.3", + "resolved": "https://registry.npmmirror.com/style-mod/-/style-mod-4.1.3.tgz", + "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==", + "license": "MIT" + }, "node_modules/stylis": { "version": "4.3.6", "resolved": "https://registry.npmmirror.com/stylis/-/stylis-4.3.6.tgz", @@ -6428,6 +7216,12 @@ "integrity": "sha512-M8RGFoKtZ8dF+iwJfAJTOH/SM4KluKOKRJpjCMhI8bG3qB74zrFoArKZ62ll0Fr3mqkMJiQOmWYkdYgDeITYQg==", "license": "MIT" }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "license": "MIT" + }, "node_modules/ufo": { "version": "1.6.1", "resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.6.1.tgz", @@ -7178,6 +7972,12 @@ "vue": "^3.0.11" } }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmmirror.com/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT" + }, "node_modules/w3c-xmlserializer": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", @@ -7440,6 +8240,28 @@ "dev": true, "license": "MIT" }, + "node_modules/xss": { + "version": "1.0.15", + "resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.15.tgz", + "integrity": "sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==", + "license": "MIT", + "dependencies": { + "commander": "^2.20.3", + "cssfilter": "0.0.10" + }, + "bin": { + "xss": "bin/xss" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/xss/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", diff --git a/package.json b/package.json index 3d8914c..1d17e5c 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "antd": "^5.27.3", "axios": "^1.12.2", "element-plus": "^2.11.5", + "md-editor-v3": "^6.1.0", "naive-ui": "^2.43.1", "pinia": "^3.0.3", "sass": "^1.93.2", diff --git a/src/App.vue b/src/App.vue index 30b53e6..c764f87 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@ @@ -14,7 +14,7 @@ import MainLayout from './layouts/MainLayout.vue' padding: 0; } -#app { +#apps { font-family: Avenir, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; diff --git a/src/components/LeftModule.vue b/src/components/LeftModule.vue index bafd8b8..6ae8ee5 100644 --- a/src/components/LeftModule.vue +++ b/src/components/LeftModule.vue @@ -103,14 +103,14 @@ onUnmounted(() => { background-color: rgba(102, 161, 216, 0.9); /* 蓝色半透明背景 */ } -.top1 { - padding-top: 10px; +#alld #top .top1 { + padding-top: 20px; + margin-bottom: 0; text-align: center; color: white; } - -.top2 { - padding-top: 10px; + +#alld #top .top2 { text-align: center; color: white; } @@ -123,7 +123,7 @@ onUnmounted(() => { .cont1 { text-align: center; - padding: 25px; + padding: 25px 10px 25px 10px ; background-color: rgba(102, 161, 216, 0.9); /* 蓝色半透明背景 */ border-radius: 10px 10px 0 0; } diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index aaf72ca..7d5f5b9 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -31,7 +31,7 @@
+ + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index f114293..6a0d981 100644 --- a/src/main.js +++ b/src/main.js @@ -12,6 +12,7 @@ import 'undraw-ui/dist/style.css' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import './styles/MainLayout.css' + // 创建Pinia实例 const pinia = createPinia() diff --git a/src/router/Router.js b/src/router/Router.js index be78935..c3f3f91 100644 --- a/src/router/Router.js +++ b/src/router/Router.js @@ -6,6 +6,8 @@ import NonsensePage from '../views/nonsense.vue' import MessageBoardPage from '../views/messageboard.vue' import AboutMePage from '../views/aboutme.vue' import ArticleContentPage from '../views/articlecontents.vue' +import LoginPage from '../views/login.vue' +import ArticleSavePage from '../views/articlesave.vue' /** * 路由配置数组 @@ -65,12 +67,28 @@ const routes = [ } }, { - path: '/article/:url', + path: '/article', name: 'articleContent', component: ArticleContentPage, meta: { title: '文章详情' } + }, + { + path: '/login', + name: 'login', + component: LoginPage, + meta: { + title: '登录' + } + }, + { + path: '/articlesave', + name: 'articlesave', + component: ArticleSavePage, + meta: { + title: '保存文章' + } } ] diff --git a/src/services/apiService.js b/src/services/apiService.js index 0fa017f..9f25d6f 100644 --- a/src/services/apiService.js +++ b/src/services/apiService.js @@ -1,46 +1,75 @@ -// 基础 API 服务配置 +// 基础API服务 import axios from 'axios' +import { ElMessage } from 'element-plus' -// 创建 axios 实例 -const apiService = axios.create({ - baseURL: 'http://localhost:8080/api', // api的base_url - timeout: 10000, // 请求超时时间 - headers: { - 'Content-Type': 'application/json' - } +// 创建axios实例 +const api = axios.create({ + baseURL:'http://localhost:8080/api', // API基础URL + timeout: 10000 // 请求超时时间 }) -// 请求拦截器 - 添加认证token -apiService.interceptors.request.use( +// 请求拦截器 +api.interceptors.request.use( config => { + // 从localStorage获取token const token = localStorage.getItem('token') if (token) { - config.headers.Authorization = `Bearer ${token}` + // 设置Authorization头 + config.headers['Authorization'] = `Bearer ${token}` } return config }, error => { + // 请求错误处理 + console.error('请求错误:', error) return Promise.reject(error) } ) -// 响应拦截器 - 统一处理响应 -apiService.interceptors.response.use( +// 响应拦截器 +api.interceptors.response.use( response => { - // 检查响应是否成功 - if (response.data && response.data.success) { - return response.data - } else { - // 处理业务错误 - return Promise.reject(new Error(response.data?.message || '请求失败')) - } + // 直接返回响应数据 + return response.data }, error => { - // 处理HTTP错误 - console.error('API请求错误:', error) - // 可以在这里添加全局错误处理,如显示错误提示 + // 错误处理 + console.error('响应错误:', error) + + let message = '请求失败' + + if (error.response) { + // 服务器响应了但状态码不是2xx + switch (error.response.status) { + case 401: + message = '未授权,请重新登录' + // 可以在这里处理登出逻辑 + localStorage.removeItem('token') + // 跳转到登录页 + window.location.href = '/login' + break + case 403: + message = '拒绝访问' + break + case 404: + message = '请求资源不存在' + break + case 500: + message = '服务器错误' + break + default: + message = error.response.data?.message || message + } + } else if (error.request) { + // 请求已发出但没有收到响应 + message = '网络错误,请检查网络连接' + } + + // 使用Element Plus的消息组件显示错误信息 + ElMessage.error(message) + return Promise.reject(error) } ) -export default apiService \ No newline at end of file +export default api \ No newline at end of file diff --git a/src/services/articleService.js b/src/services/articleService.js index 8fdc4f8..b0efc07 100644 --- a/src/services/articleService.js +++ b/src/services/articleService.js @@ -1,119 +1,122 @@ // 文章相关API服务 -import apiService from './apiService' +import api from './apiService' /** * 文章服务类 */ class ArticleService { /** - * 获取已发布文章 - * @param {Object} params - 查询参数 - * @returns {Promise} + * 获取已发布文章列表 + * @param {import('../types').PaginationParams} params - 查询参数 + * @returns {Promise>} */ getAllArticles(params = {}) { - return apiService.get('/articles/published', { params }) + return api.get('/articles/published', { params }) } /** - * 获取单篇文章 - * @param {number} id - 文章ID - * @returns {Promise} + * 根据ID获取文章详情 + * @param {number} articleid - 文章ID + * @returns {Promise>} */ - getArticleById(id) { - return apiService.get(`/articles/${id}`) + getArticleById(articleid) { + return api.get(`/articles/${articleid}`) } /** * 根据属性ID获取文章列表 - * @param {number} attributeId - 属性ID - * @returns {Promise} + * @param {number} attributeid - 属性ID + * @returns {Promise>} */ - getArticlesByAttributeId(attributeId) { - return apiService.get(`/articles/attribute/${attributeId}`) + getArticlesByAttributeId(attributeid) { + return api.get(`/articles/attribute/${attributeid}`) } /** * 根据标题查询文章列表 * @param {string} title - 文章标题 - * @returns {Promise} + * @returns {Promise>} */ getArticlesByTitle(title) { - return apiService.get(`/articles/title/${title}`) + return api.get(`/articles/title/${title}`) } - /** * 获取热门文章 - * @returns {Promise} + * @returns {Promise>} */ getPopularArticles() { - return apiService.get('/articles/popular') + return api.get('/articles/popular') } /** * 创建文章 - * @param {Object} articleData - 文章数据 - * @returns {Promise} + * @param {import('../types').ArticleDto} articleData - 文章数据 + * @returns {Promise>} */ - createArticle(articleData) { - return apiService.post('/articles', articleData) + createArticle(Article) { + return api.post('/articles', Article) } /** * 更新文章 - * @param {number} id - 文章ID - * @param {Object} articleData - 文章数据 - * @returns {Promise} + * @param {number} articleid - 文章ID + * @param {import('../types').ArticleDto} articleData - 文章数据 + * @returns {Promise>} */ - updateArticle(id, articleData) { - return apiService.put(`/articles/${id}`, articleData) + updateArticle(articleid, articleData) { + return api.put(`/articles/${articleid}`, articleData) } /** * 删除文章 - * @param {number} id - 文章ID - * @returns {Promise} + * @param {number} articleid - 文章ID + * @returns {Promise>} */ - deleteArticle(id) { - return apiService.delete(`/articles/${id}`) + deleteArticle(articleid) { + return api.delete(`/articles/${articleid}`) + } + + /** + * 根据分类获取文章 + * @param {number} categoryid - 分类ID + * @returns {Promise>} + */ + getArticlesByCategory(categoryid) { + return api.get(`/articles/category/${categoryid}`) } /** * 增加文章浏览量 - * @param {number} id - 文章ID - * @returns {Promise} + * @param {number} articleid - 文章ID + * @returns {Promise>} */ - incrementArticleViews(id) { - return apiService.post(`/articles/view/${id}`) - } - - /** - * 根据分类ID获取文章(兼容旧接口) - * @param {number} categoryId - 分类ID - * @returns {Promise} - */ - getArticlesByCategory(categoryId) { - return apiService.get(`/articles/category/${categoryId}`) - } - - /** - * 根据属性ID获取文章 - * @param {number} attributeId - 属性ID - * @returns {Promise} - */ - getArticlesByAttribute(attributeId) { - return apiService.get(`/articles/attribute/${attributeId}`) + incrementArticleViews(articleid) { + return api.post(`/articles/view/${articleid}`) } /** * 根据属性ID获取最新文章 - * @param {number} attributeId - 属性ID - * @returns {Promise} + * @param {number} attributeid - 属性ID + * @returns {Promise>} */ - getLatestArticlesByAttribute(attributeId) { - return apiService.get(`/articles/attribute/${attributeId}/latest`) + getLatestArticlesByAttribute(attributeid) { + return api.get(`/articles/attribute/${attributeid}/latest`) + } + + /** + * 点赞文章 + * @param {number} articleid - 文章ID + * @returns {Promise>} + */ + likeArticle(articleid) { + return api.post(`/articles/like/${articleid}`) } } -// 导出文章服务实例 -export default new ArticleService() \ No newline at end of file +// 创建并导出服务实例 +const articleService = new ArticleService() +export default articleService + +// 导出服务类供特殊场景使用 +export { ArticleService } \ No newline at end of file diff --git a/src/services/categoryAttributeService.js b/src/services/categoryAttributeService.js index 99d46d1..0a8ea5c 100644 --- a/src/services/categoryAttributeService.js +++ b/src/services/categoryAttributeService.js @@ -1,5 +1,5 @@ // 分类属性相关API服务 -import apiService from './apiService' +import api from './apiService' /** * 分类属性服务类 @@ -7,60 +7,64 @@ import apiService from './apiService' class CategoryAttributeService { /** * 根据ID获取分类属性 - * @param {number} id - 属性ID - * @returns {Promise} + * @param {number} attributeid - 属性ID + * @returns {Promise>} */ - getAttributeById(id) { - return apiService.get(`/category-attributes/${id}`) + getAttributeById(attributeid) { + return api.get(`/category-attributes/${attributeid}`) } /** * 根据分类ID获取属性列表 - * @param {number} categoryId - 分类ID - * @returns {Promise} + * @param {number} categoryid - 分类ID + * @returns {Promise>} */ - getAttributesByCategory(categoryId) { - return apiService.get(`/category-attributes/category/${categoryId}`) + getAttributesByCategory(categoryid) { + return api.get(`/category-attributes/category/${categoryid}`) } /** * 创建分类属性 - * @param {Object} attributeData - 属性数据 - * @returns {Promise} + * @param {import('../types').CategoryAttributeDto} attributeData - 属性数据 + * @returns {Promise>} */ createAttribute(attributeData) { - return apiService.post('/category-attributes', attributeData) + return api.post('/category-attributes', attributeData) } /** * 更新分类属性 - * @param {number} id - 属性ID - * @param {Object} attributeData - 属性数据 - * @returns {Promise} + * @param {number} attributeid - 属性ID + * @param {import('../types').CategoryAttributeDto} attributeData - 属性数据 + * @returns {Promise>} */ - updateAttribute(id, attributeData) { - return apiService.put(`/category-attributes/${id}`, attributeData) + updateAttribute(attributeid, attributeData) { + return api.put(`/category-attributes/${attributeid}`, attributeData) } /** * 删除分类属性 - * @param {number} id - 属性ID - * @returns {Promise} + * @param {number} attributeid - 属性ID + * @returns {Promise>} */ - deleteAttribute(id) { - return apiService.delete(`/category-attributes/${id}`) + deleteAttribute(attributeid) { + return api.delete(`/category-attributes/${attributeid}`) } /** * 检查分类下是否存在指定名称的属性 - * @param {number} categoryId - 分类ID - * @param {string} attributeName - 属性名称 - * @returns {Promise} + * @param {number} categoryid - 分类ID + * @param {string} attributename - 属性名称 + * @returns {Promise>} */ - checkAttributeExists(categoryId, attributeName) { - return apiService.get(`/category-attributes/check-exists?categoryId=${categoryId}&attributeName=${encodeURIComponent(attributeName)}`) + checkAttributeExists(categoryid, attributename) { + return api.get(`/category-attributes/check-exists?categoryid=${categoryid}&attributename=${encodeURIComponent(attributename)}`) } } -// 导出分类属性服务实例 -export default new CategoryAttributeService() \ No newline at end of file +// 创建并导出服务实例 +const categoryAttributeService = new CategoryAttributeService() +export default categoryAttributeService + +// 导出服务类供特殊场景使用 +export { CategoryAttributeService } \ No newline at end of file diff --git a/src/services/categoryService.js b/src/services/categoryService.js index 7058a4f..2df7583 100644 --- a/src/services/categoryService.js +++ b/src/services/categoryService.js @@ -1,4 +1,4 @@ -import apiService from './apiService' +import api from './apiService' /** * 分类服务 @@ -6,49 +6,53 @@ import apiService from './apiService' class CategoryService { /** * 获取所有分类 - * @returns {Promise} + * @returns {Promise>} */ getAllCategories() { - return apiService.get('/categories') + return api.get('/categories') } /** * 获取指定分类 - * @param {number} id - 分类ID - * @returns {Promise} + * @param {number} typeid - 分类ID + * @returns {Promise>} */ - getCategory(id) { - return apiService.get(`/categories/${id}`) + getCategory(typeid) { + return api.get(`/categories/${typeid}`) } /** * 创建新分类 - * @param {Object} categoryData - 分类数据 - * @returns {Promise} + * @param {import('../types').CategoryDto} categoryData - 分类数据 + * @returns {Promise>} */ createCategory(categoryData) { - return apiService.post('/categories', categoryData) + return api.post('/categories', categoryData) } /** * 更新分类 - * @param {number} id - 分类ID - * @param {Object} categoryData - 分类数据 - * @returns {Promise} + * @param {number} typeid - 分类ID + * @param {import('../types').CategoryDto} categoryData - 分类数据 + * @returns {Promise>} */ - updateCategory(id, categoryData) { - return apiService.put(`/categories/${id}`, categoryData) + updateCategory(typeid, categoryData) { + return api.put(`/categories/${typeid}`, categoryData) } /** * 删除分类 - * @param {number} id - 分类ID - * @returns {Promise} + * @param {number} typeid - 分类ID + * @returns {Promise>} */ - deleteCategory(id) { - return apiService.delete(`/categories/${id}`) + deleteCategory(typeid) { + return api.delete(`/categories/${typeid}`) } } -// 导出分类服务实例 -export default new CategoryService() \ No newline at end of file +// 创建并导出服务实例 +const categoryService = new CategoryService() +export default categoryService + +// 导出服务类供特殊场景使用 +export { CategoryService } \ No newline at end of file diff --git a/src/services/index.js b/src/services/index.js index 7edaf30..44dda21 100644 --- a/src/services/index.js +++ b/src/services/index.js @@ -1,17 +1,16 @@ // 导出所有服务 import articleService from './articleService' -import messageService from './messageService' -import categoryAttributeService from './categoryAttributeService' import categoryService from './categoryService' +import categoryAttributeService from './categoryAttributeService' +import loginService from './loginService' +import messageService from './messageService' - - - +// 导出服务类供特殊场景使用 export { articleService, - messageService, + categoryService, categoryAttributeService, - categoryService - + loginService, + messageService } \ No newline at end of file diff --git a/src/services/loginService.js b/src/services/loginService.js new file mode 100644 index 0000000..ad9cafe --- /dev/null +++ b/src/services/loginService.js @@ -0,0 +1,59 @@ +// 登录相关API服务 +import api from "./apiService"; + +/** + * 登录服务类 + */ +class LoginService { + /** + * 用户登录 + * @param {import('../types').LoginDto} loginData - 登录数据 + * @returns {Promise>} + */ + login(loginData) { + return api.post("/auth/login", loginData); + } + + /** + * 用户注册 + * @param {import('../types').RegisterDto} registerData - 注册数据 + * @returns {Promise>} + */ + register(registerData) { + return api.post("/auth/register", registerData); + } + + /** + * 登出 + */ + logout() { + return api.post("/auth/logout"); + } + + /** + * 获取当前用户信息 + * @returns {Promise>} + */ + getCurrentUser() { + return api.get("/user/info"); + } + + /** + * 更新用户信息 + * @param {import('../types').UserDto} userData - 用户数据 + * @returns {Promise>} + */ + updateUser(userData) { + return api.put("/user/update", userData); + } + + /** + * 修改密码 + * @param {import('../types').ChangePasswordDto} passwordData - 密码数据 + * @returns {Promise>} + */ + changePassword(passwordData) { + return api.post("/user/change-password", passwordData); + } +} +export default new LoginService(); \ No newline at end of file diff --git a/src/services/messageService.js b/src/services/messageService.js index 3be81e0..49cafc1 100644 --- a/src/services/messageService.js +++ b/src/services/messageService.js @@ -7,7 +7,7 @@ import apiService from './apiService' class MessageService { /** * 获取所有留言 - * @returns {Promise} + * @returns {Promise>} */ getAllMessages() { return apiService.get('/messages') @@ -15,25 +15,25 @@ class MessageService { /** * 获取单条留言 - * @param {number} id - 留言ID - * @returns {Promise} + * @param {number} messageid - 留言ID + * @returns {Promise>} */ - getMessageById(id) { - return apiService.get(`/messages/${id}`) + getMessageById(messageid) { + return apiService.get(`/messages/${messageid}`) } /** * 根据文章ID获取留言 - * @param {number} articleId - 文章ID - * @returns {Promise} + * @param {number} articleid - 文章ID + * @returns {Promise>} */ - getMessagesByArticleId(articleId) { - return apiService.get(`/messages/article/${articleId}`) + getMessagesByArticleId(articleid) { + return apiService.get(`/messages/article/${articleid}`) } /** * 获取根留言 - * @returns {Promise} + * @returns {Promise>} */ getRootMessages() { return apiService.get('/messages/root') @@ -41,17 +41,17 @@ class MessageService { /** * 根据父留言ID获取回复 - * @param {number} parentId - 父留言ID - * @returns {Promise} + * @param {number} parentid - 父留言ID + * @returns {Promise>} */ - getRepliesByParentId(parentId) { - return apiService.get(`/messages/${parentId}/replies`) + getRepliesByParentId(parentid) { + return apiService.get(`/messages/${parentid}/replies`) } /** * 根据昵称搜索留言 * @param {string} nickname - 昵称 - * @returns {Promise} + * @returns {Promise>} */ searchMessagesByNickname(nickname) { return apiService.get(`/messages/search?nickname=${nickname}`) @@ -59,17 +59,17 @@ class MessageService { /** * 获取文章评论数量 - * @param {number} articleId - 文章ID - * @returns {Promise} + * @param {number} articleid - 文章ID + * @returns {Promise>} */ - getMessageCountByArticleId(articleId) { - return apiService.get(`/messages/count/article/${articleId}`) + getMessageCountByArticleId(articleid) { + return apiService.get(`/messages/count/article/${articleid}`) } /** * 创建留言 - * @param {Object} messageData - 留言数据 - * @returns {Promise} + * @param {import('../types').MessageDto} messageData - 留言数据 + * @returns {Promise>} */ saveMessage(messageData) { return apiService.post('/messages', messageData) @@ -77,20 +77,21 @@ class MessageService { /** * 删除留言 - * @param {number} id - 留言ID - * @returns {Promise} + * @param {number} messageid - 留言ID + * @returns {Promise>} */ - deleteMessage(id) { - return apiService.delete(`/messages/${id}`) + deleteMessage(messageid) { + return apiService.delete(`/messages/${messageid}`) } /** * 点赞留言 - * @param {number} id - 留言ID - * @returns {Promise} + * @param {number} messageid - 留言ID + * @returns {Promise>} + * */ - likeMessage(id) { - return apiService.post(`/messages/${id}/like`) + likeMessage(messageid) { + return apiService.post(`/messages/${messageid}/like`) } } diff --git a/src/store/globalStore.js b/src/store/globalStore.js index d6ce485..ff2f590 100644 --- a/src/store/globalStore.js +++ b/src/store/globalStore.js @@ -1,3 +1,4 @@ +import Login from '@/views/login.vue' import { defineStore } from 'pinia' /** @@ -13,13 +14,17 @@ export const useGlobalStore = defineStore('global', { const savedGlobalData = localStorage.getItem('globalStoreData') const initialGlobalData = savedGlobalData ? JSON.parse(savedGlobalData) : {} + // 从localStorage读取特定状态的持久化数据 + const savedSpecificData = localStorage.getItem('globalStoreSpecificData') + const initialSpecificData = savedSpecificData ? JSON.parse(savedSpecificData) : {} + return { // 全局数据对象,存储所有需要共享的数据 globalData: initialGlobalData, - // 可以在这里定义特定的状态属性,便于类型提示和直接使用 - user: null, - loading: false, - notifications: [] + // 特定状态属性,从localStorage读取初始值 + user: initialSpecificData.user || null, + Login: initialSpecificData.Login || false, + notifications: initialSpecificData.notifications || [] } }, @@ -71,7 +76,14 @@ export const useGlobalStore = defineStore('global', { */ _persistData() { try { + // 持久化globalData localStorage.setItem('globalStoreData', JSON.stringify(this.globalData)) + // 持久化特定状态属性 + localStorage.setItem('globalStoreSpecificData', JSON.stringify({ + user: this.user, + Login: this.Login, + notifications: this.notifications + })) } catch (error) { console.error('Failed to persist data to localStorage:', error) } @@ -106,9 +118,13 @@ export const useGlobalStore = defineStore('global', { */ clearAll() { this.globalData = {} + this.user = null + this.Login = false + this.notifications = [] // 清除localStorage中的数据 try { localStorage.removeItem('globalStoreData') + // localStorage.removeItem('globalStoreSpecificData') } catch (error) { console.error('Failed to clear data from localStorage:', error) } @@ -120,6 +136,8 @@ export const useGlobalStore = defineStore('global', { */ setUser(userInfo) { this.user = userInfo + // 持久化到localStorage + this._persistData() }, /** @@ -128,6 +146,8 @@ export const useGlobalStore = defineStore('global', { */ setLoading(status) { this.loading = status + // 持久化到localStorage + this._persistData() }, /** @@ -139,6 +159,8 @@ export const useGlobalStore = defineStore('global', { id: Date.now(), ...notification }) + // 持久化到localStorage + this._persistData() }, /** @@ -149,7 +171,19 @@ export const useGlobalStore = defineStore('global', { const index = this.notifications.findIndex(notification => notification.id === id) if (index !== -1) { this.notifications.splice(index, 1) + // 持久化到localStorage + this._persistData() } + }, + + /** + * 设置登录状态 + * @param {boolean} status - 登录状态 + */ + setLoginStatus(status) { + this.Login = status + // 持久化到localStorage + this._persistData() } } }) \ No newline at end of file diff --git a/src/styles/MainLayout.css b/src/styles/MainLayout.css index bc6ed42..7e6ea05 100644 --- a/src/styles/MainLayout.css +++ b/src/styles/MainLayout.css @@ -97,7 +97,6 @@ h6 { font-family: inherit; font-weight: 400; line-height: 1.5; - margin-bottom: .5rem; color: var(--font-color-title); } @@ -118,7 +117,6 @@ p { z-index: 1000; transition: all 1s ease; font-size: inherit; - /* display: flex; */ justify-content: space-between; align-items: center; } diff --git a/src/types/index.ts b/src/types/index.ts index 33cb0b8..4e782fe 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -4,48 +4,124 @@ * 文章类型接口 */ export interface Article { - id: number + articleid: number title: string content: string - author: string - createTime: string - updateTime: string - // categoryId: number - attributeid?: number - categoryName?: string[] - tags?: string[] + attributeid: Number + categoryName: string + img?: string + createdAt: string + updatedAt: string viewCount?: number - commentCount?: number - articleid?: string - publishedAt?: string - mg?: string + likes?: number + status?: number + markdownscontent: string +} + +/** + * 文章DTO接口 + */ +export interface ArticleDto { + id?: number + title: string + content: string + attributeid: number + img?: string + status?: number } /** * 留言类型接口 */ export interface Message { - id: number + messageid: number content: string nickname: string email: string - articleId?: number - parentId?: number + articleid?: number + parentid?: number createdAt: string replyid?: number - time?: string + likes?: number +} + +/** + * 留言DTO接口 + */ +export interface MessageDto { + messageid?: number + nickname?: string + email?: string + content?: string + createdAt?: string + parentid?: number + replyid?: number + articleid?: number } /** * 分类类型接口 */ export interface Category { - id: number - name: string + typeid: number + typename: string description?: string + createdAt?: string + updatedAt?: string articleCount?: number } +/** + * 分类DTO接口 + */ +export interface CategoryDto { + typename: string + description?: string +} + +/** + * 分类属性接口 + */ +export interface CategoryAttribute { + attributeid: number + categoryid: number + attributename: string +} + +/** + * 分类属性DTO接口 + */ +export interface CategoryAttributeDto { + categoryid: number + attributename: string +} + +/** + * 用户信息接口 + */ +export interface User { + id?: number + username?: string + password?: string + email?: string + phone?: string + role?: number + createTime?: string + avatar?: string + token?: string +} + +/** + * 用户DTO接口 + */ +export interface UserDto { + username: string + password: string + email: string + phone: string + role?: number +} + /** * API响应接口 */ @@ -65,16 +141,4 @@ export interface PaginationParams { size?: number keyword?: string [key: string]: any -} - -/** - * 用户信息接口 - */ -export interface User { - id?: number - username?: string - email?: string - avatar?: string - role?: string - token?: string } \ No newline at end of file diff --git a/src/views/aboutme.vue b/src/views/aboutme.vue index 5f8ac27..73fe51a 100644 --- a/src/views/aboutme.vue +++ b/src/views/aboutme.vue @@ -88,8 +88,7 @@ const goToMessageBoard = () => { diff --git a/src/views/home.vue b/src/views/home.vue index 781d12f..1b5fbce 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -27,7 +27,6 @@
-
@@ -38,11 +37,10 @@ + + \ No newline at end of file diff --git a/src/views/markdown.vue b/src/views/markdown.vue new file mode 100644 index 0000000..cc32f5f --- /dev/null +++ b/src/views/markdown.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/messageboard.vue b/src/views/messageboard.vue index 7af8ff8..dcc18f4 100644 --- a/src/views/messageboard.vue +++ b/src/views/messageboard.vue @@ -45,6 +45,8 @@ 👍 赞 回复 + + 删除
@@ -241,9 +243,9 @@ const fetchMessages = async () => { let articleid = props.comments || null if (!articleid) { - // 安全获取文章ID,如果globalStore中没有articlebutn则返回null - const articleData = globalStore.getValue('articlebutn') - articleid = (articleData && typeof articleData === 'object' && 'id' in articleData) ? articleData.id : null + // 安全获取文章ID,如果globalStore中没有articleInfo则返回null + const articleData = globalStore.getValue('articleInfo') + articleid = (articleData && typeof articleData === 'object' && 'articleid' in articleData) ? articleData.articleid : null } form.articleid = articleid @@ -251,7 +253,6 @@ const fetchMessages = async () => { // 根据是否有文章ID选择不同的API调用 if (articleid) { res = await messageService.getMessagesByArticleId(articleid) - console.log(`获取文章ID=${articleid}的相关留言列表`) } else { res = await messageService.getAllMessages() // 过滤掉articleid不为空的留言,只保留articleid为空或不存在的留言 @@ -460,7 +461,30 @@ const handleLike = async (msg) => { msg.isLiking = false } } - +// 处理删除 +const handleDelete = async (msg) => { + try { + // 显示加载状态或禁用按钮 + // msg.isDeleting = true + if (!confirm('确定删除吗?')) { + return + } + const res = await messageService.deleteMessage(msg.messageid) + + if (res.success) { + // 从列表中移除 + messageBoardData.value = messageBoardData.value.filter(item => item.messageid !== msg.messageid) + ElMessage.success('删除成功') + } else { + ElMessage.error('删除失败:' + (res.message || '未知错误')) + } + } catch (error) { + console.error('删除失败:', error) + ElMessage.error('网络错误,请稍后重试') + } finally { + // msg.isDeleting = false + } +}