|
@@ -0,0 +1,96 @@
|
|
|
|
|
+import SwiftUI
|
|
|
|
|
+
|
|
|
|
|
+struct SettingsShareAppButton: View {
|
|
|
|
|
+ let message: String
|
|
|
|
|
+ let url: URL
|
|
|
|
|
+
|
|
|
|
|
+ var body: some View {
|
|
|
|
|
+ ShareLink(item: url, message: Text(message)) {
|
|
|
|
|
+ HStack(spacing: 14) {
|
|
|
|
|
+ Image(systemName: "square.and.arrow.up")
|
|
|
|
|
+ .font(.system(size: 16, weight: .semibold))
|
|
|
|
|
+ .foregroundStyle(.white)
|
|
|
|
|
+ .frame(width: 40, height: 40)
|
|
|
|
|
+ .background(
|
|
|
|
|
+ RoundedRectangle(cornerRadius: 10)
|
|
|
|
|
+ .fill(AppTheme.accentPurple)
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 2) {
|
|
|
|
|
+ Text("Share App")
|
|
|
|
|
+ .font(.system(size: 14, weight: .semibold))
|
|
|
|
|
+ .foregroundStyle(AppTheme.textPrimary)
|
|
|
|
|
+ Text("Tell friends about \(AppLinks.appName)")
|
|
|
|
|
+ .font(.system(size: 11))
|
|
|
|
|
+ .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Spacer()
|
|
|
|
|
+
|
|
|
|
|
+ Image(systemName: "chevron.right")
|
|
|
|
|
+ .font(.system(size: 11, weight: .semibold))
|
|
|
|
|
+ .foregroundStyle(AppTheme.textTertiary)
|
|
|
|
|
+ }
|
|
|
|
|
+ .padding(14)
|
|
|
|
|
+ .background(
|
|
|
|
|
+ RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
|
|
|
|
|
+ .fill(AppTheme.cardBackground)
|
|
|
|
|
+ .overlay(
|
|
|
|
|
+ RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
|
|
|
|
|
+ .stroke(AppTheme.accentPurple.opacity(0.35), lineWidth: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ .buttonStyle(.plain)
|
|
|
|
|
+ .frame(maxWidth: .infinity, alignment: .leading)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+struct SettingsLinkRow: View {
|
|
|
|
|
+ let icon: String
|
|
|
|
|
+ let title: String
|
|
|
|
|
+ var subtitle: String?
|
|
|
|
|
+ let action: () -> Void
|
|
|
|
|
+
|
|
|
|
|
+ var body: some View {
|
|
|
|
|
+ Button(action: action) {
|
|
|
|
|
+ HStack(spacing: 12) {
|
|
|
|
|
+ Image(systemName: icon)
|
|
|
|
|
+ .font(.system(size: 14, weight: .medium))
|
|
|
|
|
+ .foregroundStyle(AppTheme.accentPurple)
|
|
|
|
|
+ .frame(width: 32, height: 32)
|
|
|
|
|
+ .background(
|
|
|
|
|
+ RoundedRectangle(cornerRadius: 8)
|
|
|
|
|
+ .fill(AppTheme.accentPurple.opacity(0.12))
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 2) {
|
|
|
|
|
+ Text(title)
|
|
|
|
|
+ .font(.system(size: 13, weight: .medium))
|
|
|
|
|
+ .foregroundStyle(AppTheme.textPrimary)
|
|
|
|
|
+ if let subtitle {
|
|
|
|
|
+ Text(subtitle)
|
|
|
|
|
+ .font(.system(size: 10))
|
|
|
|
|
+ .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Spacer()
|
|
|
|
|
+
|
|
|
|
|
+ Image(systemName: "arrow.up.right")
|
|
|
|
|
+ .font(.system(size: 11, weight: .medium))
|
|
|
|
|
+ .foregroundStyle(AppTheme.textTertiary)
|
|
|
|
|
+ }
|
|
|
|
|
+ .padding(.horizontal, 12)
|
|
|
|
|
+ .padding(.vertical, 10)
|
|
|
|
|
+ .background(AppTheme.panelBackground)
|
|
|
|
|
+ .clipShape(RoundedRectangle(cornerRadius: 8))
|
|
|
|
|
+ .overlay(
|
|
|
|
|
+ RoundedRectangle(cornerRadius: 8)
|
|
|
|
|
+ .stroke(AppTheme.cardBorder, lineWidth: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ .buttonStyle(.plain)
|
|
|
|
|
+ .frame(maxWidth: .infinity, alignment: .leading)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|