Popup pour état connexion sur avatar + Refonte views Dashboard + Ajout types depuis DiscordJS

This commit is contained in:
Angels-dev
2024-09-03 01:24:13 +02:00
parent 9fec536395
commit 69b648d773
25 changed files with 867 additions and 586 deletions

617
package-lock.json generated
View File

@@ -14,29 +14,32 @@
"@fortawesome/free-regular-svg-icons": "^6.6.0", "@fortawesome/free-regular-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/vue-fontawesome": "^3.0.8", "@fortawesome/vue-fontawesome": "^3.0.8",
"axios": "^1.7.4", "axios": "^1.7.6",
"discord-api-types": "^0.37.98",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"js-confetti": "^0.12.0", "js-confetti": "^0.12.0",
"pinia": "^2.2.2", "pinia": "^2.2.2",
"vue": "^3.4.29", "vue": "^3.4.38",
"vue-cookies": "^1.8.4", "vue-cookies": "^1.8.4",
"vue-final-modal": "^4.5.4",
"vue-i18n": "^9.14.0", "vue-i18n": "^9.14.0",
"vue-router": "^4.3.3" "vue-loading-overlay": "^6.0.5",
"vue-router": "^4.4.3"
}, },
"devDependencies": { "devDependencies": {
"@rushstack/eslint-patch": "^1.8.0", "@rushstack/eslint-patch": "^1.10.4",
"@tsconfig/node20": "^20.1.4", "@tsconfig/node20": "^20.1.4",
"@vitejs/plugin-vue": "^5.0.5", "@vitejs/plugin-vue": "^5.1.3",
"@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0", "@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.5.1", "@vue/tsconfig": "^0.5.1",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-plugin-vue": "^9.23.0", "eslint-plugin-vue": "^9.27.0",
"npm-run-all2": "^6.2.0", "npm-run-all2": "^6.2.2",
"prettier": "^3.2.5", "prettier": "^3.3.3",
"typescript": "~5.4.0", "typescript": "~5.5.4",
"vite": "^5.3.1", "vite": "^5.4.2",
"vue-tsc": "^2.0.21" "vue-tsc": "^2.1.2"
} }
}, },
"node_modules/@babel/helper-string-parser": { "node_modules/@babel/helper-string-parser": {
@@ -58,12 +61,12 @@
} }
}, },
"node_modules/@babel/parser": { "node_modules/@babel/parser": {
"version": "7.25.3", "version": "7.25.6",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz",
"integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==", "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/types": "^7.25.2" "@babel/types": "^7.25.6"
}, },
"bin": { "bin": {
"parser": "bin/babel-parser.js" "parser": "bin/babel-parser.js"
@@ -73,9 +76,9 @@
} }
}, },
"node_modules/@babel/types": { "node_modules/@babel/types": {
"version": "7.25.2", "version": "7.25.6",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.2.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz",
"integrity": "sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==", "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/helper-string-parser": "^7.24.8", "@babel/helper-string-parser": "^7.24.8",
@@ -801,9 +804,9 @@
} }
}, },
"node_modules/@rollup/rollup-android-arm-eabi": { "node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.2.tgz",
"integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", "integrity": "sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -815,9 +818,9 @@
] ]
}, },
"node_modules/@rollup/rollup-android-arm64": { "node_modules/@rollup/rollup-android-arm64": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.2.tgz",
"integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", "integrity": "sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -829,9 +832,9 @@
] ]
}, },
"node_modules/@rollup/rollup-darwin-arm64": { "node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.2.tgz",
"integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", "integrity": "sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -843,9 +846,9 @@
] ]
}, },
"node_modules/@rollup/rollup-darwin-x64": { "node_modules/@rollup/rollup-darwin-x64": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.2.tgz",
"integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", "integrity": "sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -857,9 +860,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm-gnueabihf": { "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.2.tgz",
"integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", "integrity": "sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -871,9 +874,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm-musleabihf": { "node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.2.tgz",
"integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", "integrity": "sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -885,9 +888,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm64-gnu": { "node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.2.tgz",
"integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", "integrity": "sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -899,9 +902,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm64-musl": { "node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.2.tgz",
"integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", "integrity": "sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -913,9 +916,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": { "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.2.tgz",
"integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", "integrity": "sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@@ -927,9 +930,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-riscv64-gnu": { "node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.2.tgz",
"integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", "integrity": "sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -941,9 +944,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-s390x-gnu": { "node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.2.tgz",
"integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", "integrity": "sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@@ -955,9 +958,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-x64-gnu": { "node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.2.tgz",
"integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", "integrity": "sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -969,9 +972,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-x64-musl": { "node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.2.tgz",
"integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", "integrity": "sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -983,9 +986,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-arm64-msvc": { "node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.2.tgz",
"integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", "integrity": "sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -997,9 +1000,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-ia32-msvc": { "node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.2.tgz",
"integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", "integrity": "sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -1011,9 +1014,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-x64-msvc": { "node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.2.tgz",
"integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==", "integrity": "sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1045,17 +1048,11 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/web-bluetooth": {
"version": "20.16.1", "version": "0.0.20",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.1.tgz", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz",
"integrity": "sha512-zJDo7wEadFtSyNz5QITDfRcrhqDvQI1xQNQ0VoizPjM/dVAODqqIUWbJPkvsxmTI0MYRGRikcdjMPhOssnPejQ==", "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==",
"dev": true, "license": "MIT"
"license": "MIT",
"optional": true,
"peer": true,
"dependencies": {
"undici-types": "~6.19.2"
}
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "7.18.0", "version": "7.18.0",
@@ -1258,9 +1255,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/@vitejs/plugin-vue": { "node_modules/@vitejs/plugin-vue": {
"version": "5.1.2", "version": "5.1.3",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.2.tgz", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.3.tgz",
"integrity": "sha512-nY9IwH12qeiJqumTCLJLE7IiNx7HZ39cbHaysEUd+Myvbz9KAqd2yq+U01Kab1R/H1BmiyM2ShTYlNH32Fzo3A==", "integrity": "sha512-3xbWsKEKXYlmX82aOHufFQVnkbMC/v8fLpWwh6hWOUrK5fbbtBh9Q/WWse27BFgSy2/e2c0fz5Scgya9h2GLhw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -1272,68 +1269,68 @@
} }
}, },
"node_modules/@volar/language-core": { "node_modules/@volar/language-core": {
"version": "2.4.0-alpha.18", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.0-alpha.18.tgz", "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.1.tgz",
"integrity": "sha512-JAYeJvYQQROmVRtSBIczaPjP3DX4QW1fOqW1Ebs0d3Y3EwSNRglz03dSv0Dm61dzd0Yx3WgTW3hndDnTQqgmyg==", "integrity": "sha512-9AKhC7Qn2mQYxj7Dz3bVxeOk7gGJladhWixUYKef/o0o7Bm4an+A3XvmcTHVqZ8stE6lBVH++g050tBtJ4TZPQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@volar/source-map": "2.4.0-alpha.18" "@volar/source-map": "2.4.1"
} }
}, },
"node_modules/@volar/source-map": { "node_modules/@volar/source-map": {
"version": "2.4.0-alpha.18", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.0-alpha.18.tgz", "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.1.tgz",
"integrity": "sha512-MTeCV9MUwwsH0sNFiZwKtFrrVZUK6p8ioZs3xFzHc2cvDXHWlYN3bChdQtwKX+FY2HG6H3CfAu1pKijolzIQ8g==", "integrity": "sha512-Xq6ep3OZg9xUqN90jEgB9ztX5SsTz1yiV8wiQbcYNjWkek+Ie3dc8l7AVt3EhDm9mSIR58oWczHkzM2H6HIsmQ==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@volar/typescript": { "node_modules/@volar/typescript": {
"version": "2.4.0-alpha.18", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.0-alpha.18.tgz", "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.1.tgz",
"integrity": "sha512-sXh5Y8sqGUkgxpMWUGvRXggxYHAVxg0Pa1C42lQZuPDrW6vHJPR0VCK8Sr7WJsAW530HuNQT/ZIskmXtxjybMQ==", "integrity": "sha512-UoRzC0PXcwajFQTu8XxKSYNsWNBtVja6Y9gC8eLv7kYm+UEKJCcZ8g7dialsOYA0HKs3Vpg57MeCsawFLC6m9Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@volar/language-core": "2.4.0-alpha.18", "@volar/language-core": "2.4.1",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"vscode-uri": "^3.0.8" "vscode-uri": "^3.0.8"
} }
}, },
"node_modules/@vue/compiler-core": { "node_modules/@vue/compiler-core": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.37.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.38.tgz",
"integrity": "sha512-ZDDT/KiLKuCRXyzWecNzC5vTcubGz4LECAtfGPENpo0nrmqJHwuWtRLxk/Sb9RAKtR9iFflFycbkjkY+W/PZUQ==", "integrity": "sha512-8IQOTCWnLFqfHzOGm9+P8OPSEDukgg3Huc92qSG49if/xI2SAwLHQO2qaPQbjCWPBcQoO1WYfXfTACUrWV3c5A==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/parser": "^7.24.7", "@babel/parser": "^7.24.7",
"@vue/shared": "3.4.37", "@vue/shared": "3.4.38",
"entities": "^5.0.0", "entities": "^4.5.0",
"estree-walker": "^2.0.2", "estree-walker": "^2.0.2",
"source-map-js": "^1.2.0" "source-map-js": "^1.2.0"
} }
}, },
"node_modules/@vue/compiler-dom": { "node_modules/@vue/compiler-dom": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.37.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.38.tgz",
"integrity": "sha512-rIiSmL3YrntvgYV84rekAtU/xfogMUJIclUMeIKEtVBFngOL3IeZHhsH3UaFEgB5iFGpj6IW+8YuM/2Up+vVag==", "integrity": "sha512-Osc/c7ABsHXTsETLgykcOwIxFktHfGSUDkb05V61rocEfsFDcjDLH/IHJSNJP+/Sv9KeN2Lx1V6McZzlSb9EhQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-core": "3.4.37", "@vue/compiler-core": "3.4.38",
"@vue/shared": "3.4.37" "@vue/shared": "3.4.38"
} }
}, },
"node_modules/@vue/compiler-sfc": { "node_modules/@vue/compiler-sfc": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.37.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.38.tgz",
"integrity": "sha512-vCfetdas40Wk9aK/WWf8XcVESffsbNkBQwS5t13Y/PcfqKfIwJX2gF+82th6dOpnpbptNMlMjAny80li7TaCIg==", "integrity": "sha512-s5QfZ+9PzPh3T5H4hsQDJtI8x7zdJaew/dCGgqZ2630XdzaZ3AD8xGZfBqpT8oaD/p2eedd+pL8tD5vvt5ZYJQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/parser": "^7.24.7", "@babel/parser": "^7.24.7",
"@vue/compiler-core": "3.4.37", "@vue/compiler-core": "3.4.38",
"@vue/compiler-dom": "3.4.37", "@vue/compiler-dom": "3.4.38",
"@vue/compiler-ssr": "3.4.37", "@vue/compiler-ssr": "3.4.38",
"@vue/shared": "3.4.37", "@vue/shared": "3.4.38",
"estree-walker": "^2.0.2", "estree-walker": "^2.0.2",
"magic-string": "^0.30.10", "magic-string": "^0.30.10",
"postcss": "^8.4.40", "postcss": "^8.4.40",
@@ -1341,13 +1338,13 @@
} }
}, },
"node_modules/@vue/compiler-ssr": { "node_modules/@vue/compiler-ssr": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.37.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.38.tgz",
"integrity": "sha512-TyAgYBWrHlFrt4qpdACh8e9Ms6C/AZQ6A6xLJaWrCL8GCX5DxMzxyeFAEMfU/VFr4tylHm+a2NpfJpcd7+20XA==", "integrity": "sha512-YXznKFQ8dxYpAz9zLuVvfcXhc31FSPFDcqr0kyujbOwNhlmaNvL2QfIy+RZeJgSn5Fk54CWoEUeW+NVBAogGaw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-dom": "3.4.37", "@vue/compiler-dom": "3.4.38",
"@vue/shared": "3.4.37" "@vue/shared": "3.4.38"
} }
}, },
"node_modules/@vue/compiler-vue2": { "node_modules/@vue/compiler-vue2": {
@@ -1408,13 +1405,13 @@
} }
}, },
"node_modules/@vue/language-core": { "node_modules/@vue/language-core": {
"version": "2.0.29", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.0.29.tgz", "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.1.2.tgz",
"integrity": "sha512-o2qz9JPjhdoVj8D2+9bDXbaI4q2uZTHQA/dbyZT4Bj1FR9viZxDJnLcKVHfxdn6wsOzRgpqIzJEEmSSvgMvDTQ==", "integrity": "sha512-tt2J7C+l0J/T5PaLhJ0jvCCi0JNwu3e8azWTYxW3jmAW5B/dac0g5UxmI7l59CQgCGFotqUqI3tXjfZgoWNtog==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@volar/language-core": "~2.4.0-alpha.18", "@volar/language-core": "~2.4.1",
"@vue/compiler-dom": "^3.4.0", "@vue/compiler-dom": "^3.4.0",
"@vue/compiler-vue2": "^2.7.16", "@vue/compiler-vue2": "^2.7.16",
"@vue/shared": "^3.4.0", "@vue/shared": "^3.4.0",
@@ -1433,53 +1430,53 @@
} }
}, },
"node_modules/@vue/reactivity": { "node_modules/@vue/reactivity": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.37.tgz", "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.38.tgz",
"integrity": "sha512-UmdKXGx0BZ5kkxPqQr3PK3tElz6adTey4307NzZ3whZu19i5VavYal7u2FfOmAzlcDVgE8+X0HZ2LxLb/jgbYw==", "integrity": "sha512-4vl4wMMVniLsSYYeldAKzbk72+D3hUnkw9z8lDeJacTxAkXeDAP1uE9xr2+aKIN0ipOL8EG2GPouVTH6yF7Gnw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/shared": "3.4.37" "@vue/shared": "3.4.38"
} }
}, },
"node_modules/@vue/runtime-core": { "node_modules/@vue/runtime-core": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.37.tgz", "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.38.tgz",
"integrity": "sha512-MNjrVoLV/sirHZoD7QAilU1Ifs7m/KJv4/84QVbE6nyAZGQNVOa1HGxaOzp9YqCG+GpLt1hNDC4RbH+KtanV7w==", "integrity": "sha512-21z3wA99EABtuf+O3IhdxP0iHgkBs1vuoCAsCKLVJPEjpVqvblwBnTj42vzHRlWDCyxu9ptDm7sI2ZMcWrQqlA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/reactivity": "3.4.37", "@vue/reactivity": "3.4.38",
"@vue/shared": "3.4.37" "@vue/shared": "3.4.38"
} }
}, },
"node_modules/@vue/runtime-dom": { "node_modules/@vue/runtime-dom": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.37.tgz", "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.38.tgz",
"integrity": "sha512-Mg2EwgGZqtwKrqdL/FKMF2NEaOHuH+Ks9TQn3DHKyX//hQTYOun+7Tqp1eo0P4Ds+SjltZshOSRq6VsU0baaNg==", "integrity": "sha512-afZzmUreU7vKwKsV17H1NDThEEmdYI+GCAK/KY1U957Ig2NATPVjCROv61R19fjZNzMmiU03n79OMnXyJVN0UA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/reactivity": "3.4.37", "@vue/reactivity": "3.4.38",
"@vue/runtime-core": "3.4.37", "@vue/runtime-core": "3.4.38",
"@vue/shared": "3.4.37", "@vue/shared": "3.4.38",
"csstype": "^3.1.3" "csstype": "^3.1.3"
} }
}, },
"node_modules/@vue/server-renderer": { "node_modules/@vue/server-renderer": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.37.tgz", "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.38.tgz",
"integrity": "sha512-jZ5FAHDR2KBq2FsRUJW6GKDOAG9lUTX8aBEGq4Vf6B/35I9fPce66BornuwmqmKgfiSlecwuOb6oeoamYMohkg==", "integrity": "sha512-NggOTr82FbPEkkUvBm4fTGcwUY8UuTsnWC/L2YZBmvaQ4C4Jl/Ao4HHTB+l7WnFCt5M/dN3l0XLuyjzswGYVCA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-ssr": "3.4.37", "@vue/compiler-ssr": "3.4.38",
"@vue/shared": "3.4.37" "@vue/shared": "3.4.38"
}, },
"peerDependencies": { "peerDependencies": {
"vue": "3.4.37" "vue": "3.4.38"
} }
}, },
"node_modules/@vue/shared": { "node_modules/@vue/shared": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.37.tgz", "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.38.tgz",
"integrity": "sha512-nIh8P2fc3DflG8+5Uw8PT/1i17ccFn0xxN/5oE9RfV5SVnd7G0XEFRwakrnNFE/jlS95fpGXDVG5zDETS26nmg==", "integrity": "sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@vue/tsconfig": { "node_modules/@vue/tsconfig": {
@@ -1489,6 +1486,186 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@vueuse/core": {
"version": "10.11.1",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.1.tgz",
"integrity": "sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==",
"license": "MIT",
"dependencies": {
"@types/web-bluetooth": "^0.0.20",
"@vueuse/metadata": "10.11.1",
"@vueuse/shared": "10.11.1",
"vue-demi": ">=0.14.8"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/core/node_modules/vue-demi": {
"version": "0.14.10",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz",
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
"hasInstallScript": true,
"license": "MIT",
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vueuse/integrations": {
"version": "10.11.1",
"resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.11.1.tgz",
"integrity": "sha512-Y5hCGBguN+vuVYTZmdd/IMXLOdfS60zAmDmFYc4BKBcMUPZH1n4tdyDECCPjXm0bNT3ZRUy1xzTLGaUje8Xyaw==",
"license": "MIT",
"dependencies": {
"@vueuse/core": "10.11.1",
"@vueuse/shared": "10.11.1",
"vue-demi": ">=0.14.8"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"async-validator": "^4",
"axios": "^1",
"change-case": "^4",
"drauu": "^0.3",
"focus-trap": "^7",
"fuse.js": "^6",
"idb-keyval": "^6",
"jwt-decode": "^3",
"nprogress": "^0.2",
"qrcode": "^1.5",
"sortablejs": "^1",
"universal-cookie": "^6"
},
"peerDependenciesMeta": {
"async-validator": {
"optional": true
},
"axios": {
"optional": true
},
"change-case": {
"optional": true
},
"drauu": {
"optional": true
},
"focus-trap": {
"optional": true
},
"fuse.js": {
"optional": true
},
"idb-keyval": {
"optional": true
},
"jwt-decode": {
"optional": true
},
"nprogress": {
"optional": true
},
"qrcode": {
"optional": true
},
"sortablejs": {
"optional": true
},
"universal-cookie": {
"optional": true
}
}
},
"node_modules/@vueuse/integrations/node_modules/vue-demi": {
"version": "0.14.10",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz",
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
"hasInstallScript": true,
"license": "MIT",
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vueuse/metadata": {
"version": "10.11.1",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.1.tgz",
"integrity": "sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/shared": {
"version": "10.11.1",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.1.tgz",
"integrity": "sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==",
"license": "MIT",
"dependencies": {
"vue-demi": ">=0.14.8"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/shared/node_modules/vue-demi": {
"version": "0.14.10",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz",
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
"hasInstallScript": true,
"license": "MIT",
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.12.1", "version": "8.12.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
@@ -1579,9 +1756,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.7.4", "version": "1.7.6",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.6.tgz",
"integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "integrity": "sha512-Ekur6XDwhnJ5RgOCaxFnXyqlPALI3rVeukZMwOdfghW7/wGz784BYKiQq+QD8NPcr91KRo30KfHOchyijwWw7g==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.6",
@@ -1787,6 +1964,12 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/discord-api-types": {
"version": "0.37.98",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.98.tgz",
"integrity": "sha512-xsH4UwmnCQl4KjAf01/p9ck9s+/vDqzHbUxPOBzo8fcVUa/hQG6qInD7Cr44KAuCM+xCxGJFSAUx450pBrX0+g==",
"license": "MIT"
},
"node_modules/doctrine": { "node_modules/doctrine": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@@ -1813,9 +1996,9 @@
} }
}, },
"node_modules/entities": { "node_modules/entities": {
"version": "5.0.0", "version": "4.5.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-5.0.0.tgz", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
"integrity": "sha512-BeJFvFRJddxobhvEdm5GqHzRV/X+ACeuw0/BuuxsCh1EUZcAIz8+kYmBp/LrQuloy6K1f3a0M7+IhmZ7QnkISA==", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"engines": { "engines": {
"node": ">=0.12" "node": ">=0.12"
@@ -2256,6 +2439,15 @@
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/focus-trap": {
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz",
"integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==",
"license": "MIT",
"dependencies": {
"tabbable": "^6.2.0"
}
},
"node_modules/follow-redirects": { "node_modules/follow-redirects": {
"version": "1.15.6", "version": "1.15.6",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
@@ -2678,6 +2870,7 @@
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"braces": "^3.0.3", "braces": "^3.0.3",
"picomatch": "^2.3.1" "picomatch": "^2.3.1"
@@ -3199,9 +3392,9 @@
} }
}, },
"node_modules/rollup": { "node_modules/rollup": {
"version": "4.20.0", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.2.tgz",
"integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==", "integrity": "sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -3215,22 +3408,22 @@
"npm": ">=8.0.0" "npm": ">=8.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.20.0", "@rollup/rollup-android-arm-eabi": "4.21.2",
"@rollup/rollup-android-arm64": "4.20.0", "@rollup/rollup-android-arm64": "4.21.2",
"@rollup/rollup-darwin-arm64": "4.20.0", "@rollup/rollup-darwin-arm64": "4.21.2",
"@rollup/rollup-darwin-x64": "4.20.0", "@rollup/rollup-darwin-x64": "4.21.2",
"@rollup/rollup-linux-arm-gnueabihf": "4.20.0", "@rollup/rollup-linux-arm-gnueabihf": "4.21.2",
"@rollup/rollup-linux-arm-musleabihf": "4.20.0", "@rollup/rollup-linux-arm-musleabihf": "4.21.2",
"@rollup/rollup-linux-arm64-gnu": "4.20.0", "@rollup/rollup-linux-arm64-gnu": "4.21.2",
"@rollup/rollup-linux-arm64-musl": "4.20.0", "@rollup/rollup-linux-arm64-musl": "4.21.2",
"@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", "@rollup/rollup-linux-powerpc64le-gnu": "4.21.2",
"@rollup/rollup-linux-riscv64-gnu": "4.20.0", "@rollup/rollup-linux-riscv64-gnu": "4.21.2",
"@rollup/rollup-linux-s390x-gnu": "4.20.0", "@rollup/rollup-linux-s390x-gnu": "4.21.2",
"@rollup/rollup-linux-x64-gnu": "4.20.0", "@rollup/rollup-linux-x64-gnu": "4.21.2",
"@rollup/rollup-linux-x64-musl": "4.20.0", "@rollup/rollup-linux-x64-musl": "4.21.2",
"@rollup/rollup-win32-arm64-msvc": "4.20.0", "@rollup/rollup-win32-arm64-msvc": "4.21.2",
"@rollup/rollup-win32-ia32-msvc": "4.20.0", "@rollup/rollup-win32-ia32-msvc": "4.21.2",
"@rollup/rollup-win32-x64-msvc": "4.20.0", "@rollup/rollup-win32-x64-msvc": "4.21.2",
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },
@@ -3379,6 +3572,12 @@
"url": "https://opencollective.com/unts" "url": "https://opencollective.com/unts"
} }
}, },
"node_modules/tabbable": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz",
"integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==",
"license": "MIT"
},
"node_modules/text-table": { "node_modules/text-table": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -3422,9 +3621,9 @@
} }
}, },
"node_modules/tslib": { "node_modules/tslib": {
"version": "2.6.3", "version": "2.7.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==",
"dev": true, "dev": true,
"license": "0BSD" "license": "0BSD"
}, },
@@ -3455,9 +3654,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.4.5", "version": "5.5.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
"devOptional": true, "devOptional": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"bin": { "bin": {
@@ -3468,15 +3667,6 @@
"node": ">=14.17" "node": ">=14.17"
} }
}, },
"node_modules/undici-types": {
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT",
"optional": true,
"peer": true
},
"node_modules/uri-js": { "node_modules/uri-js": {
"version": "4.4.1", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
@@ -3495,15 +3685,15 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "5.4.0", "version": "5.4.2",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.0.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.2.tgz",
"integrity": "sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg==", "integrity": "sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"esbuild": "^0.21.3", "esbuild": "^0.21.3",
"postcss": "^8.4.40", "postcss": "^8.4.41",
"rollup": "^4.13.0" "rollup": "^4.20.0"
}, },
"bin": { "bin": {
"vite": "bin/vite.js" "vite": "bin/vite.js"
@@ -3562,16 +3752,16 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/vue": { "node_modules/vue": {
"version": "3.4.37", "version": "3.4.38",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.37.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.38.tgz",
"integrity": "sha512-3vXvNfkKTBsSJ7JP+LyR7GBuwQuckbWvuwAid3xbqK9ppsKt/DUvfqgZ48fgOLEfpy1IacL5f8QhUVl77RaI7A==", "integrity": "sha512-f0ZgN+mZ5KFgVv9wz0f4OgVKukoXtS3nwET4c2vLBGQR50aI8G0cqbFtLlX9Yiyg3LFGBitruPHt2PxwTduJEw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-dom": "3.4.37", "@vue/compiler-dom": "3.4.38",
"@vue/compiler-sfc": "3.4.37", "@vue/compiler-sfc": "3.4.38",
"@vue/runtime-dom": "3.4.37", "@vue/runtime-dom": "3.4.38",
"@vue/server-renderer": "3.4.37", "@vue/server-renderer": "3.4.38",
"@vue/shared": "3.4.37" "@vue/shared": "3.4.38"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": "*" "typescript": "*"
@@ -3613,6 +3803,23 @@
"eslint": ">=6.0.0" "eslint": ">=6.0.0"
} }
}, },
"node_modules/vue-final-modal": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/vue-final-modal/-/vue-final-modal-4.5.4.tgz",
"integrity": "sha512-wYunoN89Ago2d6p/hevyo4KSfar1HxScllS6FaHujCGyx69fsb40YPGzN17bk9K68daYAgrJ1inxv+fvhIGv5A==",
"license": "MIT",
"dependencies": {
"@vueuse/core": "^10.5.0",
"@vueuse/integrations": "^10.5.0",
"focus-trap": "^7.5.4"
},
"peerDependencies": {
"@vueuse/core": ">=10.0.0",
"@vueuse/integrations": ">=10.0.0",
"focus-trap": ">=7.2.0",
"vue": ">=3.2.0"
}
},
"node_modules/vue-i18n": { "node_modules/vue-i18n": {
"version": "9.14.0", "version": "9.14.0",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.14.0.tgz", "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.14.0.tgz",
@@ -3633,6 +3840,18 @@
"vue": "^3.0.0" "vue": "^3.0.0"
} }
}, },
"node_modules/vue-loading-overlay": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/vue-loading-overlay/-/vue-loading-overlay-6.0.5.tgz",
"integrity": "sha512-PYM6FM8INbmwlds/eCoELo3J3/YXfjbMzAQ7BfnfFq9hHeIQ69yLgJHXHSRRHZLPfyYbQMwh0BUAuBE125DK7g==",
"license": "MIT",
"engines": {
"node": ">=12.13.0"
},
"peerDependencies": {
"vue": "^3.2.0"
}
},
"node_modules/vue-router": { "node_modules/vue-router": {
"version": "4.4.3", "version": "4.4.3",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.4.3.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.4.3.tgz",
@@ -3649,14 +3868,14 @@
} }
}, },
"node_modules/vue-tsc": { "node_modules/vue-tsc": {
"version": "2.0.29", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.0.29.tgz", "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.1.2.tgz",
"integrity": "sha512-MHhsfyxO3mYShZCGYNziSbc63x7cQ5g9kvijV7dRe1TTXBRLxXyL0FnXWpUF1xII2mJ86mwYpYsUmMwkmerq7Q==", "integrity": "sha512-PH1BDxWT3eaPhl73elyZj6DV0nR3K4IFoUM1sGzMXXQneovVUwHQytdSyAHiED5MtEINGSHpL/Hs9ch+c/tDTw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@volar/typescript": "~2.4.0-alpha.18", "@volar/typescript": "~2.4.1",
"@vue/language-core": "2.0.29", "@vue/language-core": "2.1.2",
"semver": "^7.5.4" "semver": "^7.5.4"
}, },
"bin": { "bin": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "zac-mainframe-front", "name": "zac-mainframe-front",
"version": "0.1.0", "version": "0.2.0",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
@@ -12,6 +12,9 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/" "format": "prettier --write src/"
}, },
"//": [
"Garder eslint à la version 8.57.0 pour éviter un problème de dépendance"
],
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^6.6.0", "@fortawesome/fontawesome-free": "^6.6.0",
"@fortawesome/fontawesome-svg-core": "^6.6.0", "@fortawesome/fontawesome-svg-core": "^6.6.0",
@@ -19,28 +22,31 @@
"@fortawesome/free-regular-svg-icons": "^6.6.0", "@fortawesome/free-regular-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/vue-fontawesome": "^3.0.8", "@fortawesome/vue-fontawesome": "^3.0.8",
"axios": "^1.7.4", "axios": "^1.7.6",
"discord-api-types": "^0.37.98",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"js-confetti": "^0.12.0", "js-confetti": "^0.12.0",
"pinia": "^2.2.2", "pinia": "^2.2.2",
"vue": "^3.4.29", "vue": "^3.4.38",
"vue-cookies": "^1.8.4", "vue-cookies": "^1.8.4",
"vue-final-modal": "^4.5.4",
"vue-i18n": "^9.14.0", "vue-i18n": "^9.14.0",
"vue-router": "^4.3.3" "vue-loading-overlay": "^6.0.5",
"vue-router": "^4.4.3"
}, },
"devDependencies": { "devDependencies": {
"@rushstack/eslint-patch": "^1.8.0", "@rushstack/eslint-patch": "^1.10.4",
"@tsconfig/node20": "^20.1.4", "@tsconfig/node20": "^20.1.4",
"@vitejs/plugin-vue": "^5.0.5", "@vitejs/plugin-vue": "^5.1.3",
"@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0", "@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.5.1", "@vue/tsconfig": "^0.5.1",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-plugin-vue": "^9.23.0", "eslint-plugin-vue": "^9.27.0",
"npm-run-all2": "^6.2.0", "npm-run-all2": "^6.2.2",
"prettier": "^3.2.5", "prettier": "^3.3.3",
"typescript": "~5.4.0", "typescript": "~5.5.4",
"vite": "^5.3.1", "vite": "^5.4.2",
"vue-tsc": "^2.0.21" "vue-tsc": "^2.1.2"
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
public/question-square-128.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
public/question-square-256.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
public/question-square-48.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
public/question-square-512.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48" version="1.1">
<g id="surface1">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 11.816406 42.492188 L 36.203125 42.492188 C 40.402344 42.492188 42.492188 40.402344 42.492188 36.265625 L 42.492188 11.734375 C 42.492188 7.597656 40.402344 5.507812 36.203125 5.507812 L 11.816406 5.507812 C 7.636719 5.507812 5.507812 7.578125 5.507812 11.734375 L 5.507812 36.265625 C 5.507812 40.421875 7.636719 42.492188 11.816406 42.492188 Z M 11.875 39.257812 C 9.867188 39.257812 8.742188 38.191406 8.742188 36.105469 L 8.742188 11.894531 C 8.742188 9.808594 9.867188 8.742188 11.875 8.742188 L 36.144531 8.742188 C 38.132812 8.742188 39.257812 9.808594 39.257812 11.894531 L 39.257812 36.105469 C 39.257812 38.191406 38.132812 39.257812 36.144531 39.257812 Z M 23.609375 28.128906 C 24.632812 28.128906 25.234375 27.484375 25.234375 26.703125 L 25.234375 26.460938 C 25.234375 25.335938 25.898438 24.613281 27.285156 23.6875 C 29.234375 22.402344 30.621094 21.238281 30.621094 18.828125 C 30.621094 15.492188 27.644531 13.683594 24.230469 13.683594 C 20.796875 13.683594 18.527344 15.332031 17.964844 17.179688 C 17.863281 17.5 17.800781 17.84375 17.800781 18.164062 C 17.800781 19.066406 18.503906 19.550781 19.167969 19.550781 C 20.3125 19.550781 20.496094 18.949219 21.136719 18.183594 C 21.800781 17.078125 22.765625 16.417969 24.109375 16.417969 C 25.9375 16.417969 27.125 17.460938 27.125 18.988281 C 27.125 20.355469 26.28125 21.015625 24.53125 22.242188 C 23.085938 23.246094 22 24.3125 22 26.28125 L 22 26.542969 C 22 27.585938 22.582031 28.128906 23.609375 28.128906 Z M 23.566406 34.113281 C 24.734375 34.113281 25.738281 33.191406 25.738281 32.027344 C 25.738281 30.859375 24.753906 29.9375 23.566406 29.9375 C 22.382812 29.9375 21.398438 30.878906 21.398438 32.027344 C 21.398438 33.171875 22.402344 34.113281 23.566406 34.113281 Z M 23.566406 34.113281 "/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,15 +1,20 @@
<script setup lang="ts"> <script setup lang="ts">
import { RouterView, RouterLink } from 'vue-router'
import { ref, provide, onMounted } from 'vue' import { ref, provide, onMounted } from 'vue'
import { useLoading } from 'vue-loading-overlay'
import { ModalsContainer, useModal } from 'vue-final-modal'
import { checkUser, checkBots, checkUserGuilds } from '@/utils/discord' import { checkUser, checkBots, checkUserGuilds } from '@/utils/discord'
import AvatarModal from './components/AvatarModal.vue'
import type { Ref } from 'vue' import type { Ref } from 'vue'
import type { User, Guild } from '@/utils/discord' import type { APIUser, APIGuild } from 'discord-api-types/v10'
// État de l'utilisateur, des bots et de leur avatar // État de l'utilisateur, des bots et de leur avatar
const user: Ref<User | null> = ref(null) const user: Ref<APIUser | null> = ref(null)
const bots: Ref<User[] | null> = ref([]) const bots: Ref<APIUser[] | null> = ref([])
const guilds: Ref<Guild[] | null> = ref([]) const guilds: Ref<APIGuild[] | null> = ref([])
const avatar = ref('/question-square.svg') const avatar = ref('/question-square-48.png')
const ready = ref(false) const ready = ref(false)
provide('user', user) // Fournit l'utilisateur aux composants enfants provide('user', user) // Fournit l'utilisateur aux composants enfants
@@ -17,14 +22,25 @@ provide('bots', bots) // Fournit les bots aux composants enfants
provide('guilds', guilds) // Fournit les guilds aux composants enfants provide('guilds', guilds) // Fournit les guilds aux composants enfants
provide('ready', ready) // Fournit l'état de préparation aux composants enfants provide('ready', ready) // Fournit l'état de préparation aux composants enfants
// Affiche un écran de chargement
const $loading = useLoading({ color: '#eee', opacity: 0 })
// Modèle du popup de l'avatar
const { open } = useModal({ component: AvatarModal })
// Cycle de vie
onMounted(async () => { onMounted(async () => {
const loader = $loading.show()
user.value = await checkUser() // Vérifie l'authentification lors du montage du composant user.value = await checkUser() // Vérifie l'authentification lors du montage du composant
if (user.value) { if (user.value) {
avatar.value = `https://cdn.discordapp.com/avatars/${user.value.id}/${user.value.avatar}?size=48` avatar.value = `https://cdn.discordapp.com/avatars/${user.value.id}/${user.value.avatar}?size=48`
bots.value = await checkBots() // Vérifie les bots bots.value = await checkBots() // Vérifie les bots
guilds.value = await checkUserGuilds() // Vérifie les guilds de l'utilisateur guilds.value = await checkUserGuilds() // Vérifie les guilds de l'utilisateur
ready.value = true
} }
ready.value = true
loader.hide()
}) })
</script> </script>
@@ -37,8 +53,8 @@ onMounted(async () => {
<nav class="vc"> <nav class="vc">
<router-link to="/">Index</router-link> <router-link to="/">Index</router-link>
<p>|</p> <p>|</p>
<router-link to="/discord">Discord</router-link> <router-link to="/discord/dashboard">Discord</router-link>
<img class="rounded" :src=avatar> <img class="rounded" @click="() => open()" :src=avatar>
</nav> </nav>
</header> </header>
@@ -47,6 +63,8 @@ onMounted(async () => {
<component :is="Component" /> <component :is="Component" />
</transition> </transition>
</router-view> </router-view>
<ModalsContainer />
</template> </template>
<style scoped> <style scoped>

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>

Before

Width:  |  Height:  |  Size: 276 B

View File

@@ -0,0 +1,71 @@
<script setup lang="ts">
import { inject } from 'vue'
import { VueFinalModal } from 'vue-final-modal'
import { login, logout } from '@/utils/discord'
import type { Ref } from 'vue'
import type { APIUser } from 'discord-api-types/v10'
// État de l'utilisateur
const user: Ref<APIUser | null> | undefined = inject('user')
// Variable titre depuis le parent
defineProps<{
title?: string
}>()
// Événement de mise à jour du modal
const emit = defineEmits<{
(e: 'update:modelValue', modelValue: boolean): void
}>()
</script>
<template>
<VueFinalModal @update:model-value="val => emit('update:modelValue', val)" class="confirm-modal"
content-transition="vfm-fade" overlay-transition="vfm-fade" content-class="confirm-modal-content">
<!--<h1>{{ title }}</h1>
<slot />-->
<div v-if="user">
<p>Vous êtes connecté en tant que</p>
{{ user.username }}
{{ user.id }}
<p>avec Discord.</p>
<button @click="emit('update:modelValue', false); logout()">Se déconnecter </button>
</div>
<div v-else>
<p>Vous n'êtes pas connecté.</p>
<p>Cliquez sur le bouton ci-dessous, vous serez redirigé sur une page de connexion Discord !</p>
<button @click="emit('update:modelValue', false); login()">Se connecter avec Discord</button>
</div>
</VueFinalModal>
</template>
<style>
.confirm-modal {
display: flex;
justify-content: center;
align-items: center;
}
.confirm-modal-content {
display: flex;
flex-direction: column;
padding: 1rem;
background: #126;
border-radius: 0.5rem;
}
.confirm-modal-content>*+* {
margin: 0.5rem 0;
}
.confirm-modal-content h1 {
font-size: 1.375rem;
}
.confirm-modal-content button {
margin: 0.25rem 0 0 auto;
padding: 0 8px;
border: 1px solid;
border-radius: 0.5rem;
}
</style>

View File

@@ -3,20 +3,22 @@ import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons' import { fas } from '@fortawesome/free-solid-svg-icons'
import { fab } from '@fortawesome/free-brands-svg-icons' import { fab } from '@fortawesome/free-brands-svg-icons'
import { createApp } from 'vue' import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { createI18n } from 'vue-i18n' import { createI18n } from 'vue-i18n'
import cookies from 'vue-cookies' import { createVfm } from 'vue-final-modal'
import { LoadingPlugin } from 'vue-loading-overlay'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import './assets/main.css' import './assets/main.css'
import 'vue-final-modal/style.css'
import 'vue-loading-overlay/dist/css/index.css'
library.add(fas, fab) library.add(fas, fab)
createApp(App) createApp(App)
.use(createPinia())
.use(createI18n({})) .use(createI18n({}))
.use(createVfm())
.use(LoadingPlugin)
.use(router) .use(router)
.use(cookies)
.component('font-awesome-icon', FontAwesomeIcon) .component('font-awesome-icon', FontAwesomeIcon)
.mount('#app') .mount('#app')

View File

@@ -28,9 +28,28 @@ const router = createRouter({
meta: { title: 'MainFrame | Discord', discordAuth: false }, meta: { title: 'MainFrame | Discord', discordAuth: false },
children: [ children: [
{ {
path: '', path: 'dashboard',
name: 'dashboard', name: 'dashboard',
component: () => import('../views/Discord/DashboardView.vue') component: () => import('../views/Discord/DashboardView.vue'),
children: [
{
path: '',
name: 'dashboardMain',
component: () => import('../views/Discord/Dashboard/MainView.vue')
},
{
path: 'bot/:botId(\\d+)',
name: 'dashboardBot',
component: () => import('../views/Discord/Dashboard/BotView.vue'),
props: true
},
{
path: 'bot/:botId(\\d+)/guild/:guildId(\\d+)',
name: 'dashboardGuild',
component: () => import('../views/Discord/Dashboard/GuildView.vue'),
props: true
}
]
}, },
{ {
path: 'config', path: 'config',
@@ -49,7 +68,7 @@ const router = createRouter({
path: '/:pathMatch(.*)*', path: '/:pathMatch(.*)*',
name: '404', name: '404',
component: () => import('../views/404View.vue'), component: () => import('../views/404View.vue'),
meta: { title: 'MainFrame | 404' }, meta: { title: 'MainFrame | 404' }
} }
] ]
}) })

View File

@@ -2,248 +2,77 @@ import axios from 'axios'
// Fonction pour rediriger vers Discord pour l'authentification // Fonction pour rediriger vers Discord pour l'authentification
export function login() { export function login() {
window.location.href = import.meta.env.VITE_BACKEND_URL + '/discord/auth/redirect'; window.location.href = import.meta.env.VITE_BACKEND_URL + '/discord/auth/redirect'
} }
// Fonction pour se déconnecter // Fonction pour se déconnecter
export async function logout() { export async function logout() {
try { try {
console.log('1111') const response = await axios.get(import.meta.env.VITE_BACKEND_URL + '/discord/auth/logout', {
const response = await axios.get(import.meta.env.VITE_BACKEND_URL + '/discord/auth/logout', { withCredentials: true }) withCredentials: true
console.log('1112') })
console.log(response.data) console.log(response.data)
console.log('1113') window.location.href = '/discord/logout'
window.location.href = '/discord/logout'; } catch (err) {
} catch (err) { return null } return null
}
} }
// Fonction pour récupérer l'état des bots // Fonction pour récupérer l'état des bots
export async function checkBots() { export async function checkBots() {
try { try {
const response = await axios.get(import.meta.env.VITE_BACKEND_URL + '/discord/bots', { withCredentials: true }) const response = await axios.get(import.meta.env.VITE_BACKEND_URL + '/discord/bots', {
return response.data withCredentials: true
} catch (err) { return null } })
return response.data
} catch (err) {
return null
}
} }
// Fonction pour récupérer les informations de l'utilisateur // Fonction pour récupérer les informations de l'utilisateur
export async function checkUser() { export async function checkUser() {
try { try {
const response = await axios.get(import.meta.env.VITE_BACKEND_URL + '/discord/user', { withCredentials: true }) const response = await axios.get(import.meta.env.VITE_BACKEND_URL + '/discord/user', {
return response.data withCredentials: true
} catch (err) { return null } })
return response.data
} catch (err) {
return null
}
} }
// Fonction pour récupérer les guilds de l'utilisateur // Fonction pour récupérer les guilds de l'utilisateur
export async function checkUserGuilds() { export async function checkUserGuilds() {
try { try {
const response = await axios.get(import.meta.env.VITE_BACKEND_URL + '/discord/user/guilds', { withCredentials: true }) const response = await axios.get(import.meta.env.VITE_BACKEND_URL + '/discord/user/guilds', {
return response.data withCredentials: true
} catch (err) { return null } })
return response.data
} catch (err) {
return null
}
} }
// Types de données Discord export async function getUser(userId: String) {
export type snowflake = string // A unique identifier for an object within Discord try {
export type ISO8601 = string // Date and hour timestamp "2017-07-11T17:27:07.299000+00:00" const response = await axios.get(import.meta.env.VITE_BACKEND_URL + '/discord/user/' + userId, {
withCredentials: true
})
return response.data
} catch (err) {
return null
}
}
export interface User { export async function getGuild(guildId: String) {
id: snowflake // the user's id try {
username: string // the user's username, not unique across the platform const response = await axios.get(
discriminator: string // the user's Discord-tag import.meta.env.VITE_BACKEND_URL + '/discord/guild/' + guildId,
global_name?: string // the user's display name, if it is set. For bots, this is the application name { withCredentials: true }
avatar?: string // the user's avatar hash )
bot?: boolean // whether the user belongs to an OAuth2 application return response.data
system?: boolean // whether the user is an Official Discord System user (part of the urgent message system) } catch (err) {
mfa_enabled?: boolean // whether the user has two factor enabled on their account return null
banner?: string // the user's banner hash }
accent_color?: number // the user's banner color encoded as an integer representation of hexadecimal color code
locale?: string // the user's chosen language option
verified?: boolean // whether the email on this account has been verified
email?: string // the user's email
flags?: number // the flags on a user's account
premium_type?: number // the type of Nitro subscription on a user's account
public_flags?: number // the public flags on a user's account
avatar_decoration_data?: AvatarDecoration // data for the user's avatar decoration
} }
export interface AvatarDecoration {
asset: string // the avatar decoration hash
sku_id: snowflake // id of the avatar decoration's SKU
}
export interface Guild {
id: snowflake // guild id
name: string // guild name (2-100 characters, excluding trailing and leading whitespace)
icon?: string // icon hash
icon_hash?: string // icon hash, returned when in the template object
splash?: string // splash hash
discovery_splash?: string // discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
owner?: boolean // true if the user is the owner of the guild
owner_id: snowflake // id of owner
permissions?: string // total permissions for the user in the guild (excludes overwrites and implicit permissions)
region?: string // voice region id for the guild (deprecated)
afk_channel_id?: snowflake // id of afk channel
afk_timeout: number // afk timeout in seconds
widget_enabled?: boolean // true if the server widget is enabled
widget_channel_id?: snowflake // the channel id that the widget will generate an invite to, or null if set to no invite
verification_level: number // verification level required for the guild
default_message_notifications: number // default message notifications level
explicit_content_filter: number // explicit content filter level
roles: Role[] // roles in the guild
emojis: Emoji[] // custom guild emojis
features: string[] // enabled guild features
mfa_level: number // required MFA level for the guild
application_id?: snowflake // application id of the guild creator if it is bot-created
system_channel_id?: snowflake // the id of the channel where guild notices such as welcome messages and boost events are posted
system_channel_flags: number // system channel flags
rules_channel_id?: snowflake // the id of the channel where Community guilds can display rules and/or guidelines
max_presences?: number // the maximum number of presences for the guild (null is always returned, apart from the largest of guilds)
max_members?: number // the maximum number of members for the guild
vanity_url_code?: string // the vanity url code for the guild
description?: string // the description of a guild
banner?: string // banner hash
premium_tier: number // premium tier (Server Boost level)
premium_subscription_count?: number // the number of boosts this guild currently has
preferred_locale: string // the preferred locale of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to "en-US"
public_updates_channel_id?: snowflake // the id of the channel where admins and moderators of Community guilds receive notices from Discord
max_video_channel_users?: number // the maximum amount of users in a video channel
max_stage_video_channel_users?: number // the maximum amount of users in a stage video channel
approximate_member_count?: number // approximate number of members in this guild, returned from the GET /guilds/<id> and /users/@me/guilds endpoints when with_counts is true
approximate_presence_count?: number // approximate number of non-offline members in this guild, returned from the GET /guilds/<id> and /users/@me/guilds endpoints when with_counts is true
welcome_screen?: WelcomeScreen // the welcome screen of a Community guild, shown to new members, returned in an Invite's guild object
nsfw_level?: number // guild NSFW level
stickers?: Sticker[] // custom guild stickers
premium_progress_bar_enabled: boolean // whether the guild has the boost progress bar enabled
safety_alerts_channel_id?: snowflake // the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
}
export interface GuildMember {
user?: User // the user this guild member represents
nick?: string // this user's guild nickname
avatar?: string // the member's guild avatar hash
roles: snowflake[] // array of role object ids
joined_at: ISO8601 // when the user joined the guild
premium_since?: ISO8601 // when the user started boosting the guild
deaf: boolean // whether the user is deafened in voice channels
mute: boolean // whether the user is muted in voice channels
flags: number // guild member flags represented as a bit set, defaults to 0
pending?: boolean // whether the user has not yet passed the guild's Membership Screening requirements
permissions?: string // total permissions of the member in the channel, including overwrites, returned when in the interaction object
communication_disabled_until?: ISO8601 // when the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out
avatar_decoration_data?: AvatarDecoration // data for the member's guild avatar decoration
}
export interface Role {
id: snowflake // role id
name: string // role name
color: number // integer representation of hexadecimal color code
hoist: boolean // if this role is pinned in the user listing
icon?: string // role icon hash
unicode_emoji?: string // role unicode emoji
position: number // position of this role (roles with the same position are sorted by id)
permissions: string // permission bit set
managed: boolean // whether this role is managed by an integration
mentionable: boolean // whether this role is mentionable
tags?: RoleTags // the tags this role has
flags: number // role flags combined as a bitfield
}
export interface RoleTags {
bot_id?: snowflake // the id of the bot this role belongs to
integration_id?: snowflake // the id of the integration this role belongs to
premium_subscriber?: null // whether this is the guild's Booster role
subscription_listing_id?: snowflake // the id of this role's subscription sku and listing
available_for_purchase?: null // whether this role is available for purchase
guild_connections?: null // whether this role is a guild's linked role
}
export interface Emoji {
id?: snowflake // emoji id
name?: string // (can be null only in reaction emoji objects) // emoji name
roles?: snowflake[] // roles allowed to use this emoji
user?: User // user that created this emoji
require_colons?: boolean // whether this emoji must be wrapped in colons
managed?: boolean // whether this emoji is managed
animated?: boolean // whether this emoji is animated
available?: boolean // whether this emoji can be used, may be false due to loss of Server Boosts
}
export interface Sticker {
id: snowflake // id of the sticker
pack_id?: snowflake // for standard stickers, id of the pack the sticker is from
name: string // name of the sticker
description?: string // description of the sticker
tags: string // autocomplete/suggestion tags for the sticker (max 200 characters)
asset?: string // Deprecated previously the sticker asset hash, now an empty string
type: number // type of sticker
format_type: number // type of sticker format
available?: boolean // whether this guild sticker can be used, may be false due to loss of Server Boosts
guild_id?: snowflake // id of the guild that owns this sticker
user?: User // the user that uploaded the guild sticker
sort_value?: number // the standard sticker's sort order within its pack
}
export interface WelcomeScreen {
description?: string // the server description shown in the welcome screen
welcome_channels: WelcomeChannel[] // the channels shown in the welcome screen, up to 5
}
export interface WelcomeChannel {
channel_id: snowflake // the channel's id
description: string // the description shown for the channel
emoji_id?: snowflake // the emoji id, if the emoji is custom
emoji_name?: string // the emoji name if custom, the unicode character if standard, or null if no emoji is set
}
export interface Channel {
id: snowflake // the id of this channel
type: number // the type of channel
guild_id?: snowflake // the id of the guild (may be missing for some channel objects received over gateway guild dispatches)
position?: number // sorting position of the channel (channels with the same position are sorted by id)
permission_overwrites?: [] // array of overwrite objects // explicit permission overwrites for members and roles
name?: string // the name of the channel (1-100 characters)
topic?: string // the channel topic (0-4096 characters for GUILD_FORUM and GUILD_MEDIA channels, 0-1024 characters for all others)
nsfw?: boolean // whether the channel is nsfw
last_message_id?: snowflake // the id of the last message sent in this channel (or thread for GUILD_FORUM or GUILD_MEDIA channels) (may not point to an existing or valid message or thread)
bitrate?: number // the bitrate (in bits) of the voice channel
user_limit?: number // the user limit of the voice channel
rate_limit_per_user?: number // amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected
recipients?: User[] // the recipients of the DM
icon?: string // icon hash of the group DM
owner_id?: snowflake // id of the creator of the group DM or thread
application_id?: snowflake // application id of the group DM creator if it is bot-created
managed?: boolean // for group DM channels: whether the channel is managed by an application via the gdm.join OAuth2 scope
parent_id?: snowflake // for guild channels: id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created
last_pin_timestamp?: ISO8601 // when the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned.
rtc_region?: string // voice region id for the voice channel, automatic when set to null
video_quality_mode?: number // the camera video quality mode of the voice channel, 1 when not present
message_count?: number // number of messages (not including the initial message or deleted messages) in a thread.
member_count?: number // an approximate count of users in a thread, stops counting at 50
thread_metadata?: ThreadMetadata // thread-specific fields not needed by other channels
member?: ThreadMember // thread member object for the current user, if they have joined the thread, only included on certain API endpoints
default_auto_archive_duration?: number // default duration, copied onto newly created threads, in minutes, threads will stop showing in the channel list after the specified period of inactivity, can be set to: 60, 1440, 4320, 10080
permissions?: string // computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a slash command interaction. This does not include implicit permissions, which may need to be checked separately
flags?: number // channel flags combined as a bitfield
total_message_sent?: number // number of messages ever sent in a thread, it's similar to message_count on message creation, but will not decrement the number when a message is deleted
available_tags?: Tag[] // the set of tags that can be used in a GUILD_FORUM or a GUILD_MEDIA channel
applied_tags?: snowflake[] // the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM or a GUILD_MEDIA channel
default_reaction_emoji?: DefaultReaction // the emoji to show in the add reaction button on a thread in a GUILD_FORUM or a GUILD_MEDIA channel
default_thread_rate_limit_per_user?: number // the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update.
default_sort_order?: number // the default sort order type used to order posts in GUILD_FORUM and GUILD_MEDIA channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin
default_forum_layout?: number // the default forum layout view used to display posts in GUILD_FORUM channels. Defaults to 0, which indicates a layout view has not been set by a channel admin
}
export interface Tag {
id: snowflake // the id of the tag
name: string // the name of the tag (0-20 characters)
moderated: boolean // whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission
emoji_id?: snowflake // the id of a guild's custom emoji
emoji_name?: string // the unicode character of the emoji
}
export interface ThreadMetadata {
archived: boolean // whether the thread is archived
auto_archive_duration: number // the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080
archive_timestamp: ISO8601 // timestamp when the thread's archive status was last changed, used for calculating recent activity
locked: boolean // whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it
invitable?: boolean // whether non-moderators can add other non-moderators to a thread; only available on private threads
create_timestamp?: ISO8601 // timestamp when the thread was created; only populated for threads created after 2022-01-09
}
export interface ThreadMember {
id?: snowflake // ID of the thread
user_id?: snowflake // ID of the user
join_timestamp: ISO8601 // Time the user last joined the thread
flags: number // Any user-thread settings, currently only used for notifications
member?: GuildMember // Additional information about the user
}
export interface DefaultReaction {
emoji_id?: snowflake // the id of a guild's custom emoji
emoji_name?: string // the unicode character of the emoji
}

View File

@@ -1,9 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import { RouterLink } from 'vue-router' import { inject } from 'vue'
import type { Ref } from 'vue'
const ready: Ref<boolean> | undefined = inject('ready')
</script> </script>
<template> <template>
<div class="main"> <div class="main" v-if="ready">
<h1>Oula ! (Erreur 404)</h1> <h1>Oula ! (Erreur 404)</h1>
<h3> <h3>
Je sais pas ce que t'as fais mais tu es tombé sur une page inexistante. Je sais pas ce que t'as fais mais tu es tombé sur une page inexistante.

View File

@@ -0,0 +1,52 @@
<script setup lang="ts">
import { ref, provide, inject, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { useLoading } from 'vue-loading-overlay'
import { getUser } from '@/utils/discord'
import type { Ref } from 'vue'
import type { APIUser, APIGuild } from 'discord-api-types/v10'
// Récupérer le bot
defineProps({ botId: String })
const route = useRoute()
const bot = ref({} as APIUser)
provide('bot', bot) // Fournit le bot aux composants enfants
// État des guilds
const guilds = inject('guilds') as Ref<APIGuild[] | null>
const guildsAdmin = ref([] as APIGuild[] | undefined)
guildsAdmin.value = guilds?.value?.filter(guild => guild.permissions === '2251799813685247')
function guildIcon(guild: APIGuild) { return guild.icon ? `https://cdn.discordapp.com/icons/${guild.id}/${guild.icon}.png?size=128` : '/question-square-128-white.png' }
const $loading = useLoading({ color: '#eee', opacity: 0 })
onMounted(async () => {
const loader = $loading.show()
bot.value = await getUser(route.params.botId as string)
if (bot.value) loader.hide()
})
</script>
<template>
<div class="main">
<div class="title">
<h1>Infos du bot {{ bot.username }}</h1>
<div v-if="bot">
<p>ID : {{ bot.id }}.</p>
</div>
<p v-else>...</p>
</div>
<br>
<div v-if="guilds">
<p>Vous avez {{ guilds.length }} guilds.</p>
<p>Voici les guilds vous avez les permissions d'administrateur :</p>
<div v-for="guild in guildsAdmin" :key="guild.id">
<p class="guild-title">{{ guild.name }}</p>
<router-link :to="`${botId}/guild/${guild.id}`"><img class="rounded"
:src="guildIcon(guild)"></router-link>
</div>
</div>
</div>
</template>

View File

@@ -0,0 +1,27 @@
<script setup lang="ts">
import { ref, provide, inject } from 'vue'
import { useRoute } from 'vue-router'
import type { Ref } from 'vue'
import type { APIGuild } from 'discord-api-types/v10'
// Récupérer le bot
defineProps({ guildId: String })
const route = useRoute()
const guilds = inject('guilds') as Ref<APIGuild[] | null>
const guild = ref({} as APIGuild | undefined)
guild.value = guilds.value?.find(guild => guild.id === route.params.guildId)
provide('guild', guild) // Fournit la guild aux composants enfants
</script>
<template>
<div class="main">
<div class="title">
<h1>Infos de la guild {{ guild?.name }}</h1>
<div v-if="guild">
<p>ID : {{ guild.id }}.</p>
</div>
<p v-else>...</p>
</div>
</div>
</template>

View File

@@ -0,0 +1,126 @@
<script setup lang="ts">
import { ref, inject } from 'vue'
import type { Ref } from 'vue'
import type { APIUser, APIGuild } from 'discord-api-types/v10'
// État de l'utilisateur, des bots et des guilds
const user: Ref<APIUser | null> | undefined = inject('user')
const bots: Ref<APIUser[] | null> | undefined = inject('bots')
const guilds = inject('guilds') as Ref<APIGuild[] | null>
function avatar(bot: APIUser) { return bot ? `https://cdn.discordapp.com/avatars/${bot.id}/${bot.avatar}?size=256` : '/question-square-256-white.png' }
const botTamiseur = ref({} as APIUser)
const botGroove = ref({} as APIUser)
const botFunky = ref({} as APIUser)
const botJujul = ref({} as APIUser)
const botChantier = ref({} as APIUser)
if (bots?.value) {
botTamiseur.value = bots.value[0]
botGroove.value = bots.value[1]
botFunky.value = bots.value[2]
botJujul.value = bots.value[3]
botChantier.value = bots.value[4]
}
const jujul = ref(false)
const owner = ref(false)
jujul.value = guilds?.value?.some(guild => guild.id === '796327643783626782' && guild.permissions === '2251799813685247') as boolean
owner.value = user?.value?.id === '223831938346123275'
</script>
<template>
<div class="main">
<div class="title">
<h1>Liste de mes bots</h1>
<div v-if="user">
<p>Vous êtes connecté en tant que {{ user.global_name }}.</p>
<p>Vous avez l'ID {{ user.id }}.</p>
</div>
<div v-else>
<p>Vous n'êtes pas connecté.</p>
<p>Connectez-vous avec le bouton en haut à droite !</p>
</div>
</div>
<div v-if="user" class="bots">
<div>
<p class="bot-title">{{ botGroove.username }}</p>
<router-link :to="`dashboard/bot/${botGroove.id}`"><img class="rounded"
:src="avatar(botGroove)"></router-link>
<p class="bot-desc">Petit chouchou du tamiseur</p>
</div>
<div>
<p style="font-size: 26px">{{ botTamiseur.username }}</p>
<router-link :to="`dashboard/bot/${botTamiseur.id}`"><img class="rounded" style="max-width: 80%"
:src="avatar(botTamiseur)"></router-link>
<p style="font-size: 22px">Le big boss</p>
</div>
<div>
<p class="bot-title">{{ botFunky.username }}</p>
<router-link :to="`dashboard/bot/${botFunky.id}`"><img class="rounded"
:src="avatar(botFunky)"></router-link>
<p class="bot-desc">L'autre , qui le connait ?</p>
</div>
</div>
<div v-if="user" class="bots">
<div>
<p class="bot-title">{{ botJujul.username }}</p>
<router-link v-if="jujul" :to="`dashboard/bot/${botJujul.id}`"><img class="rounded"
:src="avatar(botJujul)"></router-link>
<img v-else style="filter: grayscale(1)" class="rounded" :src="avatar(botJujul)">
<p class="bot-desc">(Réservé pour la streameuse Jujul / Laytho)</p>
</div>
<div>
<p class="bot-title">{{ botChantier.username }}</p>
<router-link v-if="owner" :to="`dashboard/bot/${botChantier.id}`"><img class="rounded"
:src="avatar(botChantier)"></router-link>
<img v-else style="filter: grayscale(1)" class="rounded" :src="avatar(botChantier)">
<p class="bot-desc">(Réservé pour les débug temporaires)</p>
</div>
</div>
</div>
</template>
<style scoped>
.main {
display: flex;
flex-wrap: wrap;
flex-direction: column;
align-items: center;
align-content: stretch;
justify-content: center;
}
.title {
flex: 0.6;
margin-right: auto;
}
.bots {
flex: 1.2;
display: flex;
flex-wrap: wrap;
flex-direction: row;
align-items: center;
text-align: center;
gap: 30px;
div {
flex: 1 1 0;
}
}
.bot-title {
font-size: 20px;
}
.bot-desc {
font-size: 16px;
}
img {
max-width: 60%;
height: auto;
}
</style>

View File

@@ -1,106 +1,5 @@
<script setup lang="ts">
import { ref, inject } from 'vue'
import type { Ref } from 'vue'
import type { User, Guild } from '@/utils/discord'
// État de l'utilisateur et des bots
const user: Ref<User | null> | undefined = inject('user')
const bots: Ref<User[] | null> | undefined = inject('bots')
const guilds: Ref<Guild[] | null> | undefined = inject('guilds')
console.log(guilds)
function avatar(bot: User) { return bot?`https://cdn.discordapp.com/avatars/${bot.id}/${bot.avatar}?size=256` : '' }
const bot1 = ref({} as User)
const bot2 = ref({} as User)
const bot3 = ref({} as User)
const bot4 = ref({} as User)
const bot5 = ref({} as User)
if (bots?.value) {
bot1.value = bots.value[0]
bot2.value = bots.value[1]
bot3.value = bots.value[2]
bot4.value = bots.value[3]
bot5.value = bots.value[4]
}
</script>
<template> <template>
<div class="main"> <router-view v-slot="{ Component }">
<div class="title"> <component :is="Component" />
<h1>Liste de mes bots</h1> </router-view>
<div v-if="user"> </template>
<p>Vous êtes connecté en tant que {{ user.global_name }}.</p>
<p>Vous avez l'ID {{ user.id }}.</p>
</div>
<p v-else>Vous n'êtes pas connecté.</p>
</div>
<div class="bots">
<div>
<p class="bot-title">{{ bot2.username }}</p>
<img class="rounded" :src="avatar(bot2)">
<p class="bot-desc">Petit chouchou du tamiseur</p>
</div>
<div>
<p style="font-size: 26px">{{ bot1.username }}</p>
<img style="max-width: 80%" class="rounded" :src="avatar(bot1)">
<p style="font-size: 22px">Le big boss</p>
</div>
<div>
<p class="bot-title">{{ bot3.username }}</p>
<img class="rounded" :src="avatar(bot3)">
<p class="bot-desc">L'autre , qui le connait ?</p>
</div>
</div>
<div class="bots">
<div>
<p class="bot-title">{{ bot4.username }}</p>
<img class="rounded" :src="avatar(bot4)">
<p class="bot-desc">(Réservé pour la streameuse Jujul / Laytho)</p>
</div>
<div>
<p class="bot-title">{{ bot5.username }}</p>
<img class="rounded" :src="avatar(bot5)">
<p class="bot-desc">(Réservé pour les débug temporaires)</p>
</div>
</div>
</div>
</template>
<style scoped>
.main {
display: flex;
flex-wrap: wrap;
flex-direction: column;
align-items: center;
align-content: stretch;
justify-content: center;
}
.title {
flex: 0.6;
margin-right: auto;
}
.bots {
flex: 1.2;
display: flex;
flex-wrap: wrap;
flex-direction: row;
align-items: center;
text-align: center;
gap: 30px;
div {
flex: 1 1 0;
}
}
.bot-title {
font-size: 20px;
}
.bot-desc {
font-size: 16px;
}
img {
max-width: 60%;
height: auto;
}
</style>

View File

@@ -1,12 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import { inject } from 'vue' import { inject } from 'vue'
import type { Ref } from 'vue' import type { Ref } from 'vue'
import type { User, Guild } from '@/utils/discord' import type { APIUser, APIGuild } from 'discord-api-types/v10'
// État de l'utilisateur et des bots // État de l'utilisateur et des bots
const user: Ref<User | null> | undefined = inject('user') const user: Ref<APIUser | null> | undefined = inject('user')
const bots: Ref<User[] | null> | undefined = inject('bots') const bots: Ref<APIUser[] | null> | undefined = inject('bots')
const guilds: Ref<Guild[] | null> | undefined = inject('guilds') const guilds: Ref<APIGuild[] | null> | undefined = inject('guilds')
if (user) user.value = null if (user) user.value = null
if (bots) bots.value = null if (bots) bots.value = null
if (guilds) guilds.value = null if (guilds) guilds.value = null

View File

@@ -1,22 +1,27 @@
<script setup lang="ts"> <script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router' import { inject, ref } from 'vue'
import { login, logout } from '@/utils/discord' import { useRoute } from 'vue-router'
import { inject } from 'vue'
import type { Ref } from 'vue' import type { Ref } from 'vue'
import type { User } from '@/utils/discord'
// État de l'utilisateur et des bots // État de l'utilisateur
const user: Ref<User | null> | undefined = inject('user')
const ready: Ref<boolean> | undefined = inject('ready') const ready: Ref<boolean> | undefined = inject('ready')
// Récupérer l'ID du bot et de la guild
const route = useRoute()
const botId = ref('')
const guildId = ref('')
botId.value = route.params.botId as string
guildId.value = route.params.guildId as string
</script> </script>
<template> <template>
<div> <div>
<div class="sidenav"> <div class="sidenav">
<router-link to="/discord">Dashboard</router-link> <router-link to="/discord/dashboard">Dashboard</router-link>
<router-link v-show="botId" :to="`/discord/dashboard/bot/${botId}`">Bot</router-link>
<router-link v-show="guildId" :to="`/discord/dashboard/bot/${botId}/guild/${guildId}`">Guild</router-link>
<div class="hl"></div>
<router-link to="/discord/config">Config</router-link> <router-link to="/discord/config">Config</router-link>
<button v-if="!user" @click="login">Se connecter</button>
<button v-if="user" @click="logout">Se déconnecter</button>
</div> </div>
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
@@ -28,9 +33,9 @@ const ready: Ref<boolean> | undefined = inject('ready')
</template> </template>
<style scoped> <style scoped>
.sidenav button { .hl {
position: absolute; height: 2px;
bottom: 60px; background-color: rgb(0, 255, 140);
margin: 10px 0;
} }
</style> </style>

View File

@@ -1,5 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router' import { inject } from 'vue'
import type { Ref } from 'vue'
const ready: Ref<boolean> | undefined = inject('ready')
</script> </script>
<template> <template>
@@ -7,6 +10,7 @@ import { RouterLink, RouterView } from 'vue-router'
<div class="sidenav"> <div class="sidenav">
<router-link to="/">Home</router-link> <router-link to="/">Home</router-link>
<router-link to="/about">About</router-link> <router-link to="/about">About</router-link>
<div class="hl"></div>
<a href="https://github.com/angels-dev" target="_blank"> <a href="https://github.com/angels-dev" target="_blank">
<font-awesome-icon :icon="['fab', 'github']" /> GitHub <font-awesome-icon :icon="['fab', 'github']" /> GitHub
</a> </a>
@@ -14,8 +18,16 @@ import { RouterLink, RouterView } from 'vue-router'
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
<transition name="slide-fade" mode="out-in"> <transition name="slide-fade" mode="out-in">
<component :is="Component" /> <component v-if="ready" :is="Component" />
</transition> </transition>
</router-view> </router-view>
</div> </div>
</template> </template>
<style scoped>
.hl {
height: 2px;
background-color: rgb(0, 255, 140);
margin: 10px 0;
}
</style>