mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
EC-834 Watch UI/UX fixes (#2234)
This commit is contained in:
parent
b30fc12135
commit
e3dafb502b
5 changed files with 56 additions and 6 deletions
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
|
@ -34,5 +34,8 @@
|
||||||
"info" : {
|
"info" : {
|
||||||
"author" : "xcode",
|
"author" : "xcode",
|
||||||
"version" : 1
|
"version" : 1
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"localizable" : true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ struct CipherListView: View {
|
||||||
let AVATAR_ID: String = "avatarId"
|
let AVATAR_ID: String = "avatarId"
|
||||||
@State private var contentOffset = CGFloat(0)
|
@State private var contentOffset = CGFloat(0)
|
||||||
@State private var initialOffset = CGFloat(0)
|
@State private var initialOffset = CGFloat(0)
|
||||||
|
|
||||||
var isHeaderVisible: Bool {
|
var isHeaderVisible: Bool {
|
||||||
if !viewModel.searchTerm.isEmpty {
|
if !viewModel.searchTerm.isEmpty {
|
||||||
return true
|
return true
|
||||||
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue