Skip to content

Commit

Permalink
Improve call ui
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed Oct 2, 2023
1 parent c06c102 commit d91986a
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions Monal/Classes/AVCallUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,24 @@ struct AVCallUI: View {
Spacer().frame(height: 24)

HStack(alignment: .top) {
VStack {
Spacer().frame(height: 8)
switch MLCallDirection(rawValue:call.direction) {
case .incoming:
Image(systemName: "phone.arrow.down.left")
.resizable()
.frame(width: 20.0, height: 20.0)
.foregroundColor(.primary)
case .outgoing:
Image(systemName: "phone.arrow.up.right")
.resizable()
.frame(width: 20.0, height: 20.0)
.foregroundColor(.primary)
default: //should never be reached
Text("")
}
}

VStack {
Spacer().frame(height: 8)
Button(action: {
Expand All @@ -97,54 +115,36 @@ struct AVCallUI: View {
case .unknown:
Text("")
case .clear:
Spacer().frame(width: 10)
Image(systemName: "xmark.shield.fill")
.resizable()
.frame(width: 20.0, height: 20.0)
.foregroundColor(.red)
Spacer().frame(width: 10)
case .toFU:
Spacer().frame(width: 10)
Image(systemName: "checkmark.shield.fill")
.resizable()
.frame(width: 20.0, height: 20.0)
.foregroundColor(.yellow)
Spacer().frame(width: 10)
case .trusted:
Spacer().frame(width: 10)
Image(systemName: "checkmark.shield.fill")
.resizable()
.frame(width: 20.0, height: 20.0)
.foregroundColor(.green)
Spacer().frame(width: 10)
default: //should never be reached
Text("")
}
})
}

VStack {
Spacer().frame(height: 8)
switch MLCallDirection(rawValue:call.direction) {
case .incoming:
Image(systemName: "phone.arrow.down.left")
.resizable()
.frame(width: 20.0, height: 20.0)
.foregroundColor(.primary)
case .outgoing:
Image(systemName: "phone.arrow.up.right")
.resizable()
.frame(width: 20.0, height: 20.0)
.foregroundColor(.primary)
default: //should never be reached
Text("")
}
}

Spacer().frame(width: 20)
Spacer().frame(minWidth:20)

Text(contact.contactDisplayName as String)
.font(.largeTitle)
.foregroundColor(.primary)

Spacer().frame(width: 20)
Spacer().frame(minWidth:20)

VStack {
Spacer().frame(height: 8)
Expand Down

0 comments on commit d91986a

Please sign in to comment.