From 2fa738f147f149ec208f6c10c30095d6b90f789f Mon Sep 17 00:00:00 2001 From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com> Date: Wed, 15 May 2024 09:49:44 +0200 Subject: [PATCH] Show message to the user after a successful certificate installation (#951) * Show message to the user after a successful certificate installation * Show a simplified message (different for install and uninstall cases) --------- Co-authored-by: Xayton <30591904+Xayton@users.noreply.github.com> --- certificates/certificates.go | 2 ++ systray/systray_real.go | 1 + 2 files changed, 3 insertions(+) diff --git a/certificates/certificates.go b/certificates/certificates.go index 8a8c50d8..ae2843d2 100644 --- a/certificates/certificates.go +++ b/certificates/certificates.go @@ -32,6 +32,7 @@ import ( "os" "time" + "github.com/arduino/arduino-create-agent/utilities" "github.com/arduino/go-paths-helper" log "github.com/sirupsen/logrus" ) @@ -286,4 +287,5 @@ func GenerateAndInstallCertificates(certDir *paths.Path) { log.Errorf("cannot install certificates something went wrong: %s", err) DeleteCertificates(certDir) } + utilities.UserPrompt("The HTTPS certificate has been installed correctly.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation") } diff --git a/systray/systray_real.go b/systray/systray_real.go index 5ae79f08..b070f22a 100644 --- a/systray/systray_real.go +++ b/systray/systray_real.go @@ -117,6 +117,7 @@ func (s *Systray) start() { if err != nil { log.Errorf("cannot set installCerts value in config.ini: %s", err) } + utilities.UserPrompt("The HTTPS certificate has been uninstalled.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation") } s.Restart() }