Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
2789b546
Commit
2789b546
authored
Nov 23, 2021
by
gxkai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint: 调整
parent
b88a6fcd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
18 deletions
+19
-18
.eslintrc
.eslintrc
+1
-0
app.js
apps/remix-ide/src/app.js
+18
-18
No files found.
.eslintrc
View file @
2789b546
...
...
@@ -8,6 +8,7 @@
"plugins": ["@typescript-eslint", "@nrwl/nx"],
"extends": "standard",
"rules": {
"no-useless-escape": "off"
},
"overrides": [
{
...
...
apps/remix-ide/src/app.js
View file @
2789b546
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment