fix(settings): surface the actual full-sync error, not just a count
"Synced with 1 error" gave no way to tell what failed. Now lists each FullSyncSummary.errors entry underneath the summary line.
This commit is contained in:
@@ -173,6 +173,7 @@ struct SettingsView: View {
|
|||||||
.frame(maxWidth: 480, alignment: .leading)
|
.frame(maxWidth: 480, alignment: .leading)
|
||||||
|
|
||||||
if isFullLocalSyncEnabled {
|
if isFullLocalSyncEnabled {
|
||||||
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
if isSyncing {
|
if isSyncing {
|
||||||
ProgressView().controlSize(.small)
|
ProgressView().controlSize(.small)
|
||||||
@@ -185,7 +186,15 @@ struct SettingsView: View {
|
|||||||
if let lastFullSyncSummary {
|
if let lastFullSyncSummary {
|
||||||
Text(fullSyncSummaryText(lastFullSyncSummary))
|
Text(fullSyncSummaryText(lastFullSyncSummary))
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(lastFullSyncSummary.errors.isEmpty ? .secondary : .red)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if let lastFullSyncSummary, !isSyncing {
|
||||||
|
ForEach(Array(lastFullSyncSummary.errors.enumerated()), id: \.offset) { _, message in
|
||||||
|
Text(message)
|
||||||
|
.font(.caption2)
|
||||||
|
.foregroundStyle(.red)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user