Browse Source

startup window agama modes explained

v0.25
pbca26 7 years ago
parent
commit
fcd9de9885
  1. 35
      gui/startup/index.html
  2. 12
      routes/shepherd/confMaxconnections.js

35
gui/startup/index.html

@ -19,13 +19,33 @@
onClick="quitApp()"> onClick="quitApp()">
<img src="../EasyDEX-GUI/assets/mainWindow/img/fa-close.png"> <img src="../EasyDEX-GUI/assets/mainWindow/img/fa-close.png">
</div> </div>
<img <div class="intro">
src="../EasyDEX-GUI/assets/mainWindow/img/agama-icon.svg" <img
class="agama-logo" src="../EasyDEX-GUI/assets/mainWindow/img/agama-icon.svg"
alt="Agama Wallet" class="agama-logo"
width="80" alt="Agama Wallet"
height="100" /> width="80"
<div id="agamaModeStatus">Choose Agama mode</div> height="100" />
<div id="agamaModeStatus">
Choose Agama mode
<div
onClick="toggleMainWindowHelp()"
class="settings-help pointer"
title="About Agama modes">
<img src="../EasyDEX-GUI/assets/mainWindow/img/fa-question.png" />
</div>
</div>
</div>
<div class="agama-modes-help" style="display: none">
<img
onClick="toggleMainWindowHelp()"
class="close-btn"
src="../EasyDEX-GUI/assets/mainWindow/img/fa-close.png">
<strong>Be aware:</strong> Native mode requires to download the whole blockchain data to a local disk before you can start using it. This may take from <strong>several hours to a day</strong> depending on your connection and hardware. Please <u>try to keep Agama running</u> until the whole process is finished.
<br /><br />
If you need a quick and easy access to your funds try SPV mode which doesn't require any blockchain to be loaded locally. All data is requested on demand from Electrum servers.
</div>
<div class="mode-desc native">Full blockchain mode</div>
<button <button
id="nativeOnlyBtn" id="nativeOnlyBtn"
onClick="closeMainWindow(true)" onClick="closeMainWindow(true)"
@ -50,6 +70,7 @@
</li> </li>
</ul> </ul>
<div class="mode-desc spv">Starts in seconds</div>
<button <button
id="spvBtn" id="spvBtn"
onClick="startSPV('KMD')" onClick="startSPV('KMD')"

12
routes/shepherd/confMaxconnections.js

@ -1,15 +1,17 @@
const fs = require('fs-extra');
module.exports = (shepherd) => { module.exports = (shepherd) => {
shepherd.getMaxconKMDConf = () => { shepherd.getMaxconKMDConf = () => {
return new shepherd.Promise((resolve, reject) => { return new shepherd.Promise((resolve, reject) => {
shepherd.fs.readFile(`${shepherd.komodoDir}/komodo.conf`, 'utf8', (err, data) => { fs.readFile(`${shepherd.komodoDir}/komodo.conf`, 'utf8', (err, data) => {
if (err) { if (err) {
shepherd.log(`kmd conf maxconnections param read failed`); shepherd.log('kmd conf maxconnections param read failed');
resolve('unset'); resolve('unset');
} else { } else {
const _maxcon = data.match(/maxconnections=\s*(.*)/); const _maxcon = data.match(/maxconnections=\s*(.*)/);
if (!_maxcon) { if (!_maxcon) {
shepherd.log(`kmd conf maxconnections param is unset`); shepherd.log('kmd conf maxconnections param is unset');
resolve(false); resolve(false);
} else { } else {
shepherd.log(`kmd conf maxconnections param is already set to ${_maxcon[1]}`); shepherd.log(`kmd conf maxconnections param is already set to ${_maxcon[1]}`);
@ -22,7 +24,7 @@ module.exports = (shepherd) => {
shepherd.setMaxconKMDConf = (limit) => { shepherd.setMaxconKMDConf = (limit) => {
return new shepherd.Promise((resolve, reject) => { return new shepherd.Promise((resolve, reject) => {
shepherd.fs.readFile(`${shepherd.komodoDir}/komodo.conf`, 'utf8', (err, data) => { fs.readFile(`${shepherd.komodoDir}/komodo.conf`, 'utf8', (err, data) => {
const _maxconVal = limit ? 1 : 10; const _maxconVal = limit ? 1 : 10;
if (err) { if (err) {
@ -37,7 +39,7 @@ module.exports = (shepherd) => {
data = `${data}\nmaxconnections=${_maxconVal}\n`; data = `${data}\nmaxconnections=${_maxconVal}\n`;
} }
shepherd.fs.writeFile(`${shepherd.komodoDir}/komodo.conf`, data, (err) => { fs.writeFile(`${shepherd.komodoDir}/komodo.conf`, data, (err) => {
if (err) { if (err) {
shepherd.log(`error writing ${shepherd.komodoDir}/komodo.conf maxconnections=${_maxconVal}`); shepherd.log(`error writing ${shepherd.komodoDir}/komodo.conf maxconnections=${_maxconVal}`);
resolve(false); resolve(false);

Loading…
Cancel
Save