@@ -65,7 +65,7 @@ func (s *Systray) start() {
65
65
mRmCrashes := systray .AddMenuItem ("Remove crash reports" , "" )
66
66
s .updateMenuItem (mRmCrashes , config .LogsIsEmpty ())
67
67
68
- mManageCerts := systray .AddMenuItem ("Manage HTTPS certificates " , "HTTPS Certs" )
68
+ mManageCerts := systray .AddMenuItem ("Manage HTTPS certificate " , "HTTPS Certs" )
69
69
// On linux/windows chrome/firefox/edge(chromium) the agent works without problems on plain HTTP,
70
70
// so we disable the menuItem to generate/install the certificates
71
71
if runtime .GOOS != "darwin" {
@@ -95,19 +95,19 @@ func (s *Systray) start() {
95
95
s .updateMenuItem (mRmCrashes , config .LogsIsEmpty ())
96
96
case <- mManageCerts .ClickedCh :
97
97
infoMsg := "The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\n \n Your HTTPS certificate status:\n "
98
- buttons := "{\" OK \" , \" Install certificate for Safari \" } "
98
+ buttons := "{\" Install certificate for Safari \" , \" OK \" } default button \" OK \" "
99
99
certDir := config .GetCertificatesDir ()
100
100
if config .CertsExist () {
101
101
expDate , err := cert .GetExpirationDate ()
102
102
if err != nil {
103
103
log .Errorf ("cannot get certificates expiration date, something went wrong: %s" , err )
104
104
}
105
105
infoMsg = infoMsg + "- Certificate installed: Yes\n - Certificate trusted: Yes\n - Certificate expiration date: " + expDate
106
- buttons = "{\" OK \" , \" Uninstall certificate for Safari \" } "
106
+ buttons = "{\" Uninstall certificate for Safari \" , \" OK \" } default button \" OK \" "
107
107
} else {
108
108
infoMsg = infoMsg + "- Certificate installed: No\n - Certificate trusted: N/A\n - Certificate expiration date: N/A"
109
109
}
110
- pressedButton := utilities .UserPrompt ("display dialog \" " + infoMsg + "\" buttons " + buttons + " with title \" Arduino Agent: manage HTTPS certificates \" " )
110
+ pressedButton := utilities .UserPrompt ("display dialog \" " + infoMsg + "\" buttons " + buttons + " with title \" Arduino Agent: Manage HTTPS certificate \" " )
111
111
if strings .Contains (pressedButton , "Install certificate for Safari" ) {
112
112
cert .GenerateAndInstallCertificates (certDir )
113
113
err := config .SetInstallCertsIni (s .currentConfigFilePath .String (), "true" )
0 commit comments