forked from Silverfish/proton-bridge
feat(GODT-2555): add local telemetry settings.
feat(GODT-2555): add 'TelemetryDisabled' settings to vault. feat(GODT-2555): CLI and GUI implementation. feat(GODT-2555): implemented setting in bridge-gui-tester. feat(GODT-2555): added unit tests. feat(GODT-2555): feature tests.
This commit is contained in:
@ -195,6 +195,38 @@ func (f *frontendCLI) showAllMail(c *ishell.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
func (f *frontendCLI) enableTelemetry(_ *ishell.Context) {
|
||||
if !f.bridge.GetTelemetryDisabled() {
|
||||
f.Println("Usage diagnostics collection is enabled.")
|
||||
return
|
||||
}
|
||||
|
||||
f.Println("Usage diagnostics collection is disabled right now.")
|
||||
|
||||
if f.yesNoQuestion("Do you want to enable usage diagnostics collection") {
|
||||
if err := f.bridge.SetTelemetryDisabled(false); err != nil {
|
||||
f.printAndLogError(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (f *frontendCLI) disableTelemetry(_ *ishell.Context) {
|
||||
if f.bridge.GetTelemetryDisabled() {
|
||||
f.Println("Usage diagnostics collection is disabled.")
|
||||
return
|
||||
}
|
||||
|
||||
f.Println("Usage diagnostics collection is enabled right now.")
|
||||
|
||||
if f.yesNoQuestion("Do you want to disable usage diagnostics collection") {
|
||||
if err := f.bridge.SetTelemetryDisabled(true); err != nil {
|
||||
f.printAndLogError(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (f *frontendCLI) setGluonLocation(c *ishell.Context) {
|
||||
if gluonDir := f.bridge.GetGluonCacheDir(); gluonDir != "" {
|
||||
f.Println("The current message cache location is:", gluonDir)
|
||||
|
||||
Reference in New Issue
Block a user