Show destination folder row always, activate after auth
Remove slide-in animation — destination row is always visible but dimmed (opacity 0.45, taps blocked) until credentials are verified. On successful auth it becomes fully active, green border appears once a valid path is chosen. Co-Authored-By: Kutesir <kutesir@provoc.ug> Co-Authored-By: Sentry <sentry@provoc.ug>
This commit is contained in:
@@ -175,23 +175,28 @@ struct ConnectView: View {
|
|||||||
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: vm.isConnected)
|
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: vm.isConnected)
|
||||||
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: vm.verifyError != nil)
|
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: vm.verifyError != nil)
|
||||||
|
|
||||||
// ── Step 2: Destination folder — slides in after auth ──
|
// ── Destination folder — always visible, active only after auth ──
|
||||||
if vm.step != .credentials {
|
Button(action: { if vm.isConnected { vm.showFolderBrowser = true } }) {
|
||||||
Button(action: { vm.showFolderBrowser = true }) {
|
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
Image(systemName: vm.remotePath == "/" ? "folder" : "folder.fill")
|
Image(systemName: vm.remotePath == "/" ? "folder" : "folder.fill")
|
||||||
.font(.system(size: 14, weight: .regular))
|
.font(.system(size: 14, weight: .regular))
|
||||||
.foregroundStyle(vm.remotePath == "/" ? AppTheme.inkSecondary : AppTheme.positive)
|
.foregroundStyle(
|
||||||
|
!vm.isConnected ? AppTheme.inkQuaternary :
|
||||||
|
vm.remotePath == "/" ? AppTheme.inkSecondary : AppTheme.positive
|
||||||
|
)
|
||||||
.frame(width: 20)
|
.frame(width: 20)
|
||||||
Text(vm.remotePath == "/" ? "Select destination folder" : vm.remotePath)
|
Text(vm.remotePath == "/" ? "Destination folder" : vm.remotePath)
|
||||||
.font(AppTheme.body())
|
.font(AppTheme.body())
|
||||||
.foregroundStyle(vm.remotePath == "/" ? AppTheme.inkTertiary : AppTheme.ink)
|
.foregroundStyle(
|
||||||
|
!vm.isConnected ? AppTheme.inkQuaternary :
|
||||||
|
vm.remotePath == "/" ? AppTheme.inkTertiary : AppTheme.ink
|
||||||
|
)
|
||||||
.lineLimit(2)
|
.lineLimit(2)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
Image(systemName: "chevron.right")
|
Image(systemName: "folder.badge.plus")
|
||||||
.font(.system(size: 12, weight: .medium))
|
.font(.system(size: 16))
|
||||||
.foregroundStyle(AppTheme.inkQuaternary)
|
.foregroundStyle(vm.isConnected ? AppTheme.inkSecondary : AppTheme.inkQuaternary)
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 16)
|
.padding(.horizontal, 16)
|
||||||
.padding(.vertical, 14)
|
.padding(.vertical, 14)
|
||||||
@@ -205,13 +210,12 @@ struct ConnectView: View {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
.shadow(color: AppTheme.cardShadow, radius: 12, x: 0, y: 2)
|
.shadow(color: AppTheme.cardShadow, radius: 12, x: 0, y: 2)
|
||||||
|
.opacity(vm.isConnected ? 1 : 0.45)
|
||||||
|
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: vm.isConnected)
|
||||||
}
|
}
|
||||||
.buttonStyle(ScaleButtonStyle())
|
.buttonStyle(ScaleButtonStyle())
|
||||||
.padding(.horizontal, AppTheme.hPad)
|
.padding(.horizontal, AppTheme.hPad)
|
||||||
.padding(.bottom, 12)
|
.padding(.bottom, 12)
|
||||||
.transition(.opacity.combined(with: .move(edge: .top)))
|
|
||||||
.animation(.spring(response: 0.35, dampingFraction: 0.8), value: vm.step)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ── Status message ──
|
// ── Status message ──
|
||||||
HStack(spacing: 6) {
|
HStack(spacing: 6) {
|
||||||
|
|||||||
Reference in New Issue
Block a user