diff options
author | Kali Kaneko <kali@leap.se> | 2018-01-18 15:37:18 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2018-01-25 01:19:16 +0100 |
commit | c3306592fbb54fab0da44a8faaa8a1c6954537fd (patch) | |
tree | 0a9b406f81d33af40e1e943f0e330c28b06eb9ed /ui/app | |
parent | 276c717b0d1d662cabc117cea7373418efedde09 (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/app')
-rw-r--r-- | ui/app/components/main_panel/vpn_section.js | 13 |
1 files changed, 13 insertions, 0 deletions
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) { |