Commit 2789b546 authored by gxkai's avatar gxkai

lint: 调整

parent b88a6fcd
......@@ -8,6 +8,7 @@
"plugins": ["@typescript-eslint", "@nrwl/nx"],
"extends": "standard",
"rules": {
"no-useless-escape": "off"
},
"overrides": [
{
......
......@@ -165,27 +165,27 @@ class App {
registry.put({ api: self._components.filesProviders, name: 'fileproviders' })
migrateFileSystem(self._components.filesProviders.browser)
// 请求token
window.parent.postMessage({event: 'getToken'}, '\*')
window.addEventListener("message", this.handleListenMessage, false)
window.parent.postMessage({ event: 'getToken' }, '\*')
window.addEventListener('message', this.handleListenMessage, false)
}
handleListenMessage(event$){
const {event,data} = event$.data
handleListenMessage (event$) {
const { event, data } = event$.data
if (!event) return
// 接收token
if (event === 'giveToken') {
registry.put({api: data, name: 'baas-token'})
registry.put({ api: data, name: 'baas-token' })
}
// 接收合约zip文件
if (event === 'giveStoreUrl') {
axios.get(data, {
responseType: 'blob'
}).then(async _ => {
await resetWorkspaces()
const files = await unZipFile(_.data)
await uploadFile( {files}, '', ()=> {}, )
window.parent.postMessage({event: 'showIframe'}, '\*')
})
axios.get(data, {
responseType: 'blob'
}).then(async _ => {
await resetWorkspaces()
const files = await unZipFile(_.data)
await uploadFile({ files }, '', () => {})
window.parent.postMessage({ event: 'showIframe' }, '\*')
})
}
}
......@@ -243,9 +243,9 @@ class App {
window.location.hostname !== 'remix.ethereum.org' &&
window.location.hostname !== 'localhost' &&
window.location.hostname !== '127.0.0.1') {
// modalDialogCustom.alert(`The Remix IDE has moved to http://remix.ethereum.org.\n
// This instance of Remix you are visiting WILL NOT BE UPDATED.\n
// Please make a backup of your contracts and start using http://remix.ethereum.org`)
// modalDialogCustom.alert(`The Remix IDE has moved to http://remix.ethereum.org.\n
// This instance of Remix you are visiting WILL NOT BE UPDATED.\n
// Please make a backup of your contracts and start using http://remix.ethereum.org`)
}
if (window.location.protocol.indexOf('https') === 0) {
toolTip('You are using an `https` connection. Please switch to `http` if you are using Remix against an `http Web3 provider` or allow Mixed Content in your browser.')
......@@ -499,7 +499,7 @@ class App {
await appManager.activatePlugin(['home'])
// await appManager.activatePlugin(['settings'])
// await appManager.activatePlugin(['pluginManager'])
await appManager.activatePlugin(['hiddenPanel', 'contextualListener', 'terminal', 'blockchain', 'fetchAndCompile', 'contentImport'])
await appManager.activatePlugin(['hiddenPanel', 'contextualListener', 'terminal', 'blockchain', 'fetchAndCompile', 'contentImport'])
appManager.on('filePanel', 'workspaceInitializationCompleted', async () => {
await appManager.registerContextMenuItems()
......@@ -509,7 +509,7 @@ class App {
appManager.on('editor', 'editorMounted', () => {
const basePlugins = ['solidity', 'udapp', 'debugger']
if (Array.isArray(workspace)) {
const workspace$ = Array.from(new Set([...workspace, ... basePlugins]))
const workspace$ = Array.from(new Set([...workspace, ...basePlugins]))
appManager.activatePlugin(workspace$).then(async () => {
try {
if (params.deactivate) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment