Replace VideoCTAView with InfoTip for better UX

This commit is contained in:
Beingpax 2025-05-14 12:35:34 +05:45
parent c93eac7e94
commit 138e915298
3 changed files with 18 additions and 57 deletions

View File

@ -1,43 +0,0 @@
import SwiftUI
struct VideoCTAView: View {
let url: String
let subtitle: String
var body: some View {
Link(destination: URL(string: url)!) {
HStack(spacing: 12) {
Image(systemName: "play.circle.fill")
.symbolRenderingMode(.hierarchical)
.font(.system(size: 24))
.foregroundStyle(Color.blue)
VStack(alignment: .leading, spacing: 2) {
Text("Watch how it works")
.font(.system(size: 15, weight: .semibold))
.foregroundColor(.primary)
Text(subtitle)
.font(.system(size: 13))
.foregroundColor(.secondary)
}
Spacer()
Image(systemName: "chevron.right")
.font(.system(size: 14, weight: .medium))
.foregroundColor(.secondary)
}
.padding(16)
.background(
RoundedRectangle(cornerRadius: 12)
.fill(Color(.windowBackgroundColor).opacity(0.9))
)
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(Color.secondary.opacity(0.1), lineWidth: 1)
)
}
.buttonStyle(.plain)
}
}

View File

@ -134,20 +134,23 @@ struct EnhancementSettingsView: View {
var body: some View {
ScrollView {
VStack(spacing: 32) {
// Video CTA Section
VideoCTAView(
url: "https://dub.sh/promptmode",
subtitle: "Learn how to use AI enhancement modes"
)
// Main Settings Sections
VStack(spacing: 24) {
// Enable/Disable Toggle Section
VStack(alignment: .leading, spacing: 12) {
HStack {
VStack(alignment: .leading, spacing: 4) {
Text("Enable Enhancement")
.font(.headline)
HStack {
Text("Enable Enhancement")
.font(.headline)
InfoTip(
title: "AI Enhancement",
message: "AI enhancement lets you transform transcriptions with different modes like summarize, rewrite, or translate. Configure app-specific settings in Power Mode.",
learnMoreURL: "https://www.youtube.com/@tryvoiceink/videos"
)
}
Text("Turn on AI-powered enhancement features")
.font(.caption)
.foregroundColor(.secondary)

View File

@ -349,17 +349,18 @@ struct PowerModeView: View {
var body: some View {
ScrollView {
VStack(spacing: 32) {
// Video CTA Section
VideoCTAView(
url: "https://dub.sh/powermode",
subtitle: "See Power Mode in action"
)
// Power Mode Toggle Section
VStack(alignment: .leading, spacing: 16) {
HStack {
Text("Enable Power Mode")
.font(.headline)
InfoTip(
title: "Power Mode",
message: "Create app-specific or URL-specific configurations that automatically apply when using those apps or websites.",
learnMoreURL: "https://www.youtube.com/watch?v=cEepexxgf6Y&t=10s"
)
Spacer()
Toggle("", isOn: $powerModeManager.isPowerModeEnabled)
.toggleStyle(SwitchToggleStyle(tint: .blue))