mirror of
https://github.com/ddworken/hishtory.git
synced 2025-01-22 22:28:51 +01:00
Add additional information about sync status to hishtory status -v
for debugging purposes
This commit is contained in:
parent
c73b10011b
commit
4bc23c9575
@ -23,11 +23,25 @@ var statusCmd = &cobra.Command{
|
||||
fmt.Printf("User ID: %s\n", data.UserId(config.UserSecret))
|
||||
fmt.Printf("Device ID: %s\n", config.DeviceId)
|
||||
printDumpStatus(config)
|
||||
printOnlineStatus(config)
|
||||
}
|
||||
fmt.Printf("Commit Hash: %s\n", lib.GitCommit)
|
||||
},
|
||||
}
|
||||
|
||||
func printOnlineStatus(config hctx.ClientConfig) {
|
||||
if config.IsOffline {
|
||||
fmt.Println("Sync Mode: Disabled")
|
||||
} else {
|
||||
fmt.Println("Sync Mode: Enabled")
|
||||
if config.HaveMissedUploads {
|
||||
fmt.Println("Sync Status: Unsynced (device is offline?)")
|
||||
} else {
|
||||
fmt.Println("Sync Status: Synced")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func printDumpStatus(config hctx.ClientConfig) {
|
||||
dumpRequests, err := lib.GetDumpRequests(config)
|
||||
lib.CheckFatalError(err)
|
||||
|
Loading…
Reference in New Issue
Block a user