diff --git a/Kasztelan.xcodeproj/project.pbxproj b/Kasztelan.xcodeproj/project.pbxproj index 57e5514..ce8d639 100644 --- a/Kasztelan.xcodeproj/project.pbxproj +++ b/Kasztelan.xcodeproj/project.pbxproj @@ -292,7 +292,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = Kasztelan/Info.plist; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink"; @@ -316,7 +316,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = Kasztelan/Info.plist; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink"; diff --git a/Kasztelan/CardView.swift b/Kasztelan/CardView.swift index 037c247..dcc1aa5 100644 --- a/Kasztelan/CardView.swift +++ b/Kasztelan/CardView.swift @@ -92,11 +92,12 @@ struct CardView: View { GlassDepthDeck { loyaltyCardFace(compact: compact) } + .scaleEffect(1.01) .rotation3DEffect( - .degrees(-2.8), - axis: (x: 1, y: 0, z: 0), + .degrees(-6), + axis: (x: 1, y: -0.10, z: 0), anchor: .center, - perspective: 0.62 + perspective: 0.72 ) } @@ -198,7 +199,14 @@ struct CardView: View { .clipShape(RoundedRectangle(cornerRadius: 26, style: .continuous)) .overlay { RoundedRectangle(cornerRadius: 26, style: .continuous) - .stroke(.white.opacity(0.32), lineWidth: 1) + .stroke( + LinearGradient( + colors: [.white.opacity(0.72), .white.opacity(0.18), KTheme.pink.opacity(0.38)], + startPoint: .topLeading, + endPoint: .bottomTrailing + ), + lineWidth: 1.5 + ) } .shadow(color: KTheme.pink.opacity(0.28), radius: 28, y: 16) } diff --git a/Kasztelan/KasztelanApp.swift b/Kasztelan/KasztelanApp.swift index dd40d53..a6d9a1c 100644 --- a/Kasztelan/KasztelanApp.swift +++ b/Kasztelan/KasztelanApp.swift @@ -1,4 +1,5 @@ import SwiftUI +import UIKit import UserNotifications import BackgroundTasks import CoreSpotlight @@ -119,6 +120,21 @@ struct KasztelanApp: App { @StateObject private var model = AppModel() @Environment(\.scenePhase) private var scenePhase + init() { + let navigationAppearance = UINavigationBarAppearance() + navigationAppearance.configureWithTransparentBackground() + navigationAppearance.backgroundColor = .clear + navigationAppearance.backgroundEffect = nil + navigationAppearance.shadowColor = .clear + + let navigationBar = UINavigationBar.appearance() + navigationBar.standardAppearance = navigationAppearance + navigationBar.scrollEdgeAppearance = navigationAppearance + navigationBar.compactAppearance = navigationAppearance + navigationBar.isTranslucent = true + navigationBar.backgroundColor = .clear + } + var body: some Scene { WindowGroup { RootView() diff --git a/Kasztelan/MainTabView.swift b/Kasztelan/MainTabView.swift index f5db820..3399ba3 100644 --- a/Kasztelan/MainTabView.swift +++ b/Kasztelan/MainTabView.swift @@ -8,16 +8,31 @@ struct MainTabView: View { AmbientBackground() TabView(selection: $model.selectedTab) { - NavigationStack { WalletView() } + NavigationStack { + ZStack { + AmbientBackground() + WalletView() + } + } .toolbarBackground(.hidden, for: .navigationBar) .tabItem { Label(model.text("Karta", "Card"), systemImage: "creditcard.fill") } .tag(0) - NavigationStack { MessagesView() } + NavigationStack { + ZStack { + AmbientBackground() + MessagesView() + } + } .toolbarBackground(.hidden, for: .navigationBar) .tabItem { Label(model.text("Wiadomości", "Messages"), systemImage: "envelope.fill") } .badge(model.messages.count) .tag(1) - NavigationStack { ProfileView() } + NavigationStack { + ZStack { + AmbientBackground() + ProfileView() + } + } .toolbarBackground(.hidden, for: .navigationBar) .tabItem { Label(model.text("Profil", "Profile"), systemImage: "person.crop.circle.fill") } .tag(2) diff --git a/Kasztelan/MessagesView.swift b/Kasztelan/MessagesView.swift index c22c1c3..03595f0 100644 --- a/Kasztelan/MessagesView.swift +++ b/Kasztelan/MessagesView.swift @@ -27,7 +27,7 @@ struct MessagesView: View { } .padding(20) } - .background(AmbientBackground()) + .background(.clear) .toolbar { AppToolbar() } .toolbarBackground(.hidden, for: .navigationBar) .refreshable { await model.refresh() } diff --git a/Kasztelan/ProfileView.swift b/Kasztelan/ProfileView.swift index 2bc2b50..fad72a5 100644 --- a/Kasztelan/ProfileView.swift +++ b/Kasztelan/ProfileView.swift @@ -51,7 +51,7 @@ struct ProfileView: View { } .padding(20) } - .background(AmbientBackground()) + .background(.clear) .toolbar { AppToolbar() } .toolbarBackground(.hidden, for: .navigationBar) .fullScreenCover(isPresented: $editingProfile) { EditProfileView() } diff --git a/Kasztelan/Theme.swift b/Kasztelan/Theme.swift index 463510d..9ef7b5d 100644 --- a/Kasztelan/Theme.swift +++ b/Kasztelan/Theme.swift @@ -70,6 +70,17 @@ struct GlassDepthDeck: View { var body: some View { ZStack { + RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) + .fill(.ultraThinMaterial) + .overlay { + RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) + .stroke(KTheme.cyan.opacity(0.22), lineWidth: 1) + } + .scaleEffect(x: 0.80, y: 0.91) + .offset(y: 38) + .blur(radius: 2) + .opacity(0.42) + RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) .fill(.ultraThinMaterial) .overlay { @@ -77,7 +88,7 @@ struct GlassDepthDeck: View { .stroke(KTheme.purple.opacity(0.34), lineWidth: 1) } .scaleEffect(x: 0.88, y: 0.95) - .offset(y: 24) + .offset(y: 27) .blur(radius: 1.2) .opacity(0.62) @@ -88,14 +99,25 @@ struct GlassDepthDeck: View { .stroke(KTheme.pink.opacity(0.32), lineWidth: 1) } .scaleEffect(x: 0.95, y: 0.98) - .offset(y: 13) + .offset(y: 15) .opacity(0.80) content - .shadow(color: .black.opacity(0.48), radius: 34, y: 22) - .shadow(color: KTheme.pink.opacity(0.26), radius: 22, y: 8) + .shadow(color: .black.opacity(0.58), radius: 38, y: 26) + .shadow(color: KTheme.pink.opacity(0.34), radius: 26, y: 10) + + RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) + .stroke( + LinearGradient( + colors: [.white.opacity(0.62), .clear, KTheme.purple.opacity(0.42)], + startPoint: .topLeading, + endPoint: .bottomTrailing + ), + lineWidth: 1.3 + ) + .allowsHitTesting(false) } - .padding(.bottom, 24) + .padding(.bottom, 38) } } diff --git a/Kasztelan/WalletView.swift b/Kasztelan/WalletView.swift index 5029932..a3bd836 100644 --- a/Kasztelan/WalletView.swift +++ b/Kasztelan/WalletView.swift @@ -33,7 +33,6 @@ struct WalletView: View { private var walletCarousel: some View { GeometryReader { geometry in ZStack { - AmbientBackground() WalletMotionBubbles(progress: carouselProgress(width: geometry.size.width)) AnyView(currentPage) @@ -327,7 +326,8 @@ private struct DiscountCardView: View { .stroke(.white.opacity(0.28), lineWidth: 1) } } - .rotation3DEffect(.degrees(-2.8), axis: (x: 1, y: 0, z: 0), perspective: 0.62) + .scaleEffect(1.01) + .rotation3DEffect(.degrees(-6), axis: (x: 1, y: -0.10, z: 0), perspective: 0.72) Text(model.text("Dostępna offline • zaszyfrowana synchronizacja", "Available offline • encrypted sync")) .font(.footnote)