Xcode 27: compila sin warnings y migra API deprecadas de SwiftUI
- Imports de CoreData que faltaban (MemberImportVisibility) en AccountsView, ImportDataView, ChartsContainerView y AddSourceView. - Aislamiento MainActor: IsolatedDefaultValues en el target de la app, LinearGradient @MainActor, WatchSyncMessage nonisolated, closures de ReviewPromptService/MonthlyCheckInStore/AppIntents. - Warnings de valores sin usar (SnapshotGapDetector, DashboardLayoutStore, OnboardingView, GoalEditorView, CoreDataStack, SettingsViewModel). - foregroundColor→foregroundStyle, cornerRadius→clipShape, navigationBarLeading/Trailing→topBarLeading/Trailing, Task.sleep(nanoseconds:)→sleep(for:), NavigationLink(isActive:)→ navigationDestination(isPresented:). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F1u4K16xy7eQVtgsYNZ9Vn
This commit is contained in:
@@ -579,9 +579,9 @@ struct ChangeLine: View {
|
||||
.font(.caption.weight(.medium))
|
||||
Text("(\(String(format: "%.1f%%", entry.dayChangePercentage)))")
|
||||
.font(.caption2)
|
||||
.foregroundColor(compact ? (entry.dayChange >= 0 ? .green : .red) : .secondary)
|
||||
.foregroundStyle(compact ? (entry.dayChange >= 0 ? .green : .red) : .secondary)
|
||||
}
|
||||
.foregroundColor(entry.dayChange >= 0 ? .green : .red)
|
||||
.foregroundStyle(entry.dayChange >= 0 ? .green : .red)
|
||||
.lineLimit(1)
|
||||
.minimumScaleFactor(0.8)
|
||||
}
|
||||
@@ -595,7 +595,7 @@ struct StreakPill: View {
|
||||
HStack(spacing: 3) {
|
||||
Image(systemName: "flame.fill")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.orange)
|
||||
.foregroundStyle(.orange)
|
||||
Text("\(streak) mo")
|
||||
.font(.caption2.weight(.semibold))
|
||||
}
|
||||
@@ -608,10 +608,10 @@ struct CheckInPill: View {
|
||||
HStack(spacing: 3) {
|
||||
Image(systemName: "calendar.badge.clock")
|
||||
.font(.caption2)
|
||||
.foregroundColor(checkInIsUrgent(date) ? .orange : .secondary)
|
||||
.foregroundStyle(checkInIsUrgent(date) ? .orange : .secondary)
|
||||
Text(checkInText(for: date))
|
||||
.font(.caption2.weight(.medium))
|
||||
.foregroundColor(checkInIsUrgent(date) ? .orange : .secondary)
|
||||
.foregroundStyle(checkInIsUrgent(date) ? .orange : .secondary)
|
||||
}
|
||||
.lineLimit(1)
|
||||
}
|
||||
@@ -629,25 +629,25 @@ struct GoalProgressRow: View {
|
||||
HStack {
|
||||
Image(systemName: "target")
|
||||
.font(.caption2)
|
||||
.foregroundColor(widgetSecondaryColor)
|
||||
.foregroundStyle(widgetSecondaryColor)
|
||||
Text(goal.name)
|
||||
.font(.caption.weight(.semibold))
|
||||
.lineLimit(1)
|
||||
Spacer()
|
||||
Text("\(Int((pct * 100).rounded()))%")
|
||||
.font(.caption.weight(.bold))
|
||||
.foregroundColor(widgetSecondaryColor)
|
||||
.foregroundStyle(widgetSecondaryColor)
|
||||
}
|
||||
ProgressView(value: pct)
|
||||
.tint(widgetSecondaryColor)
|
||||
HStack {
|
||||
Text(entry.totalValue.compactCurrencyString(currencyCode: entry.currencyCode))
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
Spacer()
|
||||
Text(goal.targetAmount.compactCurrencyString(currencyCode: entry.currencyCode))
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
} else if entry.nextMilestone > 0 {
|
||||
@@ -655,13 +655,13 @@ struct GoalProgressRow: View {
|
||||
HStack {
|
||||
Image(systemName: "flag.checkered")
|
||||
.font(.caption2)
|
||||
.foregroundColor(widgetSecondaryColor)
|
||||
.foregroundStyle(widgetSecondaryColor)
|
||||
Text("Next milestone")
|
||||
.font(.caption.weight(.semibold))
|
||||
Spacer()
|
||||
Text("\(Int((entry.milestoneProgress * 100).rounded()))%")
|
||||
.font(.caption.weight(.bold))
|
||||
.foregroundColor(widgetSecondaryColor)
|
||||
.foregroundStyle(widgetSecondaryColor)
|
||||
}
|
||||
ProgressView(value: entry.milestoneProgress)
|
||||
.tint(widgetSecondaryColor)
|
||||
@@ -669,7 +669,7 @@ struct GoalProgressRow: View {
|
||||
Spacer()
|
||||
Text(entry.nextMilestone.compactCurrencyString(currencyCode: entry.currencyCode))
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -687,7 +687,7 @@ struct SmallWidgetView: View {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("Total Value")
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Text(entry.totalValue.compactCurrencyString(currencyCode: entry.currencyCode))
|
||||
.font(.title2.weight(.bold))
|
||||
@@ -697,7 +697,7 @@ struct SmallWidgetView: View {
|
||||
ChangeLine(entry: entry, compact: true)
|
||||
Text("since last check-in")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Spacer(minLength: 0)
|
||||
|
||||
@@ -723,12 +723,12 @@ struct EmptyStateView: View {
|
||||
VStack(spacing: 8) {
|
||||
Image(systemName: "chart.line.uptrend.xyaxis")
|
||||
.font(.title)
|
||||
.foregroundColor(widgetPrimaryColor)
|
||||
.foregroundStyle(widgetPrimaryColor)
|
||||
Text("No data yet")
|
||||
.font(.subheadline.weight(.semibold))
|
||||
Text("Add a snapshot to start tracking.")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
@@ -757,7 +757,7 @@ struct MediumWidgetView: View {
|
||||
HStack(spacing: 6) {
|
||||
Text("Portfolio")
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
Spacer(minLength: 0)
|
||||
WidgetRefreshButton()
|
||||
}
|
||||
@@ -791,20 +791,20 @@ struct MediumWidgetView: View {
|
||||
VStack(alignment: .trailing, spacing: 4) {
|
||||
Text("Add snapshots")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
Text("to see trend")
|
||||
.font(.caption.weight(.semibold))
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
VStack(alignment: .trailing, spacing: 4) {
|
||||
Text("Sparkline")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
Text("Premium")
|
||||
.font(.caption.weight(.semibold))
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -818,7 +818,7 @@ struct MediumWidgetView: View {
|
||||
|
||||
Text(source.name)
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(1)
|
||||
|
||||
Text(source.value.shortCurrencyString(currencyCode: entry.currencyCode))
|
||||
@@ -831,14 +831,14 @@ struct MediumWidgetView: View {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "lightbulb.fill")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.orange)
|
||||
.foregroundStyle(.orange)
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(entry.insightTitle)
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
Text(entry.insightValue)
|
||||
.font(.caption.weight(.semibold))
|
||||
.foregroundColor(.primary)
|
||||
.foregroundStyle(.primary)
|
||||
.lineLimit(1)
|
||||
}
|
||||
}
|
||||
@@ -874,7 +874,7 @@ struct LargeWidgetView: View {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("Portfolio")
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Text(entry.totalValue.compactCurrencyString(currencyCode: entry.currencyCode))
|
||||
.font(.title2.weight(.bold))
|
||||
@@ -914,7 +914,7 @@ struct LargeWidgetView: View {
|
||||
|
||||
Text(category.name)
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Spacer()
|
||||
|
||||
@@ -929,7 +929,7 @@ struct LargeWidgetView: View {
|
||||
.font(.caption.weight(.semibold))
|
||||
Text("Category evolution appears after updates.")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
|
||||
}
|
||||
@@ -939,7 +939,7 @@ struct LargeWidgetView: View {
|
||||
.font(.caption.weight(.semibold))
|
||||
Text("Premium shows evolution by category.")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
|
||||
}
|
||||
@@ -1007,7 +1007,7 @@ struct AccessoryRectangularView: View {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text("Portfolio")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Text(entry.totalValue.compactCurrencyString(currencyCode: entry.currencyCode))
|
||||
.font(.headline)
|
||||
@@ -1019,7 +1019,7 @@ struct AccessoryRectangularView: View {
|
||||
Text(String(format: "%.1f%%", entry.dayChangePercentage))
|
||||
.font(.caption2)
|
||||
}
|
||||
.foregroundColor(entry.dayChange >= 0 ? .green : .red)
|
||||
.foregroundStyle(entry.dayChange >= 0 ? .green : .red)
|
||||
}
|
||||
.containerBackground(.background, for: .widget)
|
||||
}
|
||||
@@ -1057,11 +1057,11 @@ struct TrendLineChartView: View {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(Decimal(maxValue).shortCurrencyString(currencyCode: currencyCode))
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
Spacer()
|
||||
Text(Decimal(minValue).shortCurrencyString(currencyCode: currencyCode))
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
|
||||
VStack(spacing: 4) {
|
||||
@@ -1109,7 +1109,7 @@ struct TrendLineChartView: View {
|
||||
ForEach(labels.indices, id: \.self) { index in
|
||||
Text(labels[index])
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
@@ -1154,11 +1154,11 @@ struct CombinedCategoryChartView: View {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(Decimal(maxValue).shortCurrencyString(currencyCode: currencyCode))
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
Spacer()
|
||||
Text(Decimal(0).shortCurrencyString(currencyCode: currencyCode))
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
|
||||
VStack(spacing: 4) {
|
||||
@@ -1220,7 +1220,7 @@ struct CombinedCategoryChartView: View {
|
||||
ForEach(labels.indices, id: \.self) { index in
|
||||
Text(labels[index])
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
@@ -1241,7 +1241,7 @@ struct WidgetRefreshButton: View {
|
||||
Button(intent: RefreshWidgetIntent()) {
|
||||
Image(systemName: "arrow.clockwise")
|
||||
.font(.caption2.weight(.semibold))
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.invalidatableContent()
|
||||
|
||||
Reference in New Issue
Block a user