summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-04-12 12:46:47 +0200
committerRuben Pollan <meskio@sindominio.net>2018-04-19 22:58:45 +0200
commit32f589c45d9b25a52877875f05fa4f59509458a2 (patch)
tree9d94469603914a01861975f4b3548bafabd1ca1f
parenta45d99f2dd4d3694160580184f0573a15c06708f (diff)
[feat] Ask for donations
- Resolves: #24
-rw-r--r--bitmask/main.go2
-rw-r--r--catalog.go176
-rw-r--r--locales/en-US/messages.gotext.json41
-rw-r--r--locales/es-ES/messages.gotext.json35
-rw-r--r--locales/pt-BR/messages.gotext.json35
-rw-r--r--main.go12
-rw-r--r--notificator.go60
7 files changed, 197 insertions, 164 deletions
diff --git a/bitmask/main.go b/bitmask/main.go
index bdb47c0..a78ffab 100644
--- a/bitmask/main.go
+++ b/bitmask/main.go
@@ -28,7 +28,7 @@ import (
const (
// On win should be: tcp://127.0.0.1:5001
coreEndpoint = "ipc://%s/bitmask.core.sock"
- timeout = time.Second * 40
+ timeout = time.Second * 15
)
// Bitmask holds the bitmask client data
diff --git a/catalog.go b/catalog.go
index 89c41c5..95be94b 100644
--- a/catalog.go
+++ b/catalog.go
@@ -37,108 +37,94 @@ func init() {
}
var messageKeyToIndex = map[string]int{
- "About ...": 13,
- "Can't contact bitmask": 0,
- "Cancel": 9,
- "Cancel connection to RiseupVPN": 10,
- "Checking status...": 4,
- "Could not find a polkit authentication agent. Please run one and try again.": 3,
+ "%s blocking internet": 21,
+ "%s off": 17,
+ "%s on": 16,
+ "Can't contact bitmask": 3,
+ "Cancel": 9,
+ "Cancel connection to %s": 10,
+ "Checking status...": 6,
+ "Connecting to %s": 18,
+ "Could not find a polkit authentication agent. Please run one and try again.": 4,
+ "Donate": 1,
"Donate ...": 12,
"Help ...": 11,
- "Is bitmaskd running? Start bitmask and try again.": 1,
- "Missing authentication agent": 2,
- "Quit": 14,
- "Quit BitmaskVPN": 15,
- "Retry": 26,
- "RiseupVPN is blocking internet": 27,
- "RiseupVPN is off": 20,
- "RiseupVPN is on": 18,
- "RiseupVPN is starting": 22,
- "RiseupVPN is stopping": 24,
- "Route traffic through": 16,
- "Turn RiseupVPN off": 8,
- "Turn RiseupVPN on": 6,
- "Turn off": 7,
- "Turn on": 5,
- "Use RiseupVPN %v gateway": 17,
- "VPN is blocking internet": 28,
- "VPN is off": 21,
- "VPN is on": 19,
- "VPN is starting": 23,
- "VPN is stopping": 25,
+ "Is bitmaskd running? Start bitmask and try again.": 2,
+ "Missing authentication agent": 5,
+ "Quit": 13,
+ "Retry": 20,
+ "Route traffic through": 14,
+ "Stopping %s": 19,
+ "The %s service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?": 0,
+ "Turn off": 8,
+ "Turn on": 7,
+ "Use %s %v gateway": 15,
}
-var en_USIndex = []uint32{ // 30 elements
- 0x00000000, 0x00000016, 0x00000048, 0x00000065,
- 0x000000b1, 0x000000c4, 0x000000cc, 0x000000de,
- 0x000000e7, 0x000000fa, 0x00000101, 0x00000120,
- 0x00000129, 0x00000138, 0x00000142, 0x00000147,
- 0x00000157, 0x0000016d, 0x00000189, 0x00000199,
- 0x000001a3, 0x000001b4, 0x000001bf, 0x000001d5,
- 0x000001e5, 0x000001fb, 0x0000020b, 0x00000211,
- 0x00000230, 0x00000249,
-} // Size: 144 bytes
+var en_USIndex = []uint32{ // 23 elements
+ 0x00000000, 0x000000fd, 0x00000104, 0x00000136,
+ 0x0000014c, 0x00000198, 0x000001b5, 0x000001c8,
+ 0x000001d0, 0x000001d9, 0x000001e0, 0x000001fb,
+ 0x00000204, 0x0000020f, 0x00000214, 0x0000022a,
+ 0x00000242, 0x0000024b, 0x00000255, 0x00000269,
+ 0x00000278, 0x0000027e, 0x00000296,
+} // Size: 116 bytes
-const en_USData string = "" + // Size: 585 bytes
- "\x02Can't contact bitmask\x02Is bitmaskd running? Start bitmask and try " +
- "again.\x02Missing authentication agent\x02Could not find a polkit authen" +
- "tication agent. Please run one and try again.\x02Checking status...\x02T" +
- "urn on\x02Turn RiseupVPN on\x02Turn off\x02Turn RiseupVPN off\x02Cancel" +
- "\x02Cancel connection to RiseupVPN\x02Help ...\x02Donate ...!!!!\x02Abou" +
- "t ...\x02Quit\x02Quit BitmaskVPN\x02Route traffic through\x02Use RiseupV" +
- "PN %[1]v gateway\x02RiseupVPN is on\x02VPN is on\x02RiseupVPN is off\x02" +
- "VPN is off\x02RiseupVPN is starting\x02VPN is starting\x02RiseupVPN is s" +
- "topping\x02VPN is stopping\x02Retry\x02RiseupVPN is blocking internet" +
- "\x02VPN is blocking internet"
+const en_USData string = "" + // Size: 662 bytes
+ "\x02The %[1]s service is expensive to run. Because we don't want to stor" +
+ "e personal information about you, there is no accounts or billing for th" +
+ "is service. But if you want the service to continue, donate at least $5 " +
+ "each month.\x0a\x09\x0aDo you want to donate now?\x02Donate\x02Is bitmas" +
+ "kd running? Start bitmask and try again.\x02Can't contact bitmask\x02Cou" +
+ "ld not find a polkit authentication agent. Please run one and try again." +
+ "\x02Missing authentication agent\x02Checking status...\x02Turn on\x02Tur" +
+ "n off\x02Cancel\x02Cancel connection to %[1]s\x02Help ...\x02Donate ..." +
+ "\x02Quit\x02Route traffic through\x02Use %[1]s %[2]v gateway\x02%[1]s on" +
+ "\x02%[1]s off\x02Connecting to %[1]s\x02Stopping %[1]s\x02Retry\x02%[1]s" +
+ " blocking internet"
-var es_ESIndex = []uint32{ // 30 elements
- 0x00000000, 0x00000021, 0x00000060, 0x00000082,
- 0x000000e9, 0x00000102, 0x0000010b, 0x0000011e,
- 0x00000125, 0x00000135, 0x0000013e, 0x0000015f,
- 0x00000169, 0x00000172, 0x00000180, 0x00000187,
- 0x00000199, 0x000001ac, 0x000001d1, 0x000001ea,
- 0x000001f8, 0x0000020f, 0x0000021b, 0x00000235,
- 0x00000244, 0x0000025c, 0x00000269, 0x00000274,
- 0x00000297, 0x000002af,
-} // Size: 144 bytes
+var es_ESIndex = []uint32{ // 23 elements
+ 0x00000000, 0x000000ec, 0x000000f1, 0x00000130,
+ 0x00000151, 0x000001b8, 0x000001da, 0x000001f3,
+ 0x000001fc, 0x00000203, 0x0000020c, 0x00000229,
+ 0x00000233, 0x0000023c, 0x00000243, 0x00000256,
+ 0x00000277, 0x00000287, 0x00000295, 0x000002a9,
+ 0x000002c1, 0x000002cc, 0x000002e6,
+} // Size: 116 bytes
-const es_ESData string = "" + // Size: 687 bytes
- "\x02No se pudo contactar con bitmask\x02¿Está corriendo bitmaskd? Arranc" +
- "a bitmask y prueba de nuevo.\x02Falta un agente de autenticación\x02No s" +
- "e pudo encontrar ningún agente de autenticacion de polkit. Por favor lan" +
- "za uno y prueba de nuevo.\x02Comprobando el estado...\x02Encender\x02Enc" +
- "iende RiseupVPN\x02Apagar\x02Apaga RiseupVPN\x02Cancelar\x02Cancela la c" +
- "onexión a RiseupVPN\x02Ayuda ...\x02Dona ...\x02Acerca de ...\x02Cerrar" +
- "\x02Cerrar BitmaskVPN\x02Salir a través de\x02Usa la salida de RiseupVPN" +
- " por %[1]v\x02RiseupVPN esta encendida\x02VPN encendida\x02RiseupVPN est" +
- "a apagada\x02VPN apagada\x02RiseupVPN esta arrancando\x02VPN arrancando" +
- "\x02RiseupVPN esta apagando\x02VPN apagando\x02Reintentar\x02RiseupVPN e" +
- "sta bloqueando internet\x02VPN bloqueando internet"
+const es_ESData string = "" + // Size: 742 bytes
+ "\x02El servicio %[1]s es caro de mantener. Como no queremos guardar ning" +
+ "una información personal tuya, no hay cuentas ni servicio de facturación" +
+ ". Si quieres que este servicio continúe, dona al menos $5 cada mes.\x0a" +
+ "\x09\x0a¿Quieres donar ahora?\x02Dona\x02¿Está corriendo bitmaskd? Arran" +
+ "ca bitmask y prueba de nuevo.\x02No se pudo contactar con bitmask\x02No " +
+ "se pudo encontrar ningún agente de autenticacion de polkit. Por favor la" +
+ "nza uno y prueba de nuevo.\x02Falta un agente de autenticación\x02Compro" +
+ "bando el estado...\x02Encender\x02Apagar\x02Cancelar\x02Cancela la conex" +
+ "ión a %[1]s\x02Ayuda ...\x02Dona ...\x02Cerrar\x02Salir a través de\x02U" +
+ "sa la salida de %[1]s por %[2]v\x02%[1]s encendida\x02%[1]s apagada\x02C" +
+ "onnectando a %[1]s\x02Desconnectando de %[1]s\x02Reintentar\x02%[1]s blo" +
+ "queando internet"
-var pt_BRIndex = []uint32{ // 30 elements
- 0x00000000, 0x0000002c, 0x00000086, 0x000000b1,
- 0x00000122, 0x00000141, 0x00000147, 0x00000159,
- 0x00000162, 0x00000177, 0x00000180, 0x000001a1,
- 0x000001ab, 0x000001c2, 0x000001cc, 0x000001d3,
- 0x000001e5, 0x00000203, 0x00000225, 0x0000023c,
- 0x0000024f, 0x00000269, 0x0000027f, 0x0000029e,
- 0x000002b9, 0x000002d6, 0x000002ef, 0x00000300,
- 0x00000326, 0x00000348,
-} // Size: 144 bytes
+var pt_BRIndex = []uint32{ // 23 elements
+ 0x00000000, 0x00000000, 0x00000013, 0x0000006d,
+ 0x00000099, 0x0000010a, 0x00000135, 0x00000154,
+ 0x0000015a, 0x00000163, 0x0000016c, 0x00000189,
+ 0x00000193, 0x000001aa, 0x000001b1, 0x000001cf,
+ 0x000001ed, 0x00000200, 0x00000216, 0x00000233,
+ 0x0000024e, 0x0000025f, 0x00000281,
+} // Size: 116 bytes
-const pt_BRData string = "" + // Size: 840 bytes
- "\x02Não foi possível se comunicar com bitmask\x02Você tem certeza que bi" +
- "tmaskd está sendo executado? Inicie o bitmask e tente novamente.\x02Um a" +
- "gente de autenticação está faltando\x02Não foi possível encontrar um age" +
- "nte de autenticação polkit. Por favor, execute um agente e tente novamen" +
- "te.\x02Verificando o estado da VPN...\x02Ligar\x02Ligar a RiseupVPN\x02D" +
- "esligar\x02Desligar a RiseupVPN\x02Cancelar\x02Cancelar a conexão à Rise" +
- "upVPN\x02Ajuda ...\x02Fazer uma doação ...\x02Sobre ...\x02Fechar\x02Fec" +
- "har BitmaskVPN\x02Rotear o tráfego através de\x02Usar o gateway %[1]v da" +
- " RiseupVPN\x02RiseupVPN está ligada\x02A VPN está ligada\x02RiseupVPN es" +
- "tá desligada\x02A VPN está desligada\x02RiseupVPN está sendo iniciada" +
- "\x02A VPN está sendo iniciada\x02RiseupVPN está sendo parada\x02A VPN es" +
- "tá sendo parada\x02Tentar novamente\x02RiseupVPN está bloqueando a Inter" +
- "net\x02A VPN está bloqueando a Internet"
+const pt_BRData string = "" + // Size: 641 bytes
+ "\x02Fazer uma doação\x02Você tem certeza que bitmaskd está sendo executa" +
+ "do? Inicie o bitmask e tente novamente.\x02Não foi possível se comunicar" +
+ " com bitmask\x02Não foi possível encontrar um agente de autenticação pol" +
+ "kit. Por favor, execute um agente e tente novamente.\x02Um agente de aut" +
+ "enticação está faltando\x02Verificando o estado da VPN...\x02Ligar\x02De" +
+ "sligar\x02Cancelar\x02Cancelar a conexão à %[1]s\x02Ajuda ...\x02Fazer u" +
+ "ma doação ...\x02Fechar\x02Rotear o tráfego através de\x02Usar o gateway" +
+ " %[2]v da %[1]s\x02%[1]s está ligada\x02%[1]s está desligada\x02A %[1]s " +
+ "está sendo iniciada\x02A %[1]s está sendo parada\x02Tentar novamente\x02" +
+ "%[1]s está bloqueando a Internet"
- // Total table size 2544 bytes (2KiB); checksum: FDED99FB
+ // Total table size 2393 bytes (2KiB); checksum: 3C9654DB
diff --git a/locales/en-US/messages.gotext.json b/locales/en-US/messages.gotext.json
index 2f960cd..98fad1e 100644
--- a/locales/en-US/messages.gotext.json
+++ b/locales/en-US/messages.gotext.json
@@ -2,9 +2,29 @@
"language": "en-US",
"messages": [
{
- "id": "Can't contact bitmask",
- "message": "Can't contact bitmask",
- "translation": "Can't contact bitmask",
+ "id": [
+ "donationText",
+ "The {ApplicationName} service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?"
+ ],
+ "message": "The {ApplicationName} service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?",
+ "translation": "The {ApplicationName} service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?",
+ "translatorComment": "Copied from source.",
+ "placeholders": [
+ {
+ "id": "ApplicationName",
+ "string": "%[1]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 1,
+ "expr": "applicationName"
+ }
+ ],
+ "fuzzy": true
+ },
+ {
+ "id": "Donate",
+ "message": "Donate",
+ "translation": "Donate",
"translatorComment": "Copied from source.",
"fuzzy": true
},
@@ -19,9 +39,9 @@
"fuzzy": true
},
{
- "id": "Missing authentication agent",
- "message": "Missing authentication agent",
- "translation": "Missing authentication agent",
+ "id": "Can't contact bitmask",
+ "message": "Can't contact bitmask",
+ "translation": "Can't contact bitmask",
"translatorComment": "Copied from source.",
"fuzzy": true
},
@@ -36,6 +56,13 @@
"fuzzy": true
},
{
+ "id": "Missing authentication agent",
+ "message": "Missing authentication agent",
+ "translation": "Missing authentication agent",
+ "translatorComment": "Copied from source.",
+ "fuzzy": true
+ },
+ {
"id": "Checking status...",
"message": "Checking status...",
"translation": "Checking status..."
@@ -208,4 +235,4 @@
"fuzzy": true
}
]
-} \ No newline at end of file
+}
diff --git a/locales/es-ES/messages.gotext.json b/locales/es-ES/messages.gotext.json
index bf16d01..57ebd22 100644
--- a/locales/es-ES/messages.gotext.json
+++ b/locales/es-ES/messages.gotext.json
@@ -2,9 +2,27 @@
"language": "es-ES",
"messages": [
{
- "id": "Can't contact bitmask",
- "message": "Can't contact bitmask",
- "translation": "No se pudo contactar con bitmask"
+ "id": [
+ "donationText",
+ "The {ApplicationName} service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?"
+ ],
+ "message": "The {ApplicationName} service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?",
+ "translation": "El servicio {ApplicationName} es caro de mantener. Como no queremos guardar ninguna información personal tuya, no hay cuentas ni servicio de facturación. Si quieres que este servicio continúe, dona al menos $5 cada mes.\n\t\n¿Quieres donar ahora?",
+ "placeholders": [
+ {
+ "id": "ApplicationName",
+ "string": "%[1]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 1,
+ "expr": "applicationName"
+ }
+ ]
+ },
+ {
+ "id": "Donate",
+ "message": "Donate",
+ "translation": "Dona"
},
{
"id": [
@@ -15,9 +33,9 @@
"translation": "¿Está corriendo bitmaskd? Arranca bitmask y prueba de nuevo."
},
{
- "id": "Missing authentication agent",
- "message": "Missing authentication agent",
- "translation": "Falta un agente de autenticación"
+ "id": "Can't contact bitmask",
+ "message": "Can't contact bitmask",
+ "translation": "No se pudo contactar con bitmask"
},
{
"id": [
@@ -28,6 +46,11 @@
"translation": "No se pudo encontrar ningún agente de autenticacion de polkit. Por favor lanza uno y prueba de nuevo."
},
{
+ "id": "Missing authentication agent",
+ "message": "Missing authentication agent",
+ "translation": "Falta un agente de autenticación"
+ },
+ {
"id": "Checking status...",
"message": "Checking status...",
"translation": "Comprobando el estado..."
diff --git a/locales/pt-BR/messages.gotext.json b/locales/pt-BR/messages.gotext.json
index 5ff8d9e..e78d1ff 100644
--- a/locales/pt-BR/messages.gotext.json
+++ b/locales/pt-BR/messages.gotext.json
@@ -2,9 +2,27 @@
"language": "pt-BR",
"messages": [
{
- "id": "Can't contact bitmask",
- "message": "Can't contact bitmask",
- "translation": "Não foi possível se comunicar com bitmask"
+ "id": [
+ "donationText",
+ "The {ApplicationName} service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?"
+ ],
+ "message": "The {ApplicationName} service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?",
+ "translation": "",
+ "placeholders": [
+ {
+ "id": "ApplicationName",
+ "string": "%[1]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 1,
+ "expr": "applicationName"
+ }
+ ]
+ },
+ {
+ "id": "Donate",
+ "message": "Donate",
+ "translation": "Fazer uma doação"
},
{
"id": [
@@ -15,9 +33,9 @@
"translation": "Você tem certeza que bitmaskd está sendo executado? Inicie o bitmask e tente novamente."
},
{
- "id": "Missing authentication agent",
- "message": "Missing authentication agent",
- "translation": "Um agente de autenticação está faltando"
+ "id": "Can't contact bitmask",
+ "message": "Can't contact bitmask",
+ "translation": "Não foi possível se comunicar com bitmask"
},
{
"id": [
@@ -28,6 +46,11 @@
"translation": "Não foi possível encontrar um agente de autenticação polkit. Por favor, execute um agente e tente novamente."
},
{
+ "id": "Missing authentication agent",
+ "message": "Missing authentication agent",
+ "translation": "Um agente de autenticação está faltando"
+ },
+ {
"id": "Checking status...",
"message": "Checking status...",
"translation": "Verificando o estado da VPN..."
diff --git a/main.go b/main.go
index e8fa740..d3b540d 100644
--- a/main.go
+++ b/main.go
@@ -17,6 +17,7 @@ package main
import (
"log"
+ "os"
"0xacab.org/leap/bitmask-systray/bitmask"
"github.com/jmshal/go-locale"
@@ -48,15 +49,18 @@ func main() {
return
}
defer b.Close()
+ go checkAndStartBitmask(b, notify, conf)
- err = checkAndInstallHelpers(b, notify)
+ run(b, conf)
+}
+
+func checkAndStartBitmask(b *bitmask.Bitmask, notify *notificator, conf *systrayConfig) {
+ err := checkAndInstallHelpers(b, notify)
if err != nil {
log.Printf("Is bitmask running? %v", err)
- return
+ os.Exit(1)
}
maybeStartVPN(b, conf)
-
- run(b, conf)
}
func checkAndInstallHelpers(b *bitmask.Bitmask, notify *notificator) error {
diff --git a/notificator.go b/notificator.go
index 9ce224f..ea5fb42 100644
--- a/notificator.go
+++ b/notificator.go
@@ -16,32 +16,27 @@
package main
import (
- "os"
- "path"
"time"
- notif "github.com/0xAX/notificator"
+ "0xacab.org/leap/go-dialog"
+ "github.com/skratchdot/open-golang/open"
)
const (
- donationText = `The RiseupVPN service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month at https://riseup.net/donate-vpn`
+ donationText = `The %s service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.
+
+Do you want to donate now?`
missingAuthAgent = `Could not find a polkit authentication agent. Please run one and try again.`
notRunning = `Is bitmaskd running? Start bitmask and try again.`
- svgFileName = "riseupvpn.svg"
)
type notificator struct {
- notify *notif.Notificator
- conf *systrayConfig
+ conf *systrayConfig
}
func newNotificator(conf *systrayConfig) *notificator {
- notify := notif.New(notif.Options{
- DefaultIcon: getSVGPath(),
- AppName: "RiseupVPN",
- })
- n := notificator{notify, conf}
- //go n.donations()
+ n := notificator{conf}
+ go n.donations()
return &n
}
@@ -49,46 +44,21 @@ func (n *notificator) donations() {
time.Sleep(time.Minute * 5)
for {
if n.conf.needsNotification() {
- n.notify.Push(printer.Sprintf("Donate to RiseupVPN"), printer.Sprintf(donationText), "", notif.UR_NORMAL)
+ letsDonate := dialog.Message(printer.Sprintf(donationText, applicationName)).Title(printer.Sprintf("Donate")).YesNo()
n.conf.setNotification()
+ if letsDonate {
+ open.Run("https://riseup.net/donate-vpn")
+ n.conf.setDonated()
+ }
}
time.Sleep(time.Hour)
}
}
func (n *notificator) bitmaskNotRunning() {
- n.notify.Push(printer.Sprintf("Can't contact bitmask"), printer.Sprintf(notRunning), "", notif.UR_CRITICAL)
+ dialog.Message(printer.Sprintf(notRunning)).Title(printer.Sprintf("Can't contact bitmask")).Error()
}
func (n *notificator) authAgent() {
- n.notify.Push(printer.Sprintf("Missing authentication agent"), printer.Sprintf(missingAuthAgent), "", notif.UR_CRITICAL)
-}
-
-func getSVGPath() string {
- wd, _ := os.Getwd()
- svgPath := path.Join(wd, svgFileName)
- if fileExist(svgPath) {
- return svgPath
- }
-
- svgPath = "/usr/share/riseupvpn/riseupvpn.svg"
- if fileExist(svgPath) {
- return svgPath
- }
-
- gopath := os.Getenv("GOPATH")
- if gopath == "" {
- gopath = path.Join(os.Getenv("HOME"), "go")
- }
- svgPath = path.Join(gopath, "src", "0xacab.org", "leap", "bitmask-systray", svgFileName)
- if fileExist(svgPath) {
- return svgPath
- }
-
- return ""
-}
-
-func fileExist(filePath string) bool {
- _, err := os.Stat(filePath)
- return err == nil
+ dialog.Message(printer.Sprintf(missingAuthAgent)).Title(printer.Sprintf("Missing authentication agent")).Error()
}