This repository has been archived by the owner on Feb 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix cli (fix #65) * Reorganize files * Change help messages * Add --no-run-parity * Small tweaks * Util->utils * Fix bug run parity * Fix bug no-run-parity
- Loading branch information
1 parent
ba0396e
commit a0edd59
Showing
11 changed files
with
197 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = ` | ||
Parity UI. | ||
Copyright 2015, 2016, 2017, 2018 Parity Technologies (UK) Ltd. | ||
Operating Options: | ||
--no-run-parity | ||
Parity UI will not attempt to run the locally installed parity. | ||
--ui-dev | ||
Parity UI will load http://localhost:3000. WARNING: Only use this is you plan on developing on Parity UI. | ||
--ws-interface=[IP] | ||
Specify the hostname portion of the WebSockets server Parity UI will connect to. IP should be an interface's IP address. (default: 127.0.0.1) | ||
--ws-port=[PORT] | ||
Specify the port portion of the WebSockets server Parity UI will connect to. (default: 8546) | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2015-2017 Parity Technologies (UK) Ltd. | ||
// This file is part of Parity. | ||
|
||
// Parity is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Parity is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Parity. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
const fs = require('fs'); | ||
const util = require('util'); | ||
|
||
const parityPath = require('../utils/parityPath'); | ||
|
||
const fsExists = util.promisify(fs.stat); | ||
|
||
module.exports = () => fsExists(parityPath()) | ||
.then(() => { global.isParityInstalled = true; }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2015-2017 Parity Technologies (UK) Ltd. | ||
// This file is part of Parity. | ||
|
||
// Parity is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Parity is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Parity. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
const { app, dialog } = require('electron'); | ||
|
||
const { | ||
parity: { channel } | ||
} = require('../../package.json'); | ||
const parityPath = require('../utils/parityPath'); | ||
|
||
module.exports = (err, message = 'An error occurred.') => { | ||
console.error(err); | ||
dialog.showMessageBox( | ||
{ | ||
buttons: ['Quit', 'Cancel'], | ||
detail: `Please attach the following debugging info: | ||
OS: ${process.platform} | ||
Arch: ${process.arch} | ||
Channel: ${channel} | ||
Error: ${err.message} | ||
Please also attach the contents of the following file: | ||
${parityPath()}.log | ||
Please quit the app and retry again. If the error message persists, please file an issue at https://github.com/parity-js/shell/issues.`, | ||
message: `${message}`, | ||
title: 'Parity Error', | ||
type: 'error' | ||
}, | ||
(buttonIndex) => { if (buttonIndex === 0) { app.exit(1); } } | ||
); | ||
}; |
Oops, something went wrong.