Skip to content

Commit

Permalink
Merge branch 'develop' into progressbar
Browse files Browse the repository at this point in the history
  • Loading branch information
AllienWorks committed Nov 13, 2017
2 parents 37606d7 + df1f481 commit c752be3
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 29 deletions.
37 changes: 17 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Particl Wallet - UI

![UI Preview](preview.png)

[![Build Status](https://travis-ci.org/particl/partgui.svg?branch=master)](https://travis-ci.org/particl/partgui)
[![Coverage Status](https://coveralls.io/repos/github/particl/partgui/badge.svg?branch=master)](https://coveralls.io/github/particl/partgui?branch=master)
[![Code Climate](https://codeclimate.com/github/particl/partgui/badges/gpa.svg)](https://codeclimate.com/github/particl/partgui)
[![Greenkeeper badge](https://badges.greenkeeper.io/particl/partgui.svg)](https://greenkeeper.io/)
![UI Preview](preview.gif)

> *"Particl is an open source project that aims to restore the balance of privacy on the internet."*
Expand All @@ -16,7 +11,14 @@ We provide a decentralized privacy platform with a suite of tools to enhance you

This repository is the user interface that works in combination with our [`particl-core`](https://github.com/particl/particl-core).

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.0.
[![Download the packaged wallet for Mac, Windows and Linux](download-button.png)](https://github.com/particl/partgui/releases)

# Contribute

[![Build Status](https://travis-ci.org/particl/partgui.svg?branch=master)](https://travis-ci.org/particl/partgui)
[![Coverage Status](https://coveralls.io/repos/github/particl/partgui/badge.svg?branch=master)](https://coveralls.io/github/particl/partgui?branch=master)
[![Code Climate](https://codeclimate.com/github/particl/partgui/badges/gpa.svg)](https://codeclimate.com/github/particl/partgui)
[![Greenkeeper badge](https://badges.greenkeeper.io/particl/partgui.svg)](https://greenkeeper.io/)

## Development

Expand All @@ -32,27 +34,22 @@ npm install

### Development with Electron
* Run `ng serve` to start the dev server.
* Run `npm run start:electron:dev -- -testnet` in another window to start the electron application.
* Run `npm run start:electron:dev -- -testnet -debug` to start the electron application. Daemon will be updated and launched automatically.

### Development with a Browser
* Run `ng serve` for a dev server.
#### Start the particl-core daemon
```
./particld -daemon -testnet -debug -rpcuser=test -rpcpassword=test -rpccorsdomain=http://localhost:4200
```
### Development with a Browser (deprecating)
* Run `ng serve`. Daemon will not launch automatically.
* Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
#### Stop particl-core daemon
```
./particl-cli -rpcuser=test -rpcpassword=test stop
```

#### Interact with particl-core daemon
You can directly interact with the daemon ran by the Electron version.
```
./particl-cli -rpcuser=test -rpcpassword=test getblockchaininfo
./particl-cli -testnet getblockchaininfo
```

## Running

### Start Electron
* `npm run start:electron` - Windows
* `npm run start:electron:fast` - disables debug messages for faster startup

### Package Electron
* `npm run package:win` - Windows
Expand Down
Binary file added download-button.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 16 additions & 5 deletions modules/rpc/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,24 +136,35 @@ function getOptions() {

function stopDaemon() {
return new Promise((resolve, reject) => {
rpcCall('stop', null, null, (error, response) => {
rpc.rpcCall('stop', null, null, (error, response) => {
if (error) {
log.error('Calling SIGINT!');
reject();
} else {
log.debug('Daemon stopped gracefully');
resolve();
}
});
});
}

electron.app.on('quit', function (event, exitCode) {
console.log('stopping')
electron.app.on('before-quit', function beforeQuit(event, exitCode) {
electron.ipcMain.removeAllListeners(['rpc-channel']); // Remove all ipc listeners
// kill the particl daemon if initiated on launch

// stop the particl daemon if initiated on launch
if (daemon && !daemon.exitCode) {
event.preventDefault();
electron.app.removeListener('before-quit', beforeQuit);
stopDaemon()
.catch(() => daemon.kill('SIGINT'));
.then(electron.app.quit)
.catch(() => {
daemon.kill('SIGINT');
electron.app.quit();
});
}
});

electron.app.on('quit', function(event, exitCode) {
if (exitCode === 991) {
throw Error('Could not connect to daemon.');
}
Expand Down
3 changes: 2 additions & 1 deletion modules/rpc/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,5 @@ function checkDaemon(options) {
}

exports.init = init;
exports.checkDaemon = checkDaemon;
exports.checkDaemon = checkDaemon;
exports.rpcCall = rpcCall;
Binary file added preview.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed preview.png
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
<md-expansion-panel-header fxLayout="row" fxLayoutGap="10px" layout-padding>

<!-- Date -->
<md-panel-title fxFlex="0 0 140px" fxFlex.lt-md="100" *ngIf="display.date" class="history_date">
<md-panel-title fxFlex="0 0 137px" fxFlex.lt-md="100" *ngIf="display.date" class="history_date">
{{ tx.getDate() }}
</md-panel-title>

<!-- Confirmations -->
<md-panel-title fxFlex="1 0 60px" fxFlex.lt-md="100" *ngIf="display.confirmations" class="history_confirmation">
<md-panel-title fxFlex="1 0 50px" fxFlex.lt-md="100" *ngIf="display.confirmations" class="history_confirmation">
<span md-line mdTooltip="Confirmations"><md-icon fontSet="partIcon" fontIcon="part-check-circle-08" class="confirmations"></md-icon> {{ tx.getConfirmationCount() }}</span>
</md-panel-title>

<!-- Category icon -->
<md-panel-title fxFlex="1 0 160px" fxFlex.lt-md="100" *ngIf="display.category" class="history_cat_icon" [ngSwitch]="tx.category">
<md-panel-title fxFlex="1 0 165px" fxFlex.lt-md="100" *ngIf="display.category" class="history_cat_icon" [ngSwitch]="tx.category">
<span *ngSwitchCase="'stake'" class="tx-type staked">
<md-icon fontSet="partIcon" fontIcon="part-coins"></md-icon>Staked
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
}
.mat-expansion-panel-header-title {
text-transform: uppercase;
font-family: $font;
}

// TX date/time
Expand Down Expand Up @@ -105,6 +106,7 @@
padding: 5px 0;
color: $text-muted;
font-size: 13px;
font-family: $font;
// to/from address
.to-from-address {
font-family: monospace;
Expand Down
3 changes: 3 additions & 0 deletions src/assets/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ button {
* Side bar Menu.
*/

.mat-drawer-content {
overflow-y: scroll !important; // scroll on by default, so the content doesn't jump on larger pages
}
.sidebar {
// Sync progress bar
.sync-bar {
Expand Down

0 comments on commit c752be3

Please sign in to comment.