|
|
|
@ -1,7 +1,6 @@ |
|
|
|
|
import * as packageJson from '../../../../../../package.json' |
|
|
|
|
import { ViewPlugin } from '@remixproject/engine-web' |
|
|
|
|
import { migrateToWorkspace } from '../../../migrateFileSystem' |
|
|
|
|
import { CompilerImports } from '@remix-project/core-plugin' |
|
|
|
|
import JSZip from 'jszip' |
|
|
|
|
|
|
|
|
|
const yo = require('yo-yo') |
|
|
|
@ -119,11 +118,12 @@ const profile = { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export class LandingPage extends ViewPlugin { |
|
|
|
|
constructor (appManager, verticalIcons, fileManager, filePanel) { |
|
|
|
|
constructor (appManager, verticalIcons, fileManager, filePanel, contentImport) { |
|
|
|
|
super(profile) |
|
|
|
|
this.profile = profile |
|
|
|
|
this.fileManager = fileManager |
|
|
|
|
this.filePanel = filePanel |
|
|
|
|
this.contentImport = contentImport |
|
|
|
|
this.appManager = appManager |
|
|
|
|
this.verticalIcons = verticalIcons |
|
|
|
|
this.gistHandler = new GistHandler() |
|
|
|
@ -240,7 +240,7 @@ export class LandingPage extends ViewPlugin { |
|
|
|
|
|
|
|
|
|
render () { |
|
|
|
|
const load = (service, item, examples, info) => { |
|
|
|
|
const compilerImport = new CompilerImports() |
|
|
|
|
const contentImport = this.contentImport |
|
|
|
|
const fileProviders = globalRegistry.get('fileproviders').api |
|
|
|
|
const msg = yo` |
|
|
|
|
<div class="p-2"> |
|
|
|
@ -252,7 +252,7 @@ export class LandingPage extends ViewPlugin { |
|
|
|
|
const title = `Import from ${service}` |
|
|
|
|
modalDialogCustom.prompt(title, msg, null, (target) => { |
|
|
|
|
if (target !== '') { |
|
|
|
|
compilerImport.import( |
|
|
|
|
contentImport.import( |
|
|
|
|
target, |
|
|
|
|
(loadingMsg) => { tooltip(loadingMsg) }, |
|
|
|
|
(error, content, cleanUrl, type, url) => { |
|
|
|
|