1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-25 03:33:01 +02: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",
"components" : {
"alpha" : "1.000",
"blue" : "0.349",
"green" : "0.664",
"red" : "0.279"
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"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" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"localizable" : true
}
}

View File

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

View File

@ -6,7 +6,7 @@ struct CipherListView: View {
let AVATAR_ID: String = "avatarId"
@State private var contentOffset = CGFloat(0)
@State private var initialOffset = CGFloat(0)
var isHeaderVisible: Bool {
if !viewModel.searchTerm.isEmpty {
return true
@ -50,6 +50,12 @@ struct CipherListView: View {
Section() {
avatarHeader
.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
@ -58,7 +64,7 @@ struct CipherListView: View {
}
.listRowInsets(EdgeInsets())
.listRowBackground(Color.clear)
.padding(3)
.padding(0)
}
}
.emptyState(viewModel.filteredCiphers.isEmpty, emptyContent: {
@ -77,8 +83,10 @@ struct CipherListView: View {
}
}
}
.navigationTitle("Bitwarden")
.navigationBarTitleDisplayMode(.inline)
.onAppear {
self.viewModel.checkStateAndFetch()
self.viewModel.fetchCiphers()
}
.fullScreenCover(isPresented: $viewModel.showingSheet) {
BWStateView(viewModel.currentState)