feat: update wallet punch point and report success

This commit is contained in:
2026-07-09 14:27:18 +08:00
parent 2970f1514b
commit 43e6133c21
34 changed files with 6671 additions and 71 deletions

View File

@ -976,8 +976,10 @@ private final class WildReportSuccessCheckmarkView: UIView {
///
private final class WildReportSuccessProgressView: UIView {
private let contentView = UIView()
private let stack = UIStackView()
private let steps: [String]
private var itemViews: [WildReportSuccessProgressItemView] = []
init(steps: [String]) {
self.steps = steps
@ -999,27 +1001,38 @@ private final class WildReportSuccessProgressView: UIView {
stack.axis = .horizontal
stack.alignment = .top
stack.distribution = .fillEqually
stack.spacing = 0
addSubview(stack)
addSubview(contentView)
contentView.addSubview(stack)
for (index, step) in steps.enumerated() {
let item = WildReportSuccessProgressItemView(title: step, isCompleted: index == 0)
itemViews.append(item)
stack.addArrangedSubview(item)
item.snp.makeConstraints { make in
make.width.equalTo(74)
}
}
for index in steps.indices.dropLast() {
if index < steps.count - 1 {
let connector = WildReportSuccessProgressConnectorView(isCompleted: index == 0)
stack.addArrangedSubview(connector)
contentView.insertSubview(connector, belowSubview: stack)
connector.snp.makeConstraints { make in
make.leading.equalTo(itemViews[index].connectorAnchorView.snp.centerX).offset(12)
make.trailing.equalTo(itemViews[index + 1].connectorAnchorView.snp.centerX).offset(-12)
make.centerY.equalTo(itemViews[index].connectorAnchorView)
make.height.equalTo(24)
}
}
}
}
private func setupConstraints() {
stack.snp.makeConstraints { make in
contentView.snp.makeConstraints { make in
make.edges.equalToSuperview().inset(UIEdgeInsets(top: 16, left: 12, bottom: 16, right: 12))
}
stack.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
}
}
@ -1028,6 +1041,8 @@ private final class WildReportSuccessProgressItemView: UIView {
private let nodeView: WildReportSuccessProgressNodeView
private let titleLabel = UILabel()
var connectorAnchorView: UIView { nodeView }
init(title: String, isCompleted: Bool) {
self.nodeView = WildReportSuccessProgressNodeView(isCompleted: isCompleted)
super.init(frame: .zero)