feat(mobile): upload queue ui and continuous capture page

Task 9 (P3 plan): queue tab replaces the stub, continuous capture page
enqueues per shot, album detail gains an upload FAB, and the upload
engine lifecycle is now bound to the login session.

- Engine scope: session account drives UploadEngine start/stop; wired
  from app boot, login success, logout, and 401 eviction. Tasks stay in
  the store across logout (accountId hard isolation).
- Queue tab: album x state x time filter bar, task rows with thumbnail,
  state chip, localized error copy, attempt count, per-row progress via
  a broadcast progress hub, state-dependent actions (re-pick retry,
  retryNow, cancel, delete), batch retry bar, 200ms-debounced live
  refresh from drift table updates.
- Capture page: camera preview via injected CaptureSource, one enqueue
  per shutter press, persistent album/category/badges overlay with a
  switch-only-affects-new-shots hint, gallery multi-pick, exit confirm
  while uploads are pending, permission-denied and init-failure views.
- POST_NOTIFICATIONS runtime permission via a small MethodChannel
  (photolive/permissions) + PermissionPlugin.kt: single runtime
  permission need, avoids permission_handler dependency; requested once
  on first enqueue, silent degradation when denied or unavailable.
- Album detail FAB: capture-and-upload / pick-from-gallery sheet.
- l10n: ~50 new keys in zh/en arbs; tests: +45 (filter matrix, engine
  scope lifecycle, permission gate, queue tab, capture page, FAB entry);
  existing page tests updated to inject session/task-store fakes.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-19 04:47:31 +08:00
parent 42e1c2e34b
commit 955f9b13c1
30 changed files with 4206 additions and 51 deletions
+56 -1
View File
@@ -117,5 +117,60 @@
"uploadStateConfirmed": "Confirmed",
"uploadStateCancelled": "Cancelled",
"uploadStateExpired": "Expired",
"thisDevice": "This device"
"thisDevice": "This device",
"queueAlbumFilterAll": "All albums",
"queueStateAll": "All",
"queueStatePreparing": "Preparing",
"queueStateQueued": "Queued",
"queueStateUploading": "Uploading",
"queueStateWaitingNetwork": "Waiting for network",
"queueStateFailed": "Failed",
"queueStateCompleted": "Done",
"queueTimeAll": "Any time",
"queueTimeToday": "Today",
"queueTimeLast7Days": "Last 7 days",
"queueTimeLast30Days": "Last 30 days",
"queueEmpty": "No upload tasks",
"queueRetryAllFailed": "Retry all failed",
"queueAttemptCount": "{count} attempt(s)",
"@queueAttemptCount": { "placeholders": { "count": { "type": "int" } } },
"taskStatePreparing": "Preparing",
"taskStatePreparationFailed": "Preparation failed",
"taskStateQueued": "Queued",
"taskStateUploading": "Uploading",
"taskStateUploadedConfirming": "Confirming",
"taskStateCompleted": "Completed",
"taskStateWaitingNetwork": "Waiting for network",
"taskStateRetryableFailed": "Upload failed",
"taskStateCancelled": "Cancelled",
"errorPrepSourceUnreadable": "Could not read the selected photo. Please reselect",
"errorPrepUnsupportedType": "Only JPG, PNG and HEIC images are supported",
"errorPrepTooLarge": "Photo exceeds the 50MB limit",
"errorPrepCopyFailed": "Failed to copy the photo. Please retry",
"errorUploadSourceMissing": "Source file is missing. Please reselect",
"errorAlbumUploadDisabled": "Album uploads are disabled",
"errorUploadSessionConflict": "Upload session conflict. Please retry",
"errorUploadVerifyFailed": "Upload verification failed. Will retry",
"captureTitle": "Continuous capture",
"captureCategoryDefault": "Default category",
"captureSwitchHint": "Switching only affects photos captured afterwards",
"capturePendingBadge": "Pending {count}",
"@capturePendingBadge": { "placeholders": { "count": { "type": "int" } } },
"captureFailedBadge": "Failed {count}",
"@captureFailedBadge": { "placeholders": { "count": { "type": "int" } } },
"capturePickFromGallery": "Pick from gallery",
"captureShutter": "Capture",
"captureExitTitle": "Leave shooting?",
"captureExitBody": "{count} photo(s) are still uploading. Tasks will continue in the background after you leave.",
"@captureExitBody": { "placeholders": { "count": { "type": "int" } } },
"captureKeepShooting": "Keep shooting",
"captureExitConfirm": "Leave",
"cameraPermissionDenied": "Camera unavailable. Allow camera access in system settings",
"cameraInitFailed": "Camera failed to initialize",
"uploadActionCapture": "Capture and upload",
"uploadActionPick": "Pick from gallery",
"uploadAction": "Upload",
"uploadEnqueuedCount": "Added {count} photo(s) to the upload queue",
"@uploadEnqueuedCount": { "placeholders": { "count": { "type": "int" } } },
"uploadPickNone": "No photos selected"
}