Skip to content

Commit

Permalink
fix: PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrdctr committed Feb 10, 2025
1 parent 603611d commit a427b93
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "dd47893907886c9f81f7bc3c364403f24307b057d2119120d2c533d62a65a638",
"originHash" : "d19aa5b5b3f1772f9c20a559b858c66d93920baae5fd7d7a4317bceba4d7c0b7",
"pins" : [
{
"identity" : "alamofire",
Expand All @@ -24,8 +24,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Infomaniak/ios-core-ui",
"state" : {
"revision" : "3c36b8c376dd8779b47a5b03acfbe71ed270282a",
"version" : "18.0.0"
"revision" : "89873aff2c300f9f2966340b7b3e8832e88a95a6",
"version" : "18.0.1"
}
},
{
Expand Down
1 change: 1 addition & 0 deletions Sources/MyKSuite/Generated/Resources+Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public enum Resources {
public static let gradientColor5 = ColorAsset(name: "gradient.color.5")
public static let bat = ColorAsset(name: "bat")
public static let elephant = ColorAsset(name: "elephant")
public static let mouse = ColorAsset(name: "mouse")
public static let orca = ColorAsset(name: "orca")
public static let polarBear = ColorAsset(name: "polar.bear")
public static let productDrive = ColorAsset(name: "product.drive")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xE0",
"green" : "0xE0",
"red" : "0xE0"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
2 changes: 1 addition & 1 deletion Sources/MyKSuite/Sources/Dashboard/FreeTrialView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct FreeTrialView: View {
Resources.Assets.myKSuitePlusLogo.swiftUIImage
.resizable()
.scaledToFit()
.frame(width: 90)
.frame(maxWidth: 90)

Spacer()

Expand Down
2 changes: 2 additions & 0 deletions Sources/MyKSuite/Sources/Dashboard/SubscriptionCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ struct SubscriptionCardView: View {
HeaderView(myKSuite: myKSuite, avatar: avatar)

Divider()
.overlay(ColorHelper.divider)

SubscriptionProductsView(myKSuite: myKSuite)

Divider()
.overlay(ColorHelper.divider)

if myKSuite.isFree {
SubscriptionFreeDetailsView(dailyLimit: myKSuite.mail.dailyLimitSent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@ struct SubscriptionFreeDetailsView: View {
let dailyLimit: Int

var body: some View {
VStack(alignment: .leading, spacing: IKPadding.large) {
VStack(alignment: .leading, spacing: IKPadding.mini) {
Label {
Text(MyKSuiteLocalizable.myKSuiteDashboardFreeMailLabel)
} icon: {
Image(systemName: "envelope")
.iconSize(.medium)
.foregroundStyle(ColorHelper.secondary)
}
.padding(.vertical, value: .mini)

DisclosureGroup {
VStack(alignment: .leading, spacing: 8) {
VStack(alignment: .leading, spacing: IKPadding.mini) {
Text(MyKSuiteLocalizable.myKSuiteDashboardFunctionalityMailAndDrive)
HStack {
Text(MyKSuiteLocalizable.myKSuiteDashboardFunctionalityLimit)
Expand All @@ -46,7 +47,7 @@ struct SubscriptionFreeDetailsView: View {
}
Text(MyKSuiteLocalizable.myKSuiteDashboardFunctionalityCustomReminders)
}
.padding(.top, 18)
.padding(.top, value: .mini)
.foregroundStyle(ColorHelper.secondary)
.font(FontHelper.bodySmall)
} label: {
Expand All @@ -57,6 +58,7 @@ struct SubscriptionFreeDetailsView: View {
.iconSize(.medium)
.foregroundStyle(ColorHelper.secondary)
}
.padding(.vertical, value: .mini)
}
}
.font(FontHelper.body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,20 @@ struct SubscriptionPlusDetailsView: View {
}
}

HStack(alignment: .top, spacing: IKPadding.small) {
HStack(alignment: .iconAndMultilineTextAlignment, spacing: IKPadding.small) {
Resources.Assets.information.swiftUIImage
.iconSize(.medium)
.foregroundStyle(ColorHelper.secondary)
.alignmentGuide(.iconAndMultilineTextAlignment) { d in
d[VerticalAlignment.center]
}

VStack(alignment: .leading, spacing: IKPadding.medium) {
Text(MyKSuiteLocalizable.myKSuiteManageSubscriptionDescription)
.foregroundStyle(ColorHelper.primary)
.alignmentGuide(.iconAndMultilineTextAlignment) { d in
(d.height - (d[.lastTextBaseline] - d[.firstTextBaseline])) / 2
}

Button {
// Gerer mon abonnement
Expand Down
1 change: 0 additions & 1 deletion Sources/MyKSuite/Sources/Networking/MyKSuite.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import SwiftUI

@MainActor
public struct MyKSuite: Codable, Sendable {
let id: Int
let isFree: Bool
Expand Down
2 changes: 2 additions & 0 deletions Sources/MyKSuite/Sources/Utils/ColorHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ enum ColorHelper {

static let reversedPrimary = Color(light: Resources.Colors.rabbit.swiftUIColor, dark: Resources.Colors.orca.swiftUIColor)

static let divider = Color(light: Resources.Colors.mouse.swiftUIColor, dark: Resources.Colors.elephant.swiftUIColor)

// MARK: - Gradient

static let gradientColor1 = Color("gradient.color.1", bundle: .module)
Expand Down

0 comments on commit a427b93

Please sign in to comment.