Introduce unified design tokens and migrate Home, Orders, and Statistics UI.

Establish AppColor/AppFont/AppSpacing/AppRadius theming, shared components, and design-system docs so pilot screens align with Android while keeping iOS-native spacing and touch targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 17:58:18 +08:00
parent 39186cfe25
commit 87696a4774
31 changed files with 737 additions and 213 deletions

View File

@ -15,17 +15,17 @@ final class HomeStoreCardView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
layer.cornerRadius = 10
backgroundColor = AppColor.cardBackground
layer.cornerRadius = AppRadius.md
nameLabel.font = .systemFont(ofSize: 16, weight: .semibold)
nameLabel.textColor = AppColor.text333
nameLabel.font = .app(.title)
nameLabel.textColor = AppColor.textPrimary
addressLabel.font = .systemFont(ofSize: 13)
addressLabel.textColor = AppColor.text666
addressLabel.font = .app(.body)
addressLabel.textColor = AppColor.textSecondary
addressLabel.numberOfLines = 2
statusLabel.font = .systemFont(ofSize: 12, weight: .medium)
statusLabel.font = .app(.captionMedium)
statusLabel.textColor = AppColor.primary
addSubview(nameLabel)
@ -33,17 +33,17 @@ final class HomeStoreCardView: UIView {
addSubview(statusLabel)
nameLabel.snp.makeConstraints { make in
make.top.leading.equalToSuperview().offset(15)
make.trailing.lessThanOrEqualTo(statusLabel.snp.leading).offset(-8)
make.top.leading.equalToSuperview().offset(AppSpacing.screenHorizontalInset)
make.trailing.lessThanOrEqualTo(statusLabel.snp.leading).offset(-AppSpacing.xs)
}
statusLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(15)
make.trailing.equalToSuperview().offset(-15)
make.top.equalToSuperview().offset(AppSpacing.screenHorizontalInset)
make.trailing.equalToSuperview().offset(-AppSpacing.screenHorizontalInset)
}
addressLabel.snp.makeConstraints { make in
make.top.equalTo(nameLabel.snp.bottom).offset(8)
make.leading.trailing.equalToSuperview().inset(15)
make.bottom.equalToSuperview().offset(-15)
make.top.equalTo(nameLabel.snp.bottom).offset(AppSpacing.xs)
make.leading.trailing.equalToSuperview().inset(AppSpacing.screenHorizontalInset)
make.bottom.equalToSuperview().offset(-AppSpacing.screenHorizontalInset)
}
}