summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-01-18 15:37:18 +0100
committerKali Kaneko <kali@leap.se>2018-01-25 01:19:16 +0100
commitc3306592fbb54fab0da44a8faaa8a1c6954537fd (patch)
tree0a9b406f81d33af40e1e943f0e330c28b06eb9ed /ui
parent276c717b0d1d662cabc117cea7373418efedde09 (diff)
[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.
Diffstat (limited to 'ui')
-rw-r--r--ui/README.md2
-rw-r--r--ui/app/components/main_panel/vpn_section.js13
-rw-r--r--ui/package.json2
-rw-r--r--ui/pydist/setup.py2
4 files changed, 16 insertions, 3 deletions
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 = <Button onClick={this.disconnect}>Cancel</Button>
icon = "wait"
break
+ case "nopolkit":
+ info = "Missing authentication agent."
+ body = (
+ <div>
+ <p>Could not find a polkit authentication agent.
+ Please run one and try again.</p>
+ </div>
+ )
+ 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',