Address feedback + Fix env links
This commit is contained in:
parent
a44a05a5bc
commit
79c05182cb
4 changed files with 8 additions and 15 deletions
|
@ -2,7 +2,7 @@ NODE_ENV=development
|
||||||
|
|
||||||
VITE_BLOG_URL=https://blog.ryujinx.org
|
VITE_BLOG_URL=https://blog.ryujinx.org
|
||||||
VITE_FAQ_URL=https://ryujinx.org/faq
|
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_LABEL_URL=https://github.com/Ryujinx/Ryujinx-Games-List/labels/
|
||||||
VITE_REPO_URL=https://api.github.com/repos/Ryujinx/Ryujinx
|
VITE_REPO_URL=https://api.github.com/repos/Ryujinx/Ryujinx
|
||||||
VITE_GUIDE_URL=https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide
|
VITE_GUIDE_URL=https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide
|
||||||
|
|
|
@ -2,7 +2,7 @@ NODE_ENV=production
|
||||||
|
|
||||||
VITE_BLOG_URL=https://blog.ryujinx.org
|
VITE_BLOG_URL=https://blog.ryujinx.org
|
||||||
VITE_FAQ_URL=https://ryujinx.org/faq
|
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_LABEL_URL=https://github.com/Ryujinx/Ryujinx-Games-List/labels/
|
||||||
VITE_REPO_URL=https://api.github.com/repos/Ryujinx/Ryujinx
|
VITE_REPO_URL=https://api.github.com/repos/Ryujinx/Ryujinx
|
||||||
VITE_GUIDE_URL=https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide
|
VITE_GUIDE_URL=https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide
|
||||||
|
|
7
src/chartjs.d.ts
vendored
7
src/chartjs.d.ts
vendored
|
@ -1,7 +0,0 @@
|
||||||
import type { TooltipPositionerFunction } from 'chart.js';
|
|
||||||
|
|
||||||
declare module 'chart.js' {
|
|
||||||
interface TooltipPositionerMap {
|
|
||||||
cursor: TooltipPositionerFunction<ChartType>;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -55,7 +55,7 @@ interface PlayableTier {
|
||||||
function setData(this: any) {
|
function setData(this: any) {
|
||||||
chartData.value = ({
|
chartData.value = ({
|
||||||
labels: ["label"],
|
labels: ["label"],
|
||||||
datasets: tierData.value.map((tier: PlayableTier): ChartDataset<'bar', number[]> => ({
|
datasets: tierData.value.map((tier: PlayableTier): ChartDataset<"bar", number[]> => ({
|
||||||
data: [tier.count],
|
data: [tier.count],
|
||||||
label: t(`views.compatibility.${tier.localeKey}`),
|
label: t(`views.compatibility.${tier.localeKey}`),
|
||||||
backgroundColor: tier.color
|
backgroundColor: tier.color
|
||||||
|
@ -64,11 +64,11 @@ function setData(this: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCanvasWidth() {
|
function updateCanvasWidth() {
|
||||||
var canvas = document.getElementById('chart');
|
var canvas = document.getElementById("chart");
|
||||||
var screenWidth = window.innerWidth;
|
var screenWidth = window.innerWidth;
|
||||||
var canvasWidth = screenWidth * 0.6;
|
var canvasWidth = screenWidth * 0.6;
|
||||||
if (canvas) {
|
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: [],
|
labels: [],
|
||||||
datasets: []
|
datasets: []
|
||||||
});
|
});
|
||||||
|
|
||||||
const chartOptions = ref<ChartOptions<'bar'>>({
|
const chartOptions = ref<ChartOptions<"bar">>({
|
||||||
indexAxis: "y" as const,
|
indexAxis: "y" as const,
|
||||||
responsive: true,
|
responsive: true,
|
||||||
maintainAspectRatio: false,
|
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);
|
Chart.register(CategoryScale, LinearScale, BarElement, Title, Legend, Tooltip, Colors);
|
||||||
Tooltip.positioners.cursor = function (elements, eventPosition) {
|
Tooltip.positioners.cursor = function (elements, eventPosition) {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Add table
Reference in a new issue