Improved mod install verbosity

This commit is contained in:
Kr4ight
2026-04-05 18:36:09 +02:00
parent d77e0c8924
commit 262bb89899
+7 -1
View File
@@ -21,6 +21,7 @@ import { twMerge } from "tailwind-merge";
import { motion, AnimatePresence } from "framer-motion";
import { GameVersion, Mod } from "@/lib/types";
import { versions } from "@/lib/launcher";
import toast from "react-hot-toast";
function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
@@ -90,12 +91,17 @@ const ModsSection: React.FC<ModsSectionProps> = ({ version }) => {
const handleInstall = async () => {
if (selectedModForInstall && selectedVersionsForInstall.length > 0) {
await installMod(selectedModForInstall, selectedVersionsForInstall);
setIsInstallDialogOpen(false);
toast.promise(installMod(selectedModForInstall, selectedVersionsForInstall), {
loading: `Installing mod: ${selectedModForInstall.name}`,
success: `Mod sucessfully installed: ${selectedModForInstall.name}`,
error: (e) => `${selectedModForInstall.name} Failed: ${e}`
}).then(async () => {
if (activeTab === "installed") {
const m = await getInstalledMods(version.id);
setMods(m);
}
}).catch(console.error);
}
};