Skip to content

Commit 31ac0c4

Browse files
[PM-26184] Consolidate icons to BitwardenResources (#2005)
1 parent b3a2485 commit 31ac0c4

File tree

402 files changed

+365
-821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

402 files changed

+365
-821
lines changed

AuthenticatorShared/UI/Platform/Application/Appearance/Styles/AccessoryButtonStyle.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import BitwardenResources
12
import SwiftUI
23

34
// MARK: - AccessoryButtonStyle
@@ -31,14 +32,14 @@ extension ButtonStyle where Self == AccessoryButtonStyle {
3132
#if DEBUG
3233
#Preview("Enabled") {
3334
Button {} label: {
34-
Asset.Images.bwiProvider.swiftUIImage
35+
SharedAsset.Icons.copy24.swiftUIImage
3536
}
3637
.buttonStyle(.accessory)
3738
}
3839

3940
#Preview("Disabled") {
4041
Button {} label: {
41-
Asset.Images.bwiProvider.swiftUIImage
42+
SharedAsset.Icons.copy24.swiftUIImage
4243
}
4344
.buttonStyle(.accessory)
4445
.disabled(true)

AuthenticatorShared/UI/Platform/Application/Appearance/UI.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ public enum UI {
7676

7777
UISearchBar.appearance().tintColor = Asset.Colors.primaryBitwarden.color
7878
// Explicitly tint the image so that it does not assume the tint color assigned to the entire search bar.
79-
let image = Asset.Images.cancelRound.image
79+
let image = SharedAsset.Icons.circleX16.image
8080
let tintedImage = image.withTintColor(Asset.Colors.textSecondary.color, renderingMode: .alwaysOriginal)
8181
UISearchBar.appearance().setImage(tintedImage, for: .clear, state: .normal)
82-
UISearchBar.appearance().setImage(Asset.Images.magnifyingGlass.image, for: .search, state: .normal)
82+
UISearchBar.appearance().setImage(SharedAsset.Icons.search16.image, for: .search, state: .normal)
8383

8484
// Adjust the appearance of `UITextView` for `BitwardenMultilineTextField` instances on
8585
// iOS 15.

AuthenticatorShared/UI/Platform/Application/Extensions/View+Toolbar.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extension View {
1515
/// - Returns: A `Button` configured for adding an item.
1616
///
1717
func addToolbarButton(hidden: Bool = false, action: @escaping () -> Void) -> some View {
18-
toolbarButton(asset: Asset.Images.plus, label: Localizations.add, action: action)
18+
toolbarButton(asset: SharedAsset.Icons.plus16, label: Localizations.add, action: action)
1919
.hidden(hidden)
2020
.accessibilityIdentifier("AddItemButton")
2121
}
@@ -26,7 +26,7 @@ extension View {
2626
/// - Returns: A `Button` configured for cancelling an operation in a view.
2727
///
2828
func cancelToolbarButton(action: @escaping () -> Void) -> some View {
29-
toolbarButton(asset: Asset.Images.cancel, label: Localizations.cancel, action: action)
29+
toolbarButton(asset: SharedAsset.Icons.close16, label: Localizations.cancel, action: action)
3030
.accessibilityIdentifier("CancelButton")
3131
}
3232

@@ -36,7 +36,7 @@ extension View {
3636
/// - Returns: A `Button` configured for closing a view.
3737
///
3838
func closeToolbarButton(action: @escaping () -> Void) -> some View {
39-
toolbarButton(asset: Asset.Images.cancel, label: Localizations.close, action: action)
39+
toolbarButton(asset: SharedAsset.Icons.close16, label: Localizations.close, action: action)
4040
.accessibilityIdentifier("CloseButton")
4141
}
4242

@@ -58,7 +58,7 @@ extension View {
5858
/// - action: The action to perform when the button is tapped.
5959
/// - Returns: A `Button` for displaying an image in a toolbar.
6060
///
61-
func toolbarButton(asset: ImageAsset, label: String, action: @escaping () -> Void) -> some View {
61+
func toolbarButton(asset: SharedImageAsset, label: String, action: @escaping () -> Void) -> some View {
6262
Button(action: action) {
6363
Image(asset: asset, label: Text(label))
6464
.imageStyle(.toolbarIcon)
@@ -96,7 +96,7 @@ extension View {
9696
Menu {
9797
content()
9898
} label: {
99-
Image(asset: Asset.Images.verticalKabob, label: Text(Localizations.options))
99+
Image(asset: SharedAsset.Icons.ellipsisVertical24, label: Text(Localizations.options))
100100
.imageStyle(.toolbarIcon)
101101
.accessibilityIdentifier("HeaderBarOptionsButton")
102102
}

AuthenticatorShared/UI/Platform/Application/Support/Images.xcassets/Icons/bw-logo.imageset/Contents.json

Lines changed: 0 additions & 16 deletions
This file was deleted.
-4.07 KB
Binary file not shown.

AuthenticatorShared/UI/Platform/Application/Support/Images.xcassets/Icons/bwi-provider.imageset/Contents.json

Lines changed: 0 additions & 16 deletions
This file was deleted.
-2.89 KB
Binary file not shown.
-3.52 KB
Binary file not shown.

AuthenticatorShared/UI/Platform/Application/Support/Images.xcassets/Icons/cancel-round.imageset/Contents.json

Lines changed: 0 additions & 16 deletions
This file was deleted.
-4.39 KB
Binary file not shown.

0 commit comments

Comments
 (0)