Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #76 from stromcon/feature/mods-backdrop
Browse files Browse the repository at this point in the history
Feature/mods backdrop
  • Loading branch information
CapitaineJSparrow authored Jun 2, 2021
2 parents f63d608 + 51c56af commit 534b964
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "emusak",
"productName": "emusak",
"version": "1.0.69",
"version": "1.0.70",
"description": "Saves, shaders, firmwares and keys manager for switch emulators",
"main": ".webpack/main",
"repository": "https://github.com/stromcon/emusak-ui.git",
Expand Down
4 changes: 3 additions & 1 deletion src/service/ryujinx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,10 @@ export const installModToRyujinx = async (config: IRyujinxConfig, titleID: strin
archive.extractAllTo(path.resolve(modPath, '..'),true);
}

await Swal.fire({
Swal.fire({
icon: 'success',
text: `${modName} successfully installed ${isZip ? '' : `at ${modPath}`}`
})

return true;
}
1 change: 1 addition & 0 deletions src/ui/changelog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const Changelog = () => {
<h1 style={{ textAlign: 'center' }}>What's new ? v{version}</h1>
<br />
<ul style={{ marginLeft: 20 }}>
<li>Added a progress indicator while downloading mods (some texture packs are heavy)</li>
<li>Fixed a bug preventing users sharing their shaders from mailine configuration if logs were disabled on mainline build while logs are disabled and using Ryujinx LDN without portable mode (thanks PHAT for reporting)</li>
<li>Uploaded tons of new mods</li>
<li>Add romFS mods support</li>
Expand Down
22 changes: 19 additions & 3 deletions src/ui/page/ryujinx/gamelist/ModsList.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import {
Avatar,
Button,
Avatar, Backdrop,
Button, CircularProgress,
Dialog,
DialogTitle,
List,
ListItem,
ListItemAvatar, ListItemText,
ListItemAvatar, ListItemText, makeStyles,
TableBody,
TableCell,
TableRow
Expand All @@ -30,15 +30,24 @@ interface IModsListProps {
filter: string;
}

const useStyles = makeStyles((theme) => ({
backdrop: {
zIndex: theme.zIndex.drawer + 1,
color: '#fff',
},
}));

export default ({
games,
extractNameFromID,
emusakMods,
config,
filter,
}: IModsListProps) => {
const classes = useStyles();
const [dialogVersionOpen, setDialogVersionOpen] = React.useState(false);
const [modsDialogOpen, setModsDialogOpen] = React.useState(false);
const [backdropOpen, setBackdropOpen] = React.useState(false);

const [modsName, setModsName]: [string[], Function] = React.useState([]);
const [modsVersions, setModsVersions]: [string[], Function] = React.useState([]);
Expand Down Expand Up @@ -70,8 +79,10 @@ export default ({
const modFile: any[] = await getEmusakMod(pickedTitleId, pickedVersion, modName);
const mod = modFile.find(m => m.type === "file").name;
setModsDialogOpen(false);
setBackdropOpen(true);
const file = await downloadEmusakMod(pickedTitleId, pickedVersion, modName, mod);
await installModToRyujinx(config, pickedTitleId, modName, mod, file);
setBackdropOpen(false);
}

return (
Expand Down Expand Up @@ -117,6 +128,11 @@ export default ({
</List>
</Dialog>

<Backdrop className={classes.backdrop} open={backdropOpen} onClick={() => {}}>
<CircularProgress color="secondary" /> <br />
<h3>&nbsp; Downloading and installing mod ...</h3>
</Backdrop>

{
games
.filter(titleId => titleId != '0000000000000000')
Expand Down

0 comments on commit 534b964

Please sign in to comment.