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
f8159a49
Commit
f8159a49
authored
Feb 16, 2021
by
lianahus
Committed by
Liana Husikyan
Feb 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added opt in/out and some events`
parent
230fc368
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
22 deletions
+39
-22
plugin-manager-component.js
.../remix-ide/src/app/components/plugin-manager-component.js
+13
-2
settings-tab.js
apps/remix-ide/src/app/tabs/settings-tab.js
+12
-14
landing-page.js
apps/remix-ide/src/app/ui/landing-page/landing-page.js
+12
-4
remixAppManager.js
apps/remix-ide/src/remixAppManager.js
+2
-2
No files found.
apps/remix-ide/src/app/components/plugin-manager-component.js
View file @
f8159a49
...
@@ -6,6 +6,7 @@ const csjs = require('csjs-inject')
...
@@ -6,6 +6,7 @@ const csjs = require('csjs-inject')
const
EventEmitter
=
require
(
'events'
)
const
EventEmitter
=
require
(
'events'
)
const
LocalPlugin
=
require
(
'./local-plugin'
)
const
LocalPlugin
=
require
(
'./local-plugin'
)
const
addToolTip
=
require
(
'../ui/tooltip'
)
const
addToolTip
=
require
(
'../ui/tooltip'
)
const
_paq
=
window
.
_paq
=
window
.
_paq
||
[]
const
css
=
csjs
`
const
css
=
csjs
`
.pluginSearch {
.pluginSearch {
...
@@ -101,6 +102,16 @@ class PluginManagerComponent extends ViewPlugin {
...
@@ -101,6 +102,16 @@ class PluginManagerComponent extends ViewPlugin {
return
this
.
appManager
.
actives
.
includes
(
name
)
return
this
.
appManager
.
actives
.
includes
(
name
)
}
}
activate
(
name
)
{
this
.
appManager
.
activatePlugin
(
profile
.
name
)
_paq
.
push
([
'trackEvent'
,
'manager'
,
'activate'
,
name
])
}
deactivate
(
name
)
{
this
.
appManager
.
deactivatePlugin
(
profile
.
name
)
_paq
.
push
([
'trackEvent'
,
'manager'
,
'deactivate'
,
name
])
}
renderItem
(
profile
)
{
renderItem
(
profile
)
{
const
displayName
=
(
profile
.
displayName
)
?
profile
.
displayName
:
profile
.
name
const
displayName
=
(
profile
.
displayName
)
?
profile
.
displayName
:
profile
.
name
...
@@ -118,7 +129,7 @@ class PluginManagerComponent extends ViewPlugin {
...
@@ -118,7 +129,7 @@ class PluginManagerComponent extends ViewPlugin {
const
activationButton
=
this
.
isActive
(
profile
.
name
)
const
activationButton
=
this
.
isActive
(
profile
.
name
)
?
yo
`
?
yo
`
<button
<button
onclick="
${
_
=>
this
.
appManager
.
deactivatePlugin
(
profile
.
name
)}
"
onclick="
${
_
=>
this
.
deactivate
(
profile
.
name
)}
"
class="btn btn-secondary btn-sm" data-id="pluginManagerComponentDeactivateButton
${
profile
.
name
}
"
class="btn btn-secondary btn-sm" data-id="pluginManagerComponentDeactivateButton
${
profile
.
name
}
"
>
>
Deactivate
Deactivate
...
@@ -126,7 +137,7 @@ class PluginManagerComponent extends ViewPlugin {
...
@@ -126,7 +137,7 @@ class PluginManagerComponent extends ViewPlugin {
`
`
:
yo
`
:
yo
`
<button
<button
onclick="
${
_
=>
this
.
a
ppManager
.
activatePlugin
(
profile
.
name
)}
"
onclick="
${
_
=>
this
.
a
ctivate
(
profile
.
name
)}
"
class="btn btn-success btn-sm" data-id="pluginManagerComponentActivateButton
${
profile
.
name
}
"
class="btn btn-success btn-sm" data-id="pluginManagerComponentActivateButton
${
profile
.
name
}
"
>
>
Activate
Activate
...
...
apps/remix-ide/src/app/tabs/settings-tab.js
View file @
f8159a49
...
@@ -40,7 +40,6 @@ module.exports = class SettingsTab extends ViewPlugin {
...
@@ -40,7 +40,6 @@ module.exports = class SettingsTab extends ViewPlugin {
useMatomoAnalytics
:
null
,
useMatomoAnalytics
:
null
,
useMatomoAnalyticsLabel
:
null
,
useMatomoAnalyticsLabel
:
null
,
useMatomoAnalyticsMode
:
null
,
useMatomoAnalyticsMode
:
null
,
matomo
:
null
,
warnPersonalMode
:
null
,
warnPersonalMode
:
null
,
generateContractMetadata
:
null
,
generateContractMetadata
:
null
,
generateContractMetadataLabel
:
null
,
generateContractMetadataLabel
:
null
,
...
@@ -143,13 +142,6 @@ module.exports = class SettingsTab extends ViewPlugin {
...
@@ -143,13 +142,6 @@ module.exports = class SettingsTab extends ViewPlugin {
this
.
_view
.
themes
=
this
.
_deps
.
themeModule
.
getThemes
()
this
.
_view
.
themes
=
this
.
_deps
.
themeModule
.
getThemes
()
this
.
_view
.
themesCheckBoxes
=
this
.
createThemeCheckies
()
this
.
_view
.
themesCheckBoxes
=
this
.
createThemeCheckies
()
this
.
_view
.
matomo
=
yo
`
<div class="custom-control custom-checkbox mb-1">
${
this
.
_view
.
useMatomoAnalytics
}
>
${
this
.
_view
.
useMatomoAnalyticsLabel
}
</div>
`
this
.
_view
.
config
.
general
=
yo
`
this
.
_view
.
config
.
general
=
yo
`
<div class="
${
css
.
info
}
border-top">
<div class="
${
css
.
info
}
border-top">
<div class="card-body pt-3 pb-2">
<div class="card-body pt-3 pb-2">
...
@@ -170,7 +162,10 @@ module.exports = class SettingsTab extends ViewPlugin {
...
@@ -170,7 +162,10 @@ module.exports = class SettingsTab extends ViewPlugin {
${
this
.
_view
.
personal
}
${
this
.
_view
.
personal
}
${
this
.
_view
.
personalLabel
}
${
this
.
_view
.
personalLabel
}
</div>
</div>
<div class="custom-control custom-checkbox mb-1">
${
this
.
_view
.
useMatomoAnalytics
}
>
${
this
.
_view
.
useMatomoAnalyticsLabel
}
</div>
</div>
</div>
</div>
</div>
`
`
...
@@ -223,11 +218,14 @@ module.exports = class SettingsTab extends ViewPlugin {
...
@@ -223,11 +218,14 @@ module.exports = class SettingsTab extends ViewPlugin {
self
.
config
.
set
(
'settings/personal-mode'
,
!
isChecked
)
self
.
config
.
set
(
'settings/personal-mode'
,
!
isChecked
)
elementStateChanged
(
self
.
_view
.
personalLabel
,
isChecked
)
elementStateChanged
(
self
.
_view
.
personalLabel
,
isChecked
)
}
}
function
onchangeMatomoAnalytics
()
{
function
onchangeMatomoAnalytics
(
event
)
{
const
isChecked
=
self
.
config
.
get
(
'settings/matomo-analytics'
)
elementStateChanged
(
self
.
_view
.
useMatomoAnalyticsLabel
,
event
.
target
.
checked
)
const
_paq
=
window
.
_paq
=
window
.
_paq
||
[]
self
.
config
.
set
(
'settings/matomo-analytics'
,
!
isChecked
)
if
(
this
.
checked
)
{
elementStateChanged
(
self
.
_view
.
useMatomoAnalyticsLabel
,
isChecked
)
_paq
.
push
([
'forgetUserOptOut'
])
}
else
{
_paq
.
push
([
'optUserOut'
])
}
}
}
function
elementStateChanged
(
el
,
isChanged
)
{
function
elementStateChanged
(
el
,
isChanged
)
{
...
...
apps/remix-ide/src/app/ui/landing-page/landing-page.js
View file @
f8159a49
...
@@ -5,10 +5,11 @@ const yo = require('yo-yo')
...
@@ -5,10 +5,11 @@ const yo = require('yo-yo')
const
csjs
=
require
(
'csjs-inject'
)
const
csjs
=
require
(
'csjs-inject'
)
const
globalRegistry
=
require
(
'../../../global/registry'
)
const
globalRegistry
=
require
(
'../../../global/registry'
)
const
CompilerImport
=
require
(
'../../compiler/compiler-imports'
)
const
CompilerImport
=
require
(
'../../compiler/compiler-imports'
)
var
modalDialogCustom
=
require
(
'../modal-dialog-custom'
)
const
modalDialogCustom
=
require
(
'../modal-dialog-custom'
)
var
tooltip
=
require
(
'../tooltip'
)
const
tooltip
=
require
(
'../tooltip'
)
var
GistHandler
=
require
(
'../../../lib/gist-handler'
)
const
GistHandler
=
require
(
'../../../lib/gist-handler'
)
var
QueryParams
=
require
(
'../../../lib/query-params.js'
)
const
QueryParams
=
require
(
'../../../lib/query-params.js'
)
const
_paq
=
window
.
_paq
=
window
.
_paq
||
[]
const
css
=
csjs
`
const
css
=
csjs
`
.text {
.text {
...
@@ -219,10 +220,12 @@ export class LandingPage extends ViewPlugin {
...
@@ -219,10 +220,12 @@ export class LandingPage extends ViewPlugin {
this
.
mediumPanel
.
classList
.
remove
(
'd-block'
)
this
.
mediumPanel
.
classList
.
remove
(
'd-block'
)
this
.
mediumPanel
.
classList
.
add
(
'd-none'
)
this
.
mediumPanel
.
classList
.
add
(
'd-none'
)
this
.
twitterPanel
.
classList
.
toggle
(
'd-block'
)
this
.
twitterPanel
.
classList
.
toggle
(
'd-block'
)
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'media'
,
'twitter'
])
}
else
{
}
else
{
this
.
twitterPanel
.
classList
.
remove
(
'd-block'
)
this
.
twitterPanel
.
classList
.
remove
(
'd-block'
)
this
.
twitterPanel
.
classList
.
add
(
'd-none'
)
this
.
twitterPanel
.
classList
.
add
(
'd-none'
)
this
.
mediumPanel
.
classList
.
toggle
(
'd-block'
)
this
.
mediumPanel
.
classList
.
toggle
(
'd-block'
)
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'media'
,
'medium'
])
}
}
}
}
...
@@ -258,22 +261,27 @@ export class LandingPage extends ViewPlugin {
...
@@ -258,22 +261,27 @@ export class LandingPage extends ViewPlugin {
const
startSolidity
=
async
()
=>
{
const
startSolidity
=
async
()
=>
{
await
this
.
appManager
.
activatePlugin
([
'solidity'
,
'udapp'
,
'solidityStaticAnalysis'
,
'solidityUnitTesting'
])
await
this
.
appManager
.
activatePlugin
([
'solidity'
,
'udapp'
,
'solidityStaticAnalysis'
,
'solidityUnitTesting'
])
this
.
verticalIcons
.
select
(
'solidity'
)
this
.
verticalIcons
.
select
(
'solidity'
)
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'userActivate'
,
'solidity'
])
}
}
const
startDebugger
=
async
()
=>
{
const
startDebugger
=
async
()
=>
{
await
this
.
appManager
.
activatePlugin
(
'debugger'
)
await
this
.
appManager
.
activatePlugin
(
'debugger'
)
this
.
verticalIcons
.
select
(
'debugger'
)
this
.
verticalIcons
.
select
(
'debugger'
)
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'userActivate'
,
'debugger'
])
}
}
const
startSolhint
=
async
()
=>
{
const
startSolhint
=
async
()
=>
{
await
this
.
appManager
.
activatePlugin
([
'solidity'
,
'solhint'
])
await
this
.
appManager
.
activatePlugin
([
'solidity'
,
'solhint'
])
this
.
verticalIcons
.
select
(
'solhint'
)
this
.
verticalIcons
.
select
(
'solhint'
)
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'userActivate'
,
'solhint'
])
}
}
const
startLearnEth
=
async
()
=>
{
const
startLearnEth
=
async
()
=>
{
await
this
.
appManager
.
activatePlugin
([
'solidity'
,
'LearnEth'
,
'solidityUnitTesting'
])
await
this
.
appManager
.
activatePlugin
([
'solidity'
,
'LearnEth'
,
'solidityUnitTesting'
])
this
.
verticalIcons
.
select
(
'LearnEth'
)
this
.
verticalIcons
.
select
(
'LearnEth'
)
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'userActivate'
,
'learnEth'
])
}
}
const
startSourceVerify
=
async
()
=>
{
const
startSourceVerify
=
async
()
=>
{
await
this
.
appManager
.
activatePlugin
([
'solidity'
,
'source-verification'
])
await
this
.
appManager
.
activatePlugin
([
'solidity'
,
'source-verification'
])
this
.
verticalIcons
.
select
(
'source-verification'
)
this
.
verticalIcons
.
select
(
'source-verification'
)
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'userActivate'
,
'source-verification'
])
}
}
const
startPluginManager
=
async
()
=>
{
const
startPluginManager
=
async
()
=>
{
await
this
.
appManager
.
activatePlugin
(
'pluginManager'
)
await
this
.
appManager
.
activatePlugin
(
'pluginManager'
)
...
...
apps/remix-ide/src/remixAppManager.js
View file @
f8159a49
...
@@ -66,7 +66,7 @@ export class RemixAppManager extends PluginManager {
...
@@ -66,7 +66,7 @@ export class RemixAppManager extends PluginManager {
onPluginActivated
(
plugin
)
{
onPluginActivated
(
plugin
)
{
this
.
pluginLoader
.
set
(
plugin
,
this
.
actives
)
this
.
pluginLoader
.
set
(
plugin
,
this
.
actives
)
this
.
event
.
emit
(
'activate'
,
plugin
)
this
.
event
.
emit
(
'activate'
,
plugin
)
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'activate'
,
plugin
])
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'activate'
,
plugin
.
name
])
}
}
getAll
()
{
getAll
()
{
...
@@ -82,7 +82,7 @@ export class RemixAppManager extends PluginManager {
...
@@ -82,7 +82,7 @@ export class RemixAppManager extends PluginManager {
onPluginDeactivated
(
plugin
)
{
onPluginDeactivated
(
plugin
)
{
this
.
pluginLoader
.
set
(
plugin
,
this
.
actives
)
this
.
pluginLoader
.
set
(
plugin
,
this
.
actives
)
this
.
event
.
emit
(
'deactivate'
,
plugin
)
this
.
event
.
emit
(
'deactivate'
,
plugin
)
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'deactivate'
,
plugin
])
_paq
.
push
([
'trackEvent'
,
'pluginManager'
,
'deactivate'
,
plugin
.
name
])
}
}
isRequired
(
name
)
{
isRequired
(
name
)
{
...
...
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