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/app/components/main_panel/vpn_section.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ui/app') 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) { -- cgit v1.2.3