Merge pull request #2003 from ethereum/inflate_backup

add restore backup
pull/2014/head
David Disu 3 years ago committed by GitHub
commit 54e6ff08fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx

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

Loading…
Cancel
Save