Skip to content

Commit d451a93

Browse files
committed
Show a simplified message (different for install and uninstall cases)
1 parent 4cf2b6f commit d451a93

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

certificates/certificates.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,5 @@ func GenerateAndInstallCertificates(certDir *paths.Path) {
287287
log.Errorf("cannot install certificates something went wrong: %s", err)
288288
DeleteCertificates(certDir)
289289
}
290-
expDate, err := GetExpirationDate()
291-
if err != nil {
292-
log.Errorf("cannot get certificates expiration date, something went wrong: %s", err)
293-
}
294-
infoMsg := "The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\n\nYour HTTPS certificate status:\n- Certificate installed:\t\tYes\n- Certificate trusted:\t\tYes\n- Certificate expiration:\t" + expDate.Format(time.DateTime)
295-
utilities.UserPrompt(infoMsg, "{\"OK\"}", "OK", "OK", "Arduino Agent: Manage HTTPS certificate")
290+
utilities.UserPrompt("The HTTPS certificate has been installed correctly.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation")
296291
}

systray/systray_real.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ func (s *Systray) start() {
117117
if err != nil {
118118
log.Errorf("cannot set installCerts value in config.ini: %s", err)
119119
}
120-
infoMsg = "The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\n\nYour HTTPS certificate status:\n- Certificate installed:\t\tNo\n- Certificate trusted:\t\tN/A\n- Certificate expiration:\tN/A"
121-
utilities.UserPrompt(infoMsg, "{\"OK\"}", "OK", "OK", "Arduino Agent: Manage HTTPS certificate")
120+
utilities.UserPrompt("The HTTPS certificate has been uninstalled.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation")
122121
}
123122
s.Restart()
124123
}

0 commit comments

Comments
 (0)