Added help and resources section
This commit is contained in:
parent
e21c34fdc3
commit
96185a5d0d
70
VoiceInk/Views/Metrics/HelpAndResourcesSection.swift
Normal file
70
VoiceInk/Views/Metrics/HelpAndResourcesSection.swift
Normal file
@ -0,0 +1,70 @@
|
||||
import SwiftUI
|
||||
|
||||
struct HelpAndResourcesSection: View {
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 15) {
|
||||
Text("Help & Resources")
|
||||
.font(.system(size: 22, weight: .bold, design: .rounded))
|
||||
.foregroundColor(.primary.opacity(0.8))
|
||||
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
resourceLink(
|
||||
icon: "sparkles",
|
||||
title: "Recommended Models",
|
||||
url: "https://tryvoiceink.com/recommended-models"
|
||||
)
|
||||
|
||||
resourceLink(
|
||||
icon: "video.fill",
|
||||
title: "YouTube Videos & Guides",
|
||||
url: "https://www.youtube.com/@tryvoiceink/videos"
|
||||
)
|
||||
|
||||
resourceLink(
|
||||
icon: "book.fill",
|
||||
title: "Documentation",
|
||||
url: "https://tryvoiceink.com/docs" // Placeholder
|
||||
)
|
||||
}
|
||||
}
|
||||
.padding(22)
|
||||
.padding(.vertical, 2)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 28, style: .continuous)
|
||||
.fill(Color(nsColor: .windowBackgroundColor))
|
||||
)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 28, style: .continuous)
|
||||
.stroke(Color.primary.opacity(0.1), lineWidth: 1)
|
||||
)
|
||||
}
|
||||
|
||||
private func resourceLink(icon: String, title: String, url: String) -> some View {
|
||||
Button(action: {
|
||||
if let url = URL(string: url) {
|
||||
NSWorkspace.shared.open(url)
|
||||
}
|
||||
}) {
|
||||
HStack {
|
||||
Image(systemName: icon)
|
||||
.font(.system(size: 15, weight: .medium))
|
||||
.foregroundColor(.accentColor)
|
||||
.frame(width: 20)
|
||||
|
||||
Text(title)
|
||||
.font(.system(size: 13))
|
||||
.fontWeight(.semibold)
|
||||
|
||||
Spacer()
|
||||
|
||||
Image(systemName: "arrow.up.right")
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
.padding(12)
|
||||
.background(Color.primary.opacity(0.05))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
|
||||
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
@ -13,7 +13,10 @@ struct MetricsContent: View {
|
||||
VStack(spacing: 24) {
|
||||
heroSection
|
||||
metricsSection
|
||||
DashboardPromotionsSection(licenseState: licenseState)
|
||||
HStack(alignment: .top, spacing: 18) {
|
||||
HelpAndResourcesSection()
|
||||
DashboardPromotionsSection(licenseState: licenseState)
|
||||
}
|
||||
}
|
||||
.padding(.vertical, 28)
|
||||
.padding(.horizontal, 32)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user