fix(BRIDGE-90): disable repair button when bridge cannot connect to proton servers; bump GPA

This commit is contained in:
Atanas Janeshliev
2024-06-04 17:05:12 +02:00
parent cffab028b2
commit 63eb67760e
5 changed files with 24 additions and 5 deletions

View File

@ -361,7 +361,11 @@ func (f *frontendCLI) isFile(location string) bool {
}
func (f *frontendCLI) repair(_ *ishell.Context) {
if f.yesNoQuestion("Are you sure you want to initialize a repair, this may take a while") {
f.bridge.Repair()
if f.bridge.HasAPIConnection() {
if f.yesNoQuestion("Are you sure you want to initialize a repair, this may take a while") {
f.bridge.Repair()
}
} else {
f.Println("Bridge cannot connect to the Proton servers. A connection is required to utilize this feature.")
}
}