Skip to content

Commit

Permalink
chore: update sample and integration app results screen
Browse files Browse the repository at this point in the history
  • Loading branch information
phantumcode committed Nov 27, 2023
1 parent 8220c13 commit 3de4915
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
26 changes: 13 additions & 13 deletions HostApp/HostApp/Views/LivenessResultContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ struct LivenessResultContentView: View {
.background(result.valueBackgroundColor)
.cornerRadius(8)
}

if let image = result.auditImage {
Image(uiImage: .init(data: image) ?? UIImage())
.resizable()
.aspectRatio(contentMode: .fit)
.frame(maxHeight: 300)
.background(Color.secondary.opacity(0.1))
} else {
Image(systemName: "person.fill")
.font(.system(size: 128))
.frame(maxWidth: .infinity, idealHeight: 268)
.background(Color.secondary.opacity(0.1))
}

if !result.isLive {
steps()
Expand All @@ -46,19 +59,6 @@ struct LivenessResultContentView: View {
)
.cornerRadius(6))
}

if let image = result.auditImage {
Image(uiImage: .init(data: image) ?? UIImage())
.resizable()
.aspectRatio(contentMode: .fit)
.frame(maxHeight: 300)
.background(Color.secondary.opacity(0.1))
} else {
Image(systemName: "person.fill")
.font(.system(size: 128))
.frame(maxWidth: .infinity, idealHeight: 268)
.background(Color.secondary.opacity(0.1))
}
}
.padding(.bottom, 16)
.onAppear {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ struct LivenessResultContentView: View {
.background(result.valueBackgroundColor)
.cornerRadius(8)
}

if let image = result.auditImage {
Image(uiImage: .init(data: image) ?? UIImage())
.resizable()
.aspectRatio(contentMode: .fit)
.frame(maxHeight: 300)
.background(Color.secondary.opacity(0.1))
} else {
Image(systemName: "person.fill")
.font(.system(size: 128))
.frame(maxWidth: .infinity, idealHeight: 268)
.background(Color.secondary.opacity(0.1))
}

if !result.isLive {
steps()
Expand All @@ -47,19 +60,6 @@ struct LivenessResultContentView: View {
)
.cornerRadius(6))
}

if let image = result.auditImage {
Image(uiImage: .init(data: image) ?? UIImage())
.resizable()
.aspectRatio(contentMode: .fit)
.frame(maxHeight: 300)
.background(Color.secondary.opacity(0.1))
} else {
Image(systemName: "person.fill")
.font(.system(size: 128))
.frame(maxWidth: .infinity, idealHeight: 268)
.background(Color.secondary.opacity(0.1))
}
}
.padding(.bottom, 16)
.onAppear {
Expand Down

0 comments on commit 3de4915

Please sign in to comment.