Skip to content

Commit 074bf7b

Browse files
authored
[PM-20432] fix: Update SSH key icon (#1625)
1 parent 8773160 commit 074bf7b

File tree

35 files changed

+27
-24
lines changed

35 files changed

+27
-24
lines changed

BitwardenShared/UI/Platform/Application/Support/Images.xcassets/Icons/key24.imageset/Contents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"images" : [
33
{
4-
"filename" : "key24.pdf",
4+
"filename" : "Name=key, Size=24.pdf",
55
"idiom" : "universal"
66
}
77
],

BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemView.swift

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -138,28 +138,30 @@ struct ViewItemView: View {
138138

139139
#if DEBUG
140140
struct ViewItemView_Previews: PreviewProvider {
141-
static var cipher = CipherView.fixture(
142-
attachments: [
143-
.fixture(
144-
fileName: "selfieWithACat.png",
145-
id: "1",
146-
sizeName: "11.2 MB"
147-
),
148-
.fixture(
149-
fileName: "selfieWithAPotato.png",
150-
id: "2",
151-
sizeName: "18.7 MB"
152-
),
153-
],
154-
id: "123",
155-
login: .fixture(),
156-
type: .login,
157-
viewPassword: false
158-
)
141+
static func cipher(forType: BitwardenSdk.CipherType = .login) -> CipherView {
142+
CipherView.fixture(
143+
attachments: [
144+
.fixture(
145+
fileName: "selfieWithACat.png",
146+
id: "1",
147+
sizeName: "11.2 MB"
148+
),
149+
.fixture(
150+
fileName: "selfieWithAPotato.png",
151+
id: "2",
152+
sizeName: "18.7 MB"
153+
),
154+
],
155+
id: "123",
156+
login: .fixture(),
157+
type: forType,
158+
viewPassword: false
159+
)
160+
}
159161

160162
static var cardState: CipherItemState {
161163
var state = CipherItemState(
162-
existing: cipher,
164+
existing: cipher(forType: .card),
163165
hasPremium: true
164166
)!
165167
state.type = CipherType.card
@@ -179,7 +181,7 @@ struct ViewItemView_Previews: PreviewProvider {
179181

180182
static var loginState: CipherItemState {
181183
var state = CipherItemState(
182-
existing: cipher,
184+
existing: cipher(forType: .login),
183185
hasPremium: true
184186
)!
185187
state.customFieldsState.customFields = [
@@ -216,7 +218,7 @@ struct ViewItemView_Previews: PreviewProvider {
216218

217219
static var secureNoteState: CipherItemState {
218220
var state = CipherItemState(
219-
existing: cipher,
221+
existing: cipher(forType: .secureNote),
220222
hasPremium: true
221223
)!
222224
state.notes = "secure note"
@@ -226,7 +228,7 @@ struct ViewItemView_Previews: PreviewProvider {
226228

227229
static var sshKeyState: CipherItemState {
228230
var state = CipherItemState(
229-
existing: cipher,
231+
existing: cipher(forType: .sshKey),
230232
hasPremium: true
231233
)!
232234
state.name = "Example"

BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemViewTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,8 @@ class ViewItemViewTests: BitwardenTestCase { // swiftlint:disable:this type_body
695695
private func sshKeyCipherItemState(canViewPrivateKey: Bool, isPrivateKeyVisible: Bool) -> CipherItemState {
696696
var state = CipherItemState(
697697
existing: .fixture(
698-
id: "fake-id"
698+
id: "fake-id",
699+
type: .sshKey
699700
),
700701
hasPremium: true
701702
)!

0 commit comments

Comments
 (0)