Address feedback + Fix env links

This commit is contained in:
Isaac Marovitz 2023-10-27 21:38:41 -04:00
parent a44a05a5bc
commit 79c05182cb
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
4 changed files with 8 additions and 15 deletions

View file

@ -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

View file

@ -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

7
src/chartjs.d.ts vendored
View file

@ -1,7 +0,0 @@
import type { TooltipPositionerFunction } from 'chart.js';
declare module 'chart.js' {
interface TooltipPositionerMap {
cursor: TooltipPositionerFunction<ChartType>;
}
}

View file

@ -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<ChartData<'bar'>>({
const chartData = ref<ChartData<"bar">>({
labels: [],
datasets: []
});
const chartOptions = ref<ChartOptions<'bar'>>({
const chartOptions = ref<ChartOptions<"bar">>({
indexAxis: "y" as const,
responsive: true,
maintainAspectRatio: false,
@ -156,7 +156,7 @@ const chartOptions = ref<ChartOptions<'bar'>>({
}
});
window.addEventListener('resize', updateCanvasWidth);
window.addEventListener("resize", updateCanvasWidth);
Chart.register(CategoryScale, LinearScale, BarElement, Title, Legend, Tooltip, Colors);
Tooltip.positioners.cursor = function (elements, eventPosition) {
return {