forked from lthn/blockchain
add is_remnotenode_mode_preconfigured logic
This commit is contained in:
parent
d4154fed47
commit
2c8c67158d
6 changed files with 104 additions and 2 deletions
|
|
@ -1580,6 +1580,17 @@ var BackendService = /** @class */ (function () {
|
|||
BackendService.prototype.openUrlInBrowser = function (url, callback) {
|
||||
this.runCommand('open_url_in_browser', url, callback);
|
||||
};
|
||||
BackendService.prototype.is_remnotenode_mode_preconfigured = function (callback) {
|
||||
this.runCommand('is_remnotenode_mode_preconfigured', {}, callback);
|
||||
};
|
||||
BackendService.prototype.start_backend = function (node, host, port, callback) {
|
||||
var params = {
|
||||
configure_for_remote_node: node,
|
||||
remote_node_host: host,
|
||||
remote_node_port: parseInt(port, 10)
|
||||
};
|
||||
this.runCommand('start_backend', params, callback);
|
||||
};
|
||||
BackendService = __decorate([
|
||||
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
|
||||
__metadata("design:paramtypes", [_ngx_translate_core__WEBPACK_IMPORTED_MODULE_2__["TranslateService"], _variables_service__WEBPACK_IMPORTED_MODULE_3__["VariablesService"], _modal_service__WEBPACK_IMPORTED_MODULE_4__["ModalService"], _pipes_money_to_int_pipe__WEBPACK_IMPORTED_MODULE_5__["MoneyToIntPipe"]])
|
||||
|
|
@ -2235,6 +2246,14 @@ var AppComponent = /** @class */ (function () {
|
|||
this.backend.initService().subscribe(function (initMessage) {
|
||||
console.log('Init message: ', initMessage);
|
||||
_this.backend.webkitLaunchedScript();
|
||||
_this.backend.is_remnotenode_mode_preconfigured(function (status, data) {
|
||||
// if (data === 'FALSE') {
|
||||
// } else {
|
||||
// }
|
||||
_this.backend.start_backend(false, '127.0.0.1', 11512, function (st2, dd2) {
|
||||
console.log(st2, dd2);
|
||||
});
|
||||
});
|
||||
_this.backend.eventSubscribe('quit_requested', function () {
|
||||
if (!_this.onQuitRequest) {
|
||||
_this.backend.storeSecureAppData(function () {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
1
src/gui/qt-daemon/html_source/.gitignore
vendored
1
src/gui/qt-daemon/html_source/.gitignore
vendored
|
|
@ -37,5 +37,4 @@ testem.log
|
|||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
/package.json
|
||||
/package-lock.json
|
||||
|
|
|
|||
61
src/gui/qt-daemon/html_source/package.json
Normal file
61
src/gui/qt-daemon/html_source/package.json
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"name": "zano",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"build --watch": "ng build --output-path \"C:\\Program Files\\Zano\\html/\" --watch",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e",
|
||||
"copy": "copyfiles -u 1 dist/**/* \"C:\\Program Files\\Zano\\html/\""
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~7.0.0",
|
||||
"@angular/cdk": "^7.2.0",
|
||||
"@angular/common": "~7.0.0",
|
||||
"@angular/compiler": "~7.0.0",
|
||||
"@angular/core": "~7.0.0",
|
||||
"@angular/forms": "~7.0.0",
|
||||
"@angular/http": "~7.0.0",
|
||||
"@angular/platform-browser": "~7.0.0",
|
||||
"@angular/platform-browser-dynamic": "~7.0.0",
|
||||
"@angular/router": "~7.0.0",
|
||||
"@ngx-translate/core": "^11.0.0",
|
||||
"@ngx-translate/http-loader": "^4.0.0",
|
||||
"angular-highcharts": "^7.0.2",
|
||||
"copyfiles": "^2.1.0",
|
||||
"core-js": "^2.5.4",
|
||||
"highcharts": "^6.2.0",
|
||||
"idlejs": "^2.0.1",
|
||||
"inputmask": "^4.0.4",
|
||||
"ngx-contextmenu": "^5.1.1",
|
||||
"qrcode": "^1.3.0",
|
||||
"rxjs": "~6.3.3",
|
||||
"zone.js": "~0.8.26"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.10.0",
|
||||
"@angular/cli": "~7.0.2",
|
||||
"@angular/compiler-cli": "~7.0.0",
|
||||
"@angular/language-service": "~7.0.0",
|
||||
"@types/highcharts": "^5.0.34",
|
||||
"@types/jasmine": "~2.8.8",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "~8.9.4",
|
||||
"codelyzer": "~4.5.0",
|
||||
"jasmine-core": "~2.99.1",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~3.0.0",
|
||||
"karma-chrome-launcher": "~2.2.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.0.1",
|
||||
"karma-jasmine": "~1.1.2",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "~5.4.0",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~5.11.0",
|
||||
"typescript": "~3.1.1"
|
||||
}
|
||||
}
|
||||
|
|
@ -465,6 +465,19 @@ export class BackendService {
|
|||
this.runCommand('open_url_in_browser', url, callback);
|
||||
}
|
||||
|
||||
is_remnotenode_mode_preconfigured(callback) {
|
||||
this.runCommand('is_remnotenode_mode_preconfigured', {}, callback);
|
||||
}
|
||||
|
||||
start_backend(node, host, port, callback) {
|
||||
const params = {
|
||||
configure_for_remote_node: node,
|
||||
remote_node_host: host,
|
||||
remote_node_port: parseInt(port, 10)
|
||||
};
|
||||
this.runCommand('start_backend', params, callback);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,16 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
|
||||
this.backend.webkitLaunchedScript();
|
||||
|
||||
|
||||
this.backend.is_remnotenode_mode_preconfigured((status, data) => {
|
||||
// if (data === 'FALSE') {
|
||||
// } else {
|
||||
// }
|
||||
this.backend.start_backend(false, '127.0.0.1', 11512, (st2, dd2) => {
|
||||
console.log(st2, dd2);
|
||||
});
|
||||
});
|
||||
|
||||
this.backend.eventSubscribe('quit_requested', () => {
|
||||
if (!this.onQuitRequest) {
|
||||
this.backend.storeSecureAppData(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue