From 6c8b8a69e7f5c5a2fcd4acaadf9577a586b4cadc Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 18 Mar 2024 11:21:23 -0400 Subject: [PATCH 01/11] rename Text func to BrandText --- Nos/Extensions/Font.swift | 2 +- Nos/Views/AuthorStoryView.swift | 4 ++-- Nos/Views/BeveledSeparator.swift | 6 +++--- Nos/Views/BioView.swift | 2 +- Nos/Views/FollowCard.swift | 2 +- Nos/Views/GoldenPostView.swift | 2 +- Nos/Views/HighlightedText.swift | 4 ++-- Nos/Views/Home/HomeFeedView.swift | 2 +- Nos/Views/Home/StoryNoteView.swift | 2 +- Nos/Views/New Note/ExpirationTimeButton.swift | 4 ++-- Nos/Views/New Note/ImagePickerButton.swift | 2 +- Nos/Views/NosNavigationBar.swift | 2 +- Nos/Views/NotificationCard.swift | 2 +- Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift | 2 +- Nos/Views/PreviewContainer.swift | 2 +- Nos/Views/ProfileEdit/ProfileEditView.swift | 6 +++--- Nos/Views/PublishedEventsView.swift | 8 ++++---- Nos/Views/RawEventView.swift | 4 ++-- Nos/Views/RelayDetailView.swift | 8 ++++---- Nos/Views/RelayPicker.swift | 2 +- Nos/Views/RelayView.swift | 4 ++-- Nos/Views/SearchBar.swift | 4 ++-- Nos/Views/USBC/WalletConnectSendView.swift | 4 ++-- 23 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Nos/Extensions/Font.swift b/Nos/Extensions/Font.swift index fa4538c3a..3fa7ed156 100644 --- a/Nos/Extensions/Font.swift +++ b/Nos/Extensions/Font.swift @@ -93,7 +93,7 @@ func PlainText(_ localizedStringResource: LocalizedStringResource) -> SwiftUI.Te SwiftUI.Text(localizedStringResource) } -func Text(_ content: any StringProtocol) -> SwiftUI.Text { +func BrandText(_ content: any StringProtocol) -> SwiftUI.Text { .init(content).font(.brand) } // swiftlint:enable identifier_name diff --git a/Nos/Views/AuthorStoryView.swift b/Nos/Views/AuthorStoryView.swift index eee868502..7b18586be 100644 --- a/Nos/Views/AuthorStoryView.swift +++ b/Nos/Views/AuthorStoryView.swift @@ -113,12 +113,12 @@ struct AuthorStoryView: View { .resizable() .foregroundColor(.secondaryTxt) .frame(width: 25, height: 25) - Text(expirationTime) + BrandText(expirationTime) .lineLimit(1) .font(.body) .foregroundColor(.secondaryTxt) } else if let elapsedTime = selectedNote?.createdAt?.distanceString() { - Text(elapsedTime) + BrandText(elapsedTime) .lineLimit(1) .font(.body) .foregroundColor(.secondaryTxt) diff --git a/Nos/Views/BeveledSeparator.swift b/Nos/Views/BeveledSeparator.swift index e67d09ab7..03b29d65b 100644 --- a/Nos/Views/BeveledSeparator.swift +++ b/Nos/Views/BeveledSeparator.swift @@ -19,11 +19,11 @@ struct BeveledSeparator: View { struct BeveledSeparator_Previews: PreviewProvider { static var previews: some View { VStack { - Text("hello") + BrandText("hello") FormSeparator() - Text("world") + BrandText("world") BeveledSeparator() - Text("world") + BrandText("world") } .background(Color.appBg) } diff --git a/Nos/Views/BioView.swift b/Nos/Views/BioView.swift index 4e4b88e22..2eeacb2af 100644 --- a/Nos/Views/BioView.swift +++ b/Nos/Views/BioView.swift @@ -102,7 +102,7 @@ struct BioView: View { } } .placeholder(when: isLoading) { - Text(String.loremIpsum(1)) + BrandText(String.loremIpsum(1)) .lineSpacing(lineSpacing) .lineLimit(5) .padding(EdgeInsets(top: 0, leading: 18, bottom: 0, trailing: 18)) diff --git a/Nos/Views/FollowCard.swift b/Nos/Views/FollowCard.swift index abb5fd651..3ce917cb7 100644 --- a/Nos/Views/FollowCard.swift +++ b/Nos/Views/FollowCard.swift @@ -25,7 +25,7 @@ struct FollowCard: View { } label: { HStack(alignment: .center) { AvatarView(imageUrl: author.profilePhotoURL, size: 24) - Text(author.safeName) + BrandText(author.safeName) .lineLimit(1) .font(.subheadline) .foregroundColor(Color.primaryTxt) diff --git a/Nos/Views/GoldenPostView.swift b/Nos/Views/GoldenPostView.swift index bafce1dfc..1ecafa61e 100644 --- a/Nos/Views/GoldenPostView.swift +++ b/Nos/Views/GoldenPostView.swift @@ -26,7 +26,7 @@ struct GoldenPostView: View { Group { switch noteContent { case .loading: - Text(note.content ?? "").redacted(reason: .placeholder) + BrandText(note.content ?? "").redacted(reason: .placeholder) case .loaded(let attributedString): Text(attributedString) } diff --git a/Nos/Views/HighlightedText.swift b/Nos/Views/HighlightedText.swift index 8fbba944e..765b02b1c 100644 --- a/Nos/Views/HighlightedText.swift +++ b/Nos/Views/HighlightedText.swift @@ -171,7 +171,7 @@ struct HighlightedText: View { highlightBuilder: (String) -> Text, bodyBuilder: (String) -> Text ) -> Text { - var textView = Text("") + var textView = BrandText("") for segment in segments { // swiftlint:disable shorthand_operator switch segment { @@ -180,7 +180,7 @@ struct HighlightedText: View { case .highlighted(let string): textView = textView + highlightBuilder(string) case .space: - textView = textView + Text(" ") + textView = textView + BrandText(" ") } // swiftlint:enable shorthand_operator } diff --git a/Nos/Views/Home/HomeFeedView.swift b/Nos/Views/Home/HomeFeedView.swift index 7dbc8c803..65c93cf98 100644 --- a/Nos/Views/Home/HomeFeedView.swift +++ b/Nos/Views/Home/HomeFeedView.swift @@ -144,7 +144,7 @@ struct HomeFeedView: View { HStack(spacing: 3) { Image("relay-left") .colorMultiply(relayService.numberOfConnectedRelays > 0 ? .white : .red) - Text("\(relayService.numberOfConnectedRelays)") + BrandText("\(relayService.numberOfConnectedRelays)") .font(.clarityTitle3) .fontWeight(.heavy) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/Home/StoryNoteView.swift b/Nos/Views/Home/StoryNoteView.swift index 37fb74e29..58fa032bd 100644 --- a/Nos/Views/Home/StoryNoteView.swift +++ b/Nos/Views/Home/StoryNoteView.swift @@ -68,7 +68,7 @@ struct StoryNoteView: View { Group { switch noteContent { case .loading: - Text(String.loremIpsum(3)) + BrandText(String.loremIpsum(3)) .redacted(reason: .placeholder) case .loaded(let attributedString): Text(attributedString) diff --git a/Nos/Views/New Note/ExpirationTimeButton.swift b/Nos/Views/New Note/ExpirationTimeButton.swift index cf02db1a8..c7f2fd4df 100644 --- a/Nos/Views/New Note/ExpirationTimeButton.swift +++ b/Nos/Views/New Note/ExpirationTimeButton.swift @@ -12,7 +12,7 @@ struct ExpirationTimeButton: View { ZStack { let textLayer = HStack(spacing: 3) { VStack { - Text(model.topText) + BrandText(model.topText) .foregroundColor(.primaryTxt) .bold() PlainText(model.unit) @@ -60,7 +60,7 @@ struct ExpirationTimeButton: View { ) } } - .accessibilityLabel(Text(model.accessibilityLabel)) + .accessibilityLabel(BrandText(model.accessibilityLabel)) .cornerRadius(5) .onTapGesture { isSelected.toggle() diff --git a/Nos/Views/New Note/ImagePickerButton.swift b/Nos/Views/New Note/ImagePickerButton.swift index 58bceec40..5293043ff 100644 --- a/Nos/Views/New Note/ImagePickerButton.swift +++ b/Nos/Views/New Note/ImagePickerButton.swift @@ -132,7 +132,7 @@ struct ImagePickerCoordinator_Previews: PreviewProvider { ImagePickerButton { pickedImage in print(pickedImage) } label: { - Text("Hit me") + BrandText("Hit me") } } } diff --git a/Nos/Views/NosNavigationBar.swift b/Nos/Views/NosNavigationBar.swift index 0dc982430..5f6379ed4 100644 --- a/Nos/Views/NosNavigationBar.swift +++ b/Nos/Views/NosNavigationBar.swift @@ -45,7 +45,7 @@ extension View { NavigationStack { VStack { Spacer() - Text("Content") + BrandText("Content") Spacer() } .frame(maxWidth: .infinity) diff --git a/Nos/Views/NotificationCard.swift b/Nos/Views/NotificationCard.swift index b5637f7fb..ce7040ca6 100644 --- a/Nos/Views/NotificationCard.swift +++ b/Nos/Views/NotificationCard.swift @@ -57,7 +57,7 @@ struct NotificationCard: View { VStack { Spacer() - Text(viewModel.date.distanceString()) + BrandText(viewModel.date.distanceString()) .lineLimit(1) .font(.body) .foregroundColor(.secondaryTxt) diff --git a/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift b/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift index 856a27f63..5d8f6878b 100644 --- a/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift +++ b/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift @@ -28,7 +28,7 @@ struct OnboardingTermsOfServiceView: View { .padding(.top, 92) .padding(.bottom, 60) ScrollView { - Text(termsOfService) + BrandText(termsOfService) .foregroundColor(.secondaryTxt) Rectangle().fill(Color.clear) .frame(height: 100) diff --git a/Nos/Views/PreviewContainer.swift b/Nos/Views/PreviewContainer.swift index b0a9c19d0..4c065debb 100644 --- a/Nos/Views/PreviewContainer.swift +++ b/Nos/Views/PreviewContainer.swift @@ -20,7 +20,7 @@ struct PreviewContainer_Previews: PreviewProvider { static var previews: some View { StatefulPreviewContainer(false) { binding in VStack { - Toggle(isOn: binding) { Text("Toggle me") } + Toggle(isOn: binding) { BrandText("Toggle me") } } .padding() } diff --git a/Nos/Views/ProfileEdit/ProfileEditView.swift b/Nos/Views/ProfileEdit/ProfileEditView.swift index db3490ac6..a4d7a24d3 100644 --- a/Nos/Views/ProfileEdit/ProfileEditView.swift +++ b/Nos/Views/ProfileEdit/ProfileEditView.swift @@ -206,7 +206,7 @@ fileprivate struct NosNIP05Field: View { ( Text(Image(systemName: "exclamationmark.triangle")) .foregroundStyle(Color(hex: "#F0A108")) + - Text(" ") + + BrandText(" ") + Text(.localizable.usernameWarningMessage) .foregroundStyle(Color.secondaryTxt) ) @@ -230,7 +230,7 @@ fileprivate struct NIP05Field: View { ) { VStack { HStack { - Text(nip05) + BrandText(nip05) .foregroundColor(.primaryTxt) Spacer() Button { @@ -254,7 +254,7 @@ fileprivate struct NIP05Field: View { ( Text(Image(systemName: "exclamationmark.triangle")) .foregroundStyle(Color(hex: "#F0A108")) + - Text(" ") + + BrandText(" ") + Text(.localizable.usernameWarningMessage) .foregroundStyle(Color.secondaryTxt) ) diff --git a/Nos/Views/PublishedEventsView.swift b/Nos/Views/PublishedEventsView.swift index 5387ed50e..2f607dcde 100644 --- a/Nos/Views/PublishedEventsView.swift +++ b/Nos/Views/PublishedEventsView.swift @@ -15,12 +15,12 @@ struct PublishedEventsView: View { List { ForEach(events) { event in Section { - Text("id: \(event.identifier ?? String(localized: .localizable.error))") - Text("kind: \(event.kind)") - Text("content: \(event.content ?? String(localized: .localizable.error))") + BrandText("id: \(event.identifier ?? String(localized: .localizable.error))") + BrandText("kind: \(event.kind)") + BrandText("content: \(event.content ?? String(localized: .localizable.error))") if let tags = event.allTags as? [[String]] { ForEach(tags, id: \.self) { tag in - Text("tag: \(tag.joined(separator: ", "))") + BrandText("tag: \(tag.joined(separator: ", "))") } } } diff --git a/Nos/Views/RawEventView.swift b/Nos/Views/RawEventView.swift index 5d39e7511..4757733de 100644 --- a/Nos/Views/RawEventView.swift +++ b/Nos/Views/RawEventView.swift @@ -12,7 +12,7 @@ struct RawEventView: View where ViewModel: RawEventViewModel { ProgressView() .foregroundColor(.secondaryTxt) .background(Color.appBg) - Text(loadingMessage) + BrandText(loadingMessage) .foregroundColor(.secondaryTxt) } .padding(16) @@ -71,7 +71,7 @@ struct RawEventView: View where ViewModel: RawEventViewModel { .alert(isPresented: showAlert) { Alert( title: Text(.localizable.error), - message: Text(viewModel.errorMessage ?? "") + message: BrandText(viewModel.errorMessage ?? "") ) } } diff --git a/Nos/Views/RelayDetailView.swift b/Nos/Views/RelayDetailView.swift index 769c1fbba..e5d7321ac 100644 --- a/Nos/Views/RelayDetailView.swift +++ b/Nos/Views/RelayDetailView.swift @@ -6,15 +6,15 @@ struct RelayDetailView: View { func row(title: LocalizedStringResource, value: String) -> some View { HStack(alignment: .top) { - Text("\(String(localized: title)): ") - Text(value) + BrandText("\(String(localized: title)): ") + BrandText(value) .textSelection(.enabled) } } var body: some View { List { Section { - Text(relay.address ?? String(localized: .localizable.error)) + BrandText(relay.address ?? String(localized: .localizable.error)) .textSelection(.enabled) } header: { Text(.localizable.address) @@ -58,7 +58,7 @@ struct RelayDetailView: View { } footer: { #if DEBUG if let date = relay.metadataFetchedAt { - Text("\(String(localized: .localizable.fetchedAt)): \(date.distanceString())") + BrandText("\(String(localized: .localizable.fetchedAt)): \(date.distanceString())") } #endif } diff --git a/Nos/Views/RelayPicker.swift b/Nos/Views/RelayPicker.swift index 0a0207dba..6c0d29ca9 100644 --- a/Nos/Views/RelayPicker.swift +++ b/Nos/Views/RelayPicker.swift @@ -81,7 +81,7 @@ struct RelayPickerRow: View { selection = relay } label: { HStack { - Text(title) + BrandText(title) .foregroundColor(.primaryTxt) .bold() .lineLimit(1) diff --git a/Nos/Views/RelayView.swift b/Nos/Views/RelayView.swift index 1043067bd..805708adc 100644 --- a/Nos/Views/RelayView.swift +++ b/Nos/Views/RelayView.swift @@ -42,11 +42,11 @@ struct RelayView: View { NavigationLink { RelayDetailView(relay: relay) } label: { - Text(relay.address ?? String(localized: .localizable.error)) + BrandText(relay.address ?? String(localized: .localizable.error)) .foregroundColor(.primaryTxt) } } else { - Text(relay.address ?? String(localized: .localizable.error)) + BrandText(relay.address ?? String(localized: .localizable.error)) .foregroundColor(.primaryTxt) .textSelection(.enabled) } diff --git a/Nos/Views/SearchBar.swift b/Nos/Views/SearchBar.swift index e9613fdb4..e21a296cd 100644 --- a/Nos/Views/SearchBar.swift +++ b/Nos/Views/SearchBar.swift @@ -51,7 +51,7 @@ struct SearchBar_Previews: PreviewProvider { VStack { SearchBar(text: $emptyText, isSearching: $isSearching) ForEach(0..<5) { _ in - Text(String.loremIpsum(1)) + BrandText(String.loremIpsum(1)) } } .background(Color.appBg) @@ -61,7 +61,7 @@ struct SearchBar_Previews: PreviewProvider { VStack { SearchBar(text: $text, isSearching: $isSearching) ForEach(0..<5) { _ in - Text(String.loremIpsum(1)) + BrandText(String.loremIpsum(1)) } } .background(Color.appBg) diff --git a/Nos/Views/USBC/WalletConnectSendView.swift b/Nos/Views/USBC/WalletConnectSendView.swift index 13984dadc..7713a09a5 100644 --- a/Nos/Views/USBC/WalletConnectSendView.swift +++ b/Nos/Views/USBC/WalletConnectSendView.swift @@ -30,7 +30,7 @@ struct WalletConnectSendView: View { .padding(12) VStack(spacing: 1) { HStack { - Text(controller.destinationAuthor.safeName) + BrandText(controller.destinationAuthor.safeName) .foregroundColor(.primaryTxt) .bold() .shadow(radius: 1, y: 1) @@ -38,7 +38,7 @@ struct WalletConnectSendView: View { } HStack(spacing: 3) { Image.unsLogoDark - Text(controller.destinationAuthor.uns ?? "") + BrandText(controller.destinationAuthor.uns ?? "") .foregroundColor(.secondaryTxt) Spacer() } From 8e255cfe1e594b9915e72ed6d262181c4408e77a Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 18 Mar 2024 11:36:31 -0400 Subject: [PATCH 02/11] remove clarity, clarityBold, and clarityMedium vars for simplification --- Nos/Extensions/Font.swift | 8 +------- Nos/Views/ActionBanner.swift | 2 +- Nos/Views/ActionButton.swift | 4 ++-- Nos/Views/BigActionButton.swift | 2 +- Nos/Views/HighlightedText.swift | 4 ++-- Nos/Views/SearchBar.swift | 2 +- Nos/Views/UNS/UNSVerifyCodeView.swift | 2 +- Nos/Views/UNS/UNSWizardNeedsPaymentView.swift | 2 +- 8 files changed, 10 insertions(+), 16 deletions(-) diff --git a/Nos/Extensions/Font.swift b/Nos/Extensions/Font.swift index 3fa7ed156..f67966612 100644 --- a/Nos/Extensions/Font.swift +++ b/Nos/Extensions/Font.swift @@ -2,8 +2,6 @@ import SwiftUI // https://stackoverflow.com/a/74416073 extension Font { - static var clarity = clarityRegular(.body) - static func clarity(_ fontWeight: UIFont.Weight, textStyle: UIFont.TextStyle = .body) -> Font { switch fontWeight { case .regular: @@ -15,7 +13,7 @@ extension Font { case .bold: clarityBold(textStyle) default: - clarity + clarityRegular(textStyle) } } @@ -23,8 +21,6 @@ extension Font { .custom("ClarityCity-Regular", size: UIFont.preferredFont(forTextStyle: textStyle).pointSize) } - static var clarityMedium = clarityMedium(.body) - static func clarityMedium(_ textStyle: UIFont.TextStyle) -> Font { .custom("ClarityCity-Medium", size: UIFont.preferredFont(forTextStyle: textStyle).pointSize) } @@ -33,8 +29,6 @@ extension Font { .custom("ClarityCity-SemiBold", size: UIFont.preferredFont(forTextStyle: textStyle).pointSize) } - static var clarityBold = clarityBold(.body) - static func clarityBold(_ textStyle: UIFont.TextStyle) -> Font { .custom("ClarityCity-Bold", size: UIFont.preferredFont(forTextStyle: textStyle).pointSize) } diff --git a/Nos/Views/ActionBanner.swift b/Nos/Views/ActionBanner.swift index e7f2fa0d4..437a9ce02 100644 --- a/Nos/Views/ActionBanner.swift +++ b/Nos/Views/ActionBanner.swift @@ -26,7 +26,7 @@ struct ActionBanner: View { VStack { HStack { Text(messageText) - .font(.clarityBold) + .font(.clarity(.bold)) .foregroundStyle(Color.white) .lineSpacing(3) .padding(.top, 8) diff --git a/Nos/Views/ActionButton.swift b/Nos/Views/ActionButton.swift index 4118bfecc..12d7596de 100644 --- a/Nos/Views/ActionButton.swift +++ b/Nos/Views/ActionButton.swift @@ -4,7 +4,7 @@ import SwiftUI struct ActionButton: View { var title: LocalizedStringResource - var font: Font = .clarityBold + var font: Font = .clarity(.bold) var image: Image? var textColor = Color.white var depthEffectColor = Color(hex: "#A04651") @@ -131,7 +131,7 @@ struct ActionButton_Previews: PreviewProvider { ActionButton( title: .localizable.edit, - font: .clarityMedium, + font: .clarity(.medium), image: Image.editProfile, textColor: Color(hex: "#f26141"), depthEffectColor: Color(hex: "#f8d4b6"), diff --git a/Nos/Views/BigActionButton.swift b/Nos/Views/BigActionButton.swift index 7005c164e..67b72d04e 100644 --- a/Nos/Views/BigActionButton.swift +++ b/Nos/Views/BigActionButton.swift @@ -17,7 +17,7 @@ struct BigActionButton: View { } }, label: { PlainText(title) - .font(.clarityBold) + .font(.clarity(.bold)) .transition(.opacity) .font(.headline) }) diff --git a/Nos/Views/HighlightedText.swift b/Nos/Views/HighlightedText.swift index 765b02b1c..62a2dda8c 100644 --- a/Nos/Views/HighlightedText.swift +++ b/Nos/Views/HighlightedText.swift @@ -42,7 +42,7 @@ struct HighlightedText: View { highlightedWord: String?, highlight: LinearGradient, textColor: Color = .primaryTxt, - font: Font = .clarity, + font: Font = .clarity(.regular), link: URL? ) { self.init( @@ -66,7 +66,7 @@ struct HighlightedText: View { highlightedWord: String?, highlight: LinearGradient, textColor: Color = .primaryTxt, - font: Font = .clarity, + font: Font = .clarity(.regular), link: URL? ) { self.text = text diff --git a/Nos/Views/SearchBar.swift b/Nos/Views/SearchBar.swift index e21a296cd..c382f067c 100644 --- a/Nos/Views/SearchBar.swift +++ b/Nos/Views/SearchBar.swift @@ -11,7 +11,7 @@ struct SearchBar: View { Image(systemName: "magnifyingglass") .foregroundColor(Color(.systemGray)) TextField("Search", text: $text) - .font(.clarity) + .font(.clarity(.regular)) .foregroundColor(.primaryTxt) .onTapGesture { isSearching.wrappedValue = true // Set focus to the search bar when tapped diff --git a/Nos/Views/UNS/UNSVerifyCodeView.swift b/Nos/Views/UNS/UNSVerifyCodeView.swift index b394f710a..ffda153cd 100644 --- a/Nos/Views/UNS/UNSVerifyCodeView.swift +++ b/Nos/Views/UNS/UNSVerifyCodeView.swift @@ -34,7 +34,7 @@ struct UNSVerifyCodeView: View { highlightedWord: phoneString, highlight: LinearGradient(colors: [.primaryTxt], startPoint: .top, endPoint: .bottom), textColor: .secondaryTxt, - font: .clarityMedium, + font: .clarity(.medium), link: nil ) .fixedSize(horizontal: false, vertical: true) diff --git a/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift b/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift index 55926d8cc..5feaff5cf 100644 --- a/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift +++ b/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift @@ -43,7 +43,7 @@ struct UNSWizardNeedsPaymentView: View { highlightedWord: String(localized: .localizable.registerADifferentName), highlight: LinearGradient(colors: [.primaryTxt], startPoint: .top, endPoint: .bottom), textColor: .secondaryTxt, - font: .clarityMedium, + font: .clarity(.medium), link: nil ) .multilineTextAlignment(.center) From 792d5c92bf7aec53e20ae323732812d561e89bc9 Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 18 Mar 2024 11:55:20 -0400 Subject: [PATCH 03/11] remove all clarityTitle vars from Font; replace usages --- Nos/Extensions/Font.swift | 15 --------------- Nos/Views/Home/HomeFeedView.swift | 2 +- Nos/Views/NosNavigationBar.swift | 2 +- .../PickYourUsernameSheet.swift | 2 +- Nos/Views/ProfileHeader.swift | 2 +- Nos/Views/RelayPickerToolbarButton.swift | 2 +- Nos/Views/SideMenuContent.swift | 6 +++--- Nos/Views/UNS/UNSErrorView.swift | 4 ++-- Nos/Views/UNS/UNSNamePicker.swift | 4 ++-- Nos/Views/UNS/UNSNameTakenView.swift | 4 ++-- Nos/Views/UNS/UNSNewNameView.swift | 2 +- Nos/Views/UNS/UNSSuccessView.swift | 4 ++-- Nos/Views/UNS/UNSVerifyCodeView.swift | 2 +- Nos/Views/UNS/UNSWizardChooseNameView.swift | 2 +- Nos/Views/UNS/UNSWizardIntroView.swift | 2 +- Nos/Views/UNS/UNSWizardNeedsPaymentView.swift | 2 +- Nos/Views/UNS/UNSWizardPhoneView.swift | 2 +- Nos/Views/UNS/WizardTextField.swift | 2 +- Nos/Views/USBC/WalletConnectErrorView.swift | 2 +- Nos/Views/USBC/WalletConnectPairingView.swift | 2 +- Nos/Views/USBC/WalletConnectSendView.swift | 4 ++-- 21 files changed, 27 insertions(+), 42 deletions(-) diff --git a/Nos/Extensions/Font.swift b/Nos/Extensions/Font.swift index f67966612..5811ff9d0 100644 --- a/Nos/Extensions/Font.swift +++ b/Nos/Extensions/Font.swift @@ -33,21 +33,6 @@ extension Font { .custom("ClarityCity-Bold", size: UIFont.preferredFont(forTextStyle: textStyle).pointSize) } - static var clarityTitle = Font - .custom("ClarityCity-Bold", size: UIFont.preferredFont( - forTextStyle: .title1 - ).pointSize) - - static var clarityTitle2 = Font - .custom("ClarityCity-Bold", size: UIFont.preferredFont( - forTextStyle: .title2 - ).pointSize) - - static var clarityTitle3 = Font - .custom("ClarityCity-Bold", size: UIFont.preferredFont( - forTextStyle: .title3 - ).pointSize) - static var clarityCaption = Font .custom("ClarityCity-Regular", size: UIFont.preferredFont( forTextStyle: .caption1 diff --git a/Nos/Views/Home/HomeFeedView.swift b/Nos/Views/Home/HomeFeedView.swift index 65c93cf98..76f7ae550 100644 --- a/Nos/Views/Home/HomeFeedView.swift +++ b/Nos/Views/Home/HomeFeedView.swift @@ -145,7 +145,7 @@ struct HomeFeedView: View { Image("relay-left") .colorMultiply(relayService.numberOfConnectedRelays > 0 ? .white : .red) BrandText("\(relayService.numberOfConnectedRelays)") - .font(.clarityTitle3) + .font(.clarity(.bold, textStyle: .title3)) .fontWeight(.heavy) .foregroundColor(.primaryTxt) Image("relay-right") diff --git a/Nos/Views/NosNavigationBar.swift b/Nos/Views/NosNavigationBar.swift index 5f6379ed4..430966c82 100644 --- a/Nos/Views/NosNavigationBar.swift +++ b/Nos/Views/NosNavigationBar.swift @@ -10,7 +10,7 @@ struct NosNavigationBarModifier: ViewModifier { .toolbar { ToolbarItem(placement: .principal) { PlainText(title) - .font(.clarityTitle3) + .font(.clarity(.bold, textStyle: .title3)) .foregroundColor(.primaryTxt) .padding(.leading, 14) .tint(.primaryTxt) diff --git a/Nos/Views/ProfileEdit/CreateUsernameWizard/PickYourUsernameSheet.swift b/Nos/Views/ProfileEdit/CreateUsernameWizard/PickYourUsernameSheet.swift index 557bf5775..0ea1aa9ef 100644 --- a/Nos/Views/ProfileEdit/CreateUsernameWizard/PickYourUsernameSheet.swift +++ b/Nos/Views/ProfileEdit/CreateUsernameWizard/PickYourUsernameSheet.swift @@ -40,7 +40,7 @@ struct PickYourUsernameSheet: View { } } PlainText(".nos.social") - .font(.clarityTitle3) + .font(.clarity(.bold, textStyle: .title3)) .foregroundStyle(Color.secondaryTxt) } if validationFailed { diff --git a/Nos/Views/ProfileHeader.swift b/Nos/Views/ProfileHeader.swift index 5905d7afa..b1e3f2e83 100644 --- a/Nos/Views/ProfileHeader.swift +++ b/Nos/Views/ProfileHeader.swift @@ -77,7 +77,7 @@ struct ProfileHeader: View { PlainText(author.safeName) .lineLimit(1) - .font(.clarityTitle3.weight(.semibold)) + .font(.clarity(.bold, textStyle: .title3).weight(.semibold)) .foregroundColor(Color.primaryTxt) // NIP-05 diff --git a/Nos/Views/RelayPickerToolbarButton.swift b/Nos/Views/RelayPickerToolbarButton.swift index c9af1f682..50eb3456f 100644 --- a/Nos/Views/RelayPickerToolbarButton.swift +++ b/Nos/Views/RelayPickerToolbarButton.swift @@ -49,7 +49,7 @@ struct RelayPickerToolbarButton: ToolbarContent { } label: { HStack { PlainText(title) - .font(.clarityTitle3) + .font(.clarity(.bold, textStyle: .title3)) .foregroundColor(.primaryTxt) .bold() .padding(.leading, 14) diff --git a/Nos/Views/SideMenuContent.swift b/Nos/Views/SideMenuContent.swift index 789f08a62..fd2a876a8 100644 --- a/Nos/Views/SideMenuContent.swift +++ b/Nos/Views/SideMenuContent.swift @@ -49,7 +49,7 @@ struct SideMenuContent: View { if let name = currentUser.author?.safeName { PlainText(name) .foregroundColor(.primaryTxt) - .font(.clarityTitle2) + .font(.clarity(.bold, textStyle: .title2)) .padding(.top, 15) } } @@ -142,9 +142,9 @@ struct SideMenuRow: View { } label: { HStack(alignment: .center) { image - .font(.clarityTitle3) + .font(.clarity(.bold, textStyle: .title3)) PlainText(title) - .font(.clarityTitle3) + .font(.clarity(.bold, textStyle: .title3)) .foregroundColor(.primaryTxt) Spacer() } diff --git a/Nos/Views/UNS/UNSErrorView.swift b/Nos/Views/UNS/UNSErrorView.swift index 841a73f15..de2160317 100644 --- a/Nos/Views/UNS/UNSErrorView.swift +++ b/Nos/Views/UNS/UNSErrorView.swift @@ -18,7 +18,7 @@ struct UNSErrorView: View { .padding(.top, 50) PlainText(.localizable.oops) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) @@ -26,7 +26,7 @@ struct UNSErrorView: View { .padding(.bottom, 3) PlainText(.localizable.anErrorOccurred) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) diff --git a/Nos/Views/UNS/UNSNamePicker.swift b/Nos/Views/UNS/UNSNamePicker.swift index 8da7841dd..ff8609bea 100644 --- a/Nos/Views/UNS/UNSNamePicker.swift +++ b/Nos/Views/UNS/UNSNamePicker.swift @@ -70,7 +70,7 @@ struct UNSNamePicker: View { PickerRow(isSelected: isSelected) { PlainText(name.name) - .font(.clarityTitle2) + .font(.clarity(.bold, textStyle: .title2)) } } } @@ -101,7 +101,7 @@ struct UNSNamePicker: View { .foregroundColor(.secondaryTxt) } .focused($isTextFieldFocused) - .font(.clarityTitle2) + .font(.clarity(.bold, textStyle: .title2)) .foregroundStyle(textFieldForegroundStyle) .autocorrectionDisabled() .textInputAutocapitalization(.none) diff --git a/Nos/Views/UNS/UNSNameTakenView.swift b/Nos/Views/UNS/UNSNameTakenView.swift index 4121d4016..2eeb35f7d 100644 --- a/Nos/Views/UNS/UNSNameTakenView.swift +++ b/Nos/Views/UNS/UNSNameTakenView.swift @@ -15,7 +15,7 @@ struct UNSNameTakenView: View { .padding(.top, 50) PlainText(.localizable.oops) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) @@ -23,7 +23,7 @@ struct UNSNameTakenView: View { .padding(.bottom, 3) PlainText(.localizable.thatNameIsTaken) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) diff --git a/Nos/Views/UNS/UNSNewNameView.swift b/Nos/Views/UNS/UNSNewNameView.swift index 78569fe63..3cc376674 100644 --- a/Nos/Views/UNS/UNSNewNameView.swift +++ b/Nos/Views/UNS/UNSNewNameView.swift @@ -18,7 +18,7 @@ struct UNSNewNameView: View { .padding(.top, 50) PlainText(.localizable.chooseYourName) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) diff --git a/Nos/Views/UNS/UNSSuccessView.swift b/Nos/Views/UNS/UNSSuccessView.swift index 0901e30e2..667ee0139 100644 --- a/Nos/Views/UNS/UNSSuccessView.swift +++ b/Nos/Views/UNS/UNSSuccessView.swift @@ -19,7 +19,7 @@ struct UNSSuccessView: View { VStack(spacing: 0) { Image.unsCheck PlainText(controller.nameRecord?.name ?? "") - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) @@ -30,7 +30,7 @@ struct UNSSuccessView: View { .padding(.top, 50) PlainText(.localizable.success) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) diff --git a/Nos/Views/UNS/UNSVerifyCodeView.swift b/Nos/Views/UNS/UNSVerifyCodeView.swift index ffda153cd..c9b857486 100644 --- a/Nos/Views/UNS/UNSVerifyCodeView.swift +++ b/Nos/Views/UNS/UNSVerifyCodeView.swift @@ -23,7 +23,7 @@ struct UNSVerifyCodeView: View { .padding(.top, 50) PlainText(.localizable.verification) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) diff --git a/Nos/Views/UNS/UNSWizardChooseNameView.swift b/Nos/Views/UNS/UNSWizardChooseNameView.swift index a38081d94..8045355fe 100644 --- a/Nos/Views/UNS/UNSWizardChooseNameView.swift +++ b/Nos/Views/UNS/UNSWizardChooseNameView.swift @@ -20,7 +20,7 @@ struct UNSWizardChooseNameView: View { .padding(.top, 50) PlainText(.localizable.chooseNameOrRegister) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) diff --git a/Nos/Views/UNS/UNSWizardIntroView.swift b/Nos/Views/UNS/UNSWizardIntroView.swift index a7add5f55..fd77f6460 100644 --- a/Nos/Views/UNS/UNSWizardIntroView.swift +++ b/Nos/Views/UNS/UNSWizardIntroView.swift @@ -12,7 +12,7 @@ struct UNSWizardIntroView: View { .padding(.top, 50) PlainText(.localizable.unsRegister) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .readabilityPadding() diff --git a/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift b/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift index 5feaff5cf..7deb2f8ce 100644 --- a/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift +++ b/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift @@ -17,7 +17,7 @@ struct UNSWizardNeedsPaymentView: View { .padding(.top, 50) PlainText(.localizable.premiumName) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .readabilityPadding() diff --git a/Nos/Views/UNS/UNSWizardPhoneView.swift b/Nos/Views/UNS/UNSWizardPhoneView.swift index 89cb12e38..915a3ea35 100644 --- a/Nos/Views/UNS/UNSWizardPhoneView.swift +++ b/Nos/Views/UNS/UNSWizardPhoneView.swift @@ -23,7 +23,7 @@ struct UNSWizardPhoneView: View { .padding(.top, 50) PlainText(.localizable.registration) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) .shadow(radius: 1, y: 1) diff --git a/Nos/Views/UNS/WizardTextField.swift b/Nos/Views/UNS/WizardTextField.swift index d9b5dc1bb..0013e4837 100644 --- a/Nos/Views/UNS/WizardTextField.swift +++ b/Nos/Views/UNS/WizardTextField.swift @@ -11,7 +11,7 @@ struct WizardTextField: View { PlainText(placeholder) .foregroundColor(.secondaryTxt) } - .font(.clarityTitle2) + .font(.clarity(.bold, textStyle: .title2)) .foregroundColor(.primaryTxt) .multilineTextAlignment(.center) .padding(19) diff --git a/Nos/Views/USBC/WalletConnectErrorView.swift b/Nos/Views/USBC/WalletConnectErrorView.swift index 548ebb9bb..40f87dd1e 100644 --- a/Nos/Views/USBC/WalletConnectErrorView.swift +++ b/Nos/Views/USBC/WalletConnectErrorView.swift @@ -16,7 +16,7 @@ struct WalletConnectErrorView: View { HStack { PlainText(.localizable.somethingWentWrong) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .foregroundColor(.primaryTxt) .multilineTextAlignment(.leading) .padding(0) diff --git a/Nos/Views/USBC/WalletConnectPairingView.swift b/Nos/Views/USBC/WalletConnectPairingView.swift index 76e7cd792..a7eabc6a1 100644 --- a/Nos/Views/USBC/WalletConnectPairingView.swift +++ b/Nos/Views/USBC/WalletConnectPairingView.swift @@ -12,7 +12,7 @@ struct WalletConnectPairingView: View { VStack { HStack { PlainText(.localizable.connectGlobalIDTitle) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .foregroundColor(.primaryTxt) .multilineTextAlignment(.leading) .padding(0) diff --git a/Nos/Views/USBC/WalletConnectSendView.swift b/Nos/Views/USBC/WalletConnectSendView.swift index 7713a09a5..135da9f2c 100644 --- a/Nos/Views/USBC/WalletConnectSendView.swift +++ b/Nos/Views/USBC/WalletConnectSendView.swift @@ -9,7 +9,7 @@ struct WalletConnectSendView: View { VStack { HStack { PlainText(.localizable.sendUSBC) - .font(.clarityTitle) + .font(.clarity(.bold, textStyle: .title1)) .foregroundColor(.primaryTxt) .multilineTextAlignment(.leading) .padding(0) @@ -66,7 +66,7 @@ struct WalletConnectSendView: View { .foregroundColor(.secondaryTxt) } .keyboardType(.decimalPad) - .font(.clarityTitle2) + .font(.clarity(.bold, textStyle: .title2)) .foregroundColor(.primaryTxt) .multilineTextAlignment(.center) .padding(19) From 4e136e1e65be32221082b7427558517f6d69fc68 Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 18 Mar 2024 15:49:50 -0400 Subject: [PATCH 04/11] replace captions, subheadline, and brand font vars with funcs --- Nos/Extensions/Font.swift | 24 +------------------ Nos/Views/ActionBanner.swift | 2 +- Nos/Views/AuthorCard.swift | 2 +- Nos/Views/BioView.swift | 2 +- Nos/Views/NIP05View.swift | 2 +- Nos/Views/New Note/ComposerActionBar.swift | 2 +- Nos/Views/New Note/ExpirationTimeButton.swift | 2 +- Nos/Views/UNS/SetUpUNSBanner.swift | 2 +- Nos/Views/UNSNameView.swift | 2 +- 9 files changed, 9 insertions(+), 31 deletions(-) diff --git a/Nos/Extensions/Font.swift b/Nos/Extensions/Font.swift index 5811ff9d0..b64c9b94c 100644 --- a/Nos/Extensions/Font.swift +++ b/Nos/Extensions/Font.swift @@ -32,28 +32,6 @@ extension Font { static func clarityBold(_ textStyle: UIFont.TextStyle) -> Font { .custom("ClarityCity-Bold", size: UIFont.preferredFont(forTextStyle: textStyle).pointSize) } - - static var clarityCaption = Font - .custom("ClarityCity-Regular", size: UIFont.preferredFont( - forTextStyle: .caption1 - ).pointSize) - - static var clarityCaption2 = Font - .custom("ClarityCity-Regular", size: UIFont.preferredFont( - forTextStyle: .caption2 - ).pointSize) - - static var claritySubheadline = clarity(.medium, textStyle: .subheadline) - - static var claritySemiBoldSubheadline = Font - .custom("ClarityCity-SemiBold", size: UIFont.preferredFont( - forTextStyle: .subheadline - ).pointSize) - - static var brand = Font - .custom("ClarityCity-Regular", size: UIFont.preferredFont( - forTextStyle: .body - ).pointSize) } extension UIFont { @@ -73,6 +51,6 @@ func PlainText(_ localizedStringResource: LocalizedStringResource) -> SwiftUI.Te } func BrandText(_ content: any StringProtocol) -> SwiftUI.Text { - .init(content).font(.brand) + .init(content).font(.clarity(.regular)) } // swiftlint:enable identifier_name diff --git a/Nos/Views/ActionBanner.swift b/Nos/Views/ActionBanner.swift index 437a9ce02..d59e58486 100644 --- a/Nos/Views/ActionBanner.swift +++ b/Nos/Views/ActionBanner.swift @@ -37,7 +37,7 @@ struct ActionBanner: View { HStack { ActionButton( title: buttonText, - font: .claritySemiBoldSubheadline, + font: .clarity(.semibold, textStyle: .subheadline), image: buttonImage, textColor: .actionBannerButtonTxt, depthEffectColor: .actionBannerButtonEffect, diff --git a/Nos/Views/AuthorCard.swift b/Nos/Views/AuthorCard.swift index dc0191055..9d7393787 100644 --- a/Nos/Views/AuthorCard.swift +++ b/Nos/Views/AuthorCard.swift @@ -47,7 +47,7 @@ struct AuthorCard: View { if let bio = author.about { PlainText(bio) .foregroundColor(.secondaryTxt) - .font(.claritySubheadline) + .font(.clarity(.medium, textStyle: .subheadline)) .multilineTextAlignment(.leading) .lineSpacing(5) .lineLimit(2) diff --git a/Nos/Views/BioView.swift b/Nos/Views/BioView.swift index 2eeacb2af..2db6be8eb 100644 --- a/Nos/Views/BioView.swift +++ b/Nos/Views/BioView.swift @@ -90,7 +90,7 @@ struct BioView: View { showingBio = true } label: { PlainText(String(localized: .localizable.readMore).uppercased()) - .font(.clarityCaption) + .font(.clarity(.regular, textStyle: .caption1)) .foregroundColor(.secondaryTxt) .padding(EdgeInsets(top: 4, leading: 6, bottom: 4, trailing: 6)) .background(Color.hashtagBg) diff --git a/Nos/Views/NIP05View.swift b/Nos/Views/NIP05View.swift index e11b669ac..229e76a0a 100644 --- a/Nos/Views/NIP05View.swift +++ b/Nos/Views/NIP05View.swift @@ -25,7 +25,7 @@ struct NIP05View: View { .foregroundColor(.secondaryTxt) } } - .font(.claritySubheadline) + .font(.clarity(.medium, textStyle: .subheadline)) .multilineTextAlignment(.leading) .contextMenu { Button { diff --git a/Nos/Views/New Note/ComposerActionBar.swift b/Nos/Views/New Note/ComposerActionBar.swift index f8e880219..91b67f70a 100644 --- a/Nos/Views/New Note/ComposerActionBar.swift +++ b/Nos/Views/New Note/ComposerActionBar.swift @@ -95,7 +95,7 @@ struct ComposerActionBar: View { ScrollView(.horizontal) { HStack { PlainText(.localizable.noteDisappearsIn) - .font(.clarityCaption) + .font(.clarity(.regular, textStyle: .caption1)) .foregroundColor(.secondaryTxt) .transition(.move(edge: .trailing)) .padding(10) diff --git a/Nos/Views/New Note/ExpirationTimeButton.swift b/Nos/Views/New Note/ExpirationTimeButton.swift index c7f2fd4df..64855dffd 100644 --- a/Nos/Views/New Note/ExpirationTimeButton.swift +++ b/Nos/Views/New Note/ExpirationTimeButton.swift @@ -17,7 +17,7 @@ struct ExpirationTimeButton: View { .bold() PlainText(model.unit) .foregroundColor(.secondaryTxt) - .font(.clarityCaption2) + .font(.clarity(.regular, textStyle: .caption2)) } if showClearButton { diff --git a/Nos/Views/UNS/SetUpUNSBanner.swift b/Nos/Views/UNS/SetUpUNSBanner.swift index 1a5e32b96..97ac5da18 100644 --- a/Nos/Views/UNS/SetUpUNSBanner.swift +++ b/Nos/Views/UNS/SetUpUNSBanner.swift @@ -28,7 +28,7 @@ struct SetUpUNSBanner: View { HStack { ActionButton( title: button, - font: .claritySemiBoldSubheadline, + font: .clarity(.semibold, textStyle: .subheadline), textColor: .unsBannerButtonTxt, depthEffectColor: .unsBannerButtonEffect, backgroundGradient: LinearGradient( diff --git a/Nos/Views/UNSNameView.swift b/Nos/Views/UNSNameView.swift index 4ba2e0901..6fe17f782 100644 --- a/Nos/Views/UNSNameView.swift +++ b/Nos/Views/UNSNameView.swift @@ -18,7 +18,7 @@ struct UNSNameView: View { Image.unsLogoLight PlainText(author.uns ?? "") .foregroundColor(.secondaryTxt) - .font(.claritySubheadline) + .font(.clarity(.medium, textStyle: .subheadline)) .multilineTextAlignment(.leading) } } From aa2ed4b3028d3c430583e24360694b5182e48cb6 Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 18 Mar 2024 17:47:18 -0400 Subject: [PATCH 05/11] remove BrandText in favor of using Text with a modifier --- Nos/Extensions/Font.swift | 4 ---- Nos/Views/AuthorStoryView.swift | 8 ++++---- Nos/Views/BeveledSeparator.swift | 6 +++--- Nos/Views/BioView.swift | 3 ++- Nos/Views/FollowCard.swift | 4 ++-- Nos/Views/GoldenPostView.swift | 2 +- Nos/Views/HighlightedText.swift | 4 ++-- Nos/Views/Home/HomeFeedView.swift | 3 +-- Nos/Views/Home/StoryNoteView.swift | 2 +- Nos/Views/New Note/ExpirationTimeButton.swift | 6 +++--- Nos/Views/New Note/ImagePickerButton.swift | 2 +- Nos/Views/NosNavigationBar.swift | 2 +- Nos/Views/NotificationCard.swift | 4 ++-- .../OnboardingTermsOfServiceView.swift | 5 +++-- Nos/Views/PreviewContainer.swift | 2 +- Nos/Views/ProfileEdit/ProfileEditView.swift | 6 +++--- Nos/Views/PublishedEventsView.swift | 11 +++++++---- Nos/Views/RawEventView.swift | 4 ++-- Nos/Views/RelayDetailView.swift | 16 ++++++++++------ Nos/Views/RelayPicker.swift | 4 ++-- Nos/Views/RelayView.swift | 13 +++++++------ Nos/Views/SearchBar.swift | 4 ++-- Nos/Views/USBC/WalletConnectSendView.swift | 7 ++++--- 23 files changed, 64 insertions(+), 58 deletions(-) diff --git a/Nos/Extensions/Font.swift b/Nos/Extensions/Font.swift index b64c9b94c..f7c9aa6dc 100644 --- a/Nos/Extensions/Font.swift +++ b/Nos/Extensions/Font.swift @@ -49,8 +49,4 @@ func PlainText(_ content: any StringProtocol) -> SwiftUI.Text { func PlainText(_ localizedStringResource: LocalizedStringResource) -> SwiftUI.Text { SwiftUI.Text(localizedStringResource) } - -func BrandText(_ content: any StringProtocol) -> SwiftUI.Text { - .init(content).font(.clarity(.regular)) -} // swiftlint:enable identifier_name diff --git a/Nos/Views/AuthorStoryView.swift b/Nos/Views/AuthorStoryView.swift index 7b18586be..e013ae8d2 100644 --- a/Nos/Views/AuthorStoryView.swift +++ b/Nos/Views/AuthorStoryView.swift @@ -113,14 +113,14 @@ struct AuthorStoryView: View { .resizable() .foregroundColor(.secondaryTxt) .frame(width: 25, height: 25) - BrandText(expirationTime) + Text(expirationTime) .lineLimit(1) - .font(.body) + .font(.clarity(.medium)) .foregroundColor(.secondaryTxt) } else if let elapsedTime = selectedNote?.createdAt?.distanceString() { - BrandText(elapsedTime) + Text(elapsedTime) .lineLimit(1) - .font(.body) + .font(.clarity(.medium)) .foregroundColor(.secondaryTxt) } Spacer() diff --git a/Nos/Views/BeveledSeparator.swift b/Nos/Views/BeveledSeparator.swift index 03b29d65b..e67d09ab7 100644 --- a/Nos/Views/BeveledSeparator.swift +++ b/Nos/Views/BeveledSeparator.swift @@ -19,11 +19,11 @@ struct BeveledSeparator: View { struct BeveledSeparator_Previews: PreviewProvider { static var previews: some View { VStack { - BrandText("hello") + Text("hello") FormSeparator() - BrandText("world") + Text("world") BeveledSeparator() - BrandText("world") + Text("world") } .background(Color.appBg) } diff --git a/Nos/Views/BioView.swift b/Nos/Views/BioView.swift index 2db6be8eb..4720a0d5e 100644 --- a/Nos/Views/BioView.swift +++ b/Nos/Views/BioView.swift @@ -102,7 +102,8 @@ struct BioView: View { } } .placeholder(when: isLoading) { - BrandText(String.loremIpsum(1)) + Text(String.loremIpsum(1)) + .font(.clarity(.regular)) .lineSpacing(lineSpacing) .lineLimit(5) .padding(EdgeInsets(top: 0, leading: 18, bottom: 0, trailing: 18)) diff --git a/Nos/Views/FollowCard.swift b/Nos/Views/FollowCard.swift index 3ce917cb7..17cb5dfca 100644 --- a/Nos/Views/FollowCard.swift +++ b/Nos/Views/FollowCard.swift @@ -25,9 +25,9 @@ struct FollowCard: View { } label: { HStack(alignment: .center) { AvatarView(imageUrl: author.profilePhotoURL, size: 24) - BrandText(author.safeName) + Text(author.safeName) .lineLimit(1) - .font(.subheadline) + .font(.clarity(.regular, textStyle: .subheadline)) .foregroundColor(Color.primaryTxt) .multilineTextAlignment(.leading) .frame(maxWidth: .infinity, alignment: .leading) diff --git a/Nos/Views/GoldenPostView.swift b/Nos/Views/GoldenPostView.swift index 1ecafa61e..bafce1dfc 100644 --- a/Nos/Views/GoldenPostView.swift +++ b/Nos/Views/GoldenPostView.swift @@ -26,7 +26,7 @@ struct GoldenPostView: View { Group { switch noteContent { case .loading: - BrandText(note.content ?? "").redacted(reason: .placeholder) + Text(note.content ?? "").redacted(reason: .placeholder) case .loaded(let attributedString): Text(attributedString) } diff --git a/Nos/Views/HighlightedText.swift b/Nos/Views/HighlightedText.swift index 62a2dda8c..d41172f33 100644 --- a/Nos/Views/HighlightedText.swift +++ b/Nos/Views/HighlightedText.swift @@ -171,7 +171,7 @@ struct HighlightedText: View { highlightBuilder: (String) -> Text, bodyBuilder: (String) -> Text ) -> Text { - var textView = BrandText("") + var textView = Text("") for segment in segments { // swiftlint:disable shorthand_operator switch segment { @@ -180,7 +180,7 @@ struct HighlightedText: View { case .highlighted(let string): textView = textView + highlightBuilder(string) case .space: - textView = textView + BrandText(" ") + textView = textView + Text(" ") } // swiftlint:enable shorthand_operator } diff --git a/Nos/Views/Home/HomeFeedView.swift b/Nos/Views/Home/HomeFeedView.swift index 76f7ae550..3d0fbe8b9 100644 --- a/Nos/Views/Home/HomeFeedView.swift +++ b/Nos/Views/Home/HomeFeedView.swift @@ -144,9 +144,8 @@ struct HomeFeedView: View { HStack(spacing: 3) { Image("relay-left") .colorMultiply(relayService.numberOfConnectedRelays > 0 ? .white : .red) - BrandText("\(relayService.numberOfConnectedRelays)") + Text("\(relayService.numberOfConnectedRelays)") .font(.clarity(.bold, textStyle: .title3)) - .fontWeight(.heavy) .foregroundColor(.primaryTxt) Image("relay-right") .colorMultiply(relayService.numberOfConnectedRelays > 0 ? .white : .red) diff --git a/Nos/Views/Home/StoryNoteView.swift b/Nos/Views/Home/StoryNoteView.swift index 58fa032bd..37fb74e29 100644 --- a/Nos/Views/Home/StoryNoteView.swift +++ b/Nos/Views/Home/StoryNoteView.swift @@ -68,7 +68,7 @@ struct StoryNoteView: View { Group { switch noteContent { case .loading: - BrandText(String.loremIpsum(3)) + Text(String.loremIpsum(3)) .redacted(reason: .placeholder) case .loaded(let attributedString): Text(attributedString) diff --git a/Nos/Views/New Note/ExpirationTimeButton.swift b/Nos/Views/New Note/ExpirationTimeButton.swift index 64855dffd..928dc096d 100644 --- a/Nos/Views/New Note/ExpirationTimeButton.swift +++ b/Nos/Views/New Note/ExpirationTimeButton.swift @@ -12,9 +12,9 @@ struct ExpirationTimeButton: View { ZStack { let textLayer = HStack(spacing: 3) { VStack { - BrandText(model.topText) + Text(model.topText) .foregroundColor(.primaryTxt) - .bold() + .font(.clarity(.bold)) PlainText(model.unit) .foregroundColor(.secondaryTxt) .font(.clarity(.regular, textStyle: .caption2)) @@ -60,7 +60,7 @@ struct ExpirationTimeButton: View { ) } } - .accessibilityLabel(BrandText(model.accessibilityLabel)) + .accessibilityLabel(Text(model.accessibilityLabel)) .cornerRadius(5) .onTapGesture { isSelected.toggle() diff --git a/Nos/Views/New Note/ImagePickerButton.swift b/Nos/Views/New Note/ImagePickerButton.swift index 5293043ff..58bceec40 100644 --- a/Nos/Views/New Note/ImagePickerButton.swift +++ b/Nos/Views/New Note/ImagePickerButton.swift @@ -132,7 +132,7 @@ struct ImagePickerCoordinator_Previews: PreviewProvider { ImagePickerButton { pickedImage in print(pickedImage) } label: { - BrandText("Hit me") + Text("Hit me") } } } diff --git a/Nos/Views/NosNavigationBar.swift b/Nos/Views/NosNavigationBar.swift index 430966c82..ba1d6b29d 100644 --- a/Nos/Views/NosNavigationBar.swift +++ b/Nos/Views/NosNavigationBar.swift @@ -45,7 +45,7 @@ extension View { NavigationStack { VStack { Spacer() - BrandText("Content") + Text("Content") Spacer() } .frame(maxWidth: .infinity) diff --git a/Nos/Views/NotificationCard.swift b/Nos/Views/NotificationCard.swift index ce7040ca6..7a17a91d5 100644 --- a/Nos/Views/NotificationCard.swift +++ b/Nos/Views/NotificationCard.swift @@ -57,9 +57,9 @@ struct NotificationCard: View { VStack { Spacer() - BrandText(viewModel.date.distanceString()) + Text(viewModel.date.distanceString()) .lineLimit(1) - .font(.body) + .font(.clarity(.regular)) .foregroundColor(.secondaryTxt) } .fixedSize() diff --git a/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift b/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift index 5d8f6878b..1c38c3777 100644 --- a/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift +++ b/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift @@ -13,7 +13,7 @@ struct OnboardingTermsOfServiceView: View { var body: some View { VStack { PlainText(.localizable.termsOfServiceTitle) - .font(.custom("ClarityCity-Bold", size: 34, relativeTo: .largeTitle)) + .font(.clarity(.bold, textStyle: .largeTitle)) .foregroundStyle( LinearGradient( colors: [ @@ -28,7 +28,8 @@ struct OnboardingTermsOfServiceView: View { .padding(.top, 92) .padding(.bottom, 60) ScrollView { - BrandText(termsOfService) + Text(termsOfService) + .font(.clarity(.regular)) .foregroundColor(.secondaryTxt) Rectangle().fill(Color.clear) .frame(height: 100) diff --git a/Nos/Views/PreviewContainer.swift b/Nos/Views/PreviewContainer.swift index 4c065debb..b0a9c19d0 100644 --- a/Nos/Views/PreviewContainer.swift +++ b/Nos/Views/PreviewContainer.swift @@ -20,7 +20,7 @@ struct PreviewContainer_Previews: PreviewProvider { static var previews: some View { StatefulPreviewContainer(false) { binding in VStack { - Toggle(isOn: binding) { BrandText("Toggle me") } + Toggle(isOn: binding) { Text("Toggle me") } } .padding() } diff --git a/Nos/Views/ProfileEdit/ProfileEditView.swift b/Nos/Views/ProfileEdit/ProfileEditView.swift index a4d7a24d3..db3490ac6 100644 --- a/Nos/Views/ProfileEdit/ProfileEditView.swift +++ b/Nos/Views/ProfileEdit/ProfileEditView.swift @@ -206,7 +206,7 @@ fileprivate struct NosNIP05Field: View { ( Text(Image(systemName: "exclamationmark.triangle")) .foregroundStyle(Color(hex: "#F0A108")) + - BrandText(" ") + + Text(" ") + Text(.localizable.usernameWarningMessage) .foregroundStyle(Color.secondaryTxt) ) @@ -230,7 +230,7 @@ fileprivate struct NIP05Field: View { ) { VStack { HStack { - BrandText(nip05) + Text(nip05) .foregroundColor(.primaryTxt) Spacer() Button { @@ -254,7 +254,7 @@ fileprivate struct NIP05Field: View { ( Text(Image(systemName: "exclamationmark.triangle")) .foregroundStyle(Color(hex: "#F0A108")) + - BrandText(" ") + + Text(" ") + Text(.localizable.usernameWarningMessage) .foregroundStyle(Color.secondaryTxt) ) diff --git a/Nos/Views/PublishedEventsView.swift b/Nos/Views/PublishedEventsView.swift index 2f607dcde..0f1a2c2c0 100644 --- a/Nos/Views/PublishedEventsView.swift +++ b/Nos/Views/PublishedEventsView.swift @@ -1,5 +1,7 @@ +#if DEBUG import SwiftUI +/// Only used for debugging. Settings > All published events. struct PublishedEventsView: View { var author: Author @@ -15,12 +17,12 @@ struct PublishedEventsView: View { List { ForEach(events) { event in Section { - BrandText("id: \(event.identifier ?? String(localized: .localizable.error))") - BrandText("kind: \(event.kind)") - BrandText("content: \(event.content ?? String(localized: .localizable.error))") + Text("id: \(event.identifier ?? String(localized: .localizable.error))") + Text("kind: \(event.kind)") + Text("content: \(event.content ?? String(localized: .localizable.error))") if let tags = event.allTags as? [[String]] { ForEach(tags, id: \.self) { tag in - BrandText("tag: \(tag.joined(separator: ", "))") + Text("tag: \(tag.joined(separator: ", "))") } } } @@ -43,3 +45,4 @@ struct PublishedEventsView_Previews: PreviewProvider { PublishedEventsView(author: previewData.previewAuthor) } } +#endif diff --git a/Nos/Views/RawEventView.swift b/Nos/Views/RawEventView.swift index 4757733de..5d39e7511 100644 --- a/Nos/Views/RawEventView.swift +++ b/Nos/Views/RawEventView.swift @@ -12,7 +12,7 @@ struct RawEventView: View where ViewModel: RawEventViewModel { ProgressView() .foregroundColor(.secondaryTxt) .background(Color.appBg) - BrandText(loadingMessage) + Text(loadingMessage) .foregroundColor(.secondaryTxt) } .padding(16) @@ -71,7 +71,7 @@ struct RawEventView: View where ViewModel: RawEventViewModel { .alert(isPresented: showAlert) { Alert( title: Text(.localizable.error), - message: BrandText(viewModel.errorMessage ?? "") + message: Text(viewModel.errorMessage ?? "") ) } } diff --git a/Nos/Views/RelayDetailView.swift b/Nos/Views/RelayDetailView.swift index e5d7321ac..2834a7b83 100644 --- a/Nos/Views/RelayDetailView.swift +++ b/Nos/Views/RelayDetailView.swift @@ -6,20 +6,23 @@ struct RelayDetailView: View { func row(title: LocalizedStringResource, value: String) -> some View { HStack(alignment: .top) { - BrandText("\(String(localized: title)): ") - BrandText(value) + Text("\(String(localized: title)): ") + .font(.clarity(.regular)) + Text(value) + .font(.clarity(.regular)) .textSelection(.enabled) } } var body: some View { List { Section { - BrandText(relay.address ?? String(localized: .localizable.error)) + Text(relay.address ?? String(localized: .localizable.error)) + .font(.clarity(.regular)) .textSelection(.enabled) } header: { Text(.localizable.address) .foregroundColor(.primaryTxt) - .fontWeight(.heavy) + .font(.clarity(.bold)) } .listRowBackground(LinearGradient( colors: [Color.cardBgTop, Color.cardBgBottom], @@ -54,11 +57,12 @@ struct RelayDetailView: View { } header: { Text(.localizable.metadata) .foregroundColor(.primaryTxt) - .fontWeight(.heavy) + .font(.clarity(.bold)) } footer: { #if DEBUG if let date = relay.metadataFetchedAt { - BrandText("\(String(localized: .localizable.fetchedAt)): \(date.distanceString())") + Text("\(String(localized: .localizable.fetchedAt)): \(date.distanceString())") + .font(.clarity(.regular)) } #endif } diff --git a/Nos/Views/RelayPicker.swift b/Nos/Views/RelayPicker.swift index 6c0d29ca9..5e0307af9 100644 --- a/Nos/Views/RelayPicker.swift +++ b/Nos/Views/RelayPicker.swift @@ -81,9 +81,9 @@ struct RelayPickerRow: View { selection = relay } label: { HStack { - BrandText(title) + Text(title) .foregroundColor(.primaryTxt) - .bold() + .font(.clarity(.bold)) .lineLimit(1) .padding(.horizontal, 19) .padding(.vertical, 19) diff --git a/Nos/Views/RelayView.swift b/Nos/Views/RelayView.swift index 805708adc..d3c84751a 100644 --- a/Nos/Views/RelayView.swift +++ b/Nos/Views/RelayView.swift @@ -42,11 +42,13 @@ struct RelayView: View { NavigationLink { RelayDetailView(relay: relay) } label: { - BrandText(relay.address ?? String(localized: .localizable.error)) + Text(relay.address ?? String(localized: .localizable.error)) + .font(.clarity(.regular)) .foregroundColor(.primaryTxt) } } else { - BrandText(relay.address ?? String(localized: .localizable.error)) + Text(relay.address ?? String(localized: .localizable.error)) + .font(.clarity(.regular)) .foregroundColor(.primaryTxt) .textSelection(.enabled) } @@ -78,7 +80,7 @@ struct RelayView: View { if editable { Text(.localizable.relays) .foregroundColor(.primaryTxt) - .fontWeight(.heavy) + .font(.clarity(.bold)) } } .deleteDisabled(!editable) @@ -108,7 +110,7 @@ struct RelayView: View { } header: { Text(.localizable.recommendedRelays) .foregroundColor(.primaryTxt) - .fontWeight(.heavy) + .font(.clarity(.bold)) } .listRowBackground(LinearGradient( colors: [Color.cardBgTop, Color.cardBgBottom], @@ -136,8 +138,7 @@ struct RelayView: View { } header: { Text(.localizable.addRelay) .foregroundColor(.primaryTxt) - .fontWeight(.heavy) - .bold() + .font(.clarity(.bold)) } .listRowBackground(LinearGradient( colors: [Color.cardBgTop, Color.cardBgBottom], diff --git a/Nos/Views/SearchBar.swift b/Nos/Views/SearchBar.swift index c382f067c..58db94708 100644 --- a/Nos/Views/SearchBar.swift +++ b/Nos/Views/SearchBar.swift @@ -51,7 +51,7 @@ struct SearchBar_Previews: PreviewProvider { VStack { SearchBar(text: $emptyText, isSearching: $isSearching) ForEach(0..<5) { _ in - BrandText(String.loremIpsum(1)) + Text(String.loremIpsum(1)) } } .background(Color.appBg) @@ -61,7 +61,7 @@ struct SearchBar_Previews: PreviewProvider { VStack { SearchBar(text: $text, isSearching: $isSearching) ForEach(0..<5) { _ in - BrandText(String.loremIpsum(1)) + Text(String.loremIpsum(1)) } } .background(Color.appBg) diff --git a/Nos/Views/USBC/WalletConnectSendView.swift b/Nos/Views/USBC/WalletConnectSendView.swift index 135da9f2c..fcf5ec2ba 100644 --- a/Nos/Views/USBC/WalletConnectSendView.swift +++ b/Nos/Views/USBC/WalletConnectSendView.swift @@ -30,16 +30,17 @@ struct WalletConnectSendView: View { .padding(12) VStack(spacing: 1) { HStack { - BrandText(controller.destinationAuthor.safeName) + Text(controller.destinationAuthor.safeName) .foregroundColor(.primaryTxt) - .bold() + .font(.clarity(.bold)) .shadow(radius: 1, y: 1) Spacer() } HStack(spacing: 3) { Image.unsLogoDark - BrandText(controller.destinationAuthor.uns ?? "") + Text(controller.destinationAuthor.uns ?? "") .foregroundColor(.secondaryTxt) + .font(.clarity(.regular)) Spacer() } } From 52b5eafcf0814c1c046debb74dfc6590e1ca3eaf Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 18 Mar 2024 17:54:55 -0400 Subject: [PATCH 06/11] remove unnecessary SwiftUI prefix from Text --- Nos/Views/AuthorLabel.swift | 2 +- Nos/Views/BioView.swift | 4 ++-- Nos/Views/CompactNoteView.swift | 4 ++-- Nos/Views/Components/WizardSheetBadgeText.swift | 2 +- Nos/Views/Components/WizardSheetDescriptionText.swift | 6 +++--- Nos/Views/Components/WizardSheetTitleText.swift | 2 +- .../CreateUsernameWizard/ExcellentChoiceSheet.swift | 6 +++--- .../DeleteUsernameWizard/ConfirmUsernameDeletionSheet.swift | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Nos/Views/AuthorLabel.swift b/Nos/Views/AuthorLabel.swift index 96750eb7c..27a9aa145 100644 --- a/Nos/Views/AuthorLabel.swift +++ b/Nos/Views/AuthorLabel.swift @@ -22,7 +22,7 @@ struct AuthorLabel: View { var body: some View { HStack { AvatarView(imageUrl: author.profilePhotoURL, size: 24) - SwiftUI.Text(attributedAuthor) + Text(attributedAuthor) .lineLimit(1) .font(.clarity(.medium)) .multilineTextAlignment(.leading) diff --git a/Nos/Views/BioView.swift b/Nos/Views/BioView.swift index 4720a0d5e..5c3338988 100644 --- a/Nos/Views/BioView.swift +++ b/Nos/Views/BioView.swift @@ -44,7 +44,7 @@ struct BioView: View { var body: some View { VStack(alignment: .leading, spacing: 6) { - SwiftUI.Text(parsedBio) + Text(parsedBio) .font(font) .foregroundColor(.primaryTxt) .tint(.accent) @@ -63,7 +63,7 @@ struct BioView: View { } } .background { - SwiftUI.Text(parsedBio) + Text(parsedBio) .font(font) .lineSpacing(lineSpacing) .padding(EdgeInsets(top: 0, leading: 18, bottom: 0, trailing: 18)) diff --git a/Nos/Views/CompactNoteView.swift b/Nos/Views/CompactNoteView.swift index c71e670fa..03864bbbd 100644 --- a/Nos/Views/CompactNoteView.swift +++ b/Nos/Views/CompactNoteView.swift @@ -46,11 +46,11 @@ struct CompactNoteView: View { Group { switch note.attributedContent { case .loading: - SwiftUI.Text(note.content ?? "") + Text(note.content ?? "") .font(.clarity(.regular)) .redacted(reason: .placeholder) case .loaded(let attributedString): - SwiftUI.Text(attributedString) + Text(attributedString) } } } diff --git a/Nos/Views/Components/WizardSheetBadgeText.swift b/Nos/Views/Components/WizardSheetBadgeText.swift index bf19987eb..38be6bed3 100644 --- a/Nos/Views/Components/WizardSheetBadgeText.swift +++ b/Nos/Views/Components/WizardSheetBadgeText.swift @@ -13,7 +13,7 @@ struct WizardSheetBadgeText: View { } var body: some View { - SwiftUI.Text(String(localized: localizedStringResource).uppercased()) + Text(String(localized: localizedStringResource).uppercased()) .padding(.horizontal, 6) .padding(.vertical, 5) .font(.clarity(.bold, textStyle: .footnote)) diff --git a/Nos/Views/Components/WizardSheetDescriptionText.swift b/Nos/Views/Components/WizardSheetDescriptionText.swift index 8126394ca..3bae422bf 100644 --- a/Nos/Views/Components/WizardSheetDescriptionText.swift +++ b/Nos/Views/Components/WizardSheetDescriptionText.swift @@ -12,12 +12,12 @@ struct WizardSheetDescriptionText: View { case plainText(LocalizedStringResource) case markdown(AttributedString) - var text: SwiftUI.Text { + var text: Text { switch self { case .plainText(let localizedStringResource): - return SwiftUI.Text(localizedStringResource) + return Text(localizedStringResource) case .markdown(let attributedString): - return SwiftUI.Text(attributedString) + return Text(attributedString) } } } diff --git a/Nos/Views/Components/WizardSheetTitleText.swift b/Nos/Views/Components/WizardSheetTitleText.swift index fef8ab89f..e0ed2ddd6 100644 --- a/Nos/Views/Components/WizardSheetTitleText.swift +++ b/Nos/Views/Components/WizardSheetTitleText.swift @@ -13,7 +13,7 @@ struct WizardSheetTitleText: View { } var body: some View { - SwiftUI.Text(localizedStringResource) + Text(localizedStringResource) .font(.clarity(.bold, textStyle: .title1)) .foregroundStyle(Color.primaryTxt) } diff --git a/Nos/Views/ProfileEdit/CreateUsernameWizard/ExcellentChoiceSheet.swift b/Nos/Views/ProfileEdit/CreateUsernameWizard/ExcellentChoiceSheet.swift index 6d42b9919..76b29a173 100644 --- a/Nos/Views/ProfileEdit/CreateUsernameWizard/ExcellentChoiceSheet.swift +++ b/Nos/Views/ProfileEdit/CreateUsernameWizard/ExcellentChoiceSheet.swift @@ -64,12 +64,12 @@ struct ExcellentChoiceSheet: View { .scaleEffect(1.5) .frame(maxWidth: .infinity, maxHeight: .infinity) case .failed(let error): - SwiftUI.Text(error.localizedDescription) + Text(error.localizedDescription) .font(.clarity(.regular, textStyle: .callout)) .foregroundStyle(Color.primaryTxt) case .claimed: WizardSheetTitleText(.localizable.excellentChoice) - SwiftUI.Text(attributedUsername) + Text(attributedUsername) .font(.clarity(.bold, textStyle: .title3)) .foregroundStyle(Color.secondaryTxt) WizardSheetDescriptionText(markdown: .localizable.usernameClaimedNotice) @@ -87,7 +87,7 @@ struct ExcellentChoiceSheet: View { Button { isPresented = false } label: { - SwiftUI.Text(.localizable.ok) + Text(.localizable.ok) } } .task { diff --git a/Nos/Views/ProfileEdit/DeleteUsernameWizard/ConfirmUsernameDeletionSheet.swift b/Nos/Views/ProfileEdit/DeleteUsernameWizard/ConfirmUsernameDeletionSheet.swift index 15dd2b54f..202fe6c63 100644 --- a/Nos/Views/ProfileEdit/DeleteUsernameWizard/ConfirmUsernameDeletionSheet.swift +++ b/Nos/Views/ProfileEdit/DeleteUsernameWizard/ConfirmUsernameDeletionSheet.swift @@ -59,7 +59,7 @@ struct ConfirmUsernameDeletionSheet: View { Button { isPresented = false } label: { - SwiftUI.Text(.localizable.cancel) + Text(.localizable.cancel) .font(.clarity(.medium, textStyle: .footnote)) } .frame(maxWidth: .infinity) @@ -72,7 +72,7 @@ struct ConfirmUsernameDeletionSheet: View { Button { isPresented = false } label: { - SwiftUI.Text(.localizable.ok) + Text(.localizable.ok) } } } From 706f3761e559977412f03ef80feaddd63da63592 Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Thu, 21 Mar 2024 17:51:29 -0400 Subject: [PATCH 07/11] Update text and card bg top and bottom colors --- .../Colors/card-bg-bottom.colorset/Contents.json | 6 +++--- .../Colors/card-bg-top.colorset/Contents.json | 6 +++--- .../Colors/primary-txt.colorset/Contents.json | 6 +++--- .../Colors/secondary-txt.colorset/Contents.json | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Nos/Assets/Assets.xcassets/Colors/card-bg-bottom.colorset/Contents.json b/Nos/Assets/Assets.xcassets/Colors/card-bg-bottom.colorset/Contents.json index 6a31ec59d..deb5070f6 100644 --- a/Nos/Assets/Assets.xcassets/Colors/card-bg-bottom.colorset/Contents.json +++ b/Nos/Assets/Assets.xcassets/Colors/card-bg-bottom.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x3A", - "green" : "0x17", - "red" : "0x23" + "blue" : "0x3D", + "green" : "0x18", + "red" : "0x25" } }, "idiom" : "universal" diff --git a/Nos/Assets/Assets.xcassets/Colors/card-bg-top.colorset/Contents.json b/Nos/Assets/Assets.xcassets/Colors/card-bg-top.colorset/Contents.json index a3dfbbe65..8d27937a9 100644 --- a/Nos/Assets/Assets.xcassets/Colors/card-bg-top.colorset/Contents.json +++ b/Nos/Assets/Assets.xcassets/Colors/card-bg-top.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x4C", - "green" : "0x1E", - "red" : "0x2F" + "blue" : "0x47", + "green" : "0x1C", + "red" : "0x2B" } }, "idiom" : "universal" diff --git a/Nos/Assets/Assets.xcassets/Colors/primary-txt.colorset/Contents.json b/Nos/Assets/Assets.xcassets/Colors/primary-txt.colorset/Contents.json index dd13e8b03..600c22b70 100644 --- a/Nos/Assets/Assets.xcassets/Colors/primary-txt.colorset/Contents.json +++ b/Nos/Assets/Assets.xcassets/Colors/primary-txt.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" } }, "idiom" : "universal" diff --git a/Nos/Assets/Assets.xcassets/Colors/secondary-txt.colorset/Contents.json b/Nos/Assets/Assets.xcassets/Colors/secondary-txt.colorset/Contents.json index c93f6a155..5c4b7e41f 100644 --- a/Nos/Assets/Assets.xcassets/Colors/secondary-txt.colorset/Contents.json +++ b/Nos/Assets/Assets.xcassets/Colors/secondary-txt.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0xBF", - "green" : "0x79", - "red" : "0x93" + "blue" : "0xD8", + "green" : "0x88", + "red" : "0xA5" } }, "idiom" : "universal" From 762f7ebf129378c7cc311216e95c9408e69a40d9 Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 25 Mar 2024 17:19:31 -0400 Subject: [PATCH 08/11] delete no-longer-needed PlainText --- Nos/Extensions/Font.swift | 10 --------- Nos/Views/AboutView.swift | 2 +- Nos/Views/ActionButton.swift | 2 +- Nos/Views/AuthorCard.swift | 4 ++-- Nos/Views/BigActionButton.swift | 2 +- Nos/Views/BioView.swift | 2 +- Nos/Views/CardButtonStyle.swift | 2 +- Nos/Views/CompactNoteView.swift | 2 +- .../Components/WizardNavigationStack.swift | 2 +- Nos/Views/Components/WizardSheetVStack.swift | 2 +- Nos/Views/DiscoverView.swift | 2 +- Nos/Views/FullscreenProgressView.swift | 2 +- Nos/Views/GoldenPostView.swift | 2 +- Nos/Views/LikeButton.swift | 2 +- Nos/Views/NIP05View.swift | 8 +++---- Nos/Views/New Note/ComposerActionBar.swift | 2 +- Nos/Views/New Note/ExpirationTimeButton.swift | 2 +- Nos/Views/NosNavigationBar.swift | 4 ++-- Nos/Views/NoteButton.swift | 2 +- Nos/Views/NoteCardHeader.swift | 4 ++-- Nos/Views/NoteTextEditor.swift | 2 +- .../OnboardingAgeVerificationView.swift | 2 +- .../OnboardingNotOldEnoughView.swift | 2 +- .../Onboarding/OnboardingStartView.swift | 2 +- .../OnboardingTermsOfServiceView.swift | 2 +- Nos/Views/PagedNoteListView.swift | 2 +- .../PickYourUsernameSheet.swift | 14 ++++++------ .../ConfirmUsernameDeletionSheet.swift | 2 +- Nos/Views/ProfileEdit/ProfileEditView.swift | 4 ++-- Nos/Views/ProfileHeader.swift | 2 +- Nos/Views/ProfileSocialStatsView.swift | 4 ++-- Nos/Views/RelayPickerToolbarButton.swift | 2 +- Nos/Views/RepostButton.swift | 2 +- Nos/Views/SendUSBCBarButtonItem.swift | 2 +- Nos/Views/SettingsView.swift | 22 +++++++++---------- Nos/Views/SideMenuContent.swift | 4 ++-- Nos/Views/UNS/UNSErrorView.swift | 4 ++-- Nos/Views/UNS/UNSNamePicker.swift | 4 ++-- Nos/Views/UNS/UNSNameTakenView.swift | 4 ++-- Nos/Views/UNS/UNSNewNameView.swift | 2 +- Nos/Views/UNS/UNSSuccessView.swift | 4 ++-- Nos/Views/UNS/UNSVerifyCodeView.swift | 2 +- Nos/Views/UNS/UNSWizardChooseNameView.swift | 2 +- Nos/Views/UNS/UNSWizardIntroView.swift | 2 +- Nos/Views/UNS/UNSWizardNeedsPaymentView.swift | 2 +- Nos/Views/UNS/UNSWizardPhoneView.swift | 2 +- Nos/Views/UNS/WizardTextField.swift | 2 +- Nos/Views/UNSNameView.swift | 2 +- Nos/Views/USBC/WalletConnectErrorView.swift | 6 ++--- Nos/Views/USBC/WalletConnectPairingView.swift | 4 ++-- Nos/Views/USBC/WalletConnectSendView.swift | 8 +++---- Nos/Views/USBCBalanceBarButtonItem.swift | 2 +- 52 files changed, 86 insertions(+), 96 deletions(-) diff --git a/Nos/Extensions/Font.swift b/Nos/Extensions/Font.swift index f7c9aa6dc..aa888a5f6 100644 --- a/Nos/Extensions/Font.swift +++ b/Nos/Extensions/Font.swift @@ -40,13 +40,3 @@ extension UIFont { size: UIFont.preferredFont(forTextStyle: .body).pointSize )! } - -// swiftlint:disable identifier_name -func PlainText(_ content: any StringProtocol) -> SwiftUI.Text { - SwiftUI.Text(content) -} - -func PlainText(_ localizedStringResource: LocalizedStringResource) -> SwiftUI.Text { - SwiftUI.Text(localizedStringResource) -} -// swiftlint:enable identifier_name diff --git a/Nos/Views/AboutView.swift b/Nos/Views/AboutView.swift index def8d799d..444a3128f 100644 --- a/Nos/Views/AboutView.swift +++ b/Nos/Views/AboutView.swift @@ -10,7 +10,7 @@ struct AboutView: View { .frame(width: 235.45, height: 67.1) .padding(.top, 155) .padding(.bottom, 10) - PlainText(.localizable.onboardingTitle) + Text(.localizable.onboardingTitle) .font(.custom("ClarityCity-Bold", size: 25.21)) .fontWeight(.heavy) .foregroundStyle( diff --git a/Nos/Views/ActionButton.swift b/Nos/Views/ActionButton.swift index 12d7596de..5fa0e15f3 100644 --- a/Nos/Views/ActionButton.swift +++ b/Nos/Views/ActionButton.swift @@ -30,7 +30,7 @@ struct ActionButton: View { }, label: { HStack { image - PlainText(title) + Text(title) .font(font) .transition(.opacity) .font(.headline) diff --git a/Nos/Views/AuthorCard.swift b/Nos/Views/AuthorCard.swift index 9d7393787..d0c802dec 100644 --- a/Nos/Views/AuthorCard.swift +++ b/Nos/Views/AuthorCard.swift @@ -24,7 +24,7 @@ struct AuthorCard: View { .padding(.trailing, 12) VStack(alignment: .leading, spacing: 6) { HStack { - PlainText(author.safeName) + Text(author.safeName) .lineLimit(1) .font(.title3) .fontWeight(.bold) @@ -45,7 +45,7 @@ struct AuthorCard: View { } if let bio = author.about { - PlainText(bio) + Text(bio) .foregroundColor(.secondaryTxt) .font(.clarity(.medium, textStyle: .subheadline)) .multilineTextAlignment(.leading) diff --git a/Nos/Views/BigActionButton.swift b/Nos/Views/BigActionButton.swift index 67b72d04e..129ec6581 100644 --- a/Nos/Views/BigActionButton.swift +++ b/Nos/Views/BigActionButton.swift @@ -16,7 +16,7 @@ struct BigActionButton: View { disabled = false } }, label: { - PlainText(title) + Text(title) .font(.clarity(.bold)) .transition(.opacity) .font(.headline) diff --git a/Nos/Views/BioView.swift b/Nos/Views/BioView.swift index 5c3338988..8b07a36f3 100644 --- a/Nos/Views/BioView.swift +++ b/Nos/Views/BioView.swift @@ -89,7 +89,7 @@ struct BioView: View { Button { showingBio = true } label: { - PlainText(String(localized: .localizable.readMore).uppercased()) + Text(String(localized: .localizable.readMore).uppercased()) .font(.clarity(.regular, textStyle: .caption1)) .foregroundColor(.secondaryTxt) .padding(EdgeInsets(top: 4, leading: 6, bottom: 4, trailing: 6)) diff --git a/Nos/Views/CardButtonStyle.swift b/Nos/Views/CardButtonStyle.swift index 860ccb5e3..2828f44f9 100644 --- a/Nos/Views/CardButtonStyle.swift +++ b/Nos/Views/CardButtonStyle.swift @@ -46,7 +46,7 @@ extension View { Button { } label: { VStack { - PlainText("hello world") + Text("hello world") .padding() } .background(Color.cardBgTop.cornerRadius(18)) diff --git a/Nos/Views/CompactNoteView.swift b/Nos/Views/CompactNoteView.swift index 03864bbbd..906b1299d 100644 --- a/Nos/Views/CompactNoteView.swift +++ b/Nos/Views/CompactNoteView.swift @@ -101,7 +101,7 @@ struct CompactNoteView: View { showFullMessage = true } } label: { - PlainText(String(localized: .localizable.readMore).uppercased()) + Text(String(localized: .localizable.readMore).uppercased()) .font(.caption) .foregroundColor(.secondaryTxt) .padding(EdgeInsets(top: 4, leading: 6, bottom: 4, trailing: 6)) diff --git a/Nos/Views/Components/WizardNavigationStack.swift b/Nos/Views/Components/WizardNavigationStack.swift index 4c72be935..60226e9bc 100644 --- a/Nos/Views/Components/WizardNavigationStack.swift +++ b/Nos/Views/Components/WizardNavigationStack.swift @@ -23,7 +23,7 @@ struct WizardNavigationStack: View where Root: View { #Preview { Color.clear.sheet(isPresented: .constant(true)) { WizardNavigationStack { - PlainText("Hello") + Text("Hello") } } } diff --git a/Nos/Views/Components/WizardSheetVStack.swift b/Nos/Views/Components/WizardSheetVStack.swift index 038b352a5..27362bbd2 100644 --- a/Nos/Views/Components/WizardSheetVStack.swift +++ b/Nos/Views/Components/WizardSheetVStack.swift @@ -57,7 +57,7 @@ struct WizardSheetVStack: View where Content: View { #Preview { WizardSheetVStack { Spacer(minLength: 40) - PlainText("Hello") + Text("Hello") Spacer() } } diff --git a/Nos/Views/DiscoverView.swift b/Nos/Views/DiscoverView.swift index d94fd6db1..95de29344 100644 --- a/Nos/Views/DiscoverView.swift +++ b/Nos/Views/DiscoverView.swift @@ -106,7 +106,7 @@ struct DiscoverView: View { .searchable( text: $searchController.query, placement: .toolbar, - prompt: PlainText(.localizable.searchBar) + prompt: Text(.localizable.searchBar) ) .autocorrectionDisabled() .onSubmit(of: .search) { diff --git a/Nos/Views/FullscreenProgressView.swift b/Nos/Views/FullscreenProgressView.swift index 72a5c0acb..bbb2af6c0 100644 --- a/Nos/Views/FullscreenProgressView.swift +++ b/Nos/Views/FullscreenProgressView.swift @@ -14,7 +14,7 @@ struct FullscreenProgressView: View { ProgressView() .foregroundColor(.primaryTxt) if let text { - PlainText(text) + Text(text) .font(.clarity(.regular)) .padding(.vertical, 10) .padding(.horizontal, 25) diff --git a/Nos/Views/GoldenPostView.swift b/Nos/Views/GoldenPostView.swift index bafce1dfc..9a8d639fe 100644 --- a/Nos/Views/GoldenPostView.swift +++ b/Nos/Views/GoldenPostView.swift @@ -52,7 +52,7 @@ struct GoldenPostView: View { HStack(alignment: .center) { AvatarView(imageUrl: author.profilePhotoURL, size: 20) // if !post.isBlobOnly { - PlainText(author.safeName) + Text(author.safeName) .lineLimit(1) .font(.clarity(.regular, textStyle: .subheadline)) .foregroundColor(Color.secondaryTxt) diff --git a/Nos/Views/LikeButton.swift b/Nos/Views/LikeButton.swift index a7966d1f3..211589b48 100644 --- a/Nos/Views/LikeButton.swift +++ b/Nos/Views/LikeButton.swift @@ -52,7 +52,7 @@ struct LikeButton: View { Image.buttonLikeDefault } if likeCount > 0 { - PlainText(likeCount.description) + Text(likeCount.description) .font(.clarity(.medium, textStyle: .subheadline)) .foregroundColor(.secondaryTxt) } diff --git a/Nos/Views/NIP05View.swift b/Nos/Views/NIP05View.swift index 229e76a0a..fb3abda8e 100644 --- a/Nos/Views/NIP05View.swift +++ b/Nos/Views/NIP05View.swift @@ -14,14 +14,14 @@ struct NIP05View: View { let formattedNIP05 = author.formattedNIP05 { Group { if verifiedNip05Identifier == true { - PlainText("\(formattedNIP05)") + Text("\(formattedNIP05)") .foregroundColor(.primaryTxt) } else if verifiedNip05Identifier == false { - PlainText(formattedNIP05) + Text(formattedNIP05) .strikethrough() .foregroundColor(.secondaryTxt) } else { - PlainText("\(formattedNIP05)") + Text("\(formattedNIP05)") .foregroundColor(.secondaryTxt) } } @@ -34,7 +34,7 @@ struct NIP05View: View { Text(.localizable.copy) } } preview: { - PlainText(formattedNIP05) + Text(formattedNIP05) .foregroundColor(.primaryTxt) .padding() } diff --git a/Nos/Views/New Note/ComposerActionBar.swift b/Nos/Views/New Note/ComposerActionBar.swift index 91b67f70a..07f783e6f 100644 --- a/Nos/Views/New Note/ComposerActionBar.swift +++ b/Nos/Views/New Note/ComposerActionBar.swift @@ -94,7 +94,7 @@ struct ComposerActionBar: View { backArrow ScrollView(.horizontal) { HStack { - PlainText(.localizable.noteDisappearsIn) + Text(.localizable.noteDisappearsIn) .font(.clarity(.regular, textStyle: .caption1)) .foregroundColor(.secondaryTxt) .transition(.move(edge: .trailing)) diff --git a/Nos/Views/New Note/ExpirationTimeButton.swift b/Nos/Views/New Note/ExpirationTimeButton.swift index 928dc096d..c9c5242b1 100644 --- a/Nos/Views/New Note/ExpirationTimeButton.swift +++ b/Nos/Views/New Note/ExpirationTimeButton.swift @@ -15,7 +15,7 @@ struct ExpirationTimeButton: View { Text(model.topText) .foregroundColor(.primaryTxt) .font(.clarity(.bold)) - PlainText(model.unit) + Text(model.unit) .foregroundColor(.secondaryTxt) .font(.clarity(.regular, textStyle: .caption2)) } diff --git a/Nos/Views/NosNavigationBar.swift b/Nos/Views/NosNavigationBar.swift index ba1d6b29d..5b8da32b7 100644 --- a/Nos/Views/NosNavigationBar.swift +++ b/Nos/Views/NosNavigationBar.swift @@ -9,7 +9,7 @@ struct NosNavigationBarModifier: ViewModifier { .navigationBarTitle(String(localized: title), displayMode: .inline) .toolbar { ToolbarItem(placement: .principal) { - PlainText(title) + Text(title) .font(.clarity(.bold, textStyle: .title3)) .foregroundColor(.primaryTxt) .padding(.leading, 14) @@ -32,7 +32,7 @@ extension View { NavigationStack { VStack { Spacer() - PlainText("Content") + Text("Content") Spacer() } .frame(maxWidth: .infinity) diff --git a/Nos/Views/NoteButton.swift b/Nos/Views/NoteButton.swift index 4b17c44f6..4ed094f5f 100644 --- a/Nos/Views/NoteButton.swift +++ b/Nos/Views/NoteButton.swift @@ -63,7 +63,7 @@ struct NoteButton: View { AuthorLabel(author: author) Image.repostSymbol if let elapsedTime = note.createdAt?.distanceString() { - PlainText(elapsedTime) + Text(elapsedTime) .lineLimit(1) .font(.clarity(.medium)) .foregroundColor(.secondaryTxt) diff --git a/Nos/Views/NoteCardHeader.swift b/Nos/Views/NoteCardHeader.swift index d7a13ed99..4112b24eb 100644 --- a/Nos/Views/NoteCardHeader.swift +++ b/Nos/Views/NoteCardHeader.swift @@ -14,12 +14,12 @@ struct NoteCardHeader: View { .resizable() .foregroundColor(.secondaryTxt) .frame(width: 25, height: 25) - PlainText(expirationTime) + Text(expirationTime) .lineLimit(1) .font(.clarity(.medium)) .foregroundColor(.secondaryTxt) } else if let elapsedTime = note.createdAt?.distanceString() { - PlainText(elapsedTime) + Text(elapsedTime) .lineLimit(1) .font(.clarity(.medium)) .foregroundColor(.secondaryTxt) diff --git a/Nos/Views/NoteTextEditor.swift b/Nos/Views/NoteTextEditor.swift index 35a74ef18..ec2ce9754 100644 --- a/Nos/Views/NoteTextEditor.swift +++ b/Nos/Views/NoteTextEditor.swift @@ -34,7 +34,7 @@ struct NoteTextEditor: View { .frame(height: max(reader.size.height, calculatedHeight)) .placeholder(when: text.isEmpty, placeholder: { VStack { - PlainText(placeholder) + Text(placeholder) .foregroundColor(.secondaryTxt) .padding(.top, 10) .padding(.leading, 6) diff --git a/Nos/Views/Onboarding/OnboardingAgeVerificationView.swift b/Nos/Views/Onboarding/OnboardingAgeVerificationView.swift index a4b2c4626..05c33e830 100644 --- a/Nos/Views/Onboarding/OnboardingAgeVerificationView.swift +++ b/Nos/Views/Onboarding/OnboardingAgeVerificationView.swift @@ -5,7 +5,7 @@ struct OnboardingAgeVerificationView: View { var body: some View { VStack { - PlainText(.localizable.ageVerificationTitle) + Text(.localizable.ageVerificationTitle) .multilineTextAlignment(.center) .padding(.top, 92) .padding(.bottom, 20) diff --git a/Nos/Views/Onboarding/OnboardingNotOldEnoughView.swift b/Nos/Views/Onboarding/OnboardingNotOldEnoughView.swift index a891605e8..fd58b01a0 100644 --- a/Nos/Views/Onboarding/OnboardingNotOldEnoughView.swift +++ b/Nos/Views/Onboarding/OnboardingNotOldEnoughView.swift @@ -5,7 +5,7 @@ struct OnboardingNotOldEnoughView: View { var body: some View { VStack { - PlainText(.localizable.notOldEnoughTitle) + Text(.localizable.notOldEnoughTitle) .font(.custom("ClarityCity-Bold", size: 34, relativeTo: .largeTitle)) .foregroundStyle( LinearGradient( diff --git a/Nos/Views/Onboarding/OnboardingStartView.swift b/Nos/Views/Onboarding/OnboardingStartView.swift index d82fe42a1..b45306c0e 100644 --- a/Nos/Views/Onboarding/OnboardingStartView.swift +++ b/Nos/Views/Onboarding/OnboardingStartView.swift @@ -12,7 +12,7 @@ struct OnboardingStartView: View { .frame(width: 235.45, height: 67.1) .padding(.top, 155) .padding(.bottom, 10) - PlainText(.localizable.onboardingTitle) + Text(.localizable.onboardingTitle) .font(.custom("ClarityCity-Bold", size: 25.21)) .fontWeight(.heavy) .foregroundStyle( diff --git a/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift b/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift index 1c38c3777..366746e1b 100644 --- a/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift +++ b/Nos/Views/Onboarding/OnboardingTermsOfServiceView.swift @@ -12,7 +12,7 @@ struct OnboardingTermsOfServiceView: View { var body: some View { VStack { - PlainText(.localizable.termsOfServiceTitle) + Text(.localizable.termsOfServiceTitle) .font(.clarity(.bold, textStyle: .largeTitle)) .foregroundStyle( LinearGradient( diff --git a/Nos/Views/PagedNoteListView.swift b/Nos/Views/PagedNoteListView.swift index 05a109db8..92f7c1b6b 100644 --- a/Nos/Views/PagedNoteListView.swift +++ b/Nos/Views/PagedNoteListView.swift @@ -203,7 +203,7 @@ extension Notification.Name { .id(previewData.alice.id) }, emptyPlaceholder: { - PlainText("empty") + Text("empty") }, onRefresh: { previewData.alice.allPostsRequest(onlyRootPosts: false) diff --git a/Nos/Views/ProfileEdit/CreateUsernameWizard/PickYourUsernameSheet.swift b/Nos/Views/ProfileEdit/CreateUsernameWizard/PickYourUsernameSheet.swift index 0ea1aa9ef..dc3b8da73 100644 --- a/Nos/Views/ProfileEdit/CreateUsernameWizard/PickYourUsernameSheet.swift +++ b/Nos/Views/ProfileEdit/CreateUsernameWizard/PickYourUsernameSheet.swift @@ -17,7 +17,7 @@ struct PickYourUsernameSheet: View { Button { isPresented = false } label: { - PlainText(.localizable.cancel) + Text(.localizable.cancel) .font(.clarity(.medium, textStyle: .body)) .foregroundStyle(Color.primaryTxt) .padding(.vertical, 20) @@ -39,7 +39,7 @@ struct PickYourUsernameSheet: View { await verify(usernameObserver.text) } } - PlainText(".nos.social") + Text(".nos.social") .font(.clarity(.bold, textStyle: .title3)) .foregroundStyle(Color.secondaryTxt) } @@ -61,11 +61,11 @@ struct PickYourUsernameSheet: View { ProgressView() .frame(height: .zero) .tint(Color.white) - PlainText(.localizable.next) + Text(.localizable.next) .hidden() } } else { - PlainText(.localizable.next) + Text(.localizable.next) } } .buttonStyle(BigActionButtonStyle()) @@ -76,7 +76,7 @@ struct PickYourUsernameSheet: View { } private func usernameAlreadyClaimedText() -> some View { - PlainText(.localizable.usernameAlreadyClaimed) + Text(.localizable.usernameAlreadyClaimed) .font(.clarity(.medium, textStyle: .subheadline)) .foregroundStyle(Color.red) .lineSpacing(3) @@ -141,9 +141,9 @@ fileprivate struct UsernameTextField: View { var body: some View { TextField( text: $usernameObserver.text, - prompt: PlainText(.localizable.username).foregroundStyle(Color.secondaryTxt) + prompt: Text(.localizable.username).foregroundStyle(Color.secondaryTxt) ) { - PlainText(.localizable.username) + Text(.localizable.username) .foregroundStyle(Color.primaryTxt) } .focused($usernameFieldIsFocused) diff --git a/Nos/Views/ProfileEdit/DeleteUsernameWizard/ConfirmUsernameDeletionSheet.swift b/Nos/Views/ProfileEdit/DeleteUsernameWizard/ConfirmUsernameDeletionSheet.swift index 202fe6c63..cce7a5a1f 100644 --- a/Nos/Views/ProfileEdit/DeleteUsernameWizard/ConfirmUsernameDeletionSheet.swift +++ b/Nos/Views/ProfileEdit/DeleteUsernameWizard/ConfirmUsernameDeletionSheet.swift @@ -42,7 +42,7 @@ struct ConfirmUsernameDeletionSheet: View { await deleteUsername() } } label: { - let label = PlainText(.localizable.deleteUsername) + let label = Text(.localizable.deleteUsername) if isDeleting { ZStack { ProgressView() diff --git a/Nos/Views/ProfileEdit/ProfileEditView.swift b/Nos/Views/ProfileEdit/ProfileEditView.swift index db3490ac6..d7e321a68 100644 --- a/Nos/Views/ProfileEdit/ProfileEditView.swift +++ b/Nos/Views/ProfileEdit/ProfileEditView.swift @@ -179,9 +179,9 @@ fileprivate struct NosNIP05Field: View { VStack(alignment: .leading) { HStack(spacing: 0) { Group { - PlainText(username) + Text(username) .foregroundColor(.primaryTxt) - PlainText("@nos.social") + Text("@nos.social") .foregroundStyle(Color.secondaryTxt) } Spacer(minLength: 10) diff --git a/Nos/Views/ProfileHeader.swift b/Nos/Views/ProfileHeader.swift index b1e3f2e83..a1b0add74 100644 --- a/Nos/Views/ProfileHeader.swift +++ b/Nos/Views/ProfileHeader.swift @@ -75,7 +75,7 @@ struct ProfileHeader: View { VStack(alignment: .leading, spacing: 3) { Spacer() - PlainText(author.safeName) + Text(author.safeName) .lineLimit(1) .font(.clarity(.bold, textStyle: .title3).weight(.semibold)) .foregroundColor(Color.primaryTxt) diff --git a/Nos/Views/ProfileSocialStatsView.swift b/Nos/Views/ProfileSocialStatsView.swift index 6e60307b2..b03a3bb30 100644 --- a/Nos/Views/ProfileSocialStatsView.swift +++ b/Nos/Views/ProfileSocialStatsView.swift @@ -60,10 +60,10 @@ struct ProfileSocialStatsView: View { private func tab(label: LocalizedStringResource, value: Int) -> some View { VStack { - PlainText("\(value)") + Text("\(value)") .font(.title) .foregroundColor(.primaryTxt) - PlainText(String(localized: label).lowercased()) + Text(String(localized: label).lowercased()) .font(.subheadline) .dynamicTypeSize(...DynamicTypeSize.xLarge) .foregroundColor(.secondaryTxt) diff --git a/Nos/Views/RelayPickerToolbarButton.swift b/Nos/Views/RelayPickerToolbarButton.swift index 50eb3456f..8ae103a40 100644 --- a/Nos/Views/RelayPickerToolbarButton.swift +++ b/Nos/Views/RelayPickerToolbarButton.swift @@ -48,7 +48,7 @@ struct RelayPickerToolbarButton: ToolbarContent { action() } label: { HStack { - PlainText(title) + Text(title) .font(.clarity(.bold, textStyle: .title3)) .foregroundColor(.primaryTxt) .bold() diff --git a/Nos/Views/RepostButton.swift b/Nos/Views/RepostButton.swift index 58bbbcea9..1137c0c22 100644 --- a/Nos/Views/RepostButton.swift +++ b/Nos/Views/RepostButton.swift @@ -41,7 +41,7 @@ struct RepostButton: View { } if reposts.count > 0 { - PlainText(reposts.count.description) + Text(reposts.count.description) .font(.clarity(.medium, textStyle: .subheadline)) .foregroundColor(.secondaryTxt) } diff --git a/Nos/Views/SendUSBCBarButtonItem.swift b/Nos/Views/SendUSBCBarButtonItem.swift index d726369f5..3f4e8eb86 100644 --- a/Nos/Views/SendUSBCBarButtonItem.swift +++ b/Nos/Views/SendUSBCBarButtonItem.swift @@ -20,7 +20,7 @@ struct SendUSBCBarButtonItem: View { .frame(width: 22, height: 22) .background(Circle().foregroundColor(.usbcLogoBackground)) - PlainText(.localizable.send) + Text(.localizable.send) .foregroundColor(.primaryTxt) .font(.subheadline) .bold() diff --git a/Nos/Views/SettingsView.swift b/Nos/Views/SettingsView.swift index 16e4b9f8a..2fbae2133 100644 --- a/Nos/Views/SettingsView.swift +++ b/Nos/Views/SettingsView.swift @@ -79,11 +79,11 @@ struct SettingsView: View { .padding(.vertical, 5) } header: { VStack(alignment: .leading, spacing: 10) { - PlainText(.localizable.privateKey) + Text(.localizable.privateKey) .foregroundColor(.primaryTxt) .font(.clarity(.semibold, textStyle: .headline)) - PlainText(.localizable.privateKeyWarning) + Text(.localizable.privateKeyWarning) .foregroundColor(.secondaryTxt) .font(.footnote) } @@ -101,7 +101,7 @@ struct SettingsView: View { Section { VStack { Toggle(isOn: $showReportWarnings) { - PlainText(.localizable.useReportsFromFollows) + Text(.localizable.useReportsFromFollows) .foregroundColor(.primaryTxt) } .onChange(of: showReportWarnings) { _, newValue in @@ -109,7 +109,7 @@ struct SettingsView: View { } HStack { - PlainText(.localizable.useReportsFromFollowsDescription) + Text(.localizable.useReportsFromFollowsDescription) .foregroundColor(.secondaryTxt) .font(.footnote) Spacer() @@ -119,7 +119,7 @@ struct SettingsView: View { VStack { Toggle(isOn: $showOutOfNetworkWarning) { - PlainText(.localizable.showOutOfNetworkWarnings) + Text(.localizable.showOutOfNetworkWarnings) .foregroundColor(.primaryTxt) } .onChange(of: showOutOfNetworkWarning) { _, newValue in @@ -127,7 +127,7 @@ struct SettingsView: View { } HStack { - PlainText(.localizable.showOutOfNetworkWarningsDescription) + Text(.localizable.showOutOfNetworkWarningsDescription) .foregroundColor(.secondaryTxt) .font(.footnote) Spacer() @@ -135,7 +135,7 @@ struct SettingsView: View { } .padding(.bottom, 8) } header: { - PlainText(.localizable.feedSettings) + Text(.localizable.feedSettings) .foregroundColor(.primaryTxt) .font(.clarity(.semibold, textStyle: .headline)) .textCase(nil) @@ -154,7 +154,7 @@ struct SettingsView: View { Section { HStack { - PlainText("\(String(localized: .localizable.appVersion)) \(Bundle.current.versionAndBuild)") + Text("\(String(localized: .localizable.appVersion)) \(Bundle.current.versionAndBuild)") .foregroundColor(.primaryTxt) Spacer() SecondaryActionButton(title: .localizable.shareLogs) { @@ -177,7 +177,7 @@ struct SettingsView: View { } #if DEBUG - PlainText(.localizable.sampleDataInstructions) + Text(.localizable.sampleDataInstructions) .foregroundColor(.primaryTxt) Button(String(localized: .localizable.loadSampleData)) { Task { @@ -192,12 +192,12 @@ struct SettingsView: View { NavigationLink { PublishedEventsView(author: author) } label: { - PlainText(.localizable.allPublishedEvents) + Text(.localizable.allPublishedEvents) } } #endif } header: { - PlainText(.localizable.debug) + Text(.localizable.debug) .foregroundColor(.primaryTxt) .font(.clarity(.semibold, textStyle: .headline)) .textCase(nil) diff --git a/Nos/Views/SideMenuContent.swift b/Nos/Views/SideMenuContent.swift index fd2a876a8..f98108d14 100644 --- a/Nos/Views/SideMenuContent.swift +++ b/Nos/Views/SideMenuContent.swift @@ -47,7 +47,7 @@ struct SideMenuContent: View { Spacer() } if let name = currentUser.author?.safeName { - PlainText(name) + Text(name) .foregroundColor(.primaryTxt) .font(.clarity(.bold, textStyle: .title2)) .padding(.top, 15) @@ -143,7 +143,7 @@ struct SideMenuRow: View { HStack(alignment: .center) { image .font(.clarity(.bold, textStyle: .title3)) - PlainText(title) + Text(title) .font(.clarity(.bold, textStyle: .title3)) .foregroundColor(.primaryTxt) Spacer() diff --git a/Nos/Views/UNS/UNSErrorView.swift b/Nos/Views/UNS/UNSErrorView.swift index de2160317..063500b0f 100644 --- a/Nos/Views/UNS/UNSErrorView.swift +++ b/Nos/Views/UNS/UNSErrorView.swift @@ -17,7 +17,7 @@ struct UNSErrorView: View { .padding(40) .padding(.top, 50) - PlainText(.localizable.oops) + Text(.localizable.oops) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) @@ -25,7 +25,7 @@ struct UNSErrorView: View { .padding(.top, 20) .padding(.bottom, 3) - PlainText(.localizable.anErrorOccurred) + Text(.localizable.anErrorOccurred) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/UNS/UNSNamePicker.swift b/Nos/Views/UNS/UNSNamePicker.swift index ff8609bea..8d54535a4 100644 --- a/Nos/Views/UNS/UNSNamePicker.swift +++ b/Nos/Views/UNS/UNSNamePicker.swift @@ -69,7 +69,7 @@ struct UNSNamePicker: View { } PickerRow(isSelected: isSelected) { - PlainText(name.name) + Text(name.name) .font(.clarity(.bold, textStyle: .title2)) } } @@ -97,7 +97,7 @@ struct UNSNamePicker: View { } TextField(text: $desiredName) { - PlainText(.localizable.createNewName) + Text(.localizable.createNewName) .foregroundColor(.secondaryTxt) } .focused($isTextFieldFocused) diff --git a/Nos/Views/UNS/UNSNameTakenView.swift b/Nos/Views/UNS/UNSNameTakenView.swift index 2eeb35f7d..02d7dfe34 100644 --- a/Nos/Views/UNS/UNSNameTakenView.swift +++ b/Nos/Views/UNS/UNSNameTakenView.swift @@ -14,7 +14,7 @@ struct UNSNameTakenView: View { .padding(40) .padding(.top, 50) - PlainText(.localizable.oops) + Text(.localizable.oops) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) @@ -22,7 +22,7 @@ struct UNSNameTakenView: View { .padding(.top, 20) .padding(.bottom, 3) - PlainText(.localizable.thatNameIsTaken) + Text(.localizable.thatNameIsTaken) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/UNS/UNSNewNameView.swift b/Nos/Views/UNS/UNSNewNameView.swift index 3cc376674..f49fd47ec 100644 --- a/Nos/Views/UNS/UNSNewNameView.swift +++ b/Nos/Views/UNS/UNSNewNameView.swift @@ -17,7 +17,7 @@ struct UNSNewNameView: View { .padding(20) .padding(.top, 50) - PlainText(.localizable.chooseYourName) + Text(.localizable.chooseYourName) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/UNS/UNSSuccessView.swift b/Nos/Views/UNS/UNSSuccessView.swift index 667ee0139..81675d376 100644 --- a/Nos/Views/UNS/UNSSuccessView.swift +++ b/Nos/Views/UNS/UNSSuccessView.swift @@ -18,7 +18,7 @@ struct UNSSuccessView: View { Image.unsCircle.opacity(colorScheme == .dark ? 0.15 : 1) VStack(spacing: 0) { Image.unsCheck - PlainText(controller.nameRecord?.name ?? "") + Text(controller.nameRecord?.name ?? "") .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) @@ -29,7 +29,7 @@ struct UNSSuccessView: View { .padding(20) .padding(.top, 50) - PlainText(.localizable.success) + Text(.localizable.success) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/UNS/UNSVerifyCodeView.swift b/Nos/Views/UNS/UNSVerifyCodeView.swift index c9b857486..278a3e494 100644 --- a/Nos/Views/UNS/UNSVerifyCodeView.swift +++ b/Nos/Views/UNS/UNSVerifyCodeView.swift @@ -22,7 +22,7 @@ struct UNSVerifyCodeView: View { .padding(40) .padding(.top, 50) - PlainText(.localizable.verification) + Text(.localizable.verification) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/UNS/UNSWizardChooseNameView.swift b/Nos/Views/UNS/UNSWizardChooseNameView.swift index 8045355fe..a3afbc8a1 100644 --- a/Nos/Views/UNS/UNSWizardChooseNameView.swift +++ b/Nos/Views/UNS/UNSWizardChooseNameView.swift @@ -19,7 +19,7 @@ struct UNSWizardChooseNameView: View { .padding(20) .padding(.top, 50) - PlainText(.localizable.chooseNameOrRegister) + Text(.localizable.chooseNameOrRegister) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/UNS/UNSWizardIntroView.swift b/Nos/Views/UNS/UNSWizardIntroView.swift index fd77f6460..118d29722 100644 --- a/Nos/Views/UNS/UNSWizardIntroView.swift +++ b/Nos/Views/UNS/UNSWizardIntroView.swift @@ -11,7 +11,7 @@ struct UNSWizardIntroView: View { .padding(40) .padding(.top, 50) - PlainText(.localizable.unsRegister) + Text(.localizable.unsRegister) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift b/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift index 7deb2f8ce..6ddf9f49d 100644 --- a/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift +++ b/Nos/Views/UNS/UNSWizardNeedsPaymentView.swift @@ -16,7 +16,7 @@ struct UNSWizardNeedsPaymentView: View { .padding(40) .padding(.top, 50) - PlainText(.localizable.premiumName) + Text(.localizable.premiumName) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/UNS/UNSWizardPhoneView.swift b/Nos/Views/UNS/UNSWizardPhoneView.swift index 915a3ea35..7be800f5e 100644 --- a/Nos/Views/UNS/UNSWizardPhoneView.swift +++ b/Nos/Views/UNS/UNSWizardPhoneView.swift @@ -22,7 +22,7 @@ struct UNSWizardPhoneView: View { .padding(40) .padding(.top, 50) - PlainText(.localizable.registration) + Text(.localizable.registration) .font(.clarity(.bold, textStyle: .title1)) .multilineTextAlignment(.center) .foregroundColor(.primaryTxt) diff --git a/Nos/Views/UNS/WizardTextField.swift b/Nos/Views/UNS/WizardTextField.swift index 0013e4837..ae7ce63c7 100644 --- a/Nos/Views/UNS/WizardTextField.swift +++ b/Nos/Views/UNS/WizardTextField.swift @@ -8,7 +8,7 @@ struct WizardTextField: View { var body: some View { TextField(text: text) { - PlainText(placeholder) + Text(placeholder) .foregroundColor(.secondaryTxt) } .font(.clarity(.bold, textStyle: .title2)) diff --git a/Nos/Views/UNSNameView.swift b/Nos/Views/UNSNameView.swift index 6fe17f782..0ce2da5fe 100644 --- a/Nos/Views/UNSNameView.swift +++ b/Nos/Views/UNSNameView.swift @@ -16,7 +16,7 @@ struct UNSNameView: View { } label: { HStack(spacing: 3) { Image.unsLogoLight - PlainText(author.uns ?? "") + Text(author.uns ?? "") .foregroundColor(.secondaryTxt) .font(.clarity(.medium, textStyle: .subheadline)) .multilineTextAlignment(.leading) diff --git a/Nos/Views/USBC/WalletConnectErrorView.swift b/Nos/Views/USBC/WalletConnectErrorView.swift index 40f87dd1e..490ad858c 100644 --- a/Nos/Views/USBC/WalletConnectErrorView.swift +++ b/Nos/Views/USBC/WalletConnectErrorView.swift @@ -9,13 +9,13 @@ struct WalletConnectErrorView: View { var body: some View { VStack(spacing: 8) { HStack { - PlainText("😕") + Text("😕") .font(.system(size: 50)) Spacer() } HStack { - PlainText(.localizable.somethingWentWrong) + Text(.localizable.somethingWentWrong) .font(.clarity(.bold, textStyle: .title1)) .foregroundColor(.primaryTxt) .multilineTextAlignment(.leading) @@ -24,7 +24,7 @@ struct WalletConnectErrorView: View { } HStack { - PlainText("\(error.localizedDescription). \(String(localized: .localizable.tryAgainOrContactSupport))") + Text("\(error.localizedDescription). \(String(localized: .localizable.tryAgainOrContactSupport))") .font(.callout) .foregroundColor(.secondaryTxt) Spacer() diff --git a/Nos/Views/USBC/WalletConnectPairingView.swift b/Nos/Views/USBC/WalletConnectPairingView.swift index a7eabc6a1..b251012a1 100644 --- a/Nos/Views/USBC/WalletConnectPairingView.swift +++ b/Nos/Views/USBC/WalletConnectPairingView.swift @@ -11,7 +11,7 @@ struct WalletConnectPairingView: View { var body: some View { VStack { HStack { - PlainText(.localizable.connectGlobalIDTitle) + Text(.localizable.connectGlobalIDTitle) .font(.clarity(.bold, textStyle: .title1)) .foregroundColor(.primaryTxt) .multilineTextAlignment(.leading) @@ -20,7 +20,7 @@ struct WalletConnectPairingView: View { } HStack { - PlainText(.localizable.scanTheWalletConnectQR) + Text(.localizable.scanTheWalletConnectQR) .font(.callout) .foregroundColor(.secondaryTxt) .padding(.vertical, 8) diff --git a/Nos/Views/USBC/WalletConnectSendView.swift b/Nos/Views/USBC/WalletConnectSendView.swift index fcf5ec2ba..a6e88441e 100644 --- a/Nos/Views/USBC/WalletConnectSendView.swift +++ b/Nos/Views/USBC/WalletConnectSendView.swift @@ -8,7 +8,7 @@ struct WalletConnectSendView: View { var body: some View { VStack { HStack { - PlainText(.localizable.sendUSBC) + Text(.localizable.sendUSBC) .font(.clarity(.bold, textStyle: .title1)) .foregroundColor(.primaryTxt) .multilineTextAlignment(.leading) @@ -17,7 +17,7 @@ struct WalletConnectSendView: View { } HStack { - PlainText(.localizable.sendTo) + Text(.localizable.sendTo) .font(.callout) .foregroundColor(.secondaryTxt) .padding(.vertical, 8) @@ -53,7 +53,7 @@ struct WalletConnectSendView: View { ) HStack { - PlainText(.localizable.amount) + Text(.localizable.amount) .font(.callout) .foregroundColor(.secondaryTxt) .padding(.top, 16) @@ -63,7 +63,7 @@ struct WalletConnectSendView: View { ZStack { TextField(text: $amount) { - PlainText("1,000") + Text("1,000") .foregroundColor(.secondaryTxt) } .keyboardType(.decimalPad) diff --git a/Nos/Views/USBCBalanceBarButtonItem.swift b/Nos/Views/USBCBalanceBarButtonItem.swift index 66f23555e..51b923dc4 100644 --- a/Nos/Views/USBCBalanceBarButtonItem.swift +++ b/Nos/Views/USBCBalanceBarButtonItem.swift @@ -32,7 +32,7 @@ struct USBCBalanceBarButtonItem: View { .frame(width: 22, height: 22) .background(Circle().foregroundColor(.usbcLogoBackground)) - PlainText(formattedBalance) + Text(formattedBalance) .font(.subheadline) .foregroundColor(.primaryTxt) .bold() From be91f728497fe62cd4f00e094a7af516ab7327d8 Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 25 Mar 2024 17:48:45 -0400 Subject: [PATCH 09/11] fix indentation --- Nos/Views/NoteTextEditor.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Nos/Views/NoteTextEditor.swift b/Nos/Views/NoteTextEditor.swift index 0f2f19a0f..95f8a41d8 100644 --- a/Nos/Views/NoteTextEditor.swift +++ b/Nos/Views/NoteTextEditor.swift @@ -25,12 +25,12 @@ struct NoteTextEditor: View { var body: some View { EditableText($text, guid: guid, showKeyboard: true) .placeholder(when: text.isEmpty, placeholder: { - VStack { - Text(placeholder) - .foregroundColor(.secondaryTxt) - .padding(.top, 10) - .padding(.leading, 6) - Spacer() + VStack { + Text(placeholder) + .foregroundColor(.secondaryTxt) + .padding(.top, 10) + .padding(.leading, 6) + Spacer() } }) .padding(.leading, 6) From debd6f45039b143852f51534c494b4248b87998f Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 25 Mar 2024 18:06:34 -0400 Subject: [PATCH 10/11] update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d316fa10a..4d89376b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - Added a new UI for replying to messages that allows attaching images and setting an expiration date. +- Updated dark theme colors for card backgrounds, primary text, and secondary text. ## [0.1.7] - 2024-03-21Z From d45d64c63327fa78fc5b4359af47f2cb82564f80 Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 25 Mar 2024 18:18:01 -0400 Subject: [PATCH 11/11] hopefully avoiding a merge conflict --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d89376b4..5f66bf7a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- Added a new UI for replying to messages that allows attaching images and setting an expiration date. - Updated dark theme colors for card backgrounds, primary text, and secondary text. +- Added a new UI for replying to messages that allows attaching images and setting an expiration date. ## [0.1.7] - 2024-03-21Z