Skip to content

PM-12662 Mass Update App Icons (Part 2 of 2) #1050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Oct 22, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ struct CompleteRegistrationState: Equatable, Sendable {
/// 0-4 (weak to strong password).
var passwordStrengthScore: UInt8?

/// The password visibility icon used in the view's text fields.
var passwordVisibleIcon: ImageAsset {
arePasswordsVisible ? Asset.Images.hidden : Asset.Images.visible
}

/// The required text count for the password strength.
var requiredPasswordCount = Constants.minimumPasswordCharacters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct CompleteRegistrationView: View {
VStack(spacing: 16) {
if store.state.nativeCreateAccountFeatureFlag {
PageHeaderView(
image: Asset.Images.lock,
image: Asset.Images.Illustrations.lock,
title: Localizations.chooseYourMasterPassword,
message: Localizations.chooseAUniqueAndStrongPasswordToKeepYourInformationSafe
)
Expand Down Expand Up @@ -100,9 +100,7 @@ struct CompleteRegistrationView: View {
/// The section where the user can learn more about passwords.
private var learnMoreSection: some View {
HStack(alignment: .center, spacing: 16) {
Image(decorative: Asset.Images.questionRound)
.resizable()
.frame(width: 24, height: 24)
Image(decorative: Asset.Images.questionCircle24)
.foregroundStyle(Asset.Colors.iconSecondary.swiftUIColor)

VStack(alignment: .leading, spacing: 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct MasterPasswordGeneratorView: View {
await store.perform(.generate)
} label: {
HStack(spacing: 8) {
Image(decorative: Asset.Images.restart2)
Image(decorative: Asset.Images.generate16)

Text(Localizations.generate)
}
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.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ struct MasterPasswordGuidanceView: View {
} label: {
HStack(spacing: 16) {
HStack(alignment: .top, spacing: 16) {
Image(decorative: Asset.Images.restart2)
.resizable()
.frame(width: 24, height: 24)
Image(decorative: Asset.Images.generate24)
.foregroundStyle(Asset.Colors.iconSecondary.swiftUIColor)

VStack(alignment: .leading, spacing: 0) {
Expand All @@ -95,7 +93,7 @@ struct MasterPasswordGuidanceView: View {
.frame(maxWidth: .infinity, alignment: .leading)
}

Image(decorative: Asset.Images.rightAngle)
Image(decorative: Asset.Images.chevronRight16)
.foregroundStyle(Asset.Colors.iconPrimary.swiftUIColor)
}
.padding(16)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ class MasterPasswordGuidanceViewTests: BitwardenTestCase {
func test_snapshot_masterPasswordGuidance() {
assertSnapshots(
of: subject.navStackWrapped,
as: [.defaultPortrait, .defaultPortraitDark, .tallPortraitAX5(heightMultiple: 2), .defaultLandscape]
as: [
.defaultPortrait,
.defaultPortraitDark,
.tallPortraitAX5(heightMultiple: 2),
.defaultLandscape,
]
)
}
}
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.
Original file line number Diff line number Diff line change
Expand Up @@ -13,98 +13,95 @@ struct PreventAccountLockView: View {
// MARK: View

var body: some View {
VStack {
VStack(spacing: 0) {
instructionsView

hintInstructionsView

writeDownInstructions
VStack(spacing: 24) {
instructionsView

ContentBlock(dividerLeadingPadding: 48) {
rowView(
image: Asset.Images.lightbulb24,
title: Localizations.createAHint,
subtitle: Localizations.yourHintWillBeSentToYouViaEmailWhenYouRequestIt
)

rowView(
image: Asset.Images.pencil24,
title: Localizations.writeYourPasswordDown,
subtitle: Localizations.beCarefulToKeepYourWrittenPasswordSomewhereSecretAndSafe
)
}
.background(Asset.Colors.backgroundSecondary.swiftUIColor)
.clipShape(RoundedRectangle(cornerRadius: 10))
}
.scrollView()
.navigationBar(title: Localizations.preventAccountLockout, titleDisplayMode: .inline)
.toolbar {
cancelToolbarItem {
closeToolbarItem {
store.send(.dismiss)
}
}
}

// MARK: Private views
// MARK: Private

/// The main instructions.
private var instructionsView: some View {
VStack(spacing: 0) {
VStack(alignment: .leading, spacing: 8) {
Text(Localizations.neverLoseAccessToYourVault)
.styleGuide(.title3, weight: .semibold)

Text(Localizations.theBestWayToMakeSureYouCanAlwaysAccessYourAccountIsToSetUpSafeguardsFromTheStart)
.styleGuide(.body)
}
.foregroundStyle(Asset.Colors.textPrimary.swiftUIColor)
.padding(24)

Divider()
VStack(spacing: 8) {
Text(Localizations.neverLoseAccessToYourVault)
.styleGuide(.title2, weight: .semibold)
.multilineTextAlignment(.center)

Text(Localizations.theBestWayToMakeSureYouCanAlwaysAccessYourAccountIsToSetUpSafeguardsFromTheStart)
.styleGuide(.body)
.multilineTextAlignment(.center)
}
.foregroundStyle(Asset.Colors.textPrimary.swiftUIColor)
.padding(.top, 8)
}

/// The hint instructions.
private var hintInstructionsView: some View {
VStack(spacing: 0) {
HStack(spacing: 20) {
Image(decorative: Asset.Images.lightbulb)
.resizable()
.frame(width: 32, height: 32)
.foregroundStyle(Asset.Colors.iconSecondary.swiftUIColor)
/// Returns a view for displaying a row of content within the view.
///
/// - Parameters:
/// - image: The image to display on the leading edge of the title and subtitle.
/// - title: The title text to display in the row.
/// - subtitle: The subtitle text to display in the row.
/// - Returns: A view for displaying a row of content in the view.
///
@ViewBuilder
private func rowView(
image: ImageAsset,
title: String,
subtitle: String? = nil
) -> some View {
HStack(spacing: 12) {
Image(decorative: image)
.foregroundStyle(Asset.Colors.iconSecondary.swiftUIColor)

VStack(alignment: .leading, spacing: 4) {
Text(Localizations.createAHint)
.styleGuide(.headline, weight: .semibold)
.foregroundStyle(Asset.Colors.textPrimary.swiftUIColor)
VStack(alignment: .leading, spacing: 2) {
Text(title)
.styleGuide(.body, weight: .semibold)
.foregroundStyle(Asset.Colors.textPrimary.swiftUIColor)

Text(Localizations.yourHintWillBeSentToYouViaEmailWhenYouRequestIt)
if let subtitle {
Text(subtitle)
.styleGuide(.subheadline)
.foregroundStyle(Asset.Colors.textSecondary.swiftUIColor)
}
.frame(maxWidth: .infinity, alignment: .leading)
}
.padding(16)

Divider().padding(.leading, 68)
}
}

/// The writing down instructions.
private var writeDownInstructions: some View {
HStack(spacing: 20) {
Image(decorative: Asset.Images.pencil)
.resizable()
.frame(width: 32, height: 32)
.foregroundStyle(Asset.Colors.iconSecondary.swiftUIColor)

VStack(alignment: .leading, spacing: 4) {
Text(Localizations.writeYourPasswordDown)
.styleGuide(.headline, weight: .semibold)
.foregroundStyle(Asset.Colors.textPrimary.swiftUIColor)

Text(Localizations.beCarefulToKeepYourWrittenPasswordSomewhereSecretAndSafe)
.styleGuide(.subheadline)
.foregroundStyle(Asset.Colors.textSecondary.swiftUIColor)
}
.frame(maxWidth: .infinity, alignment: .leading)
}
.padding(16)
.padding(12)
}
}

// MARK: Previews

#if DEBUG
#Preview {
PreventAccountLockView(store: Store(processor: StateProcessor()))
NavigationView {
PreventAccountLockView(
store: Store(
processor: StateProcessor(
state: ()
)
)
)
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class PreventAccountLockViewTests: BitwardenTestCase {
super.setUp()

processor = MockProcessor(state: ())

subject = PreventAccountLockView(store: Store(processor: processor))
}

Expand All @@ -32,7 +31,7 @@ class PreventAccountLockViewTests: BitwardenTestCase {
/// Tapping the cancel button dispatches the `.dismiss` action.
@MainActor
func test_cancelButton_tap() throws {
let button = try subject.inspect().find(button: Localizations.cancel)
let button = try subject.inspect().find(button: Localizations.close)
try button.tap()
XCTAssertEqual(processor.dispatchedActions.last, .dismiss)
}
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
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
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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ struct CreateAccountState: Equatable {
/// 0-4 (weak to strong password).
var passwordStrengthScore: UInt8?

/// The password visibility icon used in the view's text fields.
var passwordVisibleIcon: ImageAsset {
arePasswordsVisible ? Asset.Images.hidden : Asset.Images.visible
}

/// The text in the re-type password text field.
var retypePasswordText: String = ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@ struct IntroCarouselState: Equatable {
/// The list of scrollable pages displayed in the carousel.
let pages: [CarouselPage] = [
CarouselPage(
image: Asset.Images.items.swiftUIImage,
image: Asset.Images.Illustrations.items.swiftUIImage,
message: Localizations.introCarouselPage1Message,
title: Localizations.introCarouselPage1Title
),

CarouselPage(
image: Asset.Images.biometricsPhone.swiftUIImage,
image: Asset.Images.Illustrations.biometricsPhone.swiftUIImage,
message: Localizations.introCarouselPage2Message,
title: Localizations.introCarouselPage2Title
),

CarouselPage(
image: Asset.Images.generate.swiftUIImage,
image: Asset.Images.Illustrations.generate.swiftUIImage,
message: Localizations.introCarouselPage3Message,
title: Localizations.introCarouselPage3Title
),

CarouselPage(
image: Asset.Images.secureDevices.swiftUIImage,
image: Asset.Images.Illustrations.secureDevices.swiftUIImage,
message: Localizations.introCarouselPage4Message,
title: Localizations.introCarouselPage4Title
),
Expand Down
5 changes: 0 additions & 5 deletions BitwardenShared/UI/Auth/Login/LoginState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ struct LoginState: Equatable {
/// Whether the user is logging into a newly created account.
var isNewAccount = false

/// The password visibility icon used in the view's text field.
var passwordVisibleIcon: ImageAsset {
isMasterPasswordRevealed ? Asset.Images.hidden : Asset.Images.visible
}

/// The server URL that is hosting the user's session.
var serverURLString: String = ""

Expand Down
4 changes: 2 additions & 2 deletions BitwardenShared/UI/Auth/Login/LoginView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct LoginView: View {
store.send(.loginWithDevicePressed)
} label: {
HStack(spacing: 8) {
Image(decorative: Asset.Images.mobile)
Image(decorative: Asset.Images.mobile16)
.imageStyle(.accessoryIcon(scaleWithFont: true))
Text(Localizations.logInWithDevice)
}
Expand All @@ -104,7 +104,7 @@ struct LoginView: View {
store.send(.enterpriseSingleSignOnPressed)
} label: {
HStack(spacing: 8) {
Image(decorative: Asset.Images.bwiProvider)
Image(decorative: Asset.Images.provider16)
.imageStyle(.accessoryIcon(scaleWithFont: true))
Text(Localizations.logInSso)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct TwoFactorAuthState: Equatable, Sendable {
var detailImageAsset: ImageAsset? {
switch authMethod {
case .yubiKey:
Asset.Images.yubikey
Asset.Images.Illustrations.yubikey
default:
nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ struct ProfileSwitcherRow: View {
)
.accessibilityLabel(Localizations.account)
case .addAccount:
Asset.Images.plus.swiftUIImage
.imageStyle(.rowIcon(color: Asset.Colors.iconSecondary.swiftUIColor))
Asset.Images.plus16.swiftUIImage
.imageStyle(.accessoryIcon(color: Asset.Colors.iconSecondary.swiftUIColor))
.padding(4)
}
}
Expand Down Expand Up @@ -167,12 +167,12 @@ struct ProfileSwitcherRow: View {
private var trailingIcon: Image? {
switch store.state.rowType {
case .active:
return Asset.Images.roundCheck.swiftUIImage
return Asset.Images.checkCircle24.swiftUIImage
case let .alternate(account):
if account.isUnlocked {
return Asset.Images.unlocked.swiftUIImage
return Asset.Images.unlocked24.swiftUIImage
} else {
return Asset.Images.locked.swiftUIImage
return Asset.Images.locked24.swiftUIImage
}
case .addAccount:
return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extension View {
.frame(minWidth: 22, alignment: .center)
.background {
if initials == nil {
Asset.Images.horizontalDots.swiftUIImage
Asset.Images.horizontalDots16.swiftUIImage
.padding(.vertical, 10)
.padding(.horizontal, 14)
.opacity(initials == nil ? 1.0 : 0.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct CheckEmailView: View {
var body: some View {
VStack(spacing: 16) {
VStack(alignment: .center, spacing: 0) {
Image(decorative: Asset.Images.email)
Image(decorative: Asset.Images.Illustrations.email)
.resizable()
.frame(width: 100, height: 100)
.foregroundColor(Asset.Colors.iconSecondary.swiftUIColor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct StartRegistrationView: View {
var body: some View {
VStack(spacing: 16) {
if store.state.isCreateAccountFeatureFlagEnabled {
Image(decorative: Asset.Images.vaultIllustration)
Image(decorative: Asset.Images.Illustrations.vault)
.resizable()
.frame(width: 132, height: 132)
.padding(.top, 24)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct VaultUnlockSetupView: View {
var body: some View {
VStack(spacing: 32) {
PageHeaderView(
image: Asset.Images.biometricsPhone,
image: Asset.Images.Illustrations.biometricsPhone,
title: Localizations.setUpUnlock,
message: Localizations.setUpBiometricsOrChooseAPinCodeToQuicklyAccessYourVaultAndAutofillYourLogins
)
Expand Down
Loading
Loading