feat(drone-dock): 接入游客确认交付并对齐网页样式

This commit is contained in:
2026-10-30 16:19:40 +08:00
parent f99a175f99
commit fad2ed8a50
23 changed files with 2437 additions and 89 deletions
@@ -209,6 +209,8 @@ final class DroneDockMaterialMediaCell: UICollectionViewCell {
videoBadge.clipsToBounds = true
previewButton.addTarget(self, action: #selector(previewTapped), for: .touchUpInside)
selectionButton.addTarget(self, action: #selector(selectionTapped), for: .touchUpInside)
selectionButton.contentHorizontalAlignment = .right
selectionButton.contentVerticalAlignment = .top
let nameRow = UIStackView(arrangedSubviews: [titleLabel, retryLabel])
nameRow.axis = .horizontal
nameRow.spacing = 4
@@ -217,7 +219,7 @@ final class DroneDockMaterialMediaCell: UICollectionViewCell {
thumbnail.snp.makeConstraints { make in make.top.leading.trailing.equalToSuperview(); make.height.equalTo(thumbnail.snp.width).multipliedBy(9.0 / 16.0) }
icon.snp.makeConstraints { make in make.center.equalTo(thumbnail); make.size.equalTo(28) }
previewButton.snp.makeConstraints { $0.edges.equalTo(thumbnail) }
selectionButton.snp.makeConstraints { make in make.top.trailing.equalTo(thumbnail); make.size.equalTo(44) }
selectionButton.snp.makeConstraints { make in make.top.trailing.equalTo(thumbnail).inset(6); make.size.equalTo(44) }
videoBadge.snp.makeConstraints { make in make.leading.bottom.equalTo(thumbnail).inset(6); make.size.equalTo(CGSize(width: 32, height: 18)) }
nameRow.snp.makeConstraints { make in make.top.equalTo(thumbnail.snp.bottom).offset(7); make.leading.trailing.equalToSuperview() }
stateLabel.snp.makeConstraints { make in make.top.equalTo(nameRow.snp.bottom).offset(4); make.leading.trailing.equalToSuperview(); make.bottom.lessThanOrEqualToSuperview().inset(5) }
@@ -257,11 +259,9 @@ final class DroneDockMaterialMediaCell: UICollectionViewCell {
selectionButton.accessibilityIdentifier = "drone.materials.remote.select.\(taskID).\(file.id)"
selectionButton.accessibilityLabel = "选择\(title)"
selectionButton.accessibilityTraits = selected ? [.button, .selected] : .button
selectionButton.setImage(DroneMaterialSelectionIcon.image(selected: selected, tint: selected ? DroneDockStyle.primary : .white), for: .normal)
selectionButton.imageView?.layer.shadowColor = UIColor.black.cgColor
selectionButton.imageView?.layer.shadowOpacity = 0.25
selectionButton.imageView?.layer.shadowRadius = 2
selectionButton.imageView?.layer.shadowOffset = .zero
selectionButton.setImage(MaterialSelectionIcon.orderImage(selected: selected, size: 22,
tint: MaterialSelectionIcon.primary,
includesBackground: true), for: .normal)
thumbnail.layer.borderColor = selected ? DroneDockStyle.primary.cgColor : UIColor.clear.cgColor
previewButton.accessibilityHint = file.uploadStatus == 3 ? DroneDockHomeMetric.usableText(file.failureReason) : nil
}