|
|
|
@ -24,9 +24,12 @@ class SettingsUI { |
|
|
|
|
|
|
|
|
|
this._components.registry = globalRegistry |
|
|
|
|
this._deps = { |
|
|
|
|
networkModule: this._components.registry.get('network').api |
|
|
|
|
networkModule: this._components.registry.get('network').api, |
|
|
|
|
config: this._components.registry.get('config').api |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this._deps.config.events.on('settings/personal-mode_changed', this.onPersonalChange.bind(this)) |
|
|
|
|
|
|
|
|
|
setInterval(() => { |
|
|
|
|
this.updateAccountBalances() |
|
|
|
|
}, 10 * 1000) |
|
|
|
@ -87,7 +90,7 @@ class SettingsUI { |
|
|
|
|
<div class="${css.crow}"> |
|
|
|
|
<div class="${css.col1_1}"> |
|
|
|
|
Account |
|
|
|
|
<span id="remixRunPlusWraper" title="Create a new account"> |
|
|
|
|
<span id="remixRunPlusWraper" title="Create a new account" onload=${this.updatePlusButton.bind(this)}> |
|
|
|
|
<i id="remixRunPlus" class="fas fa-plus-circle ${css.icon}" aria-hidden="true" onclick=${this.newAccount.bind(this)}"></i> |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
@ -215,7 +218,17 @@ class SettingsUI { |
|
|
|
|
} |
|
|
|
|
break |
|
|
|
|
case 'web3': { |
|
|
|
|
if (!this._components.registry.get('config').api.get('settings/personal-mode')) { |
|
|
|
|
this.onPersonalChange() |
|
|
|
|
} |
|
|
|
|
break |
|
|
|
|
default: |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onPersonalChange () { |
|
|
|
|
let plusBtn = document.getElementById('remixRunPlus') |
|
|
|
|
let plusTitle = document.getElementById('remixRunPlusWraper') |
|
|
|
|
if (!this._deps.config.get('settings/personal-mode')) { |
|
|
|
|
plusBtn.classList.add(css.disableMouseEvents) |
|
|
|
|
plusTitle.title = 'Creating an account is possible only in Personal mode. Please go to Settings to enable it.' |
|
|
|
|
} else { |
|
|
|
@ -223,10 +236,6 @@ class SettingsUI { |
|
|
|
|
plusTitle.title = 'Create a new account' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break |
|
|
|
|
default: |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
newAccount () { |
|
|
|
|
this.settings.newAccount( |
|
|
|
|