diff --git a/src/app/tabs/settings-tab.js b/src/app/tabs/settings-tab.js
index 8b3bd1fbf3..176c0b7a9a 100644
--- a/src/app/tabs/settings-tab.js
+++ b/src/app/tabs/settings-tab.js
@@ -1,74 +1,127 @@
-/* global Option, Worker */
-var $ = require('jquery')
+/* global Worker */
var yo = require('yo-yo')
-var request = require('request')
-var QueryParams = require('../../lib/query-params')
+var csjs = require('csjs-inject')
+var minixhr = require('minixhr')
var remixLib = require('remix-lib')
-var Storage = remixLib.Storage
-var styleGuide = require('../ui/styles-guide/theme-chooser')
+var QueryParams = require('../../lib/query-params')
var helper = require('../../lib/helper')
var modal = require('../ui/modal-dialog-custom')
var tooltip = require('../ui/tooltip')
var copyToClipboard = require('../ui/copy-to-clipboard')
+var styleGuide = require('../ui/styles-guide/theme-chooser')
-var css = require('./styles/settings-tab-styles')
-
-function SettingsTab (appAPI = {}, appEvents = {}, opts = {}) {
- var queryParams = new QueryParams()
-
- var optionVM = yo``
- var personal = yo``
- var warnText = `Transaction sent over Web3 will use the web3.personal API - be sure the endpoint is opened before enabling it.
- This mode allows to provide the passphrase in the Remix interface without having to unlock the account.
- Although this is very convenient, you should completely trust the backend you are connected to (Geth, Parity, ...).
- It is not recommended (and also most likely not relevant) to use this mode with an injected provider (Mist, Metamask, ...) or with JavaScript VM.
- Remix never persist any passphrase.`
- var warnPersonalMode = yo``
-
- // Gist settings
- var gistAccessToken = yo``
- var token = appAPI.config.get('settings/gist-access-token')
- if (token) gistAccessToken.value = token
- var gistAddToken = yo` { appAPI.config.set('settings/gist-access-token', gistAccessToken.value); tooltip('Access token saved') }} value="Save" type="button">`
- var gistRemoveToken = yo` { gistAccessToken.value = ''; appAPI.config.set('settings/gist-access-token', ''); tooltip('Access token removed') }} value="Remove" type="button">`
-
- var el = yo`
-
`
+ //
+ self._view.optionVM = yo``
+ if (self._api.config.get('settings/always-use-vm')) self._view.optionVM.setAttribute('checked', '')
+ self._view.personal = yo``
+ if (self._api.config.get('settings/personal-mode')) self._view.personal.setAttribute('checked', '')
+ self._view.optimize = yo``
+ if (self.data.optimize) self._view.optimize.setAttribute('checked', '')
+ var warnText = `Transaction sent over Web3 will use the web3.personal API - be sure the endpoint is opened before enabling it.
+ This mode allows to provide the passphrase in the Remix interface without having to unlock the account.
+ Although this is very convenient, you should completely trust the backend you are connected to (Geth, Parity, ...).
+ It is not recommended (and also most likely not relevant) to use this mode with an injected provider (Mist, Metamask, ...) or with JavaScript VM.
+ Remix never persist any passphrase.`.split('\n').map(s => s.trim()).join(' ')
+ self._view.warnPersonalMode = yo``
+ self._view.pluginInput = yo``
+ self._view.versionSelector = yo`
+ `
+ if (self.data.allversions && self.data.selectedVersion) self._updateVersionSelector()
+ self._view.version = yo``
+ self._view.theme.light = yo``
+ self._view.theme.dark = yo``
+ self._view.theme[self.data.currentTheme].setAttribute('checked', 'checked')
+ self._view.config.solidity = yo`
Solidity version
- Current version:
+ Current version: ${self._view.version}
-
+ ${self._view.versionSelector}
-
+
`
+ self._view.config.general = yo`
-
General settings
-
-
${optionVM}
- Always use Ethereum VM at Load
-
-
-
- Text Wrap
-
-
-
- Enable Optimization
-
-
-
${personal}
- Enable Personal Mode ${warnPersonalMode}
-
+
General settings
+
+
${self._view.optionVM}
+ Always use Ethereum VM at Load
+
+
+
+ Text Wrap
+
+
+
${self._view.optimize}
+ Enable Optimization
+
+
+
${self._view.personal}>
+ Enable Personal Mode ${self._view.warnPersonalMode}>
+
+ `
+ self._view.gistToken = yo`
Gist Access Token
Manage the access token used to publish to Gist.
Go to github token page (link below) to create a new token and save it in Remix. Make sure this token has only 'create gist' permission.
@@ -76,14 +129,15 @@ function SettingsTab (appAPI = {}, appEvents = {}, opts = {}) {
Selecting a theme will trigger a page reload
-
+ ${self._view.theme.light}
-
+ ${self._view.theme.dark}
-
+ `
+ self._view.config.plugin = yo`
Plugin
@@ -92,11 +146,12 @@ function SettingsTab (appAPI = {}, appEvents = {}, opts = {}) {
Do not use this alpha feature if you are not sure what you are doing!