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
113d4474
Commit
113d4474
authored
Oct 25, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove registry dependency
parent
3df4c9b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
editor.js
apps/remix-ide/src/app/editor/editor.js
+5
-13
No files found.
apps/remix-ide/src/app/editor/editor.js
View file @
113d4474
...
@@ -7,8 +7,6 @@ import * as packageJson from '../../../../../package.json'
...
@@ -7,8 +7,6 @@ import * as packageJson from '../../../../../package.json'
const
EventManager
=
require
(
'../../lib/events'
)
const
EventManager
=
require
(
'../../lib/events'
)
const
globalRegistry
=
require
(
'../../global/registry'
)
const
profile
=
{
const
profile
=
{
displayName
:
'Editor'
,
displayName
:
'Editor'
,
name
:
'editor'
,
name
:
'editor'
,
...
@@ -20,13 +18,6 @@ const profile = {
...
@@ -20,13 +18,6 @@ const profile = {
class
Editor
extends
Plugin
{
class
Editor
extends
Plugin
{
constructor
()
{
constructor
()
{
super
(
profile
)
super
(
profile
)
// Dependancies
this
.
_components
=
{}
this
.
_components
.
registry
=
globalRegistry
this
.
_deps
=
{
config
:
this
.
_components
.
registry
.
get
(
'config'
).
api
,
themeModule
:
this
.
_components
.
registry
.
get
(
'themeModule'
).
api
}
this
.
_themes
=
{
this
.
_themes
=
{
light
:
'light'
,
light
:
'light'
,
...
@@ -35,11 +26,12 @@ class Editor extends Plugin {
...
@@ -35,11 +26,12 @@ class Editor extends Plugin {
}
}
const
translateTheme
=
(
theme
)
=>
this
.
_themes
[
theme
.
name
===
'Dark'
?
'remixDark'
:
theme
.
quality
]
const
translateTheme
=
(
theme
)
=>
this
.
_themes
[
theme
.
name
===
'Dark'
?
'remixDark'
:
theme
.
quality
]
this
.
_deps
.
themeModule
.
events
.
on
(
'themeChanged'
,
(
theme
)
=>
{
this
.
on
(
'themeModule'
,
'themeChanged'
,
(
theme
)
=>
{
this
.
currentTheme
=
translateTheme
(
theme
)
this
.
currentTheme
=
translateTheme
(
theme
)
this
.
renderComponent
()
this
.
renderComponent
()
})
})
this
.
currentTheme
=
translateTheme
(
this
.
_deps
.
themeModule
.
currentTheme
())
this
.
call
(
'themeModule'
,
'currentTheme'
,
(
theme
)
=>
this
.
currentTheme
=
translateTheme
(
theme
))
// Init
// Init
this
.
event
=
new
EventManager
()
this
.
event
=
new
EventManager
()
this
.
sessions
=
{}
this
.
sessions
=
{}
...
@@ -130,8 +122,8 @@ class Editor extends Plugin {
...
@@ -130,8 +122,8 @@ class Editor extends Plugin {
this
.
off
(
'sidePanel'
,
'pluginDisabled'
)
this
.
off
(
'sidePanel'
,
'pluginDisabled'
)
}
}
_onChange
(
file
)
{
async
_onChange
(
file
)
{
const
currentFile
=
this
.
_deps
.
config
.
get
(
'currentF
ile'
)
const
currentFile
=
await
this
.
call
(
'fileManager'
,
'f
ile'
)
if
(
!
currentFile
)
{
if
(
!
currentFile
)
{
return
return
}
}
...
...
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