diff --git a/App/NASBackupApp.swift b/App/NASBackupApp.swift index b505072..1b90f2a 100644 --- a/App/NASBackupApp.swift +++ b/App/NASBackupApp.swift @@ -51,3 +51,4 @@ struct RootView: View { } } } + diff --git a/Features/Backup/BackupView.swift b/Features/Backup/BackupView.swift index bbcdd6b..4cdb5b5 100644 --- a/Features/Backup/BackupView.swift +++ b/Features/Backup/BackupView.swift @@ -708,8 +708,13 @@ struct BackupView: View { private var pullZone: some View { let pct = min(pullProgress / 58, 1.0) let ready = pullProgress >= 58 - let pullLabel = ringPage == 0 ? "PULL TO BACK UP" : "PULL TO CLEAN" - let releaseLabel = ringPage == 0 ? "RELEASE TO BACK UP" : "RELEASE TO CLEAN" + let pullLabel: String + let releaseLabel: String + switch ringPage { + case 0: pullLabel = "PULL TO BACK UP"; releaseLabel = "RELEASE TO BACK UP" + case 1: pullLabel = "PULL TO CLEAN"; releaseLabel = "RELEASE TO CLEAN" + default: pullLabel = "PULL TO REFRESH"; releaseLabel = "RELEASE TO REFRESH" + } return VStack(spacing: 3) { Text("↓") .font(.system(size: 13)) @@ -825,7 +830,11 @@ struct BackupView: View { withAnimation(.spring(response: 0.38, dampingFraction: 0.85)) { pullProgress = 0 } if fired { UIImpactFeedbackGenerator(style: .medium).impactOccurred() - if ringPage == 0 { triggerBackupViaPull() } else { triggerCleanViaPull() } + switch ringPage { + case 0: triggerBackupViaPull() + case 1: triggerCleanViaPull() + default: triggerRefreshViaPull() + } } } } @@ -836,6 +845,14 @@ struct BackupView: View { if engine.job.status == .paused { engine.resume() } else { startBackup() } } + private func triggerRefreshViaPull() { + rippleScale = 0.88; rippleOpacity = 0.4 + withAnimation(.easeOut(duration: 0.65)) { rippleScale = 1.35; rippleOpacity = 0 } + loadDeviceStorage() + loadCleanupData() + statusService.refresh(force: true) + } + private func triggerCleanViaPull() { rippleScale = 0.88; rippleOpacity = 0.6 withAnimation(.easeOut(duration: 0.65)) { rippleScale = 1.35; rippleOpacity = 0 }