开放 Release 真实操作并保留 Debug 拦截;恢复前台 shooting 串行轮询;统一打印机巢请求与完整原值响应;优化长点位名称、未拍摄文案、报备失败及已结束任务提示,移除成功回执 UI。补充相关测试、离线策略检查和联调说明。
38 lines
1.5 KiB
Swift
38 lines
1.5 KiB
Swift
import SnapKit
|
|
import UIKit
|
|
|
|
/// 准备页业务失败卡片,完整换行展示原因,不展示成功回执或接口 JSON。
|
|
@MainActor
|
|
final class DroneDockTaskCreationResultCell: UICollectionViewCell {
|
|
private let titleLabel = DroneDockStyle.label(size: 16, weight: .semibold)
|
|
private let detailLabel = DroneDockStyle.label(size: 14, color: DroneDockStyle.secondary)
|
|
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
contentView.backgroundColor = DroneDockStyle.background
|
|
contentView.layer.cornerRadius = 10
|
|
titleLabel.numberOfLines = 0
|
|
detailLabel.numberOfLines = 0
|
|
titleLabel.textColor = DroneDockStyle.warning
|
|
[titleLabel, detailLabel].forEach(contentView.addSubview)
|
|
titleLabel.snp.makeConstraints { make in
|
|
make.top.leading.trailing.equalToSuperview().inset(12)
|
|
}
|
|
detailLabel.snp.makeConstraints { make in
|
|
make.top.equalTo(titleLabel.snp.bottom).offset(8)
|
|
make.leading.trailing.equalTo(titleLabel)
|
|
make.bottom.equalToSuperview().inset(12)
|
|
}
|
|
}
|
|
|
|
@available(*, unavailable)
|
|
required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") }
|
|
|
|
/// 只接收面向用户的错误模型,成功 data 不进入视图层。
|
|
func apply(failure: DroneDockPreparationFailure, identifier: String) {
|
|
titleLabel.text = failure.title
|
|
detailLabel.text = failure.message
|
|
detailLabel.accessibilityIdentifier = identifier
|
|
}
|
|
}
|