1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-13 10:14:16 +01:00

EC-834 Watch UI/UX fixes (#2234)

This commit is contained in:
Federico Maccaroni 2022-12-13 14:50:55 -03:00 committed by GitHub
parent b30fc12135
commit e3dafb502b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 6 deletions

View File

@ -5,9 +5,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "0.349", "blue" : "1.000",
"green" : "0.664", "green" : "1.000",
"red" : "0.279" "red" : "1.000"
} }
}, },
"idiom" : "universal" "idiom" : "universal"

View File

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x15",
"green" : "0x12",
"red" : "0x10"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -34,5 +34,8 @@
"info" : { "info" : {
"author" : "xcode", "author" : "xcode",
"version" : 1 "version" : 1
},
"properties" : {
"localizable" : true
} }
} }

View File

@ -7,6 +7,7 @@ extension Color {
let primary = Color(hex: "#175DDC") let primary = Color(hex: "#175DDC")
let itemBackground = Color("ItemBackground") let itemBackground = Color("ItemBackground")
let darkTextMuted = Color("DarkTextMuted") let darkTextMuted = Color("DarkTextMuted")
let avatarItemBackground = Color("AvatarItemBackground")
} }
init?(hex: String) { init?(hex: String) {

View File

@ -50,6 +50,12 @@ struct CipherListView: View {
Section() { Section() {
avatarHeader avatarHeader
.id(AVATAR_ID) .id(AVATAR_ID)
.background(
RoundedRectangle(cornerRadius: 5)
.foregroundColor(Color.ui.avatarItemBackground)
.frame(width: geometry.size.width + 10, height: 50)
)
.padding(0)
} }
} }
ForEach(viewModel.filteredCiphers, id: \.id) { cipher in ForEach(viewModel.filteredCiphers, id: \.id) { cipher in
@ -58,7 +64,7 @@ struct CipherListView: View {
} }
.listRowInsets(EdgeInsets()) .listRowInsets(EdgeInsets())
.listRowBackground(Color.clear) .listRowBackground(Color.clear)
.padding(3) .padding(0)
} }
} }
.emptyState(viewModel.filteredCiphers.isEmpty, emptyContent: { .emptyState(viewModel.filteredCiphers.isEmpty, emptyContent: {
@ -77,8 +83,10 @@ struct CipherListView: View {
} }
} }
} }
.navigationTitle("Bitwarden")
.navigationBarTitleDisplayMode(.inline)
.onAppear { .onAppear {
self.viewModel.checkStateAndFetch() self.viewModel.fetchCiphers()
} }
.fullScreenCover(isPresented: $viewModel.showingSheet) { .fullScreenCover(isPresented: $viewModel.showingSheet) {
BWStateView(viewModel.currentState) BWStateView(viewModel.currentState)