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
4affcdc9
Commit
4affcdc9
authored
Feb 22, 2021
by
lianahus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added track of theme changes
parent
23b97990
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
theme-module.js
apps/remix-ide/src/app/tabs/theme-module.js
+2
-0
No files found.
apps/remix-ide/src/app/tabs/theme-module.js
View file @
4affcdc9
...
...
@@ -3,6 +3,7 @@ import { EventEmitter } from 'events'
import
QueryParams
from
'../../lib/query-params'
import
*
as
packageJson
from
'../../../../../package.json'
import
yo
from
'yo-yo'
const
_paq
=
window
.
_paq
=
window
.
_paq
||
[]
const
themes
=
[
{
name
:
'Dark'
,
quality
:
'dark'
,
url
:
'assets/css/themes/remix-dark_tvx1s2.css'
},
...
...
@@ -77,6 +78,7 @@ export class ThemeModule extends Plugin {
if
(
themeName
&&
!
Object
.
keys
(
this
.
themes
).
includes
(
themeName
))
{
throw
new
Error
(
`Theme
${
themeName
}
doesn't exist`
)
}
_paq
.
push
([
'trackEvent'
,
'themeModule'
,
'switchTo'
,
themeName
])
const
next
=
themeName
||
this
.
active
// Name
const
nextTheme
=
this
.
themes
[
next
]
// Theme
if
(
!
this
.
forced
)
this
.
_deps
.
config
.
set
(
'settings/theme'
,
next
)
...
...
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