Start dialog: bigger centered title, share icon with more left padding

Replaces confirmationDialog with a custom sheet for better title styling.
Increases share icon trailing padding in TotalValueCard.

Fixes #17

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
alexandrev-tibco
2026-02-11 23:44:17 +01:00
parent 14af7deeda
commit d71e98c60c
@@ -282,18 +282,21 @@ struct TotalValueCard: View {
var body: some View { var body: some View {
VStack(spacing: 8) { VStack(spacing: 8) {
ZStack(alignment: .trailing) { HStack {
Spacer()
Text("Total Portfolio Value") Text("Total Portfolio Value")
.font(.headline.weight(.semibold)) .font(.title3.weight(.bold))
.foregroundColor(.white.opacity(0.85)) .foregroundColor(.white.opacity(0.85))
Spacer()
}
.overlay(alignment: .trailing) {
if let onShareTap { if let onShareTap {
Button(action: onShareTap) { Button(action: onShareTap) {
Image(systemName: "square.and.arrow.up") Image(systemName: "square.and.arrow.up")
.font(.subheadline.weight(.semibold)) .font(.subheadline.weight(.semibold))
.foregroundColor(.white.opacity(0.9)) .foregroundColor(.white.opacity(0.9))
} }
.padding(.trailing, 8) .padding(.trailing, 16)
} }
} }
@@ -525,20 +528,46 @@ struct MonthlyCheckInCard: View {
.background(Color(.systemBackground)) .background(Color(.systemBackground))
.cornerRadius(AppConstants.UI.cornerRadius) .cornerRadius(AppConstants.UI.cornerRadius)
.shadow(color: .black.opacity(0.05), radius: 8, y: 2) .shadow(color: .black.opacity(0.05), radius: 8, y: 2)
.confirmationDialog( .sheet(isPresented: $showingStartOptions) {
"Start Monthly Check-in", VStack(spacing: 16) {
isPresented: $showingStartOptions, Text("Start Monthly Check-in")
titleVisibility: .visible .font(.title2.weight(.bold))
) { .multilineTextAlignment(.center)
Button("Start from scratch") { .padding(.top, 24)
shouldDuplicatePrevious = false
startDestinationActive = true Button {
showingStartOptions = false
shouldDuplicatePrevious = false
startDestinationActive = true
} label: {
Text("Start from scratch")
.font(.headline)
.frame(maxWidth: .infinity)
.padding(.vertical, 14)
.background(Color(.systemGray5))
.cornerRadius(AppConstants.UI.cornerRadius)
}
Button {
showingStartOptions = false
shouldDuplicatePrevious = true
startDestinationActive = true
} label: {
Text("Duplicate previous month")
.font(.headline)
.frame(maxWidth: .infinity)
.padding(.vertical, 14)
.background(Color(.systemGray5))
.cornerRadius(AppConstants.UI.cornerRadius)
}
Button("Cancel", role: .cancel) {
showingStartOptions = false
}
.padding(.bottom, 16)
} }
Button("Duplicate previous month") { .padding(.horizontal, 24)
shouldDuplicatePrevious = true .presentationDetents([.height(280)])
startDestinationActive = true
}
Button("Cancel", role: .cancel) {}
} }
} }