Skip to content

Commit 54e6ff0

Browse files
authored
Merge pull request #2003 from ethereum/inflate_backup
add restore backup
2 parents 568af19 + 1682412 commit 54e6ff0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
214214
}
215215
}
216216

217+
const restoreBackupZip = async () => {
218+
await plugin.appManager.activatePlugin(['restorebackupzip'])
219+
plugin.verticalIcons.select('restorebackupzip')
220+
_paq.push(['trackEvent', 'pluginManager', 'userActivate', 'restorebackupzip'])
221+
}
222+
217223
const showFullMessage = (title: string, loadItem: string, examples: Array<string>) => {
218224
setState(prevState => {
219225
return { ...prevState, showModalDialog: true, modalInfo: { title: title, loadItem: loadItem, examples: examples } }
@@ -330,6 +336,10 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
330336
<i className="mr-1 far fa-download"></i>
331337
<label className="ml-1 remixui_home_text" onClick={() => downloadFiles()}>Download Backup</label>
332338
</p>
339+
<p className="mb-1">
340+
<i className="mr-1 far fa-upload"></i>
341+
<label className="ml-1 remixui_home_text" onClick={() => restoreBackupZip()}>Restore Backup</label>
342+
</p>
333343
<p className="mt-3 mb-0"><label>LOAD FROM:</label></p>
334344
<div className="btn-group">
335345
<button className="btn mr-1 btn-secondary" data-id="landingPageImportFromGistButton" onClick={() => importFromGist()}>Gist</button>

0 commit comments

Comments
 (0)