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
f40d5783
Unverified
Commit
f40d5783
authored
Sep 23, 2020
by
Liana Husikyan
Committed by
GitHub
Sep 23, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #444 from ethereum/yann300-patch-7
Make sure the theme exists
parents
6da50fb6
43884a86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
theme-module.js
apps/remix-ide/src/app/tabs/theme-module.js
+6
-3
No files found.
apps/remix-ide/src/app/tabs/theme-module.js
View file @
f40d5783
...
@@ -34,9 +34,12 @@ export class ThemeModule extends Plugin {
...
@@ -34,9 +34,12 @@ export class ThemeModule extends Plugin {
config
:
registry
.
get
(
'config'
).
api
config
:
registry
.
get
(
'config'
).
api
}
}
this
.
themes
=
themes
.
reduce
((
acc
,
theme
)
=>
({
...
acc
,
[
theme
.
name
]:
theme
}),
{})
this
.
themes
=
themes
.
reduce
((
acc
,
theme
)
=>
({
...
acc
,
[
theme
.
name
]:
theme
}),
{})
const
theme
=
(
new
QueryParams
()).
get
().
theme
let
queryTheme
=
(
new
QueryParams
()).
get
().
theme
this
.
active
=
theme
||
this
.
_deps
.
config
.
get
(
'settings/theme'
)
||
'Dark'
queryTheme
=
this
.
themes
[
queryTheme
]
?
queryTheme
:
null
this
.
forced
=
theme
!==
undefined
let
currentTheme
=
this
.
_deps
.
config
.
get
(
'settings/theme'
)
currentTheme
=
this
.
themes
[
currentTheme
]
?
currentTheme
:
null
this
.
active
=
queryTheme
||
currentTheme
||
'Dark'
this
.
forced
=
queryTheme
!==
undefined
}
}
/** Return the active theme */
/** Return the active theme */
...
...
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