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