feat: 样式

This commit is contained in:
jinyaqiu 2025-09-01 17:27:34 +08:00
parent 6bf52f1286
commit db82f3b7ec
7 changed files with 19 additions and 15 deletions

View File

@ -26,6 +26,7 @@ struct Theme {
static let background = Color(hex: "F8F9FA") // static let background = Color(hex: "F8F9FA") //
static let surface = Color.white // static let surface = Color.white //
static let surfaceSecondary = Color(hex: "F5F5F5") // static let surfaceSecondary = Color(hex: "F5F5F5") //
static let surfaceTertiary = Color(hex: "F7F7F7") //
// MARK: - // MARK: -
static let textPrimary = Color.black // static let textPrimary = Color.black //

View File

@ -34,7 +34,7 @@ struct CreditsInfoCard: View {
.buttonStyle(PlainButtonStyle()) .buttonStyle(PlainButtonStyle())
.background(Theme.Colors.primaryLight) .background(Theme.Colors.primaryLight)
.cornerRadius(Theme.CornerRadius.extraLarge) .cornerRadius(Theme.CornerRadius.extraLarge)
.shadow(color: Theme.Shadows.small, radius: Theme.Shadows.cardShadow.radius, x: Theme.Shadows.cardShadow.x, y: Theme.Shadows.cardShadow.y) // .shadow(color: Theme.Shadows.small, radius: Theme.Shadows.cardShadow.radius, x: Theme.Shadows.cardShadow.x, y: Theme.Shadows.cardShadow.y)
} }
// MARK: - // MARK: -

View File

@ -60,12 +60,12 @@ struct PlanCompare: View {
} }
.background(Theme.Colors.cardBackground) .background(Theme.Colors.cardBackground)
.cornerRadius(Theme.CornerRadius.medium) .cornerRadius(Theme.CornerRadius.medium)
.shadow( // .shadow(
color: Theme.Shadows.small, // color: Theme.Shadows.small,
radius: Theme.Shadows.cardShadow.radius, // radius: Theme.Shadows.cardShadow.radius,
x: Theme.Shadows.cardShadow.x, // x: Theme.Shadows.cardShadow.x,
y: Theme.Shadows.cardShadow.y // y: Theme.Shadows.cardShadow.y
) // )
} }
// MARK: - // MARK: -

View File

@ -100,7 +100,7 @@ struct PlanCard: View {
.background( .background(
plan == .pioneer ? plan == .pioneer ?
Theme.Colors.primary : Theme.Colors.primary :
Theme.Colors.surface Theme.Colors.surfaceTertiary
) )
.overlay( .overlay(
RoundedRectangle(cornerRadius: Theme.CornerRadius.medium) RoundedRectangle(cornerRadius: Theme.CornerRadius.medium)

View File

@ -57,12 +57,12 @@ struct SubscribeButton: View {
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.background(Theme.Colors.primary) // primary color background .background(Theme.Colors.primary) // primary color background
.clipShape(Capsule()) .clipShape(Capsule())
.shadow( // .shadow(
color: Theme.Shadows.buttonShadow.color, // color: Theme.Shadows.buttonShadow.color,
radius: Theme.Shadows.buttonShadow.radius, // radius: Theme.Shadows.buttonShadow.radius,
x: Theme.Shadows.buttonShadow.x, // x: Theme.Shadows.buttonShadow.x,
y: Theme.Shadows.buttonShadow.y // y: Theme.Shadows.buttonShadow.y
) // )
} }
.buttonStyle(.plain) .buttonStyle(.plain)
.disabled(isLoading || subscribed) .disabled(isLoading || subscribed)

View File

@ -109,7 +109,7 @@ struct SubscriptionStatusBar: View {
.padding(20) .padding(20)
.background(status.backgroundColor) .background(status.backgroundColor)
.cornerRadius(20) .cornerRadius(20)
.shadow(color: Color.black.opacity(0.1), radius: 4, x: 0, y: 2) // .shadow(color: Color.black.opacity(0.1), radius: 4, x: 0, y: 2)
} }
// MARK: - // MARK: -

View File

@ -60,6 +60,8 @@ struct SubscribeView: View {
SimpleNaviHeader(title: "Subscription") { SimpleNaviHeader(title: "Subscription") {
dismiss() dismiss()
} }
.background(Color.themeTextWhiteSecondary)
.padding(.bottom, Theme.Spacing.lg)
ScrollView { ScrollView {
VStack(spacing: 0) { VStack(spacing: 0) {
@ -96,6 +98,7 @@ struct SubscribeView: View {
} }
.background(Theme.Colors.background) .background(Theme.Colors.background)
} }
.background(Color.themeTextWhiteSecondary)
.navigationBarHidden(true) .navigationBarHidden(true)
.task { .task {
// Load products and refresh current entitlements on appear // Load products and refresh current entitlements on appear