move remix, remixd info to setttings tab

pull/1/head
yann300 6 years ago
parent fbc80fdb7c
commit 17718648a8
  1. 34
      src/app/tabs/settings-tab.js
  2. 60
      src/app/tabs/support-tab.js

@ -32,7 +32,7 @@ module.exports = class SettingsTab {
theme: { dark: null, light: null }, theme: { dark: null, light: null },
config: { config: {
general: null, themes: null, general: null, themes: null,
plugin: null, remixd: null, localremixd: null plugin: null
} }
} /* eslint-enable */ } /* eslint-enable */
self.data = {} self.data = {}
@ -120,39 +120,12 @@ module.exports = class SettingsTab {
<input onclick=${onloadPluginJson} type="button" value="Load" class="${css.pluginLoad}"> <input onclick=${onloadPluginJson} type="button" value="Load" class="${css.pluginLoad}">
</div> </div>
</div>` </div>`
self._view.config.remixd = yo`
<div class="${css.info}">
<div class=${css.title}>Remixd</div>
<div class="${css.crow}">
Remixd is a tool which allow Remix IDE to access files located in your local computer.
it can also be used to setup a development environment.
</div>
<div class="${css.crow}">More infos:</div>
<div class="${css.crow}"><a target="_blank" href="https://github.com/ethereum/remixd"> https://github.com/ethereum/remixd</a></div>
<div class="${css.crow}"><a target="_blank" href="https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem">http://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html</a></div>
<div class="${css.crow}">Installation: <pre class=${css.remixdinstallation}>npm install remixd -g</pre></div>
</div>`
self._view.config.localremixd = yo`
<div class="${css.info}">
<div class=${css.title}>Running Remix locally</div>
<div class="${css.crow}">
as a NPM module:
</div>
<a target="_blank" href="https://www.npmjs.com/package/remix-ide">https://www.npmjs.com/package/remix-ide</a>
<pre class=${css.remixdinstallation}>npm install remix-ide -g</pre>
<div class="${css.crow}">
as an electron app:
</div>
<a target="_blank" href="https://github.com/horizon-games/remix-app">https://github.com/horizon-games/remix-app</a>
</div>`
self._view.el = yo` self._view.el = yo`
<div class="${css.settingsTabView} "id="settingsView"> <div class="${css.settingsTabView} "id="settingsView">
${self._view.config.general} ${self._view.config.general}
${self._view.config.plugin} ${self._view.config.plugin}
${self._view.gistToken} ${self._view.gistToken}
${self._view.config.themes} ${self._view.config.themes}
${self._view.config.remixd}
${self._view.config.localremixd}
</div>` </div>`
function onchangeOption (event) { function onchangeOption (event) {
self._deps.config.set('settings/always-use-vm', !self._deps.config.get('settings/always-use-vm')) self._deps.config.set('settings/always-use-vm', !self._deps.config.get('settings/always-use-vm'))
@ -251,11 +224,6 @@ const css = csjs`
.icon { .icon {
margin-right: .5em; margin-right: .5em;
} }
.remixdinstallation {
padding: 3px;
border-radius: 2px;
margin-left: 5px;
}
.savegisttoken { .savegisttoken {
margin-left: 5px; margin-left: 5px;
} }

@ -11,7 +11,7 @@ module.exports = class SupportTab {
constructor (localRegistry) { constructor (localRegistry) {
const self = this const self = this
self.event = new EventManager() self.event = new EventManager()
self._view = { el: null, gitterIframe: '' } self._view = { el: null, gitterIframe: '', config: {} }
self.data = { gitterIsLoaded: false } self.data = { gitterIsLoaded: false }
self._components = {} self._components = {}
self._components.registry = localRegistry || globalRegistry self._components.registry = localRegistry || globalRegistry
@ -33,6 +33,31 @@ module.exports = class SupportTab {
const self = this const self = this
if (self._view.el) return self._view.el if (self._view.el) return self._view.el
self._view.gitterIframe = yo`<div></div>` self._view.gitterIframe = yo`<div></div>`
self._view.config.remixd = yo`
<div class="${css.info}">
<div class=${css.title}>Accessing local files</div>
<div class="${css.crow}">
Remixd is a tool which allow Remix IDE to access files located in your local computer.
it can also be used to setup a development environment.
</div>
<div class="${css.crow}">More infos:</div>
<div class="${css.crow}"><a target="_blank" href="https://github.com/ethereum/remixd"> https://github.com/ethereum/remixd</a></div>
<div class="${css.crow}"><a target="_blank" href="https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem">http://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html</a></div>
<div class="${css.crow}">Installation: <pre class=${css.remixdinstallation}>npm install remixd -g</pre></div>
</div>`
self._view.config.localremixd = yo`
<div class="${css.info}">
<div class=${css.title}>Running Remix locally</div>
<div class="${css.crow}">
as a NPM module:
</div>
<a target="_blank" href="https://www.npmjs.com/package/remix-ide">https://www.npmjs.com/package/remix-ide</a>
<pre class=${css.remixdinstallation}>npm install remix-ide -g</pre>
<div class="${css.crow}">
as an electron app:
</div>
<a target="_blank" href="https://github.com/horizon-games/remix-app">https://github.com/horizon-games/remix-app</a>
</div>`
self._view.el = yo` self._view.el = yo`
<div class="${css.supportTabView}" id="supportView"> <div class="${css.supportTabView}" id="supportView">
<div class="${css.infoBox}"> <div class="${css.infoBox}">
@ -47,6 +72,8 @@ module.exports = class SupportTab {
</div> </div>
${self._view.gitterIframe} ${self._view.gitterIframe}
</div> </div>
${self._view.config.remixd}
${self._view.config.localremixd}
</div>` </div>`
return self._view.el return self._view.el
function openLink () { window.open('https://gitter.im/ethereum/remix') } function openLink () { window.open('https://gitter.im/ethereum/remix') }
@ -55,12 +82,13 @@ module.exports = class SupportTab {
const css = csjs` const css = csjs`
.supportTabView { .supportTabView {
height: 100vh; height: 100%;
padding: 2%; padding: 2%;
padding-bottom: 3em; padding-bottom: 3em;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
overflow-y: auto;
} }
.chat { .chat {
${styles.rightPanel.supportTab.box_IframeContainer} ${styles.rightPanel.supportTab.box_IframeContainer}
@ -102,4 +130,32 @@ const css = csjs`
.infoBox { .infoBox {
${styles.rightPanel.supportTab.box_SupportInfo} ${styles.rightPanel.supportTab.box_SupportInfo}
} }
.remixdinstallation {
padding: 3px;
border-radius: 2px;
margin-left: 5px;
}
.info {
${styles.rightPanel.settingsTab.box_SolidityVersionInfo};
margin-top: 1em;
word-break: break-word;
}
.title {
font-size: 1.1em;
font-weight: bold;
margin-bottom: 1em;
}
.crow {
display: flex;
overflow: auto;
clear: both;
padding: .2em;
}
.crow label {
cursor:pointer;
}
.crowNoFlex {
overflow: auto;
clear: both;
}
` `

Loading…
Cancel
Save