Skip to content

Commit

Permalink
removed the modal stuff, kept the has file access check
Browse files Browse the repository at this point in the history
  • Loading branch information
srietkerk committed Nov 1, 2024
1 parent 6d63903 commit cca4bb3
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions webapp/src/scriptmanager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,17 +318,6 @@ export class ScriptManagerDialog extends data.Component<ScriptManagerDialogProps
this.setState({ sortedAsc: !sortedAsc });
}

renderDownloadDialog(fileName: string) {
return <>
<div>
{lf("Your projects were zipped and downloaded successfully!")}
<br />
<br />
{lf("Look for the file {0} on your computer. It might have a number before the .zip if you've downloaded before.", fileName)}
</div>
</>;
}

handleDownloadAsync = async () => {
pxt.tickEvent("scriptmanager.downloadZip", undefined, { interactiveConsent: true });

Expand Down Expand Up @@ -435,25 +424,12 @@ export class ScriptManagerDialog extends data.Component<ScriptManagerDialogProps

const zipName = `makecode-${targetNickname}-project-download.zip`

pxt.BrowserUtils.browserDownloadDataUri(datauri, zipName);

this.setState({
download: null
});

pxt.BrowserUtils.browserDownloadDataUri(datauri, zipName);
if (pxt.BrowserUtils.isInGame()) {
const downloadJsx = this.renderDownloadDialog(zipName);

setTimeout(async () => {
await core.confirmAsync({
header: lf("Projects Downloaded..."),
jsx: downloadJsx,
hasCloseIcon: true,
hideAgree: true,
className: 'zipdownloaddialog',
})
}, 2000);
}
}

handleDownloadProgressClose = () => {
Expand Down

0 comments on commit cca4bb3

Please sign in to comment.