feat: 统一机巢加载体验并对齐到达态界面
工作台、准备页、任务首次读取和景区空境库复用应用通用 Loading;到达态按 Web 展示,保留倒计时及手动开拍权限。新增图传几何诊断,不改变 Fit 渲染或设备连接行为。 验证:App 与测试包无签名 build-for-testing 编译通过,git diff --check 通过。iPhone 11 当前 unavailable,真机回归待设备重连后执行。
This commit is contained in:
@@ -3,7 +3,7 @@ import UIKit
|
||||
|
||||
/// 拍摄任务页:前台优先订阅快照、异常时 HTTP 兜底;自动开启图传,飞控仍由用户操作。
|
||||
@MainActor
|
||||
final class DroneDockShootingTaskViewController: BaseViewController {
|
||||
final class DroneDockShootingTaskViewController: GlobalLoadingPageViewController {
|
||||
/// 入口传入的固定任务身份及只读状态,供导航协调和页面测试检查。
|
||||
let viewModel: DroneDockShootingTaskViewModel
|
||||
/// 图传使用独立状态,刷新与播放不会影响任务阶段或固定布局。
|
||||
@@ -287,11 +287,14 @@ final class DroneDockShootingTaskViewController: BaseViewController {
|
||||
telemetry.rainText, telemetry.signalText, telemetry.satelliteText],
|
||||
isStale: viewModel.isTelemetryStale, accessibilityPrefix: "drone.task.remote.metric", preservingStaleValues: true)
|
||||
let presentation = viewModel.presentation
|
||||
setPageLoading(viewModel.response == nil && loading && presentation.phase != .navigating)
|
||||
let value = loading && viewModel.response == nil && presentation.phase != .navigating ? DroneDockTaskPresentation(
|
||||
phase: .loading, title: "正在获取任务状态", message: "正在读取当前拍摄任务",
|
||||
deviceStatus: "—", action: .none, actionTitle: nil, isActionEnabled: false) : presentation
|
||||
statusView.apply(value, isRefreshing: loading, isPrimaryActionLoading: value.action == .resume
|
||||
&& (submittingCommands.contains(.resume) || viewModel.isCommandLoading(.resume)))
|
||||
let primaryActionLoading = value.action == .resume
|
||||
&& (submittingCommands.contains(.resume) || viewModel.isCommandLoading(.resume))
|
||||
|| value.action == .start && (isStartingAction || viewModel.isStartingShooting)
|
||||
statusView.apply(value, isRefreshing: loading, isPrimaryActionLoading: primaryActionLoading)
|
||||
updateArrivalCountdown()
|
||||
safetyView.apply(model: viewModel, isSimulation: simulationRecordsProvider != nil,
|
||||
isInteractive: isPageVisible && isApplicationActive && !loading,
|
||||
|
||||
Reference in New Issue
Block a user