From d71e98c60ce705066e8b1f0607d04e5cb9eb95d4 Mon Sep 17 00:00:00 2001 From: alexandrev-tibco Date: Wed, 11 Feb 2026 23:44:17 +0100 Subject: [PATCH] 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 --- .../Views/Dashboard/DashboardView.swift | 63 ++++++++++++++----- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/PortfolioJournal/Views/Dashboard/DashboardView.swift b/PortfolioJournal/Views/Dashboard/DashboardView.swift index e3ed19f..5423add 100644 --- a/PortfolioJournal/Views/Dashboard/DashboardView.swift +++ b/PortfolioJournal/Views/Dashboard/DashboardView.swift @@ -282,18 +282,21 @@ struct TotalValueCard: View { var body: some View { VStack(spacing: 8) { - ZStack(alignment: .trailing) { + HStack { + Spacer() Text("Total Portfolio Value") - .font(.headline.weight(.semibold)) + .font(.title3.weight(.bold)) .foregroundColor(.white.opacity(0.85)) - + Spacer() + } + .overlay(alignment: .trailing) { if let onShareTap { Button(action: onShareTap) { Image(systemName: "square.and.arrow.up") .font(.subheadline.weight(.semibold)) .foregroundColor(.white.opacity(0.9)) } - .padding(.trailing, 8) + .padding(.trailing, 16) } } @@ -525,20 +528,46 @@ struct MonthlyCheckInCard: View { .background(Color(.systemBackground)) .cornerRadius(AppConstants.UI.cornerRadius) .shadow(color: .black.opacity(0.05), radius: 8, y: 2) - .confirmationDialog( - "Start Monthly Check-in", - isPresented: $showingStartOptions, - titleVisibility: .visible - ) { - Button("Start from scratch") { - shouldDuplicatePrevious = false - startDestinationActive = true + .sheet(isPresented: $showingStartOptions) { + VStack(spacing: 16) { + Text("Start Monthly Check-in") + .font(.title2.weight(.bold)) + .multilineTextAlignment(.center) + .padding(.top, 24) + + 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") { - shouldDuplicatePrevious = true - startDestinationActive = true - } - Button("Cancel", role: .cancel) {} + .padding(.horizontal, 24) + .presentationDetents([.height(280)]) } }