From 17297e279f7096645555622799b5a4a3111f632a Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sat, 19 Jul 2025 20:14:52 -0700 Subject: [PATCH] Hide versions not supported by the OS --- src/routes/Installs.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/Installs.tsx b/src/routes/Installs.tsx index 6d5154c..4b7b2fe 100644 --- a/src/routes/Installs.tsx +++ b/src/routes/Installs.tsx @@ -2,6 +2,7 @@ import './Installs.css' import { useEffect } from 'react' import axios from 'axios' import { InstallsProps } from '../types/InstallsProps' +import { platform } from '@tauri-apps/plugin-os' export default function Installs({ downloadProgress, showPopup, setShowPopup, setPopupMode, setFadeOut, setSelectedVersionList, setVersionList }: InstallsProps) { useEffect(() => { @@ -9,7 +10,7 @@ export default function Installs({ downloadProgress, showPopup, setShowPopup, se setSelectedVersionList([]); setVersionList(null) axios.get('https://berrydash.lncvrt.xyz/database/launcher/versions.php') - .then(res => setVersionList(res.data.reverse())) + .then(res => setVersionList(res.data.reverse().filter((d: { platforms: string[] }) => d.platforms.includes(platform())))) .catch(() => setVersionList([])) }, [showPopup])