Skip to content

Commit

Permalink
Merge branch 'frontend'
Browse files Browse the repository at this point in the history
  • Loading branch information
wildkif committed Mar 4, 2019
2 parents 146327e + 70a64e1 commit 43faf7d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/gui/qt-daemon/html/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1904,6 +1904,14 @@ var BackendService = /** @class */ (function () {
BackendService.prototype.openUrlInBrowser = function (url, callback) {
this.runCommand('open_url_in_browser', url, 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.prototype.getDefaultFee = function (callback) {
this.runCommand('get_default_fee', {}, callback);
};
Expand Down Expand Up @@ -2594,6 +2602,9 @@ var AppComponent = /** @class */ (function () {
this.backend.initService().subscribe(function (initMessage) {
console.log('Init message: ', initMessage);
_this.backend.webkitLaunchedScript();
_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.ngZone.run(function () {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qt-daemon/html/main.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,15 @@ export class BackendService {
this.runCommand('open_url_in_browser', url, 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);
}

getDefaultFee(callback) {
this.runCommand('get_default_fee', {}, callback);
}
Expand Down
4 changes: 4 additions & 0 deletions src/gui/qt-daemon/html_source/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export class AppComponent implements OnInit, OnDestroy {

this.backend.webkitLaunchedScript();

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.ngZone.run(() => {
Expand Down

0 comments on commit 43faf7d

Please sign in to comment.