Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use design system fonts throughout NetP #2211

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DuckDuckGo/NetworkProtectionInviteView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ private struct NetworkProtectionInviteMessageView<Content>: View where Content:
.scaledToFit()
.frame(height: 102.5)
Text(messageData.title)
.font(.system(size: 22, weight: .semibold))
.daxTitle2()
.multilineTextAlignment(.center)
.foregroundColor(.textPrimary)
Text(messageData.message)
.font(.system(size: 16))
.daxBodyRegular()
.multilineTextAlignment(.center)
.foregroundColor(.textSecondary)
.padding(.bottom, 16)
interactiveContent()
Spacer()
Text(UserText.netPInviteOnlyMessage)
.foregroundColor(.textSecondary)
.font(.system(size: 13))
.daxFootnoteRegular()
.multilineTextAlignment(.center)
}
.padding(24)
Expand Down
23 changes: 11 additions & 12 deletions DuckDuckGo/NetworkProtectionStatusView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ struct NetworkProtectionStatusView: View {
HStack {
VStack(alignment: .leading, spacing: 4) {
Text(UserText.netPStatusViewTitle)
.font(.system(size: 16))
.daxBodyRegular()
.foregroundColor(.textPrimary)
Text(statusModel.statusMessage)
.font(.system(size: 13))
.daxFootnoteRegular()
.foregroundColor(.textSecondary)
}

Expand Down Expand Up @@ -92,11 +92,11 @@ struct NetworkProtectionStatusView: View {
.frame(height: 96)
.padding(8)
Text(statusModel.headerTitle)
.font(.system(size: 17, weight: .semibold))
.daxHeadline()
.multilineTextAlignment(.center)
.foregroundColor(.textPrimary)
Text(UserText.netPStatusHeaderMessage)
.font(.system(size: 13))
.daxFootnoteRegular()
.multilineTextAlignment(.center)
.foregroundColor(.textSecondary)
.padding(.bottom, 8)
Expand Down Expand Up @@ -137,10 +137,10 @@ struct NetworkProtectionStatusView: View {
private func settings() -> some View {
Section {
NavigationLink(UserText.netPVPNSettingsTitle, destination: NetworkProtectionVPNSettingsView())
.font(.system(size: 16))
.daxBodyRegular()
.foregroundColor(.textPrimary)
NavigationLink(UserText.netPVPNNotificationsTitle, destination: NetworkProtectionVPNNotificationsView())
.font(.system(size: 16))
.daxBodyRegular()
.foregroundColor(.textPrimary)
} header: {
Text(UserText.netPStatusViewSettingsSectionTitle).foregroundColor(.textSecondary)
Expand All @@ -155,7 +155,7 @@ struct NetworkProtectionStatusView: View {
Text("\(UserText.netPInviteOnlyMessage) [\(UserText.netPStatusViewShareFeedback)](https://form.asana.com/?k=_wNLt6YcT5ILpQjDuW0Mxw&d=137249556945)")
.foregroundColor(.textSecondary)
.accentColor(Color.controlColor)
.font(.system(size: 13))
.daxFootnoteRegular()
.padding(.top, 6)
}
}
Expand All @@ -169,12 +169,11 @@ private struct NetworkProtectionErrorView: View {
HStack {
Image("Alert-Color-16")
Text(title)
.font(.system(size: 16))
.daxBodyBold()
.foregroundColor(.primary)
.bold()
}
Text(message)
.font(.system(size: 16))
.daxBodyRegular()
.foregroundColor(.primary)
}
.listRowBackground(Color.cellBackground)
Expand All @@ -190,11 +189,11 @@ private struct NetworkProtectionServerItemView: View {
HStack(spacing: 16) {
Image(imageID)
Text(title)
.font(.system(size: 16))
.daxBodyRegular()
.foregroundColor(.textPrimary)
Spacer(minLength: 2)
Text(value)
.font(.system(size: 16))
.daxBodyRegular()
.foregroundColor(.textSecondary)
}
.listRowBackground(Color.cellBackground)
Expand Down
10 changes: 5 additions & 5 deletions DuckDuckGo/NetworkProtectionVPNLocationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct NetworkProtectionVPNLocationView: View {
}, label: {
Text(UserText.netPPreferredLocationNearest)
.foregroundStyle(Color.textPrimary)
.font(.system(size: 16))
.daxBodyRegular()
}
)
} header: {
Expand All @@ -62,7 +62,7 @@ struct NetworkProtectionVPNLocationView: View {
} footer: {
Text(UserText.netPVPNLocationRecommendedSectionFooter)
.foregroundStyle(Color.textSecondary)
.font(.system(size: 13))
.daxFootnoteRegular()
.padding(.top, 6)
}
}
Expand Down Expand Up @@ -115,11 +115,11 @@ private struct CountryItem: View {
Text(itemModel.emoji)
VStack(alignment: .leading, spacing: 4) {
Text(itemModel.title)
.font(.system(size: 16))
.daxBodyRegular()
.foregroundStyle(Color.textPrimary)
if let subtitle = itemModel.subtitle {
Text(subtitle)
.font(.system(size: 13))
.daxFootnoteRegular()
.foregroundStyle(Color.textSecondary)
}
}
Expand Down Expand Up @@ -178,7 +178,7 @@ private struct MenuItem: View {
action: action,
label: {
HStack(spacing: 12) {
Text(title)
Text(title).daxBodyRegular()
Spacer()
Image(systemName: "checkmark")
.if(!isSelected) {
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo/NetworkProtectionVPNNotificationsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct NetworkProtectionVPNNotificationsView: View {
} footer: {
Text(UserText.netPTurnOnNotificationsSectionFooter)
.foregroundColor(.textSecondary)
.font(.system(size: 13))
.daxFootnoteRegular()
.padding(.top, 6)
}
}
Expand All @@ -74,7 +74,7 @@ struct NetworkProtectionVPNNotificationsView: View {
} footer: {
Text(UserText.netPVPNAlertsToggleSectionFooter)
.foregroundColor(.textSecondary)
.font(.system(size: 13))
.daxFootnoteRegular()
.padding(.top, 6)
}
}
Expand Down