set a list of module that cant be deactivated

pull/1/head
yann300 5 years ago
parent 9340a35266
commit d820a90b93
  1. 3
      src/app/compiler/compiler-artefacts.js
  2. 3
      src/app/components/hidden-panel.js
  3. 3
      src/app/components/main-panel.js
  4. 5
      src/app/components/plugin-manager-component.js
  5. 3
      src/app/components/side-panel.js
  6. 3
      src/app/components/vertical-icons.js
  7. 3
      src/app/editor/SourceHighlighters.js
  8. 3
      src/app/editor/contextualListener.js
  9. 3
      src/app/files/compiler-metadata.js
  10. 3
      src/app/files/fileManager.js
  11. 3
      src/app/panels/file-panel.js
  12. 1
      src/app/panels/terminal.js
  13. 3
      src/app/tabs/network-module.js
  14. 3
      src/app/tabs/theme-module.js
  15. 3
      src/app/ui/landing-page/landing-page.js
  16. 3
      src/lib/offsetToLineColumnConverter.js
  17. 14
      src/remixAppManager.js

@ -7,8 +7,7 @@ const profile = {
name: 'compilerArtefacts',
methods: [],
events: [],
version: packageJson.version,
required: true
version: packageJson.version
}
module.exports = class CompilerArtefacts extends Plugin {

@ -13,8 +13,7 @@ const profile = {
name: 'hiddenPanel',
displayName: 'Hidden Panel',
description: '',
version: packageJson.version,
required: true
version: packageJson.version
}
export class HiddenPanel extends AbstractPanel {

@ -16,8 +16,7 @@ const profile = {
displayName: 'Main Panel',
description: '',
version: packageJson.version,
methods: ['addView', 'removeView'],
required: true
methods: ['addView', 'removeView']
}
export class MainPanel extends AbstractPanel {

@ -59,8 +59,7 @@ const profile = {
kind: 'settings',
location: 'sidePanel',
documentation: 'https://remix-ide.readthedocs.io/en/latest/plugin_manager.html',
version: packageJson.version,
required: true
version: packageJson.version
}
class PluginManagerComponent extends ViewPlugin {
@ -146,7 +145,7 @@ class PluginManagerComponent extends ViewPlugin {
render () {
// Filtering helpers
const isFiltered = (api) => api.name.toLowerCase().includes(this.filter)
const isNotRequired = ({profile}) => !profile.required
const isNotRequired = ({profile}) => !this.appManager.isRequired(profile.name)
const sortByName = (a, b) => {
const nameA = a.name.toUpperCase()
const nameB = b.name.toUpperCase()

@ -55,8 +55,7 @@ const sidePanel = {
displayName: 'Side Panel',
description: '',
version: packageJson.version,
methods: ['addView', 'removeView'],
required: true
methods: ['addView', 'removeView']
}
// TODO merge with vertical-icons.js

@ -12,8 +12,7 @@ const profile = {
displayName: 'Vertical Icons',
description: '',
version: packageJson.version,
methods: ['select'],
required: true
methods: ['select']
}
// TODO merge with side-panel.js. VerticalIcons should not be a plugin

@ -9,8 +9,7 @@ const profile = {
name: 'sourceHighlighters',
description: 'service - highlight source code',
version: packageJson.version,
methods: ['highlight', 'discardHighlight'],
required: true
methods: ['highlight', 'discardHighlight']
}
// EditorApi:

@ -12,8 +12,7 @@ const profile = {
name: 'contextualListener',
methods: [],
events: [],
version: packageJson.version,
required: true
version: packageJson.version
}
/*

@ -8,8 +8,7 @@ const profile = {
name: 'compilerMetadata',
methods: ['deployMetadataOf'],
events: [],
version: packageJson.version,
required: true
version: packageJson.version
}
class CompilerMetadata extends Plugin {

@ -23,8 +23,7 @@ const profile = {
icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNjk2IDM4NHE0MCAwIDY4IDI4dDI4IDY4djEyMTZxMCA0MC0yOCA2OHQtNjggMjhoLTk2MHEtNDAgMC02OC0yOHQtMjgtNjh2LTI4OGgtNTQ0cS00MCAwLTY4LTI4dC0yOC02OHYtNjcycTAtNDAgMjAtODh0NDgtNzZsNDA4LTQwOHEyOC0yOCA3Ni00OHQ4OC0yMGg0MTZxNDAgMCA2OCAyOHQyOCA2OHYzMjhxNjgtNDAgMTI4LTQwaDQxNnptLTU0NCAyMTNsLTI5OSAyOTloMjk5di0yOTl6bS02NDAtMzg0bC0yOTkgMjk5aDI5OXYtMjk5em0xOTYgNjQ3bDMxNi0zMTZ2LTQxNmgtMzg0djQxNnEwIDQwLTI4IDY4dC02OCAyOGgtNDE2djY0MGg1MTJ2LTI1NnEwLTQwIDIwLTg4dDQ4LTc2em05NTYgODA0di0xMTUyaC0zODR2NDE2cTAgNDAtMjggNjh0LTY4IDI4aC00MTZ2NjQwaDg5NnoiLz48L3N2Zz4=',
permission: true,
version: packageJson.version,
methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile', 'switchFile'],
required: true
methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile', 'switchFile']
}
// File System profile

@ -37,8 +37,7 @@ const profile = {
kind: 'fileexplorer',
location: 'sidePanel',
documentation: 'https://remix-ide.readthedocs.io/en/latest/file_explorer.html',
version: packageJson.version,
required: true
version: packageJson.version
}
module.exports = class Filepanel extends ViewPlugin {

@ -34,7 +34,6 @@ const profile = {
methods: [],
events: [],
description: ' - ',
required: true,
version: packageJson.version
}

@ -6,8 +6,7 @@ export const profile = {
name: 'network',
description: 'Manage the network (mainnet, ropsten, goerli...) and the provider (web3, vm, injected)',
methods: [],
version: packageJson.version,
required: true
version: packageJson.version
}
// Network API has :

@ -21,8 +21,7 @@ const profile = {
name: 'theme',
events: ['themeChanged'],
methods: ['switchTheme', 'getThemes', 'currentTheme'],
version: packageJson.version,
required: true
version: packageJson.version
}
export class ThemeModule extends Plugin {

File diff suppressed because one or more lines are too long

@ -7,8 +7,7 @@ const profile = {
name: 'offsetToLineColumnConverter',
methods: [],
events: [],
version: packageJson.version,
required: true
version: packageJson.version
}
export class OffsetToLineColumnConverter extends Plugin {

@ -3,6 +3,11 @@ import { PluginEngine, IframePlugin } from '@remixproject/engine'
import { EventEmitter } from 'events'
import { PermissionHandler } from './app/ui/persmission-handler'
const requiredModules = [ // services + layout views + system views
'compilerArtefacts', 'compilerMetadata', 'contextualListener', 'sourceHighlighters', 'offsetToLineColumnConverter', 'network', 'theme', 'fileManager', 'contentImport', 'udapp',
'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons', 'fileExplorers',
'terminal', 'home', 'settings', 'pluginManager']
export class RemixAppManager extends PluginEngine {
constructor (plugins) {
@ -54,6 +59,15 @@ export class RemixAppManager extends PluginEngine {
this.event.emit('ensureDeactivated', apiName)
}
deactivateOne (name) {
if (requiredModules.includes(name)) return
super.deactivateOne(name)
}
isRequired (name) {
return requiredModules.includes(name)
}
registeredPlugins () {
let vyper = {
name: 'vyper',

Loading…
Cancel
Save