|
@@ -13,11 +13,6 @@ struct SidebarView: View {
|
|
|
}
|
|
}
|
|
|
.frame(width: AppTheme.sidebarWidth)
|
|
.frame(width: AppTheme.sidebarWidth)
|
|
|
.background(AppTheme.sidebarBackground)
|
|
.background(AppTheme.sidebarBackground)
|
|
|
- .overlay(alignment: .trailing) {
|
|
|
|
|
- Rectangle()
|
|
|
|
|
- .fill(AppTheme.border)
|
|
|
|
|
- .frame(width: 1)
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private var header: some View {
|
|
private var header: some View {
|
|
@@ -99,58 +94,59 @@ struct SidebarView: View {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private var upgradeCard: some View {
|
|
private var upgradeCard: some View {
|
|
|
- VStack(alignment: .center, spacing: 8) {
|
|
|
|
|
- VStack(spacing: 4) {
|
|
|
|
|
- Image(systemName: "crown.fill")
|
|
|
|
|
- .font(.system(size: 14))
|
|
|
|
|
- .foregroundStyle(AppTheme.accentYellow)
|
|
|
|
|
- Text(isPremium ? "Reddora Premium" : "Upgrade to Premium")
|
|
|
|
|
- .font(.system(size: 12, weight: .semibold))
|
|
|
|
|
- .foregroundStyle(AppTheme.textPrimary)
|
|
|
|
|
- }
|
|
|
|
|
- .frame(maxWidth: .infinity, alignment: .center)
|
|
|
|
|
|
|
+ VStack(spacing: 0) {
|
|
|
|
|
+ Rectangle()
|
|
|
|
|
+ .fill(AppTheme.border)
|
|
|
|
|
+ .frame(height: 1)
|
|
|
|
|
|
|
|
- Text(
|
|
|
|
|
- isPremium
|
|
|
|
|
- ? "You have unlimited AI generations and all premium features."
|
|
|
|
|
- : "Unlock unlimited AI generations and advanced analytics"
|
|
|
|
|
- )
|
|
|
|
|
- .font(.system(size: 10))
|
|
|
|
|
- .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
- .multilineTextAlignment(.center)
|
|
|
|
|
|
|
+ VStack(alignment: .center, spacing: 8) {
|
|
|
|
|
+ VStack(spacing: 4) {
|
|
|
|
|
+ Image(systemName: "crown.fill")
|
|
|
|
|
+ .font(.system(size: 14))
|
|
|
|
|
+ .foregroundStyle(AppTheme.accentYellow)
|
|
|
|
|
+ Text(isPremium ? "Reddora Premium" : "Upgrade to Premium")
|
|
|
|
|
+ .font(.system(size: 12, weight: .semibold))
|
|
|
|
|
+ .foregroundStyle(AppTheme.textPrimary)
|
|
|
|
|
+ }
|
|
|
.frame(maxWidth: .infinity, alignment: .center)
|
|
.frame(maxWidth: .infinity, alignment: .center)
|
|
|
- .fixedSize(horizontal: false, vertical: true)
|
|
|
|
|
- .lineSpacing(2)
|
|
|
|
|
|
|
|
|
|
- Button(isPremium ? "Manage Subscription" : "Upgrade Now") {
|
|
|
|
|
- viewModel.showPaywall()
|
|
|
|
|
- }
|
|
|
|
|
- .font(.system(size: 11, weight: .semibold))
|
|
|
|
|
- .foregroundStyle(.white)
|
|
|
|
|
- .frame(maxWidth: .infinity)
|
|
|
|
|
- .padding(.vertical, 7.5)
|
|
|
|
|
- .background(AppTheme.accentPurple)
|
|
|
|
|
- .clipShape(RoundedRectangle(cornerRadius: 8))
|
|
|
|
|
- .buttonStyle(AppPrimaryButtonStyle())
|
|
|
|
|
- }
|
|
|
|
|
- .frame(maxWidth: .infinity, minHeight: 105)
|
|
|
|
|
- .padding(.horizontal, 12)
|
|
|
|
|
- .padding(.vertical, 12)
|
|
|
|
|
- .background(
|
|
|
|
|
- RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
|
|
|
|
|
- .fill(AppTheme.cardBackground)
|
|
|
|
|
- .overlay(
|
|
|
|
|
- RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
|
|
|
|
|
- .stroke(AppTheme.accentPurple.opacity(0.25), lineWidth: 1)
|
|
|
|
|
|
|
+ Text(
|
|
|
|
|
+ isPremium
|
|
|
|
|
+ ? "You have unlimited AI generations and all premium features."
|
|
|
|
|
+ : "Unlock unlimited AI generations and advanced analytics"
|
|
|
)
|
|
)
|
|
|
- )
|
|
|
|
|
- .padding(.horizontal, AppTheme.sidebarContentInset + 8)
|
|
|
|
|
- .padding(.top, 12)
|
|
|
|
|
- .padding(.bottom, 20)
|
|
|
|
|
- .overlay(alignment: .top) {
|
|
|
|
|
- Rectangle()
|
|
|
|
|
- .fill(AppTheme.border)
|
|
|
|
|
- .frame(height: 1)
|
|
|
|
|
|
|
+ .font(.system(size: 10))
|
|
|
|
|
+ .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
+ .multilineTextAlignment(.center)
|
|
|
|
|
+ .frame(maxWidth: .infinity, alignment: .center)
|
|
|
|
|
+ .fixedSize(horizontal: false, vertical: true)
|
|
|
|
|
+ .lineSpacing(2)
|
|
|
|
|
+
|
|
|
|
|
+ Button(isPremium ? "Manage Subscription" : "Upgrade Now") {
|
|
|
|
|
+ viewModel.showPaywall()
|
|
|
|
|
+ }
|
|
|
|
|
+ .font(.system(size: 11, weight: .semibold))
|
|
|
|
|
+ .foregroundStyle(.white)
|
|
|
|
|
+ .frame(maxWidth: .infinity)
|
|
|
|
|
+ .padding(.vertical, 7.5)
|
|
|
|
|
+ .background(AppTheme.accentPurple)
|
|
|
|
|
+ .clipShape(RoundedRectangle(cornerRadius: 8))
|
|
|
|
|
+ .buttonStyle(AppPrimaryButtonStyle())
|
|
|
|
|
+ }
|
|
|
|
|
+ .frame(maxWidth: .infinity, minHeight: 105)
|
|
|
|
|
+ .padding(.horizontal, 12)
|
|
|
|
|
+ .padding(.vertical, 12)
|
|
|
|
|
+ .background(
|
|
|
|
|
+ RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
|
|
|
|
|
+ .fill(AppTheme.cardBackground)
|
|
|
|
|
+ .overlay(
|
|
|
|
|
+ RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
|
|
|
|
|
+ .stroke(AppTheme.accentPurple.opacity(0.25), lineWidth: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ )
|
|
|
|
|
+ .padding(.horizontal, AppTheme.sidebarContentInset + 8)
|
|
|
|
|
+ .padding(.top, 12)
|
|
|
|
|
+ .padding(.bottom, 20)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|