pull/5370/head
bunsenstraat 3 years ago
parent f75ce40939
commit 0113d4ccfb
  1. 0
      apps/remix-ide/src/app/components/ViewPluginUI.tsx
  2. 2
      apps/remix-ide/src/app/components/hidden-panel.tsx
  3. 2
      apps/remix-ide/src/app/components/main-panel.tsx
  4. 2
      apps/remix-ide/src/app/components/plugin-manager-component.js
  5. 2
      apps/remix-ide/src/app/components/side-panel.tsx
  6. 2
      apps/remix-ide/src/app/components/vertical-icons.tsx
  7. 4
      apps/remix-ide/src/app/editor/editor.js
  8. 52
      apps/remix-ide/src/app/tabs/analysis-tab.js
  9. 2
      apps/remix-ide/src/app/tabs/settings-tab.tsx

@ -4,7 +4,7 @@ import ReactDOM from 'react-dom' // eslint-disable-line
import { AbstractPanel } from './panel' import { AbstractPanel } from './panel'
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import { RemixPluginPanel } from '@remix-ui/panel' import { RemixPluginPanel } from '@remix-ui/panel'
import { ViewPluginUI } from '../plugins/ViewPluginUI' import { ViewPluginUI } from '../components/ViewPluginUI'
const profile = { const profile = {
name: 'hiddenPanel', name: 'hiddenPanel',

@ -3,7 +3,7 @@ import { AbstractPanel } from './panel'
import ReactDOM from 'react-dom' // eslint-disable-line import ReactDOM from 'react-dom' // eslint-disable-line
import { RemixPluginPanel } from '@remix-ui/panel' import { RemixPluginPanel } from '@remix-ui/panel'
import packageJson from '../../../../../package.json' import packageJson from '../../../../../package.json'
import { ViewPluginUI } from '../plugins/ViewPluginUI' import { ViewPluginUI } from '../components/ViewPluginUI'
const profile = { const profile = {
name: 'mainPanel', name: 'mainPanel',

@ -3,7 +3,7 @@ import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
import {RemixUiPluginManager} from '@remix-ui/plugin-manager' // eslint-disable-line import {RemixUiPluginManager} from '@remix-ui/plugin-manager' // eslint-disable-line
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import { ViewPluginUI } from '../plugins/ViewPluginUI' import { ViewPluginUI } from '../components/ViewPluginUI'
const _paq = window._paq = window._paq || [] const _paq = window._paq = window._paq || []
const profile = { const profile = {

@ -5,7 +5,7 @@ import { AbstractPanel } from './panel'
import { RemixPluginPanel } from '@remix-ui/panel' import { RemixPluginPanel } from '@remix-ui/panel'
import packageJson from '../../../../../package.json' import packageJson from '../../../../../package.json'
import RemixUIPanelHeader from 'libs/remix-ui/panel/src/lib/plugins/panel-header' import RemixUIPanelHeader from 'libs/remix-ui/panel/src/lib/plugins/panel-header'
import { ViewPluginUI } from '../plugins/ViewPluginUI' import { ViewPluginUI } from '../components/ViewPluginUI'
// const csjs = require('csjs-inject') // const csjs = require('csjs-inject')
const sidePanel = { const sidePanel = {

@ -6,7 +6,7 @@ import { Plugin } from '@remixproject/engine'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
import { IconRecord, RemixUiVerticalIconsPanel } from '@remix-ui/vertical-icons-panel' import { IconRecord, RemixUiVerticalIconsPanel } from '@remix-ui/vertical-icons-panel'
import { Profile } from '@remixproject/plugin-utils' import { Profile } from '@remixproject/plugin-utils'
import { ViewPluginUI } from '../plugins/ViewPluginUI' import { ViewPluginUI } from '../components/ViewPluginUI'
const profile = { const profile = {
name: 'menuicons', name: 'menuicons',

@ -4,7 +4,7 @@ import ReactDOM from 'react-dom'
import { EditorUI } from '@remix-ui/editor' // eslint-disable-line import { EditorUI } from '@remix-ui/editor' // eslint-disable-line
import { Plugin } from '@remixproject/engine' import { Plugin } from '@remixproject/engine'
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import { ViewPluginUI } from '../plugins/ViewPluginUI' import { ViewPluginUI } from '../components/ViewPluginUI'
const EventManager = require('../../lib/events') const EventManager = require('../../lib/events')
@ -68,8 +68,6 @@ class Editor extends Plugin {
setDispatch (dispatch) { setDispatch (dispatch) {
this.dispatch = dispatch this.dispatch = dispatch
} }
updateComponent(state) { updateComponent(state) {

@ -1,10 +1,10 @@
import React from 'react' // eslint-disable-line import React from 'react' // eslint-disable-line
import { ViewPlugin } from '@remixproject/engine-web' import { ViewPlugin } from '@remixproject/engine-web'
import ReactDOM from 'react-dom'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
import {RemixUiStaticAnalyser} from '@remix-ui/static-analyser' // eslint-disable-line import {RemixUiStaticAnalyser} from '@remix-ui/static-analyser' // eslint-disable-line
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry' import Registry from '../state/registry'
import { ViewPluginUI } from '../components/ViewPluginUI'
var EventManager = require('../../lib/events') var EventManager = require('../../lib/events')
@ -35,6 +35,7 @@ class AnalysisTab extends ViewPlugin {
offsetToLineColumnConverter: this.registry.get( offsetToLineColumnConverter: this.registry.get(
'offsettolinecolumnconverter').api 'offsettolinecolumnconverter').api
} }
this.dispatch = null
} }
async onActivation () { async onActivation () {
@ -43,33 +44,40 @@ class AnalysisTab extends ViewPlugin {
await this.call('manager', 'activatePlugin', 'solidity') await this.call('manager', 'activatePlugin', 'solidity')
} }
this.renderComponent() this.renderComponent()
this.event.register('staticAnaysisWarning', (count) => {
if (count > 0) {
this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: 'warning' })
} else if (count === 0) {
this.emit('statusChanged', { key: 'succeed', title: 'no warning', type: 'success' })
} else {
// count ==-1 no compilation result
this.emit('statusChanged', { key: 'none' })
}
})
}
setDispatch (dispatch) {
this.dispatch = dispatch
} }
render () { render () {
return this.element return <div id='staticAnalyserView'><ViewPluginUI plugin={this} /></div>
}
updateComponent(state) {
return <RemixUiStaticAnalyser
registry={state.registry}
analysisModule={state}
event={state.event}
/>
} }
renderComponent () { renderComponent () {
ReactDOM.render( this.dispatch({
<RemixUiStaticAnalyser registry: this.registry,
registry={this.registry} analysisModule: this,
analysisModule={this} event: this.event
event={this.event} })
/>,
this.element,
() => {
this.event.register('staticAnaysisWarning', (count) => {
if (count > 0) {
this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: 'warning' })
} else if (count === 0) {
this.emit('statusChanged', { key: 'succeed', title: 'no warning', type: 'success' })
} else {
// count ==-1 no compilation result
this.emit('statusChanged', { key: 'none' })
}
})
}
)
} }
} }

@ -5,7 +5,7 @@ import * as packageJson from '../../../../../package.json'
import { RemixUiSettings } from '@remix-ui/settings' //eslint-disable-line import { RemixUiSettings } from '@remix-ui/settings' //eslint-disable-line
import Registry from '../state/registry' import Registry from '../state/registry'
import { ViewReactPlugin } from '../plugins/viewReactPlugin' import { ViewReactPlugin } from '../plugins/viewReactPlugin'
import { ViewPluginUI } from '../plugins/ViewPluginUI' import { ViewPluginUI } from '../components/ViewPluginUI'
const profile = { const profile = {
name: 'settings', name: 'settings',

Loading…
Cancel
Save