mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-06 17:18:34 +00:00
feat(BRIDGE-75): Bridge repair button/feature implemented
This commit is contained in:
@ -306,6 +306,12 @@ func New(
|
||||
Aliases: []string{"del", "rm", "remove"},
|
||||
Completer: fe.completeUsernames,
|
||||
})
|
||||
fe.AddCmd(&ishell.Cmd{
|
||||
Name: "repair",
|
||||
Help: "reload all accounts and cached data, re-download emails. Email clients remain connected. Logged out users will be repaired on next login. (aliases: rep)",
|
||||
Func: fe.repair,
|
||||
Aliases: []string{"rep"},
|
||||
})
|
||||
|
||||
badEventCmd := &ishell.Cmd{
|
||||
Name: "bad-event",
|
||||
|
||||
@ -359,3 +359,9 @@ func (f *frontendCLI) isFile(location string) bool {
|
||||
|
||||
return !stat.IsDir()
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user