feat: Add screen recording info
This commit is contained in:
parent
31e724566c
commit
0914840460
@ -25,22 +25,39 @@ struct InfoTip: View {
|
||||
.padding(5)
|
||||
.contentShape(Rectangle())
|
||||
.popover(isPresented: $isShowingTip) {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
Text(title)
|
||||
.font(.headline)
|
||||
.foregroundColor(.primary)
|
||||
|
||||
Text(message)
|
||||
.font(.body)
|
||||
.foregroundColor(.secondary)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.frame(width: width, alignment: .leading)
|
||||
.padding(.bottom, learnMoreLink != nil ? 5 : 0)
|
||||
|
||||
if let url = learnMoreLink {
|
||||
Button(learnMoreText) {
|
||||
NSWorkspace.shared.open(url)
|
||||
Link(destination: url) {
|
||||
HStack(spacing: 4) {
|
||||
Text(learnMoreText)
|
||||
.font(.caption)
|
||||
.fontWeight(.medium)
|
||||
Image(systemName: "arrow.up.forward")
|
||||
.font(.caption2)
|
||||
}
|
||||
.foregroundColor(.white)
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.vertical, 6)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 6)
|
||||
.fill(Color.accentColor)
|
||||
)
|
||||
}
|
||||
.foregroundColor(.blue)
|
||||
.buttonStyle(.plain)
|
||||
.padding(.top, 8)
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.padding(16)
|
||||
}
|
||||
.onTapGesture {
|
||||
isShowingTip.toggle()
|
||||
|
||||
@ -117,10 +117,20 @@ struct OnboardingPermissionsView: View {
|
||||
|
||||
// Permission text
|
||||
VStack(spacing: 12) {
|
||||
Text(permissions[currentPermissionIndex].title)
|
||||
.font(.title2)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(.white)
|
||||
HStack(spacing: 8) {
|
||||
Text(permissions[currentPermissionIndex].title)
|
||||
.font(.title2)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(.white)
|
||||
|
||||
if permissions[currentPermissionIndex].type == .screenRecording {
|
||||
InfoTip(
|
||||
title: "Screen Recording Access",
|
||||
message: "VoiceInk captures on-screen text to understand the context of your voice input, which significantly improves transcription accuracy. Your privacy is important: this data is processed locally and is not stored.",
|
||||
learnMoreURL: "https://tryvoiceink.com/docs/contextual-awareness"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Text(permissions[currentPermissionIndex].description)
|
||||
.font(.body)
|
||||
|
||||
@ -90,6 +90,9 @@ struct PermissionCard: View {
|
||||
let buttonTitle: String
|
||||
let buttonAction: () -> Void
|
||||
let checkPermission: () -> Void
|
||||
var infoTipTitle: String?
|
||||
var infoTipMessage: String?
|
||||
var infoTipLink: String?
|
||||
@State private var isRefreshing = false
|
||||
|
||||
var body: some View {
|
||||
@ -108,8 +111,17 @@ struct PermissionCard: View {
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(title)
|
||||
.font(.headline)
|
||||
HStack {
|
||||
Text(title)
|
||||
.font(.headline)
|
||||
if let infoTipTitle = infoTipTitle, let infoTipMessage = infoTipMessage {
|
||||
InfoTip(
|
||||
title: infoTipTitle,
|
||||
message: infoTipMessage,
|
||||
learnMoreURL: infoTipLink ?? ""
|
||||
)
|
||||
}
|
||||
}
|
||||
Text(description)
|
||||
.font(.subheadline)
|
||||
.foregroundColor(.secondary)
|
||||
@ -260,7 +272,9 @@ struct PermissionsView: View {
|
||||
NSWorkspace.shared.open(url)
|
||||
}
|
||||
},
|
||||
checkPermission: { permissionManager.checkAccessibilityPermissions() }
|
||||
checkPermission: { permissionManager.checkAccessibilityPermissions() },
|
||||
infoTipTitle: "Accessibility Access",
|
||||
infoTipMessage: "VoiceInk uses Accessibility permissions to paste the transcribed text directly into other applications at your cursor's position. This allows for a seamless dictation experience across your Mac."
|
||||
)
|
||||
|
||||
// Screen Recording Permission
|
||||
@ -277,7 +291,10 @@ struct PermissionsView: View {
|
||||
NSWorkspace.shared.open(url)
|
||||
}
|
||||
},
|
||||
checkPermission: { permissionManager.checkScreenRecordingPermission() }
|
||||
checkPermission: { permissionManager.checkScreenRecordingPermission() },
|
||||
infoTipTitle: "Screen Recording Access",
|
||||
infoTipMessage: "VoiceInk captures on-screen text to understand the context of your voice input, which significantly improves transcription accuracy. Your privacy is important: this data is processed locally and is not stored.",
|
||||
infoTipLink: "https://tryvoiceink.com/docs/contextual-awareness"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user