Skip to content

Commit

Permalink
[iOS] - Cleanup UI and Strings (#27858)
Browse files Browse the repository at this point in the history
* Cleanup VPN, AIChat, and RecentlyClosedTabs UI
* Cleanup Wallet Strings from AIChat
* Fix warnings in Package.swift
  • Loading branch information
Brandon-T authored Feb 28, 2025
1 parent c3f6d66 commit cd59f2e
Show file tree
Hide file tree
Showing 37 changed files with 26 additions and 582 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct LeoAssetsPlugin: BuildToolPlugin {
}

// Check to make sure the plugin is being used correctly in SPM
guard let target = target as? SourceModuleTarget else {
guard target is SourceModuleTarget else {
Diagnostics.error("Attempted to use `LeoAssetsPlugin` on an unsupported module target")
return []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public struct AIChatTermsAndConditionsView: View {
.multilineTextAlignment(.leading)
.frame(maxWidth: .infinity, alignment: .leading)
.fixedSize(horizontal: false, vertical: true)
.font(.body.weight(.semibold))
.font(.headline)
.foregroundStyle(Color(braveSystemName: .textPrimary))

Text(
Expand Down Expand Up @@ -53,10 +53,7 @@ public struct AIChatTermsAndConditionsView: View {
.padding([.leading, .trailing], 16)
.frame(maxWidth: .infinity)
.foregroundStyle(Color(braveSystemName: .schemesOnPrimary))
.background(
Color(braveSystemName: .buttonBackground),
in: Capsule()
)
.background(Color(braveSystemName: .buttonBackground), in: .capsule)
}
)
.buttonStyle(.plain)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ struct AIChatBusyErrorView: View {
},
label: {
Text(Strings.AIChat.retryActionTitle)
.font(.body.weight(.semibold))
.font(.headline)
.padding()
.foregroundStyle(Color(braveSystemName: .schemesOnPrimary))
.background(
Color(braveSystemName: .buttonBackground),
in: Capsule()
)
.background(Color(braveSystemName: .buttonBackground), in: .capsule)
}
)
.buttonStyle(.plain)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ struct AIChatContextLimitErrorView: View {
},
label: {
Text(Strings.AIChat.newChatActionTitle)
.font(.body.weight(.semibold))
.font(.headline)
.padding()
.foregroundStyle(Color(braveSystemName: .schemesOnPrimary))
.background(
Color(braveSystemName: .buttonBackground),
in: Capsule()
)
.background(Color(braveSystemName: .buttonBackground), in: .capsule)
}
)
.buttonStyle(.plain)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ struct AIChatNetworkErrorView: View {
},
label: {
Text(Strings.AIChat.retryActionTitle)
.font(.body.weight(.semibold))
.font(.headline)
.foregroundColor(Color(braveSystemName: .schemesOnPrimary))
.padding()
.foregroundStyle(.white)
.background(
Color(braveSystemName: .buttonBackground),
in: Capsule()
)
.background(Color(braveSystemName: .buttonBackground), in: .capsule)
}
)
.buttonStyle(.plain)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ struct AIChatSessionExpiredErrorView: View {
},
label: {
Text(Strings.AIChat.refreshCredentialsActionTitle)
.font(.body.weight(.semibold))
.font(.headline)
.padding()
.foregroundStyle(Color(braveSystemName: .schemesOnPrimary))
.background(
Color(braveSystemName: .buttonBackground),
in: Capsule()
)
.background(Color(braveSystemName: .buttonBackground), in: .capsule)
}
)
.buttonStyle(.plain)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ struct AIChatFeedbackToastView: View {
} label: {
Label {
Text(Strings.close)

} icon: {
Image(systemName: "xmark")
.foregroundStyle(Color(braveSystemName: .primary30))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ struct AIChatFeedbackView: View {
var body: some View {
VStack {
Text(Strings.AIChat.feedbackViewMainTitle)
.font(.body.weight(.semibold))
.font(.headline)
.frame(maxWidth: .infinity, alignment: .leading)
.padding()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ struct AIChatMessageHeaderView: View {
.background(Color(braveSystemName: .containerHighlight), in: Circle())

Text(Strings.AIChat.youMessageTitle)
.font(.body.weight(.semibold))
.font(.headline)
.foregroundStyle(Color(braveSystemName: .textTertiary))
} else {
AIChatProductIcon(containerShape: Circle(), padding: 6.0)
.font(.callout)

Text(Strings.AIChat.leoAssistantNameTitle)
.font(.body.weight(.semibold))
.font(.headline)
.foregroundStyle(Color(braveSystemName: .textTertiary))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct AIChatPaywallView: View {
}
.background(
Color(braveSystemName: .primitivePrimary10)
.edgesIgnoringSafeArea(.all)
.ignoresSafeArea()
.overlay(
Image("leo-product", bundle: .module),
alignment: .topTrailing
Expand Down Expand Up @@ -221,7 +221,7 @@ struct AIChatPaywallView: View {
? Strings.AIChat.paywallPurchaseActionIntroOfferTitle
: Strings.AIChat.paywallPurchaseActionTitle
)
.font(.body.weight(.semibold))
.font(.headline)
.foregroundColor(Color(.white))
.padding()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ struct PremiumUpsellTitleView: View {
.font(.body.weight(.medium))
.lineLimit(2)
.truncationMode(.tail)
.frame(maxWidth: .infinity, alignment: .center)
.frame(maxWidth: .infinity)
.fixedSize(horizontal: false, vertical: true)
.foregroundStyle(foregroundTextColor)
case .rateLimit:
Expand Down

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit cd59f2e

Please sign in to comment.