feat(debug): add bulk share image export and stadium visit tools
Adds debug-only DebugShareExporter that bulk-exports ~298 shareable image variations (achievement cards, progress cards, trip cards, icons) to Documents/DebugExport/ for visual QA. Also adds a button to populate all stadium visits for testing the fully-unlocked app state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,8 @@ struct SettingsView: View {
|
||||
#if DEBUG
|
||||
@State private var selectedSyncStatus: EntitySyncStatus?
|
||||
@State private var showSyncLogs = false
|
||||
@State private var exporter = DebugShareExporter()
|
||||
@State private var showExportProgress = false
|
||||
#endif
|
||||
|
||||
var body: some View {
|
||||
@@ -348,12 +350,30 @@ struct SettingsView: View {
|
||||
} label: {
|
||||
Label("Reset Onboarding Flag", systemImage: "arrow.counterclockwise")
|
||||
}
|
||||
|
||||
Button {
|
||||
showExportProgress = true
|
||||
Task {
|
||||
await exporter.exportAll(modelContext: modelContext)
|
||||
}
|
||||
} label: {
|
||||
Label("Export All Shareables", systemImage: "square.and.arrow.up.on.square")
|
||||
}
|
||||
|
||||
Button {
|
||||
Task { await exporter.addAllStadiumVisits(modelContext: modelContext) }
|
||||
} label: {
|
||||
Label("Add All Stadium Visits", systemImage: "mappin.and.ellipse")
|
||||
}
|
||||
} header: {
|
||||
Text("Debug")
|
||||
} footer: {
|
||||
Text("These options are only visible in debug builds.")
|
||||
}
|
||||
.listRowBackground(Theme.cardBackground(colorScheme))
|
||||
.sheet(isPresented: $showExportProgress) {
|
||||
DebugExportProgressView(exporter: exporter)
|
||||
}
|
||||
}
|
||||
|
||||
private var syncStatusSection: some View {
|
||||
|
||||
Reference in New Issue
Block a user