Refine floating card depth and reserve carousel indicator space
This commit is contained in:
parent
02336c04b8
commit
dd8adb2c59
|
|
@ -292,7 +292,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 14;
|
CURRENT_PROJECT_VERSION = 15;
|
||||||
GENERATE_INFOPLIST_FILE = NO;
|
GENERATE_INFOPLIST_FILE = NO;
|
||||||
INFOPLIST_FILE = Kasztelan/Info.plist;
|
INFOPLIST_FILE = Kasztelan/Info.plist;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink";
|
||||||
|
|
@ -316,7 +316,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 14;
|
CURRENT_PROJECT_VERSION = 15;
|
||||||
GENERATE_INFOPLIST_FILE = NO;
|
GENERATE_INFOPLIST_FILE = NO;
|
||||||
INFOPLIST_FILE = Kasztelan/Info.plist;
|
INFOPLIST_FILE = Kasztelan/Info.plist;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink";
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ struct CardView: View {
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
let compact = geometry.size.height < 680
|
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)
|
Text(model.text("Witaj, ", "Hello, ") + firstName)
|
||||||
.font(compact ? .title.bold() : .largeTitle.bold())
|
.font(compact ? .title.bold() : .largeTitle.bold())
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
|
|
@ -36,7 +36,7 @@ struct CardView: View {
|
||||||
summary(compact: compact)
|
summary(compact: compact)
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 20)
|
.padding(.horizontal, 20)
|
||||||
.padding(.vertical, compact ? 8 : 14)
|
.padding(.top, compact ? 0 : 2)
|
||||||
.frame(width: geometry.size.width, height: geometry.size.height, alignment: .top)
|
.frame(width: geometry.size.width, height: geometry.size.height, alignment: .top)
|
||||||
}
|
}
|
||||||
.background(.clear)
|
.background(.clear)
|
||||||
|
|
@ -92,13 +92,6 @@ struct CardView: View {
|
||||||
GlassDepthDeck {
|
GlassDepthDeck {
|
||||||
loyaltyCardFace(compact: compact)
|
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 {
|
private func loyaltyCardFace(compact: Bool) -> some View {
|
||||||
|
|
@ -106,7 +99,7 @@ struct CardView: View {
|
||||||
Image("Logo")
|
Image("Logo")
|
||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
.frame(maxHeight: compact ? 54 : 76)
|
.frame(maxHeight: compact ? 66 : 88)
|
||||||
if model.cardNumber.count == 13 {
|
if model.cardNumber.count == 13 {
|
||||||
VStack(spacing: compact ? 4 : 8) {
|
VStack(spacing: compact ? 4 : 8) {
|
||||||
CardBarcodeView(digits: model.cardNumber)
|
CardBarcodeView(digits: model.cardNumber)
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ struct AppToolbar: ToolbarContent {
|
||||||
Image("Logo")
|
Image("Logo")
|
||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
.frame(width: 170, height: 44)
|
.frame(width: 190, height: 46)
|
||||||
.shadow(color: KTheme.pink.opacity(0.28), radius: 12)
|
.shadow(color: KTheme.pink.opacity(0.28), radius: 12)
|
||||||
}
|
}
|
||||||
ToolbarItem(placement: .topBarTrailing) { LanguageButton() }
|
ToolbarItem(placement: .topBarTrailing) { LanguageButton() }
|
||||||
|
|
|
||||||
|
|
@ -71,53 +71,28 @@ struct GlassDepthDeck<Content: View>: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
|
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
|
||||||
.fill(.ultraThinMaterial)
|
.fill(.black.opacity(0.50))
|
||||||
.overlay {
|
.scaleEffect(x: 0.94, y: 0.97)
|
||||||
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
|
.offset(y: 18)
|
||||||
.stroke(KTheme.cyan.opacity(0.22), lineWidth: 1)
|
.blur(radius: 18)
|
||||||
}
|
|
||||||
.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)
|
|
||||||
|
|
||||||
content
|
content
|
||||||
.shadow(color: .black.opacity(0.58), radius: 38, y: 26)
|
.shadow(color: .black.opacity(0.66), radius: 30, y: 20)
|
||||||
.shadow(color: KTheme.pink.opacity(0.34), radius: 26, y: 10)
|
.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)
|
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
|
||||||
.stroke(
|
.stroke(
|
||||||
LinearGradient(
|
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,
|
startPoint: .topLeading,
|
||||||
endPoint: .bottomTrailing
|
endPoint: .bottomTrailing
|
||||||
),
|
),
|
||||||
lineWidth: 1.3
|
lineWidth: 1.6
|
||||||
)
|
)
|
||||||
.allowsHitTesting(false)
|
.allowsHitTesting(false)
|
||||||
}
|
}
|
||||||
.padding(.bottom, 38)
|
.padding(.bottom, 20)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ struct WalletView: View {
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
.simultaneousGesture(carouselGesture(width: geometry.size.width))
|
.simultaneousGesture(carouselGesture(width: geometry.size.width))
|
||||||
}
|
}
|
||||||
.overlay(alignment: .bottom) { pageIndicator }
|
.safeAreaInset(edge: .bottom, spacing: 0) { pageIndicator }
|
||||||
.clipped()
|
.clipped()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -326,8 +326,6 @@ private struct DiscountCardView: View {
|
||||||
.stroke(.white.opacity(0.28), lineWidth: 1)
|
.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"))
|
Text(model.text("Dostępna offline • zaszyfrowana synchronizacja", "Available offline • encrypted sync"))
|
||||||
.font(.footnote)
|
.font(.footnote)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user