home icon on vertical panel

pull/1/head
LianaHus 6 years ago
parent 26887da521
commit 6b3581ce39
  1. 8
      src/app.js
  2. 2
      src/app/components/plugin-manager-component.js
  3. 16
      src/app/components/vertical-icons-component.js
  4. 5
      src/app/ui/landing-page/landing-page.js

@ -364,8 +364,11 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
pluginManagerComponent.setApp(appManager)
pluginManagerComponent.setStore(appStore)
// Need to have Home initialized before VerticalIconComponent render to access profile of it for icon
const landingPage = new LandingPage(appManager, appStore)
// ----------------- Vertical Icon ----------------------------
const verticalIconsComponent = new VerticalIconsComponent('swapPanel', appStore)
const verticalIconsComponent = new VerticalIconsComponent('swapPanel', appStore, landingPage.profile)
const swapPanelApi = new SwapPanelApi(swapPanelComponent, verticalIconsComponent) // eslint-disable-line
const mainPanelApi = new SwapPanelApi(mainPanelComponent, verticalIconsComponent) // eslint-disable-line
const verticalIconsApi = new VerticalIconsApi(verticalIconsComponent) // eslint-disable-line
@ -373,7 +376,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
self._components.editorpanel.init()
self._components.fileManager.init()
self._view.mainpanel.appendChild(self._components.editorpanel.render())
self._view.iconpanel.appendChild(verticalIconsComponent.render())
self._view.swappanel.appendChild(swapPanelComponent.render())
@ -407,7 +409,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
)
let analysis = new AnalysisTab(registry)
let debug = new DebuggerTab()
const landingPage = new LandingPage(appManager, appStore)
let test = new TestTab(
registry.get('filemanager').api,
registry.get('filepanel').api,
@ -438,6 +439,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...appManager.plugins()
])
framingService.start(appStore, swapPanelApi, verticalIconsApi, mainPanelApi, this._components.resizeFeature)
// The event listener needs to be registered as early as possible, because the

@ -156,7 +156,7 @@ class PluginManagerComponent extends BaseApi {
<div id='pluginManager'>
<div class="form-group ${css.pluginSearch}">
<input onkeyup="${e => this.filterPlugins(e)}" class="form-control" placeholder="Search">
<button onclick="${_ => this.openLocalPlugin()}" class="btn btn-sm text-dark ${css.localPluginBtn}">
<button onclick="${_ => this.openLocalPlugin()}" class="btn btn-sm text-info ${css.localPluginBtn}">
Connect to a Local Plugin
</button>
</div>

@ -8,8 +8,9 @@ const EventEmitter = require('events')
// Component
class VerticalIconComponent {
constructor (name, appStore) {
constructor (name, appStore, homeProfile) {
this.store = appStore
this.homeProfile = homeProfile
this.events = new EventEmitter()
this.icons = {}
this.iconKind = {}
@ -215,6 +216,18 @@ class VerticalIconComponent {
}
render () {
let home = yo`
<div
class="${css.icon}"
onclick="${(e) => {
this._iconClick(name)
globalRegistry.get('appManager').api.ensureActivated('home')
}}"
plugin="${this.homeProfile.name}" title="${this.homeProfile.displayName}"
>
<i class="fab fa-ethereum" alt="${this.homeProfile.name}"></i>
</div>`
this.iconKind['fileexplorer'] = yo`
<div id='fileExplorerIcons'>
</div>
@ -257,6 +270,7 @@ class VerticalIconComponent {
this.view = yo`
<div class=${css.icons}>
${home}
${this.iconKind['fileexplorer']}
${this.iconKind['compile']}
${this.iconKind['run']}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save