From c3306592fbb54fab0da44a8faaa8a1c6954537fd Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 18 Jan 2018 15:37:18 +0100 Subject: [feat] report missing polkit properly from main UI also refactor and move polkit_agent so that it does not depend on having bitmask on the path. --- ui/README.md | 2 +- ui/app/components/main_panel/vpn_section.js | 13 +++++++++++++ ui/package.json | 2 +- ui/pydist/setup.py | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/README.md b/ui/README.md index 08181615..bf1d8667 100644 --- a/ui/README.md +++ b/ui/README.md @@ -35,7 +35,7 @@ python package and installed in the virtualenv: In order to package for distribution: - make dist-build + make pydist-build NOTE: If you make changes to the asset files, like add or modify an image, you will need to stop then rerun `npm run watch` for the changes to take diff --git a/ui/app/components/main_panel/vpn_section.js b/ui/app/components/main_panel/vpn_section.js index 71bbbe1d..78146933 100644 --- a/ui/app/components/main_panel/vpn_section.js +++ b/ui/app/components/main_panel/vpn_section.js @@ -116,6 +116,9 @@ export default class vpnSection extends React.Component { console.log('check()', error) if (error == "Missing VPN certificate") { this.renewCert() + } + if (error == 'nopolkit') { + this.setState({vpn: "nopolkit"}) } else { this.setState({vpn: "failed", error: error}) } @@ -306,6 +309,16 @@ export default class vpnSection extends React.Component { button = icon = "wait" break + case "nopolkit": + info = "Missing authentication agent." + body = ( +
+

Could not find a polkit authentication agent. + Please run one and try again.

+
+ ) + icon= "disabled" + break case "failed": info = "Failed" if (this.state.ready) { diff --git a/ui/package.json b/ui/package.json index b593f7b1..14afbda4 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "bitmask_js", - "version": "0.0.1", + "version": "0.3.0", "description": "bitmask user interface in javascript", "license": "GPL-3.0", "homepage": "https://bitmask.net", diff --git a/ui/pydist/setup.py b/ui/pydist/setup.py index 8f6fd4cd..0bfeac78 100644 --- a/ui/pydist/setup.py +++ b/ui/pydist/setup.py @@ -39,7 +39,7 @@ timestamp = time.strftime('%Y%m%d%H%M', now.timetuple()) setup( name='leap.bitmask_js', - version='0.2.%s' % timestamp, + version='0.3.%s' % timestamp, description='Bitmask UI', long_description=long_description, author='LEAP Encrypted Access Project', -- cgit v1.2.3