Merge branch 'master' into search

pull/2092/head
David Disu 3 years ago committed by GitHub
commit 4fd6662a7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      apps/remix-ide/src/app/components/preload.tsx
  2. 8
      apps/remix-ide/src/app/files/filesystems/fileSystemUtility.ts
  3. 4
      libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx

@ -34,7 +34,7 @@ export const Preload = () => {
)
})
}).catch(err => {
_paq.push(['_trackEvent', 'Preload', 'error', err && err.message])
_paq.push(['trackEvent', 'Preload', 'error', err && err.message])
console.log('Error loading Remix:', err)
setError(true)
})
@ -51,7 +51,7 @@ export const Preload = () => {
setShowDownloader(false)
const fsUtility = new fileSystemUtility()
const migrationResult = await fsUtility.migrate(localStorageFileSystem.current, remixIndexedDB.current)
_paq.push(['_trackEvent', 'Migrate', 'result', migrationResult?'success' : 'fail'])
_paq.push(['trackEvent', 'Migrate', 'result', migrationResult?'success' : 'fail'])
await setFileSystems()
}
@ -59,10 +59,10 @@ export const Preload = () => {
const fsLoaded = await remixFileSystems.current.setFileSystem([(testmigrationFallback.current || testBlockStorage.current)? null: remixIndexedDB.current, testBlockStorage.current? null:localStorageFileSystem.current])
if (fsLoaded) {
console.log(fsLoaded.name + ' activated')
_paq.push(['_trackEvent', 'Storage', 'activate', fsLoaded.name])
_paq.push(['trackEvent', 'Storage', 'activate', fsLoaded.name])
loadAppComponent()
} else {
_paq.push(['_trackEvent', 'Storage', 'error', 'no supported storage'])
_paq.push(['trackEvent', 'Storage', 'error', 'no supported storage'])
setSupported(false)
}
}
@ -76,8 +76,8 @@ export const Preload = () => {
useEffect(() => {
async function loadStorage() {
await remixFileSystems.current.addFileSystem(remixIndexedDB.current) || _paq.push(['_trackEvent', 'Storage', 'error', 'indexedDB not supported'])
await remixFileSystems.current.addFileSystem(localStorageFileSystem.current) || _paq.push(['_trackEvent', 'Storage', 'error', 'localstorage not supported'])
await remixFileSystems.current.addFileSystem(remixIndexedDB.current) || _paq.push(['trackEvent', 'Storage', 'error', 'indexedDB not supported'])
await remixFileSystems.current.addFileSystem(localStorageFileSystem.current) || _paq.push(['trackEvent', 'Storage', 'error', 'localstorage not supported'])
await testmigration()
remixIndexedDB.current.loaded && await remixIndexedDB.current.checkWorkspaces()
localStorageFileSystem.current.loaded && await localStorageFileSystem.current.checkWorkspaces()

@ -26,14 +26,14 @@ export class fileSystemUtility {
console.log('file migration successful')
return true
} else {
_paq.push(['_trackEvent', 'Migrate', 'error', 'hash mismatch'])
_paq.push(['trackEvent', 'Migrate', 'error', 'hash mismatch'])
console.log('file migration failed falling back to ' + fsFrom.name)
fsTo.loaded = false
return false
}
} catch (err) {
console.log(err)
_paq.push(['_trackEvent', 'Migrate', 'error', err && err.message])
_paq.push(['trackEvent', 'Migrate', 'error', err && err.message])
console.log('file migration failed falling back to ' + fsFrom.name)
fsTo.loaded = false
return false
@ -52,9 +52,9 @@ export class fileSystemUtility {
const date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate()
const time = today.getHours() + 'h' + today.getMinutes() + 'min'
this.saveAs(blob, `remix-backup-at-${time}-${date}.zip`)
_paq.push(['_trackEvent','Backup','download','preload'])
_paq.push(['trackEvent','Backup','download','preload'])
} catch (err) {
_paq.push(['_trackEvent','Backup','error',err && err.message])
_paq.push(['trackEvent','Backup','error',err && err.message])
console.log(err)
}
}

@ -206,9 +206,9 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
const date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate()
const time = today.getHours() + 'h' + today.getMinutes() + 'min'
saveAs(blob, `remix-backup-at-${time}-${date}.zip`)
_paq.push(['_trackEvent', 'Backup', 'download', 'home'])
_paq.push(['trackEvent', 'Backup', 'download', 'home'])
}).catch((e) => {
_paq.push(['_trackEvent', 'Backup', 'error', e.message])
_paq.push(['trackEvent', 'Backup', 'error', e.message])
plugin.call('notification', 'toast', e.message)
})
} catch (e) {

Loading…
Cancel
Save