mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-17 11:48:27 +00:00
Update DialerBottomSheet UI and add DTMF playback
This commit is contained in:
parent
bfb4ac3c22
commit
e066ff4ee7
2 changed files with 35 additions and 34 deletions
|
|
@ -2,6 +2,6 @@ import Foundation
|
|||
|
||||
public enum AppGitInfo {
|
||||
public static let branch = "master"
|
||||
public static let commit = "75e96ed8a"
|
||||
public static let commit = "bfb4ac3c2"
|
||||
public static let tag = "6.1.0-alpha"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ struct DialerBottomSheet: View {
|
|||
.frame(width: 32, height: 32)
|
||||
|
||||
}
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
}
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.top, 10)
|
||||
|
|
@ -111,9 +111,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
|
||||
|
|
@ -132,9 +132,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
|
||||
|
|
@ -153,9 +153,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
}
|
||||
|
|
@ -176,9 +176,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
|
||||
|
|
@ -197,9 +197,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
|
||||
|
|
@ -218,9 +218,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
}
|
||||
|
|
@ -242,9 +242,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
|
||||
|
|
@ -263,9 +263,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
|
||||
|
|
@ -284,9 +284,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
}
|
||||
|
|
@ -308,9 +308,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
|
||||
|
|
@ -324,19 +324,19 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 75)
|
||||
.frame(width: 100, height: 75)
|
||||
.padding(.top, -15)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
Text("+")
|
||||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 20)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 85)
|
||||
.frame(width: 100, height: 85)
|
||||
.padding(.bottom, -25)
|
||||
.background(.clear)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
}
|
||||
}
|
||||
.simultaneousGesture(
|
||||
|
|
@ -361,9 +361,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
}
|
||||
|
|
@ -383,9 +383,9 @@ struct DialerBottomSheet: View {
|
|||
.foregroundStyle(currentCall != nil ? .white : Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 32)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(currentCall != nil ? Color.gray500 : .white)
|
||||
.clipShape(Circle())
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
}
|
||||
}
|
||||
|
|
@ -398,7 +398,7 @@ struct DialerBottomSheet: View {
|
|||
HStack {
|
||||
|
||||
}
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
|
||||
Spacer()
|
||||
|
||||
|
|
@ -452,7 +452,7 @@ struct DialerBottomSheet: View {
|
|||
.frame(width: 32, height: 32)
|
||||
|
||||
}
|
||||
.frame(width: 90, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
.background(Color.greenSuccess500)
|
||||
.cornerRadius(40)
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
|
|
@ -467,7 +467,7 @@ struct DialerBottomSheet: View {
|
|||
.frame(width: 32, height: 32)
|
||||
|
||||
}
|
||||
.frame(width: 60, height: 60)
|
||||
.frame(width: 100, height: 60)
|
||||
}
|
||||
.padding(.horizontal, 60)
|
||||
.padding(.top, 20)
|
||||
|
|
@ -479,7 +479,7 @@ struct DialerBottomSheet: View {
|
|||
.frame(maxWidth: .infinity)
|
||||
.frame(maxHeight: .infinity)
|
||||
}
|
||||
.background(currentCall != nil ? Color.gray600 : Color.gray100)
|
||||
.background(currentCall != nil ? Color.gray600.opacity(0.9) : Color.gray100.opacity(0.5))
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(maxHeight: .infinity)
|
||||
.onRotate { newOrientation in
|
||||
|
|
@ -496,6 +496,7 @@ struct DialerBottomSheet: View {
|
|||
|
||||
do {
|
||||
try call.sendDtmf(dtmf: dtmf)
|
||||
core.playDtmf(dtmf: dtmf, durationMs: 200)
|
||||
} catch {
|
||||
Log.error("Cannot send DTMF \(dtmf) to call \(call.callLog?.callId ?? ""): \(error)")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue