feat: webui

This commit is contained in:
xuthus5 2023-10-08 20:59:36 +08:00
parent d642ed1a9c
commit d50a651865
Signed by: xuthus5
GPG Key ID: A23CF9620CBB55F9
9 changed files with 205 additions and 201 deletions

2
go.mod
View File

@ -3,7 +3,6 @@ module pastebin
go 1.21.0
require (
github.com/alecthomas/chroma v0.10.0
github.com/gin-gonic/gin v1.9.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
@ -19,7 +18,6 @@ require (
github.com/bytedance/sonic v1.10.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/dlclark/regexp2 v1.10.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect

354
webui/package-lock.json generated
View File

@ -240,9 +240,9 @@
}
},
"node_modules/@babel/parser": {
"version": "7.22.16",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.22.16.tgz",
"integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==",
"version": "7.23.0",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.0.tgz",
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
"bin": {
"parser": "bin/babel-parser.js"
},
@ -251,9 +251,9 @@
}
},
"node_modules/@codemirror/autocomplete": {
"version": "6.9.1",
"resolved": "https://registry.npmmirror.com/@codemirror/autocomplete/-/autocomplete-6.9.1.tgz",
"integrity": "sha512-yma56tqD7khIZK4gy4X5lX3/k5ArMiCGat7HEWRF/8L2kqOjVdp2qKZqpcJjwTIjSj6fqKAHqi7IjtH3QFE+Bw==",
"version": "6.9.2",
"resolved": "https://registry.npmmirror.com/@codemirror/autocomplete/-/autocomplete-6.9.2.tgz",
"integrity": "sha512-suItGf7PhtfgQMCd8ofYzycdsAHDBB8BkNrmyxeLvptW7yNT6zGT6ZzwhAfmB94TUyAAStrHjaDGC4/foenF2A==",
"dependencies": {
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
@ -330,8 +330,8 @@
}
},
"node_modules/@codemirror/lang-markdown": {
"version": "6.2.1",
"resolved": "git+ssh://git@github.com/codemirror/lang-markdown.git#b22ffef7330b46ce7de6c4b620e6aeb2fc343fcd",
"version": "6.2.2",
"resolved": "git+ssh://git@github.com/codemirror/lang-markdown.git#90283323da269dcbc34a40b4dcab7fa1ab22d777",
"license": "MIT",
"dependencies": {
"@codemirror/autocomplete": "^6.7.1",
@ -393,9 +393,9 @@
}
},
"node_modules/@codemirror/view": {
"version": "6.21.0",
"resolved": "https://registry.npmmirror.com/@codemirror/view/-/view-6.21.0.tgz",
"integrity": "sha512-JI3asAk/fZ7h2ATjY9ErDFGWoWe4Bu7XgzR31G26RU3M/DLjfdQK8Im7hL1P/PAyprfVrf0uRNqxu02TkBcm3g==",
"version": "6.21.3",
"resolved": "https://registry.npmmirror.com/@codemirror/view/-/view-6.21.3.tgz",
"integrity": "sha512-8l1aSQ6MygzL4Nx7GVYhucSXvW4jQd0F6Zm3v9Dg+6nZEfwzJVqi4C2zHfDljID+73gsQrWp9TgHc81xU15O4A==",
"dependencies": {
"@codemirror/state": "^6.1.4",
"style-mod": "^4.1.0",
@ -770,9 +770,9 @@
}
},
"node_modules/@eslint-community/regexpp": {
"version": "4.8.1",
"resolved": "https://registry.npmmirror.com/@eslint-community/regexpp/-/regexpp-4.8.1.tgz",
"integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==",
"version": "4.9.1",
"resolved": "https://registry.npmmirror.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz",
"integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==",
"dev": true,
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
@ -799,9 +799,9 @@
}
},
"node_modules/@eslint/js": {
"version": "8.50.0",
"resolved": "https://registry.npmmirror.com/@eslint/js/-/js-8.50.0.tgz",
"integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==",
"version": "8.51.0",
"resolved": "https://registry.npmmirror.com/@eslint/js/-/js-8.51.0.tgz",
"integrity": "sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -924,9 +924,9 @@
}
},
"node_modules/@lezer/javascript": {
"version": "1.4.7",
"resolved": "https://registry.npmmirror.com/@lezer/javascript/-/javascript-1.4.7.tgz",
"integrity": "sha512-OVWlK0YEi7HM+9JRWtRkir8qvcg0/kVYg2TAMHlVtl6DU1C9yK1waEOLBMztZsV/axRJxsqfJKhzYz+bxZme5g==",
"version": "1.4.8",
"resolved": "https://registry.npmmirror.com/@lezer/javascript/-/javascript-1.4.8.tgz",
"integrity": "sha512-QRmw/5xrcyRLyWr3JT3KCzn2XZr5NYNqQMGsqnYy+FghbQn9DZPuj6JDkE6uSXvfMLpdapu8KBIaeoJFaR4QVw==",
"dependencies": {
"@lezer/highlight": "^1.1.3",
"@lezer/lr": "^1.3.0"
@ -942,9 +942,9 @@
}
},
"node_modules/@lezer/lr": {
"version": "1.3.12",
"resolved": "https://registry.npmmirror.com/@lezer/lr/-/lr-1.3.12.tgz",
"integrity": "sha512-5nwY1JzCueUdRtlMBnlf1SUi69iGCq2ABq7WQFQMkn/kxPvoACAEnTp4P17CtXxYr7WCwtYPLL2AEvxKPuF1OQ==",
"version": "1.3.13",
"resolved": "https://registry.npmmirror.com/@lezer/lr/-/lr-1.3.13.tgz",
"integrity": "sha512-RLAbau/4uSzKgIKj96mI5WUtG1qtiR0Frn0Ei9zhPj8YOkHM+1Bb8SgdVvmR/aWJCFIzjo2KFnDiRZ75Xf5NdQ==",
"dependencies": {
"@lezer/common": "^1.0.0"
}
@ -1065,9 +1065,9 @@
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
},
"node_modules/@rushstack/eslint-patch": {
"version": "1.4.0",
"resolved": "https://registry.npmmirror.com/@rushstack/eslint-patch/-/eslint-patch-1.4.0.tgz",
"integrity": "sha512-cEjvTPU32OM9lUFegJagO0mRnIn+rbqrG89vV8/xLnLFX0DoR0r1oy5IlTga71Q7uT3Qus7qm7wgeiMT/+Irlg==",
"version": "1.5.1",
"resolved": "https://registry.npmmirror.com/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz",
"integrity": "sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==",
"dev": true
},
"node_modules/@tsconfig/node18": {
@ -1083,33 +1083,33 @@
"dev": true
},
"node_modules/@types/node": {
"version": "18.17.18",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-18.17.18.tgz",
"integrity": "sha512-/4QOuy3ZpV7Ya1GTRz5CYSz3DgkKpyUptXuQ5PPce7uuyJAOR7r9FhkmxJfvcNUXyklbC63a+YvB3jxy7s9ngw=="
"version": "18.18.4",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-18.18.4.tgz",
"integrity": "sha512-t3rNFBgJRugIhackit2mVcLfF6IRc0JE4oeizPQL8Zrm8n2WY/0wOdpOPhdtG0V9Q2TlW/axbF1MJ6z+Yj/kKQ=="
},
"node_modules/@types/normalize-package-data": {
"version": "2.4.1",
"resolved": "https://registry.npmmirror.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz",
"integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==",
"version": "2.4.2",
"resolved": "https://registry.npmmirror.com/@types/normalize-package-data/-/normalize-package-data-2.4.2.tgz",
"integrity": "sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==",
"dev": true
},
"node_modules/@types/semver": {
"version": "7.5.2",
"resolved": "https://registry.npmmirror.com/@types/semver/-/semver-7.5.2.tgz",
"integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==",
"version": "7.5.3",
"resolved": "https://registry.npmmirror.com/@types/semver/-/semver-7.5.3.tgz",
"integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==",
"dev": true
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.2.tgz",
"integrity": "sha512-ooaHxlmSgZTM6CHYAFRlifqh1OAr3PAQEwi7lhYhaegbnXrnh7CDcHmc3+ihhbQC7H0i4JF0psI5ehzkF6Yl6Q==",
"version": "6.7.4",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz",
"integrity": "sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.7.2",
"@typescript-eslint/type-utils": "6.7.2",
"@typescript-eslint/utils": "6.7.2",
"@typescript-eslint/visitor-keys": "6.7.2",
"@typescript-eslint/scope-manager": "6.7.4",
"@typescript-eslint/type-utils": "6.7.4",
"@typescript-eslint/utils": "6.7.4",
"@typescript-eslint/visitor-keys": "6.7.4",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@ -1131,15 +1131,15 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-6.7.2.tgz",
"integrity": "sha512-KA3E4ox0ws+SPyxQf9iSI25R6b4Ne78ORhNHeVKrPQnoYsb9UhieoiRoJgrzgEeKGOXhcY1i8YtOeCHHTDa6Fw==",
"version": "6.7.4",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-6.7.4.tgz",
"integrity": "sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.7.2",
"@typescript-eslint/types": "6.7.2",
"@typescript-eslint/typescript-estree": "6.7.2",
"@typescript-eslint/visitor-keys": "6.7.2",
"@typescript-eslint/scope-manager": "6.7.4",
"@typescript-eslint/types": "6.7.4",
"@typescript-eslint/typescript-estree": "6.7.4",
"@typescript-eslint/visitor-keys": "6.7.4",
"debug": "^4.3.4"
},
"engines": {
@ -1155,26 +1155,26 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.2.tgz",
"integrity": "sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw==",
"version": "6.7.4",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz",
"integrity": "sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.7.2",
"@typescript-eslint/visitor-keys": "6.7.2"
"@typescript-eslint/types": "6.7.4",
"@typescript-eslint/visitor-keys": "6.7.4"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-6.7.2.tgz",
"integrity": "sha512-36F4fOYIROYRl0qj95dYKx6kybddLtsbmPIYNK0OBeXv2j9L5nZ17j9jmfy+bIDHKQgn2EZX+cofsqi8NPATBQ==",
"version": "6.7.4",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz",
"integrity": "sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "6.7.2",
"@typescript-eslint/utils": "6.7.2",
"@typescript-eslint/typescript-estree": "6.7.4",
"@typescript-eslint/utils": "6.7.4",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
@ -1191,22 +1191,22 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.7.2.tgz",
"integrity": "sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg==",
"version": "6.7.4",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.7.4.tgz",
"integrity": "sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.2.tgz",
"integrity": "sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ==",
"version": "6.7.4",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz",
"integrity": "sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.7.2",
"@typescript-eslint/visitor-keys": "6.7.2",
"@typescript-eslint/types": "6.7.4",
"@typescript-eslint/visitor-keys": "6.7.4",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -1223,17 +1223,17 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-6.7.2.tgz",
"integrity": "sha512-ZCcBJug/TS6fXRTsoTkgnsvyWSiXwMNiPzBUani7hDidBdj1779qwM1FIAmpH4lvlOZNF3EScsxxuGifjpLSWQ==",
"version": "6.7.4",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-6.7.4.tgz",
"integrity": "sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.7.2",
"@typescript-eslint/types": "6.7.2",
"@typescript-eslint/typescript-estree": "6.7.2",
"@typescript-eslint/scope-manager": "6.7.4",
"@typescript-eslint/types": "6.7.4",
"@typescript-eslint/typescript-estree": "6.7.4",
"semver": "^7.5.4"
},
"engines": {
@ -1244,12 +1244,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "6.7.2",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.2.tgz",
"integrity": "sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ==",
"version": "6.7.4",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz",
"integrity": "sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.7.2",
"@typescript-eslint/types": "6.7.4",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
@ -1257,9 +1257,9 @@
}
},
"node_modules/@vitejs/plugin-vue": {
"version": "4.3.4",
"resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-4.3.4.tgz",
"integrity": "sha512-ciXNIHKPriERBisHFBvnTbfKa6r9SAesOYXeGDzgegcvy9Q4xdScSHAmKbNT0M3O0S9LKhIf5/G+UYG4NnnzYw==",
"version": "4.4.0",
"resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-4.4.0.tgz",
"integrity": "sha512-xdguqb+VUwiRpSg+nsc2HtbAUSGak25DXYvpQQi4RVU1Xq1uworyoH/md9Rfd8zMmPR/pSghr309QNcftUVseg==",
"dev": true,
"engines": {
"node": "^14.18.0 || >=16.0.0"
@ -1270,30 +1270,30 @@
}
},
"node_modules/@volar/language-core": {
"version": "1.10.1",
"resolved": "https://registry.npmmirror.com/@volar/language-core/-/language-core-1.10.1.tgz",
"integrity": "sha512-JnsM1mIPdfGPxmoOcK1c7HYAsL6YOv0TCJ4aW3AXPZN/Jb4R77epDyMZIVudSGjWMbvv/JfUa+rQ+dGKTmgwBA==",
"version": "1.10.3",
"resolved": "https://registry.npmmirror.com/@volar/language-core/-/language-core-1.10.3.tgz",
"integrity": "sha512-7Qgwu9bWUHN+cLrOkCbIVBkL+RVPREhvY07wY89dGxi4mY9mQCsUVRRp64F61lX7Nc27meMnvy0sWlzY0x6oQQ==",
"dev": true,
"dependencies": {
"@volar/source-map": "1.10.1"
"@volar/source-map": "1.10.3"
}
},
"node_modules/@volar/source-map": {
"version": "1.10.1",
"resolved": "https://registry.npmmirror.com/@volar/source-map/-/source-map-1.10.1.tgz",
"integrity": "sha512-3/S6KQbqa7pGC8CxPrg69qHLpOvkiPHGJtWPkI/1AXCsktkJ6gIk/5z4hyuMp8Anvs6eS/Kvp/GZa3ut3votKA==",
"version": "1.10.3",
"resolved": "https://registry.npmmirror.com/@volar/source-map/-/source-map-1.10.3.tgz",
"integrity": "sha512-QE9nwK3xsdBQGongHnC9SCR0itx7xUKQFsUDn5HbZY3pHpyXxdY1hSBG0eh9mE+aTKoM4KlqMvrb+19Tv9vS1Q==",
"dev": true,
"dependencies": {
"muggle-string": "^0.3.1"
}
},
"node_modules/@volar/typescript": {
"version": "1.10.1",
"resolved": "https://registry.npmmirror.com/@volar/typescript/-/typescript-1.10.1.tgz",
"integrity": "sha512-+iiO9yUSRHIYjlteT+QcdRq8b44qH19/eiUZtjNtuh6D9ailYM7DVR0zO2sEgJlvCaunw/CF9Ov2KooQBpR4VQ==",
"version": "1.10.3",
"resolved": "https://registry.npmmirror.com/@volar/typescript/-/typescript-1.10.3.tgz",
"integrity": "sha512-n0ar6xGYpRoSvgGMetm/JXP0QAXx+NOUvxCaWCfCjiFivQRSLJeydYDijhoGBUl5KSKosqq9In5L3e/m2TqTcQ==",
"dev": true,
"dependencies": {
"@volar/language-core": "1.10.1"
"@volar/language-core": "1.10.3"
}
},
"node_modules/@vue/compiler-core": {
@ -1386,17 +1386,17 @@
}
},
"node_modules/@vue/language-core": {
"version": "1.8.13",
"resolved": "https://registry.npmmirror.com/@vue/language-core/-/language-core-1.8.13.tgz",
"integrity": "sha512-nata2fYBZAkl4QJrU+IcArJCMTHt1VP8ePL/Z7eUPC2AF+Cm7Qgo9ksNCPBzZRh1LYjCaSaqV7njqNogwpsMVg==",
"version": "1.8.16",
"resolved": "https://registry.npmmirror.com/@vue/language-core/-/language-core-1.8.16.tgz",
"integrity": "sha512-IAONyjgR3XImwgrtyQ7CCJlSXTlLesXG6/LpPjOBaXFiwknmGf1yDAXGa9fVH0lRplcnvOA7HNDI92OwWBi9qg==",
"dev": true,
"dependencies": {
"@volar/language-core": "~1.10.0",
"@volar/source-map": "~1.10.0",
"@volar/language-core": "~1.10.3",
"@volar/source-map": "~1.10.3",
"@vue/compiler-dom": "^3.3.0",
"@vue/reactivity": "^3.3.0",
"@vue/shared": "^3.3.0",
"minimatch": "^9.0.0",
"minimatch": "^9.0.3",
"muggle-string": "^0.3.1",
"vue-template-compiler": "^2.7.14"
},
@ -1493,13 +1493,13 @@
"dev": true
},
"node_modules/@vue/typescript": {
"version": "1.8.13",
"resolved": "https://registry.npmmirror.com/@vue/typescript/-/typescript-1.8.13.tgz",
"integrity": "sha512-ALJjHFqQ3dgZVCI/ogAS/dZ7JEhIi1N0Em5I7uwabY1p9RDRK3odLsycMHyxZRjm5dLI15c07eeBloHiD2Otlg==",
"version": "1.8.16",
"resolved": "https://registry.npmmirror.com/@vue/typescript/-/typescript-1.8.16.tgz",
"integrity": "sha512-ywbY4bS4YJw8gYyPpOhwyutqzl0lqkYI7l3waZkOcQG4ZYgiu6KyHZc3aagEbH8saFQTQxi5+I3ATUN5KwfvNw==",
"dev": true,
"dependencies": {
"@volar/typescript": "~1.10.0",
"@vue/language-core": "1.8.13"
"@volar/typescript": "~1.10.3",
"@vue/language-core": "1.8.16"
}
},
"node_modules/acorn": {
@ -1699,13 +1699,13 @@
}
},
"node_modules/browserslist": {
"version": "4.21.11",
"resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.21.11.tgz",
"integrity": "sha512-xn1UXOKUz7DjdGlg9RrUr0GGiWzI97UQJnugHtH0OLDfJB7jMgoIkYvRIEO1l9EeEERVqeqLYOcFBW9ldjypbQ==",
"version": "4.22.1",
"resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.22.1.tgz",
"integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==",
"dev": true,
"dependencies": {
"caniuse-lite": "^1.0.30001538",
"electron-to-chromium": "^1.4.526",
"caniuse-lite": "^1.0.30001541",
"electron-to-chromium": "^1.4.535",
"node-releases": "^2.0.13",
"update-browserslist-db": "^1.0.13"
},
@ -1747,9 +1747,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001538",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz",
"integrity": "sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==",
"version": "1.0.30001546",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001546.tgz",
"integrity": "sha512-zvtSJwuQFpewSyRrI3AsftF6rM0X80mZkChIt1spBGEvRglCrjTniXvinc8JKRoqTwXAgvqTImaN9igfSMtUBw==",
"dev": true
},
"node_modules/case-anything": {
@ -1917,16 +1917,16 @@
"integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
},
"node_modules/daisyui": {
"version": "3.7.7",
"resolved": "https://registry.npmmirror.com/daisyui/-/daisyui-3.7.7.tgz",
"integrity": "sha512-2/nFdW/6R9MMnR8tTm07jPVyPaZwpUSkVsFAADb7Oq8N2Ynbls57laDdNqxTCUmn0QvcZi01TKl8zQbAwRfw1w==",
"version": "3.9.2",
"resolved": "https://registry.npmmirror.com/daisyui/-/daisyui-3.9.2.tgz",
"integrity": "sha512-yJZ1QjHUaL+r9BkquTdzNHb7KIgAJVFh0zbOXql2Wu0r7zx5qZNLxclhjN0WLoIpY+o2h/8lqXg7ijj8oTigOw==",
"dev": true,
"dependencies": {
"colord": "^2.9",
"css-selector-tokenizer": "^0.8",
"postcss": "^8",
"postcss-js": "^4",
"tailwindcss": "^3"
"tailwindcss": "^3.1"
},
"engines": {
"node": ">=16.9.0"
@ -2062,9 +2062,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.4.528",
"resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.528.tgz",
"integrity": "sha512-UdREXMXzLkREF4jA8t89FQjA8WHI6ssP38PMY4/4KhXFQbtImnghh4GkCgrtiZwLKUKVD2iTVXvDVQjfomEQuA==",
"version": "1.4.544",
"resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.544.tgz",
"integrity": "sha512-54z7squS1FyFRSUqq/knOFSptjjogLZXbKcYk3B0qkE1KZzvqASwRZnY2KzZQJqIYLVD38XZeoiMRflYSwyO4w==",
"dev": true
},
"node_modules/error-ex": {
@ -2132,15 +2132,15 @@
}
},
"node_modules/eslint": {
"version": "8.50.0",
"resolved": "https://registry.npmmirror.com/eslint/-/eslint-8.50.0.tgz",
"integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==",
"version": "8.51.0",
"resolved": "https://registry.npmmirror.com/eslint/-/eslint-8.51.0.tgz",
"integrity": "sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "8.50.0",
"@eslint/js": "8.51.0",
"@humanwhocodes/config-array": "^0.11.11",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@ -2449,12 +2449,12 @@
}
},
"node_modules/flat-cache": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/flat-cache/-/flat-cache-3.1.0.tgz",
"integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==",
"version": "3.1.1",
"resolved": "https://registry.npmmirror.com/flat-cache/-/flat-cache-3.1.1.tgz",
"integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==",
"dev": true,
"dependencies": {
"flatted": "^3.2.7",
"flatted": "^3.2.9",
"keyv": "^4.5.3",
"rimraf": "^3.0.2"
},
@ -2523,12 +2523,6 @@
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"node_modules/get-stream": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz",
@ -2568,9 +2562,9 @@
}
},
"node_modules/globals": {
"version": "13.22.0",
"resolved": "https://registry.npmmirror.com/globals/-/globals-13.22.0.tgz",
"integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==",
"version": "13.23.0",
"resolved": "https://registry.npmmirror.com/globals/-/globals-13.23.0.tgz",
"integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==",
"dev": true,
"dependencies": {
"type-fest": "^0.20.2"
@ -2603,13 +2597,10 @@
"dev": true
},
"node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/has/-/has-1.0.4.tgz",
"integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==",
"dev": true,
"dependencies": {
"function-bind": "^1.1.1"
},
"engines": {
"node": ">= 0.4.0"
}
@ -2632,6 +2623,14 @@
"he": "bin/he"
}
},
"node_modules/highlight.js": {
"version": "10.7.3",
"resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz",
"integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==",
"engines": {
"node": "*"
}
},
"node_modules/hosted-git-info": {
"version": "7.0.1",
"resolved": "https://registry.npmmirror.com/hosted-git-info/-/hosted-git-info-7.0.1.tgz",
@ -2887,9 +2886,9 @@
"dev": true
},
"node_modules/keyv": {
"version": "4.5.3",
"resolved": "https://registry.npmmirror.com/keyv/-/keyv-4.5.3.tgz",
"integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==",
"version": "4.5.4",
"resolved": "https://registry.npmmirror.com/keyv/-/keyv-4.5.4.tgz",
"integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
"dev": true,
"dependencies": {
"json-buffer": "3.0.1"
@ -2965,9 +2964,9 @@
}
},
"node_modules/magic-string": {
"version": "0.30.3",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.3.tgz",
"integrity": "sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==",
"version": "0.30.4",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.4.tgz",
"integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15"
},
@ -3132,9 +3131,9 @@
}
},
"node_modules/npm-run-all2": {
"version": "6.0.6",
"resolved": "https://registry.npmmirror.com/npm-run-all2/-/npm-run-all2-6.0.6.tgz",
"integrity": "sha512-Ba31DnJj3aqJ5freRdVIoBuRdGjHDt0Sfc7tduR2wYDbtcxsFlga6Sw2pE5Tn3+kdVttVwqzFlmozcT540wDxw==",
"version": "6.1.1",
"resolved": "https://registry.npmmirror.com/npm-run-all2/-/npm-run-all2-6.1.1.tgz",
"integrity": "sha512-lWLbkPZ5BSdXtN8lR+0rc8caKoPdymycpZksyDEC9MOBvfdwTXZ0uVhb7bMcGeXv2/BKtfQuo6Zn3zfc8rxNXA==",
"dev": true,
"dependencies": {
"ansi-styles": "^6.2.1",
@ -3147,6 +3146,7 @@
},
"bin": {
"npm-run-all": "bin/npm-run-all/index.js",
"npm-run-all2": "bin/npm-run-all/index.js",
"run-p": "bin/run-p/index.js",
"run-s": "bin/run-s/index.js"
},
@ -3478,9 +3478,9 @@
}
},
"node_modules/postcss": {
"version": "8.4.30",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.30.tgz",
"integrity": "sha512-7ZEao1g4kd68l97aWG/etQKPKq07us0ieSZ2TnFDk11i0ZfDW2AwKHYU8qv4MZKqN2fdBfg+7q0ES06UA73C1g==",
"version": "8.4.31",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.31.tgz",
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"dependencies": {
"nanoid": "^3.3.6",
"picocolors": "^1.0.0",
@ -3682,9 +3682,9 @@
}
},
"node_modules/read-pkg/node_modules/type-fest": {
"version": "4.3.1",
"resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-4.3.1.tgz",
"integrity": "sha512-pphNW/msgOUSkJbH58x8sqpq8uQj6b0ZKGxEsLKMUnGorRcDjrUaLS+39+/ub41JNTwrrMyJcUB8+YZs3mbwqw==",
"version": "4.4.0",
"resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-4.4.0.tgz",
"integrity": "sha512-HT3RRs7sTfY22KuPQJkD/XjbTbxgP2Je5HPt6H6JEGvcjHd5Lqru75EbrP3tb4FYjNJ+DjLp+MNQTFQU0mhXNw==",
"dev": true,
"engines": {
"node": ">=16"
@ -3748,9 +3748,9 @@
}
},
"node_modules/rollup": {
"version": "3.29.2",
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.29.2.tgz",
"integrity": "sha512-CJouHoZ27v6siztc21eEQGo0kIcE5D1gVPA571ez0mMYb25LGYGKnVNXpEj5MGlepmDWGXNjDB5q7uNiPHC11A==",
"version": "3.29.4",
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.29.4.tgz",
"integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
@ -3968,9 +3968,9 @@
}
},
"node_modules/spdx-license-ids": {
"version": "3.0.15",
"resolved": "https://registry.npmmirror.com/spdx-license-ids/-/spdx-license-ids-3.0.15.tgz",
"integrity": "sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ==",
"version": "3.0.16",
"resolved": "https://registry.npmmirror.com/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz",
"integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==",
"dev": true
},
"node_modules/strip-ansi": {
@ -4199,9 +4199,9 @@
}
},
"node_modules/ts-proto": {
"version": "1.158.0",
"resolved": "https://registry.npmmirror.com/ts-proto/-/ts-proto-1.158.0.tgz",
"integrity": "sha512-t5XcKYvdeeeinP4zBA+YXzRANMXacxPzqhs7hsmnD9RxfP1L+Ip858ii9Zdkp/UYW58N3q4wJKLdZfvnBmAk9w==",
"version": "1.160.0",
"resolved": "https://registry.npmmirror.com/ts-proto/-/ts-proto-1.160.0.tgz",
"integrity": "sha512-AUJQ0noLEkLew81MYmNPF/z8QDIBxAIJ4UKt9sH2AwdaywOTk1jh1NoluoCr3cGScpVh0GHWCB/UA4V0fOO8fg==",
"dependencies": {
"case-anything": "^2.1.13",
"protobufjs": "^7.2.4",
@ -4312,9 +4312,9 @@
}
},
"node_modules/vite": {
"version": "4.4.9",
"resolved": "https://registry.npmmirror.com/vite/-/vite-4.4.9.tgz",
"integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==",
"version": "4.4.11",
"resolved": "https://registry.npmmirror.com/vite/-/vite-4.4.11.tgz",
"integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==",
"dev": true,
"dependencies": {
"esbuild": "^0.18.10",
@ -4433,14 +4433,14 @@
}
},
"node_modules/vue-tsc": {
"version": "1.8.13",
"resolved": "https://registry.npmmirror.com/vue-tsc/-/vue-tsc-1.8.13.tgz",
"integrity": "sha512-Hl8zUXPVK2KzPtbXeMCN0CSFkwvD96YOtYt9KvJPG9W8QGcNpGk9KHwPuGMxA8blWXSIli7gtsoC+clICEVdVg==",
"version": "1.8.16",
"resolved": "https://registry.npmmirror.com/vue-tsc/-/vue-tsc-1.8.16.tgz",
"integrity": "sha512-PT2xOJNl2qkmmp8eHf4qapfzvcRTQLxQQhQAzY7sMjv0JKsud9vo+aotklh/VzM9ZfaSo1UlDGZy6zSSRc+8wA==",
"dev": true,
"dependencies": {
"@vue/language-core": "1.8.13",
"@vue/typescript": "1.8.13",
"semver": "^7.3.8"
"@vue/language-core": "1.8.16",
"@vue/typescript": "1.8.16",
"semver": "^7.5.4"
},
"bin": {
"vue-tsc": "bin/vue-tsc.js"
@ -4460,14 +4460,6 @@
"vue": "^3.0.0"
}
},
"node_modules/vue3-highlightjs/node_modules/highlight.js": {
"version": "10.7.3",
"resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz",
"integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==",
"engines": {
"node": "*"
}
},
"node_modules/w3c-keyname": {
"version": "2.2.8",
"resolved": "https://registry.npmmirror.com/w3c-keyname/-/w3c-keyname-2.2.8.tgz",

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import {usePageStore} from "@/stores/counter";
import {usePageStore} from "./stores/counter";
const pager = usePageStore()
</script>

1
webui/src/declare.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module 'vue3-highlightjs';

View File

@ -4,15 +4,15 @@ import {useRouter} from "vue-router";
const router = useRouter()
let doc_id = ref(router.currentRoute.value.params.id);
import {get} from "../request/api";
import {PastebinServiceGetResp, PastebinServiceRecord} from "@/gen/api_services/v1/pastebin_module.ts";
import {get} from "@request/api";
import {PastebinServiceGetResp, PastebinServiceRecord} from "@gen/api_services/v1/pastebin_module.ts";
import {onMounted, reactive, ref} from "vue";
import {useNotification} from "@kyvg/vue3-notification";
const notification = useNotification()
let doc_proxy: PastebinServiceRecord = {}
let doc_proxy: PastebinServiceRecord = {} as PastebinServiceRecord
let doc = reactive({instance: doc_proxy})
async function document() {
@ -25,7 +25,7 @@ async function document() {
});
return
}
doc.instance = response.data.record
doc.instance = response.data.record as PastebinServiceRecord
}
onMounted(async () => {

View File

@ -8,16 +8,16 @@ const router = useRouter()
const extensions = [javascript(), oneDark]
import {usePageStore} from "@/stores/counter";
import {usePageStore} from "@stores/counter";
const pager = usePageStore()
pager.change('home')
import {put} from "../request/api";
import {put} from "@request/api";
import {
PastebinServiceAddReq,
PastebinServiceAddResp,
PastebinServiceRecord
} from "@/gen/api_services/v1/pastebin_module";
} from "@gen/api_services/v1/pastebin_module";
import { useNotification } from "@kyvg/vue3-notification";
const notification = useNotification()
@ -32,8 +32,8 @@ let document = ref({
})
async function add() {
let request:PastebinServiceAddReq = {}
let record:PastebinServiceRecord = {}
let request:PastebinServiceAddReq = {} as PastebinServiceAddReq
let record:PastebinServiceRecord = {} as PastebinServiceRecord
record.title = document.value.title
record.author = document.value.author
record.content = document.value.code

View File

@ -1,13 +1,13 @@
<script setup lang="ts">
import {usePageStore} from "@/stores/counter";
import {usePageStore} from "@stores/counter";
const pager = usePageStore()
pager.change('list')
import {get} from "../request/api";
import {get} from "@request/api";
import {
PastebinServiceListResp,
PastebinServiceRecord
} from "@/gen/api_services/v1/pastebin_module";
} from "@gen/api_services/v1/pastebin_module";
import {onMounted, reactive, ref} from "vue";
import { useNotification } from "@kyvg/vue3-notification";
@ -70,7 +70,7 @@ onMounted(async () => {
</thead>
<tbody>
<tr v-for="item in pastebin_items.list" :key="item.id">
<td>{{item.title}}</td>
<td><RouterLink :to="{name: 'view', params: {id: item.key}}" class="link link-primary">{{item.title}}</RouterLink></td>
<td>{{item.author}}</td>
<td>{{item.lang}}</td>
<td>{{item.key}}</td>

View File

@ -5,7 +5,7 @@
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
"types": ["node"],
"types": ["node", "vite/client"],
/* Bundler mode */
"moduleResolution": "bundler",
@ -19,8 +19,17 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
// source alias
"baseUrl": "src",
"paths": {
"@views/*": ["./views/*"],
"@request/*": ["./request/*"],
"@stores/*": ["./stores/*"],
"@gen/*": ["./gen/*"],
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
"references": [{ "path": "./tsconfig.node.json" }],
}

View File

@ -2,6 +2,7 @@ import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import * as path from "path";
// https://vitejs.dev/config/
export default defineConfig({
@ -10,7 +11,10 @@ export default defineConfig({
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
'@views': path.resolve(__dirname, "./src/views"),
'@request': path.resolve(__dirname, "./src/request"),
'@stores': path.resolve(__dirname, "./src/stores"),
'@gen': path.resolve(__dirname, "./src/gen"),
}
}
})