Check the CloudKit schema when packaging and show broken iCloud sync
This commit is contained in:
@@ -382,7 +382,7 @@ private struct ClientTable: View {
|
||||
} else {
|
||||
Grid(alignment: .leading, horizontalSpacing: 12, verticalSpacing: 2) {
|
||||
GridRow {
|
||||
ForEach(["Mac", "User", "Build", "Connected", "Last action"], id: \.self) { h in
|
||||
ForEach(["Mac", "User", "Build", "Connected", "Last action", "iCloud"], id: \.self) { h in
|
||||
Text(h).font(Fonts.font(11)).foregroundStyle(Palette.muted)
|
||||
}
|
||||
}
|
||||
@@ -394,6 +394,7 @@ private struct ClientTable: View {
|
||||
Text(c.commit.isEmpty ? "—" : String(c.commit.prefix(8))).help(c.commit)
|
||||
Text(since(c.connectedAt))
|
||||
Text(c.lastActionAt.map(since) ?? "—")
|
||||
SyncCell(sync: c.sync)
|
||||
}
|
||||
.textSelection(.enabled)
|
||||
Divider().overlay(Palette.border)
|
||||
@@ -403,6 +404,24 @@ private struct ClientTable: View {
|
||||
}
|
||||
}
|
||||
|
||||
private struct SyncCell: View {
|
||||
let sync: ClientSync?
|
||||
|
||||
var body: some View {
|
||||
if let sync {
|
||||
if sync.ok {
|
||||
Text("ok").help("Last synced \(since(sync.at))")
|
||||
} else {
|
||||
Text("failing")
|
||||
.foregroundStyle(Palette.danger)
|
||||
.help("Failed \(since(sync.at)): \(sync.error ?? "")")
|
||||
}
|
||||
} else {
|
||||
Text("—")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private struct ServerRows: View {
|
||||
let status: ServerStatus
|
||||
|
||||
|
||||
Reference in New Issue
Block a user