diff --git a/.env.development b/.env.development index f9b2b23..392369b 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ NODE_ENV=development VITE_BLOG_URL=https://blog.ryujinx.org VITE_FAQ_URL=https://ryujinx.org/faq -VITE_STATS_URL=https://raw.githubusercontent.com/Ryujinx/Ryujinx-Games-List/stats/compat-stats.json +VITE_STATS_URL=https://raw.githubusercontent.com/Ryujinx/Ryujinx-Games-List/master/compat-stats.json VITE_LABEL_URL=https://github.com/Ryujinx/Ryujinx-Games-List/labels/ VITE_REPO_URL=https://api.github.com/repos/Ryujinx/Ryujinx VITE_GUIDE_URL=https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide diff --git a/.env.production b/.env.production index 0b40892..73cdb8f 100644 --- a/.env.production +++ b/.env.production @@ -2,7 +2,7 @@ NODE_ENV=production VITE_BLOG_URL=https://blog.ryujinx.org VITE_FAQ_URL=https://ryujinx.org/faq -VITE_STATS_URL=https://raw.githubusercontent.com/Ryujinx/Ryujinx-Games-List/stats/compat-stats.json +VITE_STATS_URL=https://raw.githubusercontent.com/Ryujinx/Ryujinx-Games-List/master/compat-stats.json VITE_LABEL_URL=https://github.com/Ryujinx/Ryujinx-Games-List/labels/ VITE_REPO_URL=https://api.github.com/repos/Ryujinx/Ryujinx VITE_GUIDE_URL=https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide diff --git a/src/chartjs.d.ts b/src/chartjs.d.ts deleted file mode 100644 index 83dbfbc..0000000 --- a/src/chartjs.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { TooltipPositionerFunction } from 'chart.js'; - -declare module 'chart.js' { - interface TooltipPositionerMap { - cursor: TooltipPositionerFunction; - } -} \ No newline at end of file diff --git a/src/views/CompatibilityPage.vue b/src/views/CompatibilityPage.vue index f56c170..d56ab4d 100644 --- a/src/views/CompatibilityPage.vue +++ b/src/views/CompatibilityPage.vue @@ -55,7 +55,7 @@ interface PlayableTier { function setData(this: any) { chartData.value = ({ labels: ["label"], - datasets: tierData.value.map((tier: PlayableTier): ChartDataset<'bar', number[]> => ({ + datasets: tierData.value.map((tier: PlayableTier): ChartDataset<"bar", number[]> => ({ data: [tier.count], label: t(`views.compatibility.${tier.localeKey}`), backgroundColor: tier.color @@ -64,11 +64,11 @@ function setData(this: any) { } function updateCanvasWidth() { - var canvas = document.getElementById('chart'); + var canvas = document.getElementById("chart"); var screenWidth = window.innerWidth; var canvasWidth = screenWidth * 0.6; if (canvas) { - canvas.style.width = canvasWidth + 'px'; + canvas.style.width = canvasWidth + "px"; } } @@ -87,12 +87,12 @@ const fetchStats = async () => { } } -const chartData = ref>({ +const chartData = ref>({ labels: [], datasets: [] }); -const chartOptions = ref>({ +const chartOptions = ref>({ indexAxis: "y" as const, responsive: true, maintainAspectRatio: false, @@ -156,7 +156,7 @@ const chartOptions = ref>({ } }); -window.addEventListener('resize', updateCanvasWidth); +window.addEventListener("resize", updateCanvasWidth); Chart.register(CategoryScale, LinearScale, BarElement, Title, Legend, Tooltip, Colors); Tooltip.positioners.cursor = function (elements, eventPosition) { return {