Refine floating card depth and reserve carousel indicator space

This commit is contained in:
Rafal Kolarz 2026-10-23 01:54:25 +01:00
parent 02336c04b8
commit dd8adb2c59
5 changed files with 17 additions and 51 deletions

View File

@ -292,7 +292,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 14;
CURRENT_PROJECT_VERSION = 15;
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 = 14;
CURRENT_PROJECT_VERSION = 15;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = Kasztelan/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink";

View File

@ -23,7 +23,7 @@ struct CardView: View {
GeometryReader { geometry in
let compact = geometry.size.height < 680
VStack(alignment: .leading, spacing: compact ? 10 : 18) {
VStack(alignment: .leading, spacing: compact ? 8 : 12) {
Text(model.text("Witaj, ", "Hello, ") + firstName)
.font(compact ? .title.bold() : .largeTitle.bold())
.lineLimit(1)
@ -36,7 +36,7 @@ struct CardView: View {
summary(compact: compact)
}
.padding(.horizontal, 20)
.padding(.vertical, compact ? 8 : 14)
.padding(.top, compact ? 0 : 2)
.frame(width: geometry.size.width, height: geometry.size.height, alignment: .top)
}
.background(.clear)
@ -92,13 +92,6 @@ struct CardView: View {
GlassDepthDeck {
loyaltyCardFace(compact: compact)
}
.scaleEffect(1.01)
.rotation3DEffect(
.degrees(-6),
axis: (x: 1, y: -0.10, z: 0),
anchor: .center,
perspective: 0.72
)
}
private func loyaltyCardFace(compact: Bool) -> some View {
@ -106,7 +99,7 @@ struct CardView: View {
Image("Logo")
.resizable()
.scaledToFit()
.frame(maxHeight: compact ? 54 : 76)
.frame(maxHeight: compact ? 66 : 88)
if model.cardNumber.count == 13 {
VStack(spacing: compact ? 4 : 8) {
CardBarcodeView(digits: model.cardNumber)

View File

@ -54,7 +54,7 @@ struct AppToolbar: ToolbarContent {
Image("Logo")
.resizable()
.scaledToFit()
.frame(width: 170, height: 44)
.frame(width: 190, height: 46)
.shadow(color: KTheme.pink.opacity(0.28), radius: 12)
}
ToolbarItem(placement: .topBarTrailing) { LanguageButton() }

View File

@ -71,53 +71,28 @@ struct GlassDepthDeck<Content: View>: 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 {
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
.stroke(KTheme.purple.opacity(0.34), lineWidth: 1)
}
.scaleEffect(x: 0.88, y: 0.95)
.offset(y: 27)
.blur(radius: 1.2)
.opacity(0.62)
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
.fill(.thinMaterial)
.overlay {
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
.stroke(KTheme.pink.opacity(0.32), lineWidth: 1)
}
.scaleEffect(x: 0.95, y: 0.98)
.offset(y: 15)
.opacity(0.80)
.fill(.black.opacity(0.50))
.scaleEffect(x: 0.94, y: 0.97)
.offset(y: 18)
.blur(radius: 18)
content
.shadow(color: .black.opacity(0.58), radius: 38, y: 26)
.shadow(color: KTheme.pink.opacity(0.34), radius: 26, y: 10)
.shadow(color: .black.opacity(0.66), radius: 30, y: 20)
.shadow(color: KTheme.purple.opacity(0.30), radius: 24, x: -8, y: 8)
.shadow(color: KTheme.pink.opacity(0.30), radius: 20, x: 10, y: 4)
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
.stroke(
LinearGradient(
colors: [.white.opacity(0.62), .clear, KTheme.purple.opacity(0.42)],
colors: [.white.opacity(0.76), .white.opacity(0.10), KTheme.purple.opacity(0.46)],
startPoint: .topLeading,
endPoint: .bottomTrailing
),
lineWidth: 1.3
lineWidth: 1.6
)
.allowsHitTesting(false)
}
.padding(.bottom, 38)
.padding(.bottom, 20)
}
}

View File

@ -51,7 +51,7 @@ struct WalletView: View {
.contentShape(Rectangle())
.simultaneousGesture(carouselGesture(width: geometry.size.width))
}
.overlay(alignment: .bottom) { pageIndicator }
.safeAreaInset(edge: .bottom, spacing: 0) { pageIndicator }
.clipped()
}
}
@ -326,8 +326,6 @@ private struct DiscountCardView: View {
.stroke(.white.opacity(0.28), lineWidth: 1)
}
}
.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)