Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Multiplatform/Views/AudioControlsPanel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct AudioControlsPanel: View {
Toggle("Always prepared", isOn: $appCtx.isRecordingAlwaysPreparedMode)
Text("Keeps mic pipeline warmed for low-latency publish.")
.font(.caption)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}

Section(header: Text("Mic mute mode")) {
Expand All @@ -106,7 +106,7 @@ struct AudioControlsPanel: View {
}
Text(micMuteModeDescription(for: appCtx.micMuteMode))
.font(.caption)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}

Section(header: Text("Audio Ducking")) {
Expand Down
7 changes: 4 additions & 3 deletions Multiplatform/Views/ConnectView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ struct ConnectView: View {
#if os(macOS)
.frame(minWidth: 500, minHeight: 500)
#endif
.alert(isPresented: $roomCtx.shouldShowDisconnectReason) {
Alert(title: Text("Disconnected"),
message: Text("Reason: " + String(describing: roomCtx.latestError)))
.alert("Disconnected", isPresented: $roomCtx.shouldShowDisconnectReason) {
Button("OK", role: .cancel) {}
} message: {
Text("Reason: " + String(describing: roomCtx.latestError))
}
}
}
4 changes: 2 additions & 2 deletions Multiplatform/Views/MessagesPanel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ struct MessagesPanel: View {
Text(message.text)
.padding(8)
.background(isMe ? Color.lkRed : Color.lkGray3)
.foregroundColor(Color.white)
.cornerRadius(18)
.foregroundStyle(Color.white)
.clipShape(RoundedRectangle(cornerRadius: 18))

if !isMe {
Spacer()
Expand Down
42 changes: 21 additions & 21 deletions Multiplatform/Views/ParticipantView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct ParticipantView: View {
Image(systemSymbol: systemSymbol)
.resizable()
.aspectRatio(contentMode: .fit)
.foregroundColor(Color.lkGray2)
.foregroundStyle(Color.lkGray2)
.frame(width: min(geometry.size.width, geometry.size.height) * 0.3)
.frame(
maxWidth: .infinity,
Expand Down Expand Up @@ -121,7 +121,7 @@ struct ParticipantView: View {
.background(Color.black)
.aspectRatio(contentMode: .fit)
.frame(width: min(geometry.size.width, geometry.size.height) * 0.3)
.cornerRadius(8)
.clipShape(RoundedRectangle(cornerRadius: 8))
.padding()
}

Expand Down Expand Up @@ -151,10 +151,10 @@ struct ParticipantView: View {
} label: {
if case .subscribed = remotePub.subscriptionState {
Image(systemSymbol: .videoFill)
.foregroundColor(Color.green)
.foregroundStyle(Color.green)
} else if case .notAllowed = remotePub.subscriptionState {
Image(systemSymbol: .exclamationmarkCircle)
.foregroundColor(Color.red)
.foregroundStyle(Color.red)
} else {
Image(systemSymbol: .videoSlashFill)
}
Expand All @@ -169,12 +169,12 @@ struct ParticipantView: View {
} else {
// local
Image(systemSymbol: .videoFill)
.foregroundColor(Color.green)
.foregroundStyle(Color.green)
}

} else {
Image(systemSymbol: .videoSlashFill)
.foregroundColor(Color.white)
.foregroundStyle(Color.white)
}

if let publication = participant.firstAudioPublication,
Expand All @@ -195,10 +195,10 @@ struct ParticipantView: View {
} label: {
if case .subscribed = remotePub.subscriptionState {
Image(systemSymbol: .micFill)
.foregroundColor(Color.orange)
.foregroundStyle(Color.orange)
} else if case .notAllowed = remotePub.subscriptionState {
Image(systemSymbol: .exclamationmarkCircle)
.foregroundColor(Color.red)
.foregroundStyle(Color.red)
} else {
Image(systemSymbol: .micSlashFill)
}
Expand All @@ -213,12 +213,12 @@ struct ParticipantView: View {
} else {
// local
Image(systemSymbol: .micFill)
.foregroundColor(Color.orange)
.foregroundStyle(Color.orange)
}

} else {
Image(systemSymbol: .micSlashFill)
.foregroundColor(Color.white)
.foregroundStyle(Color.white)
}

#if !os(tvOS)
Expand All @@ -231,29 +231,29 @@ struct ParticipantView: View {

if participant.connectionQuality == .excellent {
Image(systemSymbol: .wifi)
.foregroundColor(.green)
.foregroundStyle(.green)
} else if participant.connectionQuality == .good {
Image(systemSymbol: .wifi)
.foregroundColor(Color.orange)
.foregroundStyle(Color.orange)
} else if participant.connectionQuality == .poor {
Image(systemSymbol: .wifiExclamationmark)
.foregroundColor(Color.red)
.foregroundStyle(Color.red)
}

if participant.firstTrackEncryptionType == .none {
Image(systemSymbol: .lockOpenFill)
.foregroundColor(.red)
.foregroundStyle(.red)
} else {
Image(systemSymbol: .lockFill)
.foregroundColor(.green)
.foregroundStyle(.green)
}

}.padding(5)
.frame(minWidth: 0, maxWidth: .infinity)
.background(Color.black.opacity(0.5))
}
}
.cornerRadius(8)
.clipShape(RoundedRectangle(cornerRadius: 8))
// Glow the border when the participant is speaking
.overlay(
participant.isSpeaking ?
Expand Down Expand Up @@ -293,7 +293,7 @@ struct RemoteAudioVolumeControl: View {
isSliderPresented.toggle()
} label: {
Image(systemSymbol: volumeSymbol)
.foregroundColor(isSliderPresented ? Color.orange : .white)
.foregroundStyle(isSliderPresented ? Color.orange : .white)
}
.buttonStyle(.plain)
.accessibilityLabel("Remote audio volume")
Expand All @@ -308,7 +308,7 @@ struct RemoteAudioVolumeControl: View {
VStack(alignment: .leading, spacing: 10) {
HStack(spacing: 8) {
Image(systemSymbol: volumeSymbol)
.foregroundColor(Color.orange)
.foregroundStyle(Color.orange)

Text("Volume")
.font(.headline)
Expand All @@ -317,7 +317,7 @@ struct RemoteAudioVolumeControl: View {

Text(volumePercentageText)
.font(.system(size: 12, weight: .semibold, design: .monospaced))
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}

Slider(value: volumeBinding, in: 0.0 ... Self.maxVolume)
Expand Down Expand Up @@ -445,10 +445,10 @@ struct StatsView: View {
}
}
.font(.system(size: 10))
.foregroundColor(Color.white)
.foregroundStyle(Color.white)
.padding(5)
.background(Color.black.opacity(0.5))
.cornerRadius(8)
.clipShape(RoundedRectangle(cornerRadius: 8))
}
}
}
2 changes: 1 addition & 1 deletion Multiplatform/Views/RoomContextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct RoomContextView: View {
RoomSwitchView()
.environmentObject(roomCtx)
.environmentObject(roomCtx.room)
.foregroundColor(Color.white)
.foregroundStyle(Color.white)
.onDisappear {
print("\(String(describing: type(of: self))) onDisappear")
Task {
Expand Down
18 changes: 9 additions & 9 deletions Multiplatform/Views/RoomView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct RoomView: View {
func messagesPanel(geometry: GeometryProxy) -> some View {
MessagesPanel()
.background(Color.lkGray1)
.cornerRadius(8)
.clipShape(RoundedRectangle(cornerRadius: 8))
.frame(
minWidth: 0,
maxWidth: geometry.isTall ? .infinity : 320
Expand All @@ -103,7 +103,7 @@ struct RoomView: View {
func audioControlsPanel(geometry: GeometryProxy) -> some View {
AudioControlsPanel()
.background(Color.lkGray1)
.cornerRadius(8)
.clipShape(RoundedRectangle(cornerRadius: 8))
.frame(
minWidth: 0,
maxWidth: geometry.isTall ? .infinity : 320
Expand All @@ -124,14 +124,14 @@ struct RoomView: View {
if showConnectionTime {
Text("Connected (\([room.serverRegion, room.serverNodeId, "\(String(describing: room.connectSpan?.total().rounded(to: 2)))s"].compactMap { $0 }.joined(separator: ", ")))")
.multilineTextAlignment(.center)
.foregroundColor(.white)
.foregroundStyle(.white)
.padding()
}

if case .connecting = room.connectionState {
Text("Re-connecting...")
.multilineTextAlignment(.center)
.foregroundColor(.white)
.foregroundStyle(.white)
.padding()
}

Expand All @@ -149,11 +149,11 @@ struct RoomView: View {
Text("SELECTED")
.font(.system(size: 10))
.fontWeight(.bold)
.foregroundColor(Color.white)
.foregroundStyle(Color.white)
.padding(.horizontal, 5)
.padding(.vertical, 2)
.background(Color.lkRed.opacity(0.7))
.cornerRadius(8)
.clipShape(RoundedRectangle(cornerRadius: 8))
.padding(.vertical, 35)
.padding(.horizontal, 10)
}
Expand Down Expand Up @@ -194,11 +194,11 @@ struct RoomView: View {
Text("Your mic is muted")
.font(.headline)
}
.foregroundColor(.white)
.foregroundStyle(.white)
.padding(.horizontal, 22)
.padding(.vertical, 16)
.background(Color.black.opacity(0.85))
.cornerRadius(14)
.clipShape(RoundedRectangle(cornerRadius: 14))
.transition(.opacity)
.allowsHitTesting(false)
}
Expand Down Expand Up @@ -399,7 +399,7 @@ struct RoomView: View {
label: {
Image(systemSymbol: .rectangleFillOnRectangleFill)
.renderingMode(isScreenShareEnabled ? .original : .template)
.foregroundColor(isScreenShareEnabled ? Color.green : Color.white)
.foregroundStyle(isScreenShareEnabled ? Color.green : Color.white)
}).popover(isPresented: $screenPickerPresented) {
ScreenShareSourcePickerView { source in
Task {
Expand Down
2 changes: 1 addition & 1 deletion Multiplatform/Views/Shared/LKButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ struct LKButton: View {
.padding(.vertical, 10)
})
.background(Color.lkRed)
.cornerRadius(8)
.clipShape(RoundedRectangle(cornerRadius: 8))
}
}
2 changes: 1 addition & 1 deletion Multiplatform/Views/Shared/LKTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct LKTextField: View {
.strokeBorder(Color.white.opacity(0.3),
style: StrokeStyle(lineWidth: 1.0)))
#if os(iOS)
.autocapitalization(.none)
.textInputAutocapitalization(.never)
.keyboardType(type.toiOSType())
#endif

Expand Down