feat: 积分明细页面

This commit is contained in:
Junhui Chen 2025-08-20 13:28:27 +08:00
parent 62c2defb1d
commit bae3923475
4 changed files with 15 additions and 8 deletions

View File

@ -4,9 +4,8 @@ import SwiftUI
/// ///
enum FontFamily: String, CaseIterable { enum FontFamily: String, CaseIterable {
case sankeiCute = "SankeiCutePopanime" // case sankeiCute = "SankeiCutePopanime" //
case quicksand = "Quicksand x" // case quicksandRegular = "Quicksand-Regular" //
case quicksandBold = "Quicksand-Bold" case quicksandBold = "Quicksand-Bold"
case quicksandRegular = "Quicksand-Regular"
// case // case
// : case anotherFont = "AnotherFontName" // : case anotherFont = "AnotherFontName"
@ -16,6 +15,12 @@ enum FontFamily: String, CaseIterable {
} }
} }
// `.quicksand`
extension FontFamily {
@available(*, deprecated, message: "Use .quicksandRegular instead.")
static var quicksand: FontFamily { .quicksandRegular }
}
// MARK: - // MARK: -
/// 使 /// 使
enum TypographyStyle { enum TypographyStyle {
@ -40,7 +45,7 @@ struct Typography {
// MARK: - // MARK: -
/// ///
private static let defaultFontFamily: FontFamily = .quicksand private static let defaultFontFamily: FontFamily = .quicksandRegular
/// ///
private static let styleConfig: [TypographyStyle: TypographyConfig] = [ private static let styleConfig: [TypographyStyle: TypographyConfig] = [

View File

@ -1,4 +1,4 @@
// //
// CreditsDetailView.swift // CreditsDetailView.swift
// wake // wake
// //
@ -92,7 +92,7 @@ struct CreditsDetailView: View {
Spacer(minLength: 100) Spacer(minLength: 100)
} }
} }
.background(Color(.systemGroupedBackground)) .background(Theme.Colors.background)
.navigationBarHidden(true) .navigationBarHidden(true)
} }
} }
@ -185,9 +185,11 @@ struct CreditsDetailView: View {
Spacer() Spacer()
Image(systemName: showRules ? "chevron.up" : "chevron.down") Image(systemName: "chevron.right")
.foregroundColor(.black) .foregroundColor(.black)
.font(.system(size: 14, weight: .medium)) .font(.system(size: 14, weight: .medium))
.rotationEffect(.degrees(showRules ? 90 : 0))
.animation(.easeInOut(duration: 0.3), value: showRules)
} }
.padding(.horizontal, Theme.Spacing.xl) .padding(.horizontal, Theme.Spacing.xl)
.padding(.vertical, Theme.Spacing.lg) .padding(.vertical, Theme.Spacing.lg)
@ -213,7 +215,7 @@ struct CreditsDetailView: View {
Text("Points History") Text("Points History")
.font(Typography.font(for: .title, family: .quicksandBold)) .font(Typography.font(for: .title, family: .quicksandBold))
.foregroundColor(Theme.Colors.textPrimary) .foregroundColor(Theme.Colors.textPrimary)
.padding(.horizontal, Theme.Spacing.xl) .padding(.horizontal, Theme.Spacing.xxl)
LazyVStack(spacing: 0) { LazyVStack(spacing: 0) {
ForEach(Array(transactions.enumerated()), id: \.element.id) { index, transaction in ForEach(Array(transactions.enumerated()), id: \.element.id) { index, transaction in

View File

@ -68,7 +68,7 @@ struct CreditsInfoCard: View {
.font(Typography.font(for: .caption, family: .quicksandRegular)) .font(Typography.font(for: .caption, family: .quicksandRegular))
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.presentationBackground(Theme.Gradients.backgroundGradient) .presentationBackground(Theme.Gradients.backgroundGradient)
.frame(minWidth: 240, maxWidth: UIScreen.main.bounds.width * 0.6) .frame(minWidth: 200, maxWidth: UIScreen.main.bounds.width * 0.6)
.presentationCompactAdaptation(.popover) .presentationCompactAdaptation(.popover)
.padding(.horizontal, Theme.Spacing.md) .padding(.horizontal, Theme.Spacing.md)
.padding(.vertical, Theme.Spacing.sm) .padding(.vertical, Theme.Spacing.sm)