feat: 积分明细页面
This commit is contained in:
parent
62c2defb1d
commit
bae3923475
Binary file not shown.
@ -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] = [
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user