Merge origin/dev into release/test preserving current workflows

This commit is contained in:
2026-09-14 11:05:48 +08:00
17 changed files with 328 additions and 24 deletions
+14 -2
View File
@@ -524,6 +524,10 @@
if (!requireSession()) return
this.currentUser = session.currentUser
if (options.taskId) {
// Session display state can belong to the task opened before this route.
// Only the scoped draft restored after loading this task may restore its history.
this.scanValue = ''
this.scanHistory = []
// A local completion marker belongs to the previously opened task. The
// canonical server detail decides whether this task is complete.
this.completedBoxes = {}
@@ -540,6 +544,8 @@
},
async onShow() {
if (!requireSession()) return
if (this._pageVisible) return this._showRefreshPromise
this._pageVisible = true
this.currentUser = session.currentUser
this.startHardwareScanner()
if (this.cameraPicking) {
@@ -551,10 +557,16 @@
this.debugEvidence('preview.resume', { evidenceIdentity: this.evidenceIdentity })
return
}
await this.refreshAvailableBoxes()
await this.syncRemoteTask()
if (this._showRefreshPromise) return this._showRefreshPromise
this._showRefreshPromise = (async () => {
await this.refreshAvailableBoxes()
await this.syncRemoteTask()
})()
try { await this._showRefreshPromise }
finally { this._showRefreshPromise = null }
},
onHide() {
this._pageVisible = false
if (this.evidencePreviewOpening) {
this.evidencePreviewOpening = false
this.evidencePreviewReturning = true