mirror of
https://github.com/Ryujinx/Ryujinx-Website.git
synced 2024-06-02 21:28:47 +02:00
Navigate to list onClick
This commit is contained in:
parent
2b313ace8f
commit
a39f9add31
|
@ -3,6 +3,7 @@ NODE_ENV=development
|
|||
VITE_BLOG_URL=https://blog.ryujinx.org
|
||||
VITE_FAQ_URL=https://ryujinx.org/faq
|
||||
VITE_LABEL_SEARCH_URL=https://api.github.com/search/issues?repository_id=133966349&q=
|
||||
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
|
||||
VITE_DISCORD_URL=https://discord.gg/VkQYXAZ
|
||||
|
|
|
@ -3,6 +3,7 @@ NODE_ENV=production
|
|||
VITE_BLOG_URL=https://blog.ryujinx.org
|
||||
VITE_FAQ_URL=https://ryujinx.org/faq
|
||||
VITE_LABEL_SEARCH_URL=https://api.github.com/search/issues?repository_id=133966349&q=
|
||||
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
|
||||
VITE_DISCORD_URL=https://discord.gg/VkQYXAZ
|
||||
|
|
1
src/global.d.ts
vendored
1
src/global.d.ts
vendored
|
@ -2,6 +2,7 @@ interface ImportMetaEnv {
|
|||
VITE_BLOG_URL: string;
|
||||
VITE_FAQ_URL: string;
|
||||
VITE_LABEL_SEARCH_URL: string;
|
||||
VITE_LABEL_URL: string,
|
||||
VITE_REPO_URL: string;
|
||||
VITE_GUIDE_URL: string;
|
||||
VITE_DISCORD_URL: string;
|
||||
|
|
|
@ -156,6 +156,16 @@ const chartOptions = {
|
|||
size: 14
|
||||
}
|
||||
}
|
||||
},
|
||||
onClick: (e, activeEls) => {
|
||||
let datasetIndex = activeEls[0].datasetIndex;
|
||||
let dataIndex = activeEls[0].index;
|
||||
let value = e.chart.data.datasets[datasetIndex].data[dataIndex];
|
||||
var tier = tierData.value.find((tier) => tier.count == value);
|
||||
|
||||
if (tier != null) {
|
||||
window.location.href = import.meta.env.VITE_LABEL_URL + tier.labelName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user