Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct OnboardingFlowView: View {
case .push:
OnboardingPushView()
case .pairing:
OnboardingPairingView(isActive: stage == .pairing)
OnboardingPairingView()
case .connect:
OnboardingConnectionView(
phase: connectionPhase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,17 @@ import CmuxMobileSupport
import SwiftUI

/// A real Mac Settings capture cropped to the Mobile pane. The asset catalog
/// selects the light or dark source to match the app appearance.
/// selects the light or dark source to match the app appearance. Keeping the
/// capture still makes the Mobile pairing setting easy to read.
struct OnboardingPairingSettingsScreenshot: View {
let isActive: Bool

@Environment(\.accessibilityReduceMotion) private var reduceMotion
@Environment(\.scenePhase) private var scenePhase

var body: some View {
Color.clear
.aspectRatio(1030.0 / 285.0, contentMode: .fit)
.overlay(alignment: .top) {
Image("OnboardingPairingSettings", bundle: .module)
.resizable()
.interpolation(.high)
.scaledToFill()
.keyframeAnimator(
initialValue: CGFloat(1),
repeating: isActive && scenePhase == .active && !reduceMotion
) { image, zoom in
image.scaleEffect(zoom, anchor: .topTrailing)
} keyframes: { _ in
LinearKeyframe(1, duration: 2)
CubicKeyframe(1.3, duration: 1.2)
LinearKeyframe(1.3, duration: 3)
CubicKeyframe(1, duration: 1.2)
}
.scaledToFit()
}
.clipShape(RoundedRectangle(cornerRadius: 12))
.accessibilityElement(children: .ignore)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import SwiftUI

/// Explains the Mac-side opt-in before onboarding starts discovery.
struct OnboardingPairingView: View {
let isActive: Bool

var body: some View {
ZStack {
Color.clear
Expand Down Expand Up @@ -35,7 +33,7 @@ struct OnboardingPairingView: View {

private var pairingVisual: some View {
VStack(spacing: 22) {
OnboardingPairingSettingsScreenshot(isActive: isActive)
OnboardingPairingSettingsScreenshot()

Label {
Text(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading